Skip to content

Commit af715bd

Browse files
authored
Merge pull request #144 from chef/jk/json2
Allow JSON 2.0 on Ruby 2.2 and above
2 parents 6831c6c + a559d0d commit af715bd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('1.9.3')
88
gem 'net-ssh', '~> 2.9'
99
end
1010

11+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2')
12+
gem 'json', '< 2.0'
13+
gem 'rack', '< 2.0'
14+
end
15+
1116
group :test do
1217
gem 'bundler', '~> 1.11'
1318
gem 'minitest', '~> 5.8'

train.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
2424
spec.require_paths = ['lib']
2525

26-
spec.add_dependency 'json', '~> 1.8'
26+
spec.add_dependency 'json', '>= 1.8', '< 3.0'
2727
# chef-client < 12.4.1 require mixlib-shellout-2.0.1
2828
spec.add_dependency 'mixlib-shellout', '~> 2.0'
2929
# net-ssh 3.x drops Ruby 1.9 support, so this constraint could be raised when

0 commit comments

Comments
 (0)