forked from fatmcgav/fatmcgav-glassfish
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gemfile
74 lines (63 loc) · 3.38 KB
/
Gemfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# frozen_string_literal: true
source ENV['GEM_SOURCE'] || 'https://rubygems.org/'
SUPPORTED_RUBIES = [
'~> 2.3.0',
'~> 2.4.0'
].freeze
# Used for gem conditionals, ugly code here :-P
RVERSION = Gem::Version.new(RUBY_VERSION.dup)
ruby_version_segments = RVERSION.segments
minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
def ver(spec)
Gem::Version.new(spec)
end
def location_for(place_or_version)
[place_or_version, { require: false }]
end
# Puppet Module version
VER = '0.3.3'
# Testing dependencies group
group :test do
gem "puppet-module-posix-default-r#{minor_version}", VER, require: false, platforms: 'ruby'
gem "puppet-module-posix-dev-r#{minor_version}", VER, require: false, platforms: 'ruby'
gem "puppet-module-win-default-r#{minor_version}", VER, require: false, platforms: %w[mswin mingw x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", VER, require: false, platforms: %w[mswin mingw x64_mingw]
gem 'metadata-json-lint', require: false, platforms: %w[mswin mingw x64_mingw]
gem 'rspec-puppet', require: false, platforms: %w[mswin mingw x64_mingw]
gem 'rspec-puppet-facts', require: false
gem 'rspec-puppet-facts-unsupported', '~> 0', require: false
gem 'rubocop', require: false, platforms: %w[mswin mingw x64_mingw]
gem 'safe_yaml', require: false
gem 'simplecov', require: false, platforms: %w[mswin mingw x64_mingw]
end
# Acceptance Testing dependencies group
group :system_test do
gem "puppet-module-posix-system-r#{minor_version}", VER, require: false, platforms: 'ruby'
gem "puppet-module-win-system-r#{minor_version}", VER, require: false, platforms: %w[mswin mingw x64_mingw]
gem 'beaker', *location_for(ENV['BEAKER_VERSION'])
gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'])
gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
gem 'beaker-pe', require: false
gem 'beaker-puppeter', require: false
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'])
gem 'puppet-examples-helpers', '~> 0', require: false
gem 'vagrant-wrapper', require: false
end
# Development dependencies group
group :development do
gem 'pry', require: false
gem 'pry-byebug', require: false
end
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'] || '~> 4')
# Only explicitly specify Facter/Hiera if a version has been specified.
# Otherwise it can lead to strange bundler behavior. If you are seeing weird
# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
# to `1` and then run bundle install.
gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
# Check for correct Ruby version, ugly code here :-P
if SUPPORTED_RUBIES.map { |v| Gem::Requirement.new(v) }
.find { |req| req.satisfied_by? RVERSION }.nil?
raise "Unsupported Ruby version #{RVERSION}, use one of: #{SUPPORTED_RUBIES}"
end
# vim:ft=ruby