diff --git a/.fixtures.yml b/.fixtures.yml index 8fe93ac..dc753b5 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -5,6 +5,6 @@ fixtures: ref: "4.1.0" concat: repo: "puppetlabs/concat" - ref: "1.2.0" + ref: "1.2.1" symlinks: sudo: "#{source_dir}" diff --git a/.travis.yml b/.travis.yml index f909898..4897347 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,36 +2,29 @@ language: ruby sudo: false bundler_args: --without development before_install: rm Gemfile.lock || true -rvm: -- 1.9 -- 2.0 -- 2.1 script: bundle exec rake test -env: -- PUPPET_VERSION="~> 3.6.0" STRICT_VARIABLES=true -- PUPPET_VERSION="~> 3.7.0" STRICT_VARIABLES=true -- PUPPET_VERSION="~> 3.8.0" STRICT_VARIABLES=true -- PUPPET_VERSION="~> 3.8.0" STRICT_VARIABLES=true PARSER="future" -- PUPPET_VERSION="~> 4.0.0" STRICT_VARIABLES=true -- PUPPET_VERSION="~> 4.1.0" STRICT_VARIABLES=true -- PUPPET_VERSION="~> 4.2.0" STRICT_VARIABLES=true matrix: - exclude: - - rvm: 1.9 - env: PUPPET_VERSION="~> 4.0.0" STRICT_VARIABLES=true - - rvm: 1.9 - env: PUPPET_VERSION="~> 4.1.0" STRICT_VARIABLES=true - - rvm: 1.9 - env: PUPPET_VERSION="~> 4.2.0" STRICT_VARIABLES=true - - rvm: 2.0 - env: PUPPET_VERSION="~> 4.0.0" STRICT_VARIABLES=true - - rvm: 2.0 - env: PUPPET_VERSION="~> 4.1.0" STRICT_VARIABLES=true - - rvm: 2.0 - env: PUPPET_VERSION="~> 4.2.0" STRICT_VARIABLES=true -notifications: - slack: - secure: Bgqq8f5Ej+g78Iy8o0HSexx4OyCrO2eNrSiev8O8FCB2zQSNZ82EUnuXwDq5LeHJZb3eTBM/6NcAYeXRNuHwgniQQef9xiHC8uBvV3pMstAe5pa+9l7OaXzKyMrVhbjUfqZUhnRYPHY+OYgUMb4UfotfxvRCduPj1YhMrSVXocs= + fast_finish: true + include: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 3.6.0" STRICT_VARIABLES=true + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 3.7.0" STRICT_VARIABLES=true + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 3.8.5" STRICT_VARIABLES=true + - rvm: 2.1.9 + env: PUPPET_GEM_VERSION="~> 3.8.5" STRICT_VARIABLES=true FUTURE_PARSER="yes" + - rvm: 2.1.9 + env: PUPPET_GEM_VERSION="~> 4.5.0" STRICT_VARIABLES=true + - rvm: 2.1.9 + env: PUPPET_GEM_VERSION="~> 4.7.0" STRICT_VARIABLES=true + - rvm: 2.1.9 + env: PUPPET_GEM_VERSION="~> 4.8.0" STRICT_VARIABLES=true + - rvm: 2.1.9 + env: PUPPET_GEM_VERSION="~> 4.9.0" STRICT_VARIABLES=true + - rvm: 2.1.9 + env: PUPPET_GEM_VERSION="~> 4.10.4" STRICT_VARIABLES=true + deploy: provider: puppetforge user: abstractit @@ -39,7 +32,9 @@ deploy: secure: ZbtzOD15CmlaLJ0zK2qwLLaqXDk+Ile/2nGwZQ3pV5+cx6ILBVHN/cH0PaddVM9z2bV8k/sHN9ZCe5NXEyC54Vta8jCgLvIckS0tRqNICagn5BMhyEg5jSP7IIDhM9pWgF9KiJyMtx+8iWIt6h7v5+HbOylUuSUyhA0ewpFp2GA= on: tags: true - rvm: 2.1 + # all_branches is required to use tags + all_branches: true + rvm: 2.1.9 condition: - - $PUPPET_VERSION = '~> 4.2.0' + - $PUPPET_GEM_VERSION = '4.10.4' - $STRICT_VARIABLES = true diff --git a/Gemfile b/Gemfile index d91e883..f650d17 100644 --- a/Gemfile +++ b/Gemfile @@ -1,26 +1,37 @@ source 'https://rubygems.org' +def location_for(place, fake_version = nil) + if place =~ /^(git:[^#]*)#(.*)/ + [fake_version, { :git => $1, :branch => $2, :require => false }].compact + elsif place =~ /^file:\/\/(.*)/ + ['>= 0', { :path => File.expand_path($1), :require => false }] + else + [place, { :require => false }] + end +end + group :test do - gem 'rake' - gem 'puppet', ENV['PUPPET_VERSION'] || '~> 4.2.0' - gem 'puppet-lint', :git => 'https://github.com/rodjek/puppet-lint' - gem 'puppet-lint-unquoted_string-check', :require => false - gem 'puppet-lint-empty_string-check', :require => false - gem 'puppet-lint-leading_zero-check', :require => false - gem 'puppet-lint-variable_contains_upcase', :require => false + gem "rspec-core", '3.5.4', :require => false + gem "rspec-puppet", '2.5.0', :require => false + gem 'puppetlabs_spec_helper', '2.1.0', :require => false + gem 'rspec-puppet-facts', '1.7.1', :require => false + gem "puppet-syntax", '2.1.0', :require => false + gem 'metadata-json-lint', :require => false + gem 'simplecov', :require => false + gem 'json', '1.8.5', :require => false + gem "puppet-blacksmith", :require => false + gem 'pry', '<= 0.9.8', :require => false + gem 'puppet-lint', '2.0.2', :require => false + gem 'puppet-lint-unquoted_string-check', :require => false + gem 'puppet-lint-empty_string-check', :require => false + gem 'puppet-lint-leading_zero-check', :require => false + gem 'puppet-lint-variable_contains_upcase', :require => false gem 'puppet-lint-spaceship_operator_without_tag-check', :require => false - gem 'puppet-lint-absolute_classname-check', :require => false - gem 'puppet-lint-undef_in_function-check', :require => false - gem 'puppet-lint-roles_and_profiles-check', :require => false - gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet'#'~> 2.1' - gem 'rspec-puppet-facts', :git => 'https://github.com/mcanevet/rspec-puppet-facts',:require => false - gem "puppet-syntax" - gem 'metadata-json-lint', :require => false - gem 'puppetlabs_spec_helper', :git => 'https://github.com/puppetlabs/puppetlabs_spec_helper' - gem "rspec", '< 3.2.0' - # gem 'coveralls', require: false - gem 'pry', '<= 0.9.8' - gem "puppet-blacksmith" + gem 'puppet-lint-absolute_classname-check', :require => false + gem 'puppet-lint-undef_in_function-check', :require => false + gem 'puppet-lint-roles_and_profiles-check', :require => false + # gem "rspec-puppet", :require => false + # gem 'ci_reporter', :require => false end group :development do @@ -29,3 +40,38 @@ group :development do # gem "beaker", :git => 'https://github.com/puppetlabs/beaker.git' # gem "beaker-rspec" end + +# group :system_tests do +# if beaker_version = ENV['BEAKER_VERSION'] +# gem 'beaker', *location_for(beaker_version) +# end +# if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION'] +# gem 'beaker-rspec', *location_for(beaker_rspec_version) +# else +# gem 'beaker-rspec', :require => false +# end +# gem 'serverspec', :require => false +# gem 'beaker-puppet_install_helper', :require => false +# end + +# puppet requires json_pure; json_pure > 2.0.1 requires Ruby 2 +# so force the older json_pure in the case of older ruby +gem 'json_pure', '< 2.0.2', :require => false, :platforms => [:ruby_18, :ruby_19] + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +if facterversion = ENV['FACTER_GEM_VERSION'] + gem 'facter', facterversion, :require => false +else + gem 'facter', :require => false +end + +if hieraversion = ENV['HIERA_GEM_VERSION'] + gem 'hiera', hieraversion, :require => false +else + gem 'hiera', :require => false +end diff --git a/Gemfile.lock b/Gemfile.lock index b06c40e..262779e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,152 +1,151 @@ -GIT - remote: https://github.com/mcanevet/rspec-puppet-facts - revision: dbdf4deda25d03e9a68d462dc5adfc0fda5ab4ca - specs: - rspec-puppet-facts (1.1.1) - facter - facterdb (>= 0.2.0) - json - puppet - -GIT - remote: https://github.com/puppetlabs/puppetlabs_spec_helper - revision: ea5d01fd13aef495b2c7da8e802a3939966f6729 - specs: - puppetlabs_spec_helper (0.10.3) - mocha - puppet-lint - puppet-syntax - rake - rspec-puppet - -GIT - remote: https://github.com/rodjek/puppet-lint - revision: 2546fed6be894bbcff15c3f48d4b6f6bc15d94d1 - specs: - puppet-lint (1.1.0) - -GIT - remote: https://github.com/rodjek/rspec-puppet - revision: 7659172a5f47c286c03ba6fa76a39cac1087c324 - specs: - rspec-puppet (2.2.1.pre) - rspec - GEM remote: https://rubygems.org/ specs: - CFPropertyList (2.2.8) - addressable (2.3.8) - backports (3.6.6) + addressable (2.4.0) + backports (3.6.8) coderay (1.0.9) - diff-lcs (1.2.5) - domain_name (0.5.25) + diff-lcs (1.3) + docile (1.1.5) + domain_name (0.5.20170223) unf (>= 0.0.5, < 1.0.0) - ethon (0.8.0) + ethon (0.10.1) ffi (>= 1.3.0) - facter (2.4.4) - CFPropertyList (~> 2.2.6) - facterdb (0.2.1) + facter (2.4.6) + facterdb (0.3.10) facter jgrep - json - faraday (0.9.2) + faraday (0.11.0) multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - ffi (1.9.10) - gh (0.14.0) - addressable + faraday_middleware (0.11.0.1) + faraday (>= 0.7.4, < 1.0) + fast_gettext (1.1.0) + ffi (1.9.18) + gettext (3.2.2) + locale (>= 2.0.5) + text (>= 1.3.0) + gettext-setup (0.18) + fast_gettext (~> 1.1.0) + gettext (>= 3.0.2) + locale + gh (0.15.1) + addressable (~> 2.4.0) backports faraday (~> 0.8) multi_json (~> 1.0) - net-http-persistent (>= 2.7) + net-http-persistent (~> 2.9) net-http-pipeline - hiera (3.0.1) - json_pure + hiera (3.2.2) highline (1.7.8) - http-cookie (1.0.2) + http-cookie (1.0.3) domain_name (~> 0.5) - jgrep (1.3.3) + jgrep (1.4.1) json - json (1.8.3) - json_pure (1.8.3) + json (1.8.5) + json_pure (1.8.6) launchy (2.4.3) addressable (~> 2.3) + locale (2.1.2) + mcollective-client (2.10.2) + json + stomp + systemu metaclass (0.0.4) - metadata-json-lint (0.0.11) + metadata-json-lint (1.1.0) json + semantic_puppet (>= 0.1.2, < 2.0.0) spdx-licenses (~> 1.0) - method_source (0.7.1) - mime-types (2.6.2) - mocha (1.1.0) + method_source (0.8.2) + mime-types (2.99.3) + mocha (1.2.1) metaclass (~> 0.0.1) - multi_json (1.11.2) + multi_json (1.12.1) multipart-post (2.0.0) net-http-persistent (2.9.4) net-http-pipeline (1.0.1) - netrc (0.10.3) + netrc (0.11.0) pry (0.9.8) coderay (~> 1.0.5) method_source (~> 0.7) slop (>= 2.4.3, < 3) - puppet (4.2.2) + puppet (4.7.0) facter (> 2.0, < 4) hiera (>= 2.0, < 4) - json_pure - puppet-blacksmith (3.3.1) + json_pure (~> 1.8) + puppet-blacksmith (3.4.0) puppet (>= 2.7.16) - rest-client - puppet-lint-absolute_classname-check (0.1.3) - puppet-lint (~> 1.0) - puppet-lint-empty_string-check (0.2.1) - puppet-lint (~> 1.0) - puppet-lint-leading_zero-check (0.1.0) - puppet-lint (~> 1.0) - puppet-lint-roles_and_profiles-check (0.1.0) - puppet-lint (~> 1.0) - puppet-lint-spaceship_operator_without_tag-check (0.1.0) - puppet-lint (~> 1.0) - puppet-lint-undef_in_function-check (0.1.0) - puppet-lint (~> 1.0) - puppet-lint-unquoted_string-check (0.2.5) - puppet-lint (~> 1.0) - puppet-lint-variable_contains_upcase (1.0.0) - puppet-lint (~> 1.0) - puppet-syntax (2.0.0) + rest-client (~> 1.8.0) + puppet-lint (2.0.2) + puppet-lint-absolute_classname-check (0.2.4) + puppet-lint (>= 1.0, < 3.0) + puppet-lint-empty_string-check (0.2.2) + puppet-lint (>= 1.0, < 3.0) + puppet-lint-leading_zero-check (0.1.1) + puppet-lint (>= 1.0, < 3.0) + puppet-lint-roles_and_profiles-check (0.1.1) + puppet-lint (>= 1.0, < 3.0) + puppet-lint-spaceship_operator_without_tag-check (0.1.1) + puppet-lint (>= 1.0, < 3.0) + puppet-lint-undef_in_function-check (0.2.1) + puppet-lint (>= 1.0, < 3.0) + puppet-lint-unquoted_string-check (0.3.0) + puppet-lint (>= 1.0, < 3.0) + puppet-lint-variable_contains_upcase (1.2.0) + puppet-lint (>= 1.0, < 3.0) + puppet-syntax (2.1.0) rake + puppetlabs_spec_helper (2.1.0) + mocha (~> 1.0) + puppet-lint (~> 2.0) + puppet-syntax (~> 2.0) + rspec-puppet (~> 2.0) pusher-client (0.6.2) json websocket (~> 1.0) - rake (10.4.2) + rake (12.0.0) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - slop (2.4.4) - spdx-licenses (1.0.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-puppet (2.5.0) + rspec + rspec-puppet-facts (1.7.1) + facter + facterdb (>= 0.3.0) json - travis (1.8.0) - addressable (~> 2.3) + mcollective-client + puppet + rspec-support (3.5.0) + semantic_puppet (0.1.4) + gettext-setup (>= 0.3) + simplecov (0.14.1) + docile (~> 1.1.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + slop (2.4.4) + spdx-licenses (1.1.0) + stomp (1.4.3) + systemu (2.6.5) + text (1.3.1) + travis (1.8.8) backports faraday (~> 0.9) faraday_middleware (~> 0.9, >= 0.9.1) gh (~> 0.13) highline (~> 1.6) launchy (~> 2.1) - pry (~> 0.9, < 0.10) pusher-client (~> 0.4) typhoeus (~> 0.6, >= 0.6.8) travis-lint (2.0.0) @@ -155,18 +154,22 @@ GEM ethon (>= 0.8.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.1) - websocket (1.2.2) + unf_ext (0.0.7.2) + websocket (1.2.4) PLATFORMS ruby DEPENDENCIES + facter + hiera + json (= 1.8.5) + json_pure (< 2.0.2) metadata-json-lint pry (<= 0.9.8) - puppet (~> 4.2.0) + puppet puppet-blacksmith - puppet-lint! + puppet-lint (= 2.0.2) puppet-lint-absolute_classname-check puppet-lint-empty_string-check puppet-lint-leading_zero-check @@ -175,14 +178,14 @@ DEPENDENCIES puppet-lint-undef_in_function-check puppet-lint-unquoted_string-check puppet-lint-variable_contains_upcase - puppet-syntax - puppetlabs_spec_helper! - rake - rspec (< 3.2.0) - rspec-puppet! - rspec-puppet-facts! + puppet-syntax (= 2.1.0) + puppetlabs_spec_helper (= 2.1.0) + rspec-core (= 3.5.4) + rspec-puppet (= 2.5.0) + rspec-puppet-facts (= 1.7.1) + simplecov travis travis-lint BUNDLED WITH - 1.10.6 + 1.14.6 diff --git a/metadata.json b/metadata.json index 4604dc2..6306cd9 100644 --- a/metadata.json +++ b/metadata.json @@ -17,14 +17,20 @@ ] } ], + "requirements": [ + { + "name": "puppet", + "version_requirement": ">=3.0.0 <5.0.0" + } + ], "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">=4.1.0" + "version_requirement": ">=4.1.0 <5.0.0" }, { "name": "puppetlabs/concat", - "version_requirement": ">=1.2.0" + "version_requirement": ">=1.2.1 <2.0.0" } ] -} \ No newline at end of file +}