(MODULES-3983) Update parallel_tests for ruby 2.0.0
[puppet-modules/puppetlabs-apt.git] / Gemfile
diff --git a/Gemfile b/Gemfile
index 643d3f5d9e0baac476a5e1ac992d4f69fe0ff36a..8222ef0a7af80dd54658f155125a2f828c30a831 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,49 +1,49 @@
+#This file is generated by ModuleSync, do not edit.
+
 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 }]
+def location_from_env(env, default_location = [])
+  if location = ENV[env]
+    if location =~ /^((?:git|https?)[:@][^#]*)#(.*)/
+      [{ :git => $1, :branch => $2, :require => false }]
+    elsif location =~ /^file:\/\/(.*)/
+      ['>= 0', { :path => File.expand_path($1), :require => false }]
+    else
+      [location, { :require => false }]
+    end
   else
-    [place, { :require => false }]
+    default_location
   end
 end
 
 group :development, :unit_tests do
-  gem 'rspec-puppet', '~> 2.1',  :require => false
-  gem 'rspec-core', '3.1.7',     :require => false
-  gem 'puppetlabs_spec_helper',  :require => false
-  gem 'simplecov',               :require => false
-  gem 'puppet_facts',            :require => false
-  gem 'json',                    :require => false
+  gem 'metadata-json-lint'
+  gem 'puppet_facts'
+  gem 'puppet-blacksmith', '>= 3.4.0'
+  gem 'puppetlabs_spec_helper', '>= 1.2.1'
+  gem 'rspec-puppet', '>= 2.3.2'
+  gem 'rspec-puppet-facts'
+  gem 'simplecov'
+  gem 'parallel_tests', '< 2.10.0' if RUBY_VERSION < '2.0.0'
+  gem 'parallel_tests' if RUBY_VERSION >= '2.0.0'
+  gem 'rubocop', '0.41.2' if RUBY_VERSION < '2.0.0'
+  gem 'rubocop' if RUBY_VERSION >= '2.0.0'
+  gem 'rubocop-rspec', '~> 1.6' if RUBY_VERSION >= '2.3.0'
+  gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0'
 end
-
 group :system_tests do
-  if beaker_version = ENV['BEAKER_VERSION']
-    gem 'beaker', *location_for(beaker_version)
-  end
-  if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
-    gem 'beaker-rspec', *location_for(beaker_rspec_version)
-  else
-    gem 'beaker-rspec',  :require => false
-  end
-  gem 'serverspec',    :require => false
-  gem 'beaker-puppet_install_helper', :require => false
+  gem 'beaker', *location_from_env('BEAKER_VERSION', []) if RUBY_VERSION >= '2.3.0'
+  gem 'beaker', *location_from_env('BEAKER_VERSION', ['< 3']) if RUBY_VERSION < '2.3.0'
+  gem 'beaker-rspec', *location_from_env('BEAKER_RSPEC_VERSION', ['>= 3.4'])
+  gem 'serverspec'
+  gem 'beaker-puppet_install_helper'
+  gem 'master_manipulator'
+  gem 'beaker-hostgenerator', *location_from_env('BEAKER_HOSTGENERATOR_VERSION', [])
 end
 
+gem 'facter', *location_from_env('FACTER_GEM_VERSION')
+gem 'puppet', *location_from_env('PUPPET_GEM_VERSION')
 
-
-if facterversion = ENV['FACTER_GEM_VERSION']
-  gem 'facter', facterversion, :require => false
-else
-  gem 'facter', :require => false
-end
-
-if puppetversion = ENV['PUPPET_GEM_VERSION']
-  gem 'puppet', puppetversion, :require => false
-else
-  gem 'puppet', :require => false
+if File.exists? "#{__FILE__}.local"
+  eval(File.read("#{__FILE__}.local"), binding)
 end
-
-# vim:ft=ruby