diff --git a/.gitignore b/.gitignore index ef01482d1..b5db85e05 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ spec/fixtures/ coverage/ .idea/ *.iml -*.swp diff --git a/.travis.yml b/.travis.yml index ec6f08dc6..827da319f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ --- +sudo: false language: ruby bundler_args: --without system_tests script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" diff --git a/Gemfile b/Gemfile index f7319c221..cc77f38cf 100644 --- a/Gemfile +++ b/Gemfile @@ -1,49 +1,26 @@ source ENV['GEM_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 :development, :unit_tests do - gem 'rake', :require => false - gem 'rspec-core', '~> 3.1.7', :require => false - gem 'rspec-puppet', '~> 2.0', :require => false + gem 'rspec-core', '3.1.7', :require => false gem 'puppetlabs_spec_helper', :require => false - gem 'puppet-lint', :require => false gem 'simplecov', :require => false gem 'puppet_facts', :require => false gem 'json', :require => false - gem 'pry' end -beaker_version = ENV['BEAKER_VERSION'] -beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION'] group :system_tests do - if beaker_version - gem 'beaker', *location_for(beaker_version) - end - if beaker_rspec_version - gem 'beaker-rspec', *location_for(beaker_rspec_version) - else - gem 'beaker-rspec', :require => false - end + gem 'beaker-rspec', :require => false gem 'serverspec', :require => false end if facterversion = ENV['FACTER_GEM_VERSION'] - gem 'facter', *location_for(facterversion) + gem 'facter', facterversion, :require => false else gem 'facter', :require => false end if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', *location_for(puppetversion) + gem 'puppet', puppetversion, :require => false else gem 'puppet', :require => false end diff --git a/Rakefile b/Rakefile index e3be95b0b..181157e6e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' -PuppetLint.configuration.fail_on_warnings +PuppetLint.configuration.fail_on_warnings = true PuppetLint.configuration.send('relative') PuppetLint.configuration.send('disable_80chars') PuppetLint.configuration.send('disable_class_inherits_from_params_class')