thoughtbot / cocaine

A small library for doing (command) lines.
https://robots.thoughtbot.com
Other
785 stars 55 forks source link

Depend on activesupport instead of active_support #49

Closed mvz closed 11 years ago

mvz commented 11 years ago

Limits the version of activesupport to the 3.x line to avoid deprecation warnings that pop up with version 4.0.0.

kirs commented 11 years ago

What's wrong with activesupport > 3.x?

mvz commented 11 years ago

ActiveSupport 4.0.0 deprecates BufferedLogger.

jyurek commented 11 years ago

I don't quite understand. The active_support gem already locks activesupport's version at 3.0.0. Can you give me an except of these warnings? Would it make more sense to change the logger that spec uses?

mvz commented 11 years ago

I'm trying to avoid having both latest activesupport from the 3.x.x series and version 3.0.0 installed. I can live with having 3.x.x and 4.x.x installed to accomodate both Rails 3 and 4, but having 3.0.0 around in addition seems silly.

The warning I'm getting is: DEPRECATION WARNING: ActiveSupport::BufferedLogger is deprecated! Use ActiveSupport::Logger instead. (called from new at /home/matijs/Documents/Projects/Forks/cocaine/spec/cocaine/command_line_spec.rb:214).

Indeed, replacing BufferedLogger with Logger makes all specs pass with ActiveSupport 4.0.0 without the warning. The spec checks that it still satisfies the necessary preconditions.

I will add a commit loosening the dependency and updating the spec.

mvz commented 11 years ago

Actually, I had to update the dependency to ~> 4.0 since the 3.x series does not have ActiveSupport::Logger.

jyurek commented 11 years ago

I've put a fix in that seems more general than the one specified here. Thanks for bringing this up, or I wouldn't have realized it was an issue.

mvz commented 11 years ago

Ok. Thanks for fixing this.