Skip to content

Commit

Permalink
Add json as a gem dependency for ruby 1.9.2
Browse files Browse the repository at this point in the history
* This is required for rubocop to work on 1.9.2
  • Loading branch information
dkubb committed Dec 19, 2013
1 parent 4263f13 commit 54c549d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gem 'rake'
group :test do
gem 'backports'
gem 'coveralls', :require => false
gem 'json', :platforms => [:ruby_19]

This comment has been minimized.

Copy link
@sferik

sferik Dec 19, 2013

Collaborator

This is required for rubocop to work on 1.9.2.

Then, by definition, shouldn’t it be a dependency of rubocop? Or does rubocop not officially support Ruby 1.9.2 (in which case, it should specify a required_ruby_version >= '1.9.3' in its gemspec)?

I also noticed that yardstick would not run without backports. If you’re using backports to support older Ruby versions, shouldn’t yardstick specify it as a dependency. My understand of the way backports is written is that it’s basically a no-op if you require 'backports' on the current Ruby version, since everything is conditionally defined.

This comment has been minimized.

Copy link
@dkubb

dkubb Dec 23, 2013

Author Owner

I just checked rubocop's travis config and it looks like it's only tested with 1.9.3+, so it should specify the required_ruby_version. I created a ticket for this in rubocop/rubocop#694

I was an early adopter of backports and used it in almost all my gems. It's a pretty neat idea, but it does have some side effects and does lag a bit behind. Other people who used my gems would often complain about weird bugs and issues that eventually were tracked back to backports.

As I started to remove it from my gems after dropping support for 1.8.7, I discovered it was doing almost nothing for me outside of 1.8.7 support; almost all of my code continued to work as-is with no changes in 1.9.

When I get some time to work on yardstick, which is relatively low on my oss priority list, I will try removing backports and see what breaks under 1.8.7 and if it can be made to work without backports.

This comment has been minimized.

Copy link
@mbj

mbj Dec 23, 2013

Collaborator

@dkubb I'd advocate to drop yardstick support for 1.8.7. I dont expect any blind spot to if your project is only yardsticked from 1.9.3.

gem 'reek'
gem 'rspec', '~> 2.14'
gem 'rubocop', :platforms => [:ruby_19, :ruby_20]
Expand Down

0 comments on commit 54c549d

Please sign in to comment.