Skip to content

Commit 5ee2561

Browse files
committed
test on old json, fix old rubocop config
1 parent 6814065 commit 5ee2561

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ Style/TrailingCommaInHashLiteral:
4242

4343
Lint/RedundantCopDisableDirective:
4444
Enabled: false
45+
46+
Metrics/AbcSize:
47+
Max: 17
48+
49+
Bundler/DuplicatedGem:
50+
Enabled: false

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@ if RUBY_VERSION >= "2.7"
4949
gem "yajl-ruby", "~> 1.4"
5050
end
5151

52+
# test on the oldest version of the json gem we can expect based on the required_ruby_version
53+
# see https://stdgems.org/compare/2.3/
54+
gem "json", "1.8.3.1" if RUBY_VERSION < "2.4"
55+
5256
gem "libyajl2", "~> 2.1"

Gemfile_ruby_2_3.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: .
33
specs:
44
json_scanner (0.3.1)
5-
json
5+
json (>= 1.8.3.1)
66

77
GEM
88
remote: https://rubygems.org/
@@ -12,7 +12,7 @@ GEM
1212
coderay (1.1.3)
1313
diff-lcs (1.5.1)
1414
jaro_winkler (1.5.6)
15-
json (2.7.6)
15+
json (1.8.3.1)
1616
libyajl2 (2.1.0)
1717
method_source (0.9.2)
1818
parallel (1.19.2)
@@ -61,6 +61,7 @@ PLATFORMS
6161
x86_64-linux
6262

6363
DEPENDENCIES
64+
json (= 1.8.3.1)
6465
json_scanner!
6566
libyajl2 (~> 2.1)
6667
pry (~> 0.12.2)

json_scanner.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
2929
spec.require_paths = ["lib"]
3030
spec.extensions = ["ext/json_scanner/extconf.rb"]
3131
spec.metadata["rubygems_mfa_required"] = "true"
32-
spec.add_dependency "json"
32+
spec.add_dependency "json", ">= 1.8.3.1"
3333
end

0 commit comments

Comments
 (0)