|
1 | | -# Copyright 2015 Puppet Community |
2 | | -# |
3 | | -# Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | -# you may not use this file except in compliance with the License. |
5 | | -# You may obtain a copy of the License at |
6 | | -# |
7 | | -# http://www.apache.org/licenses/LICENSE-2.0 |
8 | | -# |
9 | | -# Unless required by applicable law or agreed to in writing, software |
10 | | -# distributed under the License is distributed on an "AS IS" BASIS, |
11 | | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | -# See the License for the specific language governing permissions and |
13 | | -# limitations under the License. |
14 | | - |
15 | | -source 'https://rubygems.org' |
| 1 | +source ENV['GEM_SOURCE'] || "https://rubygems.org" |
| 2 | + |
| 3 | +def location_for(place, fake_version = nil) |
| 4 | + if place =~ /^(git[:@][^#]*)#(.*)/ |
| 5 | + [fake_version, { :git => $1, :branch => $2, :require => false }].compact |
| 6 | + elsif place =~ /^file:\/\/(.*)/ |
| 7 | + ['>= 0', { :path => File.expand_path($1), :require => false }] |
| 8 | + else |
| 9 | + [place, { :require => false }] |
| 10 | + end |
| 11 | +end |
16 | 12 |
|
17 | 13 | group :test do |
18 | | - gem 'rake' |
19 | | - gem 'puppet', ENV['PUPPET_VERSION'] || '~> 4.0' |
20 | | - gem 'rspec-puppet', git: 'https://github.com/rodjek/rspec-puppet.git' |
21 | | - gem 'puppetlabs_spec_helper' |
22 | | - gem 'metadata-json-lint' |
23 | | - gem 'rspec-puppet-facts' |
24 | | - gem 'rspec' |
25 | | - gem 'puppet-blacksmith' |
26 | | - gem 'rubocop' |
| 14 | + gem 'rake', :require => false |
| 15 | + gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git' |
| 16 | + gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git' |
| 17 | + gem 'metadata-json-lint', :require => false |
| 18 | + gem 'rspec-puppet-facts', :require => false |
| 19 | + gem 'rspec', :require => false |
| 20 | + gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git' |
| 21 | + gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git' |
| 22 | + gem 'rubocop', '~> 0.38', :require => false |
| 23 | + gem 'rspec-puppet-utils', :require => false |
| 24 | + gem 'puppetlabs_spec_helper', :require => false |
| 25 | + gem 'puppet-lint-absolute_classname-check', :require => false |
| 26 | + gem 'puppet-lint-leading_zero-check', :require => false |
| 27 | + gem 'puppet-lint-trailing_comma-check', :require => false |
| 28 | + gem 'puppet-lint-version_comparison-check', :require => false |
| 29 | + gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false |
| 30 | + gem 'puppet-lint-unquoted_string-check', :require => false |
| 31 | + gem 'puppet-lint-variable_contains_upcase', :require => false |
27 | 32 | end |
28 | 33 |
|
29 | 34 | group :development do |
30 | | - gem 'travis' |
31 | | - gem 'travis-lint' |
32 | | - gem 'guard-rake' |
| 35 | + gem 'travis', :require => false |
| 36 | + gem 'travis-lint', :require => false |
| 37 | + gem 'guard-rake', :require => false |
33 | 38 | end |
34 | 39 |
|
35 | 40 | group :system_tests do |
36 | | - gem 'beaker' |
37 | | - gem 'beaker-rspec' |
| 41 | + gem 'beaker', :require => false |
| 42 | + if beaker_version = ENV['BEAKER_VERSION'] |
| 43 | + gem 'beaker', *location_for(beaker_version) |
| 44 | + end |
| 45 | + if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION'] |
| 46 | + gem 'beaker-rspec', *location_for(beaker_rspec_version) |
| 47 | + else |
| 48 | + gem 'beaker-rspec', :require => false |
| 49 | + end |
| 50 | + gem 'beaker-puppet_install_helper', :require => false |
| 51 | +end |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +if facterversion = ENV['FACTER_GEM_VERSION'] |
| 56 | +gem 'facter', facterversion.to_s, :require => false, :groups => [:test] |
| 57 | +else |
| 58 | +gem 'facter', :require => false, :groups => [:test] |
38 | 59 | end |
| 60 | + |
| 61 | +ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s |
| 62 | +gem 'puppet', puppetversion, :require => false, :groups => [:test] |
| 63 | + |
| 64 | +# vim:ft=ruby |
0 commit comments