|
1 | | -source "https://rubygems.org" |
| 1 | +source 'https://rubygems.org' |
2 | 2 |
|
3 | | -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } |
| 3 | +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } |
4 | 4 |
|
5 | 5 | # Specify your gem's dependencies in puppet-resource_api.gemspec |
6 | 6 | gemspec |
7 | 7 |
|
8 | 8 | group :tests do |
9 | | - gem 'codecov' |
| 9 | + gem 'CFPropertyList' |
10 | 10 | gem 'rspec', '~> 3.0' |
11 | | - # rubocop 0.58 throws when testing against ruby 2.1, so pin to the latest, |
12 | | - # unless we're dealing with jruby... |
| 11 | + gem 'simplecov-console' |
| 12 | + |
| 13 | + # the test gems required for module testing |
| 14 | + gem 'puppetlabs_spec_helper', '~> 2.7' |
| 15 | + gem 'rspec-puppet' |
| 16 | + |
| 17 | + # since the Resource API runs inside the puppetserver, test against the JRuby versions we ship |
| 18 | + # these require special dependencies to have everything load properly |
| 19 | + |
| 20 | + # `codecov` 0.1.17 introduced usage of %i[] which is not recognised by JRuby 1.7 |
| 21 | + if RUBY_PLATFORM == 'java' && Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('2.3.0') |
| 22 | + gem 'codecov', '= 0.1.16' |
| 23 | + else |
| 24 | + gem 'codecov' |
| 25 | + end |
| 26 | + |
| 27 | + # `rake` dropped support for older versions of ruby a while back |
13 | 28 | if RUBY_PLATFORM == 'java' |
14 | | - # load a rake version that works on java |
15 | 29 | gem 'rake', '~> 10.0' |
| 30 | + else |
| 31 | + gem 'rake', '~> 12.3' |
| 32 | + end |
| 33 | + |
| 34 | + # rubocop is special, as usual |
| 35 | + if RUBY_PLATFORM == 'java' |
16 | 36 | # load a rubocop version that works on java for the Rakefile |
17 | 37 | gem 'parser', '2.3.3.1' |
18 | 38 | gem 'rubocop', '0.41.2' |
19 | | - # JRuby 1.7 does not like json 2.3.0, jruby 9.1.9.0 has RUBY_VERSION == '2.3.3' |
20 | | - gem 'json', '2.2.0' if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('2.3.0') |
21 | 39 | elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.0') |
| 40 | + # rubocop 0.58 throws when testing against ruby 2.1, so pin to the latest version that works |
22 | 41 | gem 'rubocop', '0.57.2' |
23 | | - # the last version of parallel to support ruby 2.1 |
24 | | - gem 'parallel', '1.13.0' |
25 | 42 | gem 'rubocop-rspec' |
26 | 43 | else |
27 | | - # the rake everyone else should be using |
28 | | - gem 'rake', '~> 12.3' |
29 | 44 | # 2.1-compatible analysis was dropped after version 0.58 |
30 | 45 | # This needs to be removed once we drop puppet4 support. |
31 | 46 | gem 'rubocop', '~> 0.57.0' |
32 | 47 | gem 'rubocop-rspec' |
33 | | - # license_finder does not install on windows using older versions of rubygems. |
34 | | - # ruby 2.4 is confirmed working on appveyor. |
35 | | - gem 'license_finder' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0') |
36 | 48 | end |
37 | | - gem 'simplecov-console' |
38 | | - # the test gems required for module testing |
39 | | - gem 'puppetlabs_spec_helper', '~> 2.7' |
40 | | - gem 'rspec-puppet' |
41 | 49 |
|
42 | | - gem 'CFPropertyList' |
| 50 | + # JRuby 1.7 does not like json 2.3.0, jruby 9.1.9.0 has RUBY_VERSION == '2.3.3' |
| 51 | + gem 'json', '2.2.0' if RUBY_PLATFORM == 'java' && Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('2.3.0') |
| 52 | + # the last version of parallel to support ruby 2.1 |
| 53 | + gem 'parallel', '1.13.0' if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('2.2.0') |
| 54 | + |
| 55 | + # license_finder does not install on windows using older versions of rubygems. |
| 56 | + # ruby 2.4 is confirmed working on appveyor and we only need to run it on the newest gemset anyways |
| 57 | + gem 'license_finder' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0') |
43 | 58 | end |
44 | 59 |
|
45 | 60 | group :development do |
|
0 commit comments