Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Use modulesync to manage meta files
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanevet committed Oct 27, 2014
1 parent 0161370 commit 79d994e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
language: ruby
bundler_args: --without development
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
after_success:
["git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng", ".forge-releng/publish"]
env:
global:
- PUBLISHER_LOGIN=camptocamp
- secure: "l2uNtqjFDAjJ5iUklkQuWbErS3QxF7YV6wtJOnRXATJsEF9RVF5wb+kujThpbb13i0ymvxPnDaqxv6RFUqn2tkYuR2nGO3J2Lx3N8uQbBnuO4Clnphf1Iin+pCQq25KQ/Xv4UbYZIbrvOV7ULSxcfVb3oNYVxdB/uSECEJ7LbKw="
matrix:
fast_finish: true
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 1.9.3
Expand Down
21 changes: 21 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,24 @@
PuppetlabsSpec::Files.cleanup
end
end

require 'pathname'
dir = Pathname.new(__FILE__).parent
Puppet[:modulepath] = File.join(dir, 'fixtures', 'modules')

# There's no real need to make this version dependent, but it helps find
# regressions in Puppet
#
# 1. Workaround for issue #16277 where default settings aren't initialised from
# a spec and so the libdir is never initialised (3.0.x)
# 2. Workaround for 2.7.20 that now only loads types for the current node
# environment (#13858) so Puppet[:modulepath] seems to get ignored
# 3. Workaround for 3.5 where context hasn't been configured yet,
# ticket https://tickets.puppetlabs.com/browse/MODULES-823
#
ver = Gem::Version.new(Puppet.version.split('-').first)
if Gem::Requirement.new("~> 2.7.20") =~ ver || Gem::Requirement.new("~> 3.0.0") =~ ver || Gem::Requirement.new("~> 3.5") =~ ver
puts "augeasproviders: setting Puppet[:libdir] to work around broken type autoloading"
# libdir is only a single dir, so it can only workaround loading of one external module
Puppet[:libdir] = "#{Puppet[:modulepath]}/augeasproviders_core/lib"
end

0 comments on commit 79d994e

Please sign in to comment.