diff --git a/.rubocop.yml b/.rubocop.yml index 87d7d79a..f4023ed4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -26,6 +26,10 @@ Metrics/AbcSize: Metrics/MethodLength: Enabled: false +# Module length is not necessarily an indicator of code quality +Metrics/ModuleLength: + Enabled: false + # Class length is not necessarily an indicator of code quality Metrics/ClassLength: Enabled: false @@ -33,6 +37,8 @@ Metrics/ClassLength: # dealbreaker: Style/TrailingCommaInArguments: Enabled: false +Style/TrailingCommaInLiteral: + Enabled: false Style/ClosingParenthesisIndentation: Enabled: false diff --git a/.travis.yml b/.travis.yml index bad4cc7e..abf320c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,10 @@ matrix: env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test - rvm: 2.1.8 env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test + - rvm: 1.9.3 + env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes + - rvm: 2.1.8 + env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes - rvm: 2.1.8 env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test - rvm: 2.2.4 @@ -37,3 +41,4 @@ deploy: all_branches: true # Only publish if our main Ruby target builds rvm: 1.9.3 + condition: "$FUTURE_PARSER = yes" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9bbffeab..00deb27d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,7 +87,7 @@ with: This will run the tests on an Ubuntu 12.04 virtual machine. You can also run the integration tests against Centos 6.5 with. - RS_SET=centos-64-x64 bundle exec rake acceptances + BEAKER_set=centos-64-x64 bundle exec rake acceptances If you don't want to have to recreate the virtual machine every time you can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will diff --git a/Gemfile b/Gemfile index 8fa35daa..c9dae6c1 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil) end group :test do - gem 'rake', :require => false + gem 'rake', '< 11', :require => false gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git' gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git' gem 'metadata-json-lint', :require => false @@ -19,7 +19,7 @@ group :test do gem 'rspec', :require => false gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git' gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git' - gem 'rubocop', '0.35.0', :require => false + gem 'rubocop', '0.37.2', :require => false gem 'rspec-puppet-utils', :require => false gem 'puppetlabs_spec_helper', :require => false gem 'puppet-lint-absolute_classname-check', :require => false @@ -58,7 +58,7 @@ else gem 'facter', :require => false, :groups => [:test] end -ENV['PUPPET_VERSION'].nil? ? puppetversion = '3.8.4' : puppetversion = ENV['PUPPET_VERSION'].to_s +ENV['PUPPET_VERSION'].nil? ? puppetversion = '3.8.5' : puppetversion = ENV['PUPPET_VERSION'].to_s gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim:ft=ruby diff --git a/spec/classes/coverage_spec.rb b/spec/classes/coverage_spec.rb new file mode 100644 index 00000000..c083569a --- /dev/null +++ b/spec/classes/coverage_spec.rb @@ -0,0 +1,3 @@ +require 'rspec-puppet' + +at_exit { RSpec::Puppet::Coverage.report! } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2c6f5664..1ffdf178 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1 +1,3 @@ require 'puppetlabs_spec_helper/module_spec_helper' +require 'rspec-puppet-facts' +include RspecPuppetFacts