Skip to content

Commit

Permalink
Remove 'json' gem dependency.
Browse files Browse the repository at this point in the history
The original `json` gem dependency was added in the original fpm.gemspec
because, at the time, Ruby 1.8.7 was common and required an external
`json` dependency for parsing JSON.

Later, Ruby releases since 1.9.1 have bundled `json`[1].

Therefore, it feels safe to remove this dependency. As a bonus, the
rubygems `json` gem places requirements on the minimum version of Ruby.
At this time, the latest `json` gem requires Ruby >= 2.3.

If the `json` gem dependency is removed, fpm will still retain the
ability to process JSON while lowering the minimum required Ruby version
to Ruby 1.9.x -- It's not perfect, but it's a start! :)

[1] https://docs.ruby-lang.org/en/2.3.0/NEWS-1_9_1.html

The idea for this change change came originally from a discussion
with @edolnx in #1949

Fixes #1741, #1264, #1949
  • Loading branch information
jordansissel committed Nov 3, 2022
1 parent 56a97c4 commit d9ba0b4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fpm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 1.9.3'

# For parsing JSON (required for some Python support, etc)
# http://flori.github.com/json/doc/index.html
spec.add_dependency("json", ">= 1.7.7", "< 3.0") # license: Ruby License

# For logging
# https://github.com/jordansissel/ruby-cabin
spec.add_dependency("cabin", ">= 0.6.0") # license: Apache 2
Expand Down

0 comments on commit d9ba0b4

Please sign in to comment.