diff --git a/.rubocop.yml b/.rubocop.yml index 1a14db7..e58d55c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -555,3 +555,9 @@ Metrics/AbcSize: Metrics/PerceivedComplexity: Enabled: false + +Metrics/BlockLength: + Enabled: false + +Style/VariableNumber: + Enabled: false diff --git a/.travis.yml b/.travis.yml index 6578762..8d74731 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,45 @@ +--- language: ruby + sudo: false + bundler_args: --without development acceptance -script: - - "bundle exec rake $CHECK" + notifications: email: false + rvm: - 1.9.3 - 2.0.0 - 2.1.0 + - 2.3.1 env: - - "CHECK=spec SPEC_OPTS='--color --format documentation'" - - "CHECK=rubocop" + matrix: + - PUPPET_GEM_VERSION="~> 3.7.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 3.8.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 3" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.0.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.1.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.2.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.3.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.4.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.5.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.6.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4.7.0" CHECK=spec + - PUPPET_GEM_VERSION="~> 4" CHECK=spec + - PUPPET_GEM_VERSION="~> 4" CHECK=rubocop + +script: 'SPEC_OPTS="--format documentation" bundle exec rake $CHECK' matrix: fast_finish: true + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 4" CHECK=rubocop + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.7.0" CHECK=spec + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3.8.0" CHECK=spec + - rvm: 2.3.1 + env: PUPPET_GEM_VERSION="~> 3" CHECK=spec diff --git a/Gemfile b/Gemfile index 152e3cd..ac2de4a 100644 --- a/Gemfile +++ b/Gemfile @@ -6,12 +6,10 @@ gem 'rgen' gem 'redcarpet' gem 'yard', '~> 0.9.5' -puppetversion = ENV['PUPPET_VERSION'] - -if puppetversion - gem 'puppet', puppetversion +if ENV['PUPPET_GEM_VERSION'] + gem 'puppet', ENV['PUPPET_GEM_VERSION'], :require => false else - gem 'puppet' + gem 'puppet', :require => false end group :test do @@ -19,7 +17,6 @@ group :test do gem 'mocha' gem 'puppetlabs_spec_helper' gem 'serverspec' - gem 'rubocop', '~> 0.41.0' end group :acceptance do @@ -36,3 +33,7 @@ group :development do gem 'pry-byebug' end end + +gem 'json', '<= 1.8' if RUBY_VERSION < '2.0.0' +gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0' +gem 'rubocop' if RUBY_VERSION >= '2.0.0'