From 45ffd8c28e22057f94ea7e1a56bf7dc66dac0df4 Mon Sep 17 00:00:00 2001 From: Garrett Honeycutt Date: Thu, 13 Oct 2016 13:33:00 -0400 Subject: [PATCH] Fix dependency issues for testing --- .travis.yml | 29 +++++++++++++++++------------ Gemfile | 47 +++++++++++++++++++++++------------------------ 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab4a3849..899e0293 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,27 @@ --- -sudo: false -branches: - only: - - master + language: ruby -bundler_args: --without acceptance -script: - - "bundle exec rake lint" - - "bundle exec rake syntax" - - "bundle exec rake spec SPEC_OPTS='--format documentation'" + +sudo: false + +before_install: + - 'gem update --system' + - 'gem update bundler' + +bundler_args: --without acceptance + +script: "SPEC_OPTS='--format documentation' bundle exec rake lint syntax spec" + after_success: - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng - .forge-releng/publish + rvm: - 1.8.7 - 1.9.3 - 2.0.0 - jruby-19mode + env: - PUPPET_VERSION="~> 2.7.0" - PUPPET_VERSION="~> 3.1.0" @@ -31,6 +36,7 @@ env: global: - PUBLISHER_LOGIN=acidprime + matrix: exclude: - rvm: 1.9.3 @@ -56,13 +62,12 @@ matrix: include: - rvm: 2.1.5 env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" -# - rvm: 2.1.6 -# env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes" + notifications: email: false webhooks: urls: - - 'https://webhooks.gitter.im/e/8936500cc6a369ff46ee' + - 'https://webhooks.gitter.im/e/8936500cc6a369ff46ee' on_success: change on_failure: always on_start: false diff --git a/Gemfile b/Gemfile index 443205e4..458f00fe 100644 --- a/Gemfile +++ b/Gemfile @@ -1,24 +1,9 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" +source ENV['GEM_SOURCE'] || 'https://rubygems.org' -group :development, :test do - if RUBY_VERSION < '1.9.3' - gem 'rake', '~> 10.5.0', :require => false - else - gem 'rake', :require => false - end - gem 'puppetlabs_spec_helper', :require => false - gem "rspec", '< 3.2.0' - gem "rspec-core", "3.1.7" - gem "rspec-puppet", "~> 2.1" - gem 'puppet-lint', :require => false - gem 'puppet-syntax', :require => false -end - -group :acceptance do - gem "beaker", "> 2.0.0" - gem "beaker-rspec", ">= 5.1.0" - gem 'serverspec', :require => false - gem "vagrant-wrapper" +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', '~> 3.0', :require => false end if facterversion = ENV['FACTER_GEM_VERSION'] @@ -27,10 +12,24 @@ else gem 'facter', :require => false end -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', '3.7.0', :require => false +gem 'puppetlabs_spec_helper', '>= 1.2.0' +gem 'rspec-puppet' +gem 'puppet-lint', '~> 2.0' + +gem 'rspec', '~> 2.0', :require => false if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' +gem 'rspec', :require => false if RUBY_VERSION >= '1.9' +gem 'rake', '~> 10.0', :require => false if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' +gem 'rake', :require => false if RUBY_VERSION >= '1.9' +gem 'json', '<= 1.8', :require => false if RUBY_VERSION < '2.0.0' +gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0' +gem 'metadata-json-lint', '0.0.11', :require => false if RUBY_VERSION < '1.9' +gem 'metadata-json-lint', :require => false if RUBY_VERSION >= '1.9' + +group :acceptance do + gem 'beaker', '> 2.0.0', :require => false + gem 'beaker-rspec', '>= 5.1.0', :require => false + gem 'serverspec', :require => false + gem 'vagrant-wrapper', :require => false end # vim:ft=ruby