Skip to content

Commit

Permalink
Merge ddd4ca2 into 169d2cd
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink committed Mar 1, 2019
2 parents 169d2cd + ddd4ca2 commit 84028c8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
19 changes: 5 additions & 14 deletions .travis.yml
@@ -1,29 +1,20 @@
language: ruby
dist: precise
sudo: required
rvm:
- 2.1.9
# Ruby with Puppet 5
- 2.4.0
- 2.4.4
notifications:
email:
- raphael.pinson@camptocamp.com
env:
# base env
# Test Puppet 4
- PUPPET=4.0 RUBY_AUGEAS=0.5
# Test Oldest Puppet, Inc. supported Puppet
- PUPPET=4.7.1 RUBY_AUGEAS=0.5 FORGE_PUBLISH=true
# Test latest Puppet 5 version
- PUPPET=5.5 RUBY_AUGEAS=0.5 FORGE_PUBLISH=true
# Test latest Puppet version
- PUPPET=5.0 RUBY_AUGEAS=0.5
- PUPPET=6 RUBY_AUGEAS=0.5

matrix:
fast_finish: true
exclude:
# base exclude
# No support for Ruby 2.1.9 in Puppet 5
- rvm: 2.1.9
env: PUPPET=5.0 RUBY_AUGEAS=0.5

install:
- "travis_retry ./.travis.sh"
Expand All @@ -41,5 +32,5 @@ deploy:
# all_branches is required to use tags
all_branches: true
# Only publish if our main Ruby target builds
rvm: 2.1.9
rvm: 2.4.4
condition: "$FORGE_PUBLISH = true"
38 changes: 22 additions & 16 deletions metadata.json
Expand Up @@ -5,13 +5,13 @@
"summary": "Augeas-based mounttab provider for Puppet",
"license": "Apache-2.0",
"source": "https://github.com/hercules-team/augeasproviders_mounttab",
"project_page": "http://augeasproviders.com",
"project_page": "https://github.com/hercules-team/augeasproviders_mounttab",
"issues_url": "https://github.com/hercules-team/augeasproviders_mounttab/issues",
"description": "This module provides a provider for the mounttab type using the Augeas configuration API library.",
"dependencies": [
{
"name": "herculesteam/augeasproviders_core",
"version_requirement": ">= 2.0.0"
"version_requirement": ">= 2.4.0 <3.0.0"
},
{
"name": "puppetlabs/mount_providers",
Expand All @@ -22,37 +22,43 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"5",
"6",
"7",
"8"
"8",
"9"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"12.04",
"12.10",
"14.04",
"14.10",
"15.10",
"16.04"
"16.04",
"18.04",
"18.10"
]
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"4",
"5",
"6",
"7"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"6",
"7"
]
}
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 2.7.0 < 6.0.0"
}
{ "name": "puppet", "version_requirement": ">= 5.0.0 < 6.0.0" }
]
}
17 changes: 11 additions & 6 deletions spec/spec_helper.rb
Expand Up @@ -34,12 +34,17 @@
# 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 || Gem::Requirement.new("~> 4.0") =~ ver || Gem::Requirement.new("~> 5.0") =~ 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"
# Ugly hack, because there can only be one libdir
`rsync -a #{Puppet[:modulepath]}/mount_providers/lib/ #{Puppet[:modulepath]}/augeasproviders_core/lib`
if ver >= Gem::Version.new("2.7.20")
puts "augeasproviders: setting $LOAD_PATH to work around broken type autoloading"
Puppet.initialize_settings
$LOAD_PATH.unshift(
dir,
File.join(dir, 'fixtures/modules/augeasproviders_core/spec/lib'),
File.join(dir, 'fixtures/modules/augeasproviders_core/lib'),
File.join(dir, 'fixtures/modules/mount_providers/lib'),
)

$LOAD_PATH.unshift(File.join(dir, '..', 'lib'))
end

# Load all shared contexts and shared examples
Expand Down

0 comments on commit 84028c8

Please sign in to comment.