From ec198edcbf020c549df48c96022597e7d78df215 Mon Sep 17 00:00:00 2001 From: Phil Friderici Date: Fri, 8 Jan 2016 11:43:50 +0000 Subject: [PATCH] Modernize Travis setup - let Travis test all Puppet version from 3.1.0 to 4.3.0 - let Travis test with FUTURE_PARSER and STRICT_VARIABLES - add json test for metadata.json and let Travis validate it - remove and ignore Gemfile.lock to allow different Puppet versions to get tested --- .gitignore | 3 +- .travis.yml | 51 ++++++-- Gemfile | 17 ++- Gemfile.lock | 347 --------------------------------------------------- 4 files changed, 60 insertions(+), 358 deletions(-) delete mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index 6f3bc6d..3b3ab7f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ log/ junit/ .yar* doc/ -coverage/ \ No newline at end of file +coverage/ +Gemfile.lock diff --git a/.travis.yml b/.travis.yml index 0ba7f6d..50f3d00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,15 +2,52 @@ sudo: false language: ruby bundler_args: --without system_tests development -script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" +script: "bundle exec metadata-json-lint metadata.json && bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" rvm: + - 1.8.7 - 1.9.3 - 2.0.0 + - 2.1.0 + +env: + matrix: + - PUPPET_GEM_VERSION="~> 3.1.0" + - PUPPET_GEM_VERSION="~> 3.2.0" + - PUPPET_GEM_VERSION="~> 3.3.0" + - PUPPET_GEM_VERSION="~> 3.4.0" + - PUPPET_GEM_VERSION="~> 3.5.0" + - PUPPET_GEM_VERSION="~> 3.6.0" + - PUPPET_GEM_VERSION="~> 3.7.0" + - PUPPET_GEM_VERSION="~> 3.8.0" + - PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes" + - PUPPET_GEM_VERSION="~> 4.0.0" + - PUPPET_GEM_VERSION="~> 4.1.0" + - PUPPET_GEM_VERSION="~> 4.2.0" + - PUPPET_GEM_VERSION="~> 4.3.0" + - PUPPET_GEM_VERSION="~> 4" + - PUPPET_GEM_VERSION="~> 4" STRICT_VARIABLES="yes" + matrix: exclude: - - rvm: 2.0.0 - env: PUPPET_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_VERSION="~> 3.1.0" - - rvm: 1.9.3 - env: PUPPET_VERSION="~> 2.7.0" \ No newline at end of file + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: 2.1.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: 2.1.0 + env: PUPPET_GEM_VERSION="~> 3.2.0" + - rvm: 2.1.0 + env: PUPPET_GEM_VERSION="~> 3.3.0" + - rvm: 2.1.0 + env: PUPPET_GEM_VERSION="~> 3.4.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4.0.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4.1.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4.2.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4.3.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 4" STRICT_VARIABLES="yes" diff --git a/Gemfile b/Gemfile index 6a777eb..d294874 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,18 @@ source 'http://rubygems.org' group :test do + if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false + else + gem 'puppet', ENV['PUPPET_VERSION'] || '~> 3.8.0' + end + + # rspec must be v2 for ruby 1.8.7 + if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' + gem 'rspec', '~> 2.0' + end + gem 'rake' - gem 'puppet', ENV['PUPPET_VERSION'] || '~> 3.8.0' gem 'puppet-lint' gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git' gem 'puppet-syntax' @@ -16,10 +26,11 @@ group :development do gem 'travis-lint' gem 'puppet-blacksmith' gem 'guard-rake' - gem 'puppet-module' + end group :system_tests do gem 'beaker' gem 'beaker-rspec' -end \ No newline at end of file +end + diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 7e4a6d5..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,347 +0,0 @@ -GIT - remote: https://github.com/rodjek/rspec-puppet.git - revision: a9a837669cf6955279f02d1d9b524dc140b9d3e8 - specs: - rspec-puppet (2.0.1) - rspec - -GEM - remote: http://rubygems.org/ - specs: - CFPropertyList (2.3.0) - activesupport (4.2.0) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - addressable (2.3.7) - autoparse (0.3.3) - addressable (>= 2.3.1) - extlib (>= 0.9.15) - multi_json (>= 1.0.0) - aws-sdk (1.63.0) - aws-sdk-v1 (= 1.63.0) - aws-sdk-v1 (1.63.0) - json (~> 1.4) - nokogiri (>= 1.4.4) - backports (3.6.4) - beaker (2.6.0) - aws-sdk (~> 1.57) - docker-api - fission (~> 0.4) - fog (~> 1.25) - google-api-client (~> 0.8) - hocon (~> 0.0.4) - inifile (~> 2.0) - json (~> 1.8) - minitest (~> 5.4) - net-scp (~> 1.2) - net-ssh (~> 2.9) - rbvmomi (~> 1.8) - rsync (~> 1.0.9) - unf (~> 0.1) - beaker-rspec (5.0.1) - beaker (~> 2.0) - rspec - serverspec (~> 2) - specinfra (~> 2) - builder (3.2.2) - celluloid (0.16.0) - timers (~> 4.0.0) - coderay (1.1.0) - diff-lcs (1.2.5) - docile (1.1.5) - docker-api (1.20.0) - excon (>= 0.38.0) - json - ethon (0.7.3) - ffi (>= 1.3.0) - excon (0.44.4) - extlib (0.9.16) - facter (1.7.6) - faraday (0.9.1) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.9.1) - faraday (>= 0.7.4, < 0.10) - ffi (1.9.8) - fission (0.5.0) - CFPropertyList (~> 2.2) - fog (1.28.0) - fog-atmos - fog-aws (~> 0.0) - fog-brightbox (~> 0.4) - fog-core (~> 1.27, >= 1.27.3) - fog-ecloud - fog-json - fog-profitbricks - fog-radosgw (>= 0.0.2) - fog-riakcs - fog-sakuracloud (>= 0.0.4) - fog-serverlove - fog-softlayer - fog-storm_on_demand - fog-terremark - fog-vmfusion - fog-voxel - fog-xml (~> 0.1.1) - ipaddress (~> 0.5) - nokogiri (~> 1.5, >= 1.5.11) - fog-atmos (0.1.0) - fog-core - fog-xml - fog-aws (0.1.1) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-brightbox (0.7.1) - fog-core (~> 1.22) - fog-json - inflecto (~> 0.0.2) - fog-core (1.29.0) - builder - excon (~> 0.38) - formatador (~> 0.2) - mime-types - net-scp (~> 1.1) - net-ssh (>= 2.1.3) - fog-ecloud (0.0.2) - fog-core - fog-xml - fog-json (1.0.0) - multi_json (~> 1.0) - fog-profitbricks (0.0.1) - fog-core - fog-xml - nokogiri - fog-radosgw (0.0.3) - fog-core (>= 1.21.0) - fog-json - fog-xml (>= 0.0.1) - fog-riakcs (0.1.0) - fog-core - fog-json - fog-xml - fog-sakuracloud (1.0.0) - fog-core - fog-json - fog-serverlove (0.1.1) - fog-core - fog-json - fog-softlayer (0.4.1) - fog-core - fog-json - fog-storm_on_demand (0.1.0) - fog-core - fog-json - fog-terremark (0.0.4) - fog-core - fog-xml - fog-vmfusion (0.0.1) - fission - fog-core - fog-voxel (0.0.2) - fog-core - fog-xml - fog-xml (0.1.1) - fog-core - nokogiri (~> 1.5, >= 1.5.11) - formatador (0.2.5) - gh (0.14.0) - addressable - backports - faraday (~> 0.8) - multi_json (~> 1.0) - net-http-persistent (>= 2.7) - net-http-pipeline - google-api-client (0.8.2) - activesupport (>= 3.2) - addressable (~> 2.3) - autoparse (~> 0.3) - extlib (~> 0.9) - faraday (~> 0.9) - launchy (~> 2.4) - multi_json (~> 1.10) - retriable (~> 1.4) - signet (~> 0.6) - guard (2.12.5) - formatador (>= 0.2.4) - listen (~> 2.7) - lumberjack (~> 1.0) - nenv (~> 0.1) - notiffany (~> 0.0) - pry (>= 0.9.12) - shellany (~> 0.0) - thor (>= 0.18.1) - guard-rake (1.0.0) - guard - rake - hiera (1.3.4) - json_pure - highline (1.7.1) - hitimes (1.2.2) - hocon (0.0.7) - i18n (0.7.0) - inflecto (0.0.2) - inifile (2.0.2) - ipaddress (0.8.0) - json (1.8.2) - json_pure (1.8.2) - jwt (1.4.1) - launchy (2.4.3) - addressable (~> 2.3) - listen (2.9.0) - celluloid (>= 0.15.2) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - lumberjack (1.0.9) - metaclass (0.0.4) - metadata-json-lint (0.0.6) - json - spdx-licenses (~> 1.0) - method_source (0.8.2) - mime-types (2.4.3) - mini_portile (0.6.2) - minitest (5.5.1) - mocha (1.1.0) - metaclass (~> 0.0.1) - multi_json (1.11.0) - multipart-post (2.0.0) - nenv (0.2.0) - net-http-persistent (2.9.4) - net-http-pipeline (1.0.1) - net-scp (1.2.1) - net-ssh (>= 2.6.5) - net-ssh (2.9.2) - netrc (0.10.3) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) - notiffany (0.0.6) - nenv (~> 0.1) - shellany (~> 0.0) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) - slop (~> 3.4) - puppet (3.8.1) - facter (> 1.6, < 3) - hiera (~> 1.0) - json_pure - puppet-blacksmith (3.2.0) - puppet (>= 2.7.16) - rest-client - puppet-lint (1.1.0) - puppet-module (0.3.4) - puppet-syntax (2.0.0) - rake - puppetlabs_spec_helper (0.10.0) - mocha - puppet-lint - puppet-syntax - rake - rspec-puppet - pusher-client (0.6.0) - json - websocket (~> 1.0) - rake (10.4.2) - rb-fsevent (0.9.4) - rb-inotify (0.9.5) - ffi (>= 0.5.0) - rbvmomi (1.8.2) - builder - nokogiri (>= 1.4.1) - trollop - rest-client (1.7.3) - mime-types (>= 1.16, < 3.0) - netrc (~> 0.7) - retriable (1.4.1) - rspec (3.2.0) - rspec-core (~> 3.2.0) - rspec-expectations (~> 3.2.0) - rspec-mocks (~> 3.2.0) - rspec-core (3.2.2) - rspec-support (~> 3.2.0) - rspec-expectations (3.2.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.2.0) - rspec-its (1.2.0) - rspec-core (>= 3.0.0) - rspec-expectations (>= 3.0.0) - rspec-mocks (3.2.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.2.0) - rspec-support (3.2.2) - rsync (1.0.9) - serverspec (2.10.1) - multi_json - rspec (~> 3.0) - rspec-its - specinfra (~> 2.15) - shellany (0.0.1) - signet (0.6.0) - addressable (~> 2.3) - extlib (~> 0.9) - faraday (~> 0.9) - jwt (~> 1.0) - multi_json (~> 1.10) - simplecov (0.9.2) - docile (~> 1.1.0) - multi_json (~> 1.0) - simplecov-html (~> 0.9.0) - simplecov-html (0.9.0) - slop (3.6.0) - spdx-licenses (1.0.0) - json - specinfra (2.19.4) - net-scp - net-ssh - thor (0.19.1) - thread_safe (0.3.5) - timers (4.0.1) - hitimes - travis (1.7.5) - addressable (~> 2.3) - 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) - json - trollop (2.1.2) - typhoeus (0.7.1) - ethon (>= 0.7.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) - unf (0.1.4) - unf_ext - unf_ext (0.0.6) - websocket (1.2.1) - -PLATFORMS - ruby - -DEPENDENCIES - beaker - beaker-rspec - guard-rake - metadata-json-lint - puppet (~> 3.8.0) - puppet-blacksmith - puppet-lint - puppet-module - puppet-syntax - puppetlabs_spec_helper - rake - rspec-puppet! - simplecov - travis - travis-lint - -BUNDLED WITH - 1.10.5