-
Notifications
You must be signed in to change notification settings - Fork 86
/
octocatalog-diff.gemspec
52 lines (47 loc) · 2.37 KB
/
octocatalog-diff.gemspec
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
require 'json'
DEFAULT_PUPPET_VERSION = '7.32.1'.freeze
Gem::Specification.new do |s|
s.required_ruby_version = '>= 2.6.0'
puppet_version = ENV['PUPPET_VERSION'] || DEFAULT_PUPPET_VERSION
s.name = 'octocatalog-diff'
s.version = ENV['OCTOCATALOG_DIFF_VERSION'] || File.read(File.join(File.dirname(__FILE__), '.version')).strip
s.license = 'MIT'
s.authors = ['GitHub, Inc.', 'Kevin Paulisse']
s.email = '[email protected]'
s.files = Dir.glob('doc/**/*.md') \
+ Dir.glob('lib/**/*') \
+ Dir.glob('scripts/**/*') \
+ %w(LICENSE README.md .version bin/octocatalog-diff)
s.executables = 'octocatalog-diff'
s.homepage = 'https://github.com/github/octocatalog-diff'
s.summary = 'Compile Puppet catalogs from 2 branches, versions, etc., and compare them.'
s.description = <<-EOF
Octocatalog-Diff assists with Puppet development and testing by enabling the user to
compile 2 Puppet catalogs and compare them. It is possible to compare different
branches, different versions, and different fact values. This is intended to be run
from a local development environment or in CI.
EOF
s.add_runtime_dependency 'diffy', '>= 3.1.0'
s.add_runtime_dependency 'httparty', '>= 0.21.0'
s.add_runtime_dependency 'hashdiff', '>= 0.3.0'
s.add_runtime_dependency 'parallel', '>= 1.12.0'
s.add_runtime_dependency 'rugged', '>= 0.25.0b2'
s.add_runtime_dependency 'puppet', '>= 5.5.0'
s.add_development_dependency 'puppet', '>= 5.5.0'
s.add_development_dependency 'rspec', '~> 3.4.0'
s.add_development_dependency 'rake', '12.3.3'
s.add_development_dependency 'parallel_tests', '2.7.1'
s.add_development_dependency 'rspec-retry', '0.5.0'
s.add_development_dependency 'rubocop', '= 0.49.0'
s.add_development_dependency 'simplecov', '~> 0.14.1'
s.add_development_dependency 'simplecov-erb', '~> 0.1.1'
puppet_v = Gem::Version.new(puppet_version)
version_config = JSON.parse(File.read(File.join(File.dirname(__FILE__), 'config', 'puppet-versions.json')))
version_config.each do |data|
next unless puppet_v >= Gem::Version.new(data['minimum_version'])
next unless puppet_v <= Gem::Version.new(data['maximum_version'])
data['additional_gems'].each do |additional_gem|
s.add_development_dependency additional_gem['name'], additional_gem['version']
end
end
end