-group :development, :test do
- gem 'rake', :require => false
- gem 'pry', :require => false
- gem 'rspec-puppet', :require => false
- gem 'puppet-lint', :require => false
- gem 'puppetlabs_spec_helper', :require => false
- gem 'serverspec', :require => false
- gem 'beaker', :require => false
- gem 'beaker-rspec', :require => false
+source ENV['GEM_SOURCE'] || "https://rubygems.org"
+
+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
+ default_location
+ end
+end
+
+group :development, :unit_tests do
+ 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'
+ 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'