Skip to content

Commit 6ac75d6

Browse files
joshcooperccaviness
authored andcommitted
(PUP-6894) Update gems now that puppet requires ruby 2.3 and up
When another project depends on puppet and references it using `git` or `path` in its Gemfile, then bundler will load puppet's .gemspec. As such the following dependencies are not needed. * Drop net-ssh * Drop hocon When building puppet as a gem using project_data.yaml: * Add missing httpclient required dependency * Bump ffi to >= 1.9.25, < 1.10 When running via bundler using Gemfile: * Drop conditional ruby version logic for rubocop * Relax rubocop constraint to allow y component to float. * Unpin transitive rainbow dependency as the original problem[1] was resolved in rainbow 3.0 (which requires ruby >= 2.1) * Delete outdated mocha comment * Add optional hocon dependency [1] ku1ik/rainbow#48
1 parent 31e56fb commit 6ac75d6

File tree

3 files changed

+8
-28
lines changed

3 files changed

+8
-28
lines changed

.gemspec

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,11 @@ Gem::Specification.new do |s|
3333
s.specification_version = 3
3434
s.add_runtime_dependency(%q<facter>, [">= 2.0.1", "< 4"])
3535
s.add_runtime_dependency(%q<hiera>, [">= 3.2.1", "< 4"])
36-
s.add_runtime_dependency(%q<semantic_puppet>, ["~> 1.0"])
37-
# i18n support (gettext-setup and dependencies)
36+
s.add_runtime_dependency(%q<semantic_puppet>, "~> 1.0")
3837
s.add_runtime_dependency(%q<fast_gettext>, "~> 1.1.2")
3938
s.add_runtime_dependency(%q<locale>, "~> 2.1")
4039
s.add_runtime_dependency(%q<multi_json>, "~> 1.13")
4140
s.add_runtime_dependency(%q<httpclient>, "~> 2.8")
42-
# hocon is an optional hiera backend shipped in puppet-agent packages
43-
s.add_runtime_dependency(%q<hocon>, "~> 1.0")
44-
# net-ssh is a runtime dependency of Puppet::Util::NetworkDevice::Transport::Ssh
45-
# Beaker 3.0.0 to 3.10.0 depends on net-ssh 3.3.0beta1
46-
# Beaker 3.11.0+ depends on net-ssh 4.0+
47-
# be lenient to allow module testing where Beaker and Puppet are in same Gemfile
48-
s.add_runtime_dependency(%q<net-ssh>, [">= 3.0", "< 5"]) if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0')
4941

5042
# loads platform specific gems like ffi, win32 platform gems
5143
# as additional runtime dependencies

Gemfile

+3-12
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,16 @@ group(:development, :test) do
4343
gem "rspec-its", "~> 1.1", :require => false
4444
gem "rspec-collection_matchers", "~> 1.1", :require => false
4545
gem "rspec-legacy_formatters", "~> 1.0", :require => false
46-
47-
# Mocha is not compatible across minor version changes; because of this only
48-
# versions matching ~> 0.10.5 are supported. All other versions are unsupported
49-
# and can be expected to fail.
5046
gem "mocha", '~> 1.5.0', :require => false
5147

5248
gem "yarjuf", "~> 2.0"
5349

5450
# json-schema does not support windows, so omit it from the platforms list
5551
gem "json-schema", "~> 2.0", :require => false, :platforms => [:ruby, :jruby]
5652

57-
if RUBY_VERSION >= '2.0'
58-
# pin rubocop as 0.50 requires a higher version of the rainbow gem (see below)
59-
gem 'rubocop', '~> 0.49.1', :platforms => [:ruby]
60-
gem 'rubocop-i18n', '~> 1.2.0', :platforms => [:ruby]
61-
end
53+
gem 'rubocop', '~> 0.49', :platforms => [:ruby]
54+
gem 'rubocop-i18n', '~> 1.2.0', :platforms => [:ruby]
6255

63-
# pin rainbow gem as 2.2.1 requires rubygems 2.6.9+ and (donotwant)
64-
gem "rainbow", "< 2.2.1", :platforms => [:ruby]
6556

6657
gem 'rdoc', "~> 6.0", :platforms => [:ruby]
6758
gem 'yard'
@@ -72,6 +63,7 @@ group(:development, :test) do
7263
gem 'webmock', '~> 1.24'
7364
gem 'vcr', '~> 2.9'
7465
gem "hiera-eyaml", :require => false
66+
gem "hocon", '~> 1.0', :require => false
7567

7668
gem 'memory_profiler', :platforms => [:mri_21, :mri_22, :mri_23, :mri_24, :mri_25]
7769
end
@@ -85,7 +77,6 @@ group(:development) do
8577
end
8678

8779
group(:extra) do
88-
gem "rack", "~> 1.4", :require => false
8980
gem "puppetlabs_spec_helper", :require => false
9081
gem "msgpack", :require => false
9182
end

ext/project_data.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ gem_required_rubygems_version: '> 1.3.1'
1919
gem_runtime_dependencies:
2020
facter: ['> 2.0.1', '< 4']
2121
hiera: ['>= 3.2.1', '< 4']
22-
# PUP-7115 - return to a gem dependency in Puppet 5
23-
semantic_puppet: ['~> 1.0']
22+
semantic_puppet: '~> 1.0'
2423
fast_gettext: '~> 1.1.2'
2524
locale: '~> 2.1'
2625
multi_json: '~> 1.10'
26+
httpclient: '~> 2.8'
2727
gem_rdoc_options:
2828
- --title
2929
- "Puppet - Configuration Management"
@@ -36,9 +36,7 @@ gem_platform_dependencies:
3636
CFPropertyList: '~> 2.2'
3737
x86-mingw32:
3838
gem_runtime_dependencies:
39-
# Pinning versions that require native extensions
40-
# ffi is pinned due to PUP-8438
41-
ffi: '<= 1.9.18'
39+
ffi: '~> 1.9.25'
4240
# win32-xxxx gems are pinned due to PUP-6445
4341
win32-dir: '= 0.4.9'
4442
win32-process: '= 0.7.5'
@@ -48,8 +46,7 @@ gem_platform_dependencies:
4846
minitar: '~> 0.6.1'
4947
x64-mingw32:
5048
gem_runtime_dependencies:
51-
# ffi is pinned due to PUP-8438
52-
ffi: '<= 1.9.18'
49+
ffi: '~> 1.9.25'
5350
# win32-xxxx gems are pinned due to PUP-6445
5451
win32-dir: '= 0.4.9'
5552
win32-process: '= 0.7.5'

0 commit comments

Comments
 (0)