1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Cleanup, prepare for release

This commit is contained in:
Mike Perham 2012-04-22 19:22:09 -07:00
parent c852d7e2e5
commit 3b1955d1d7
2 changed files with 7 additions and 6 deletions

View file

@ -5,6 +5,7 @@
Sidekiq will retry once per second until it can re-establish
a connection. (ryanlecompte)
- capistrano recipe now uses `bundle_cmd` if set [#147]
- handle multi\_json API changes (sferik)
1.1.2
-----------

View file

@ -82,21 +82,21 @@ module Sidekiq
@server_chain
end
def self.load_json(string, options={})
def self.load_json(string)
# Can't reliably detect whether MultiJson responds to load, since it's
# a reserved word. Use adapter as a proxy for new features.
if MultiJson.respond_to?(:adapter)
MultiJson.load(string, options)
MultiJson.load(string)
else
MultiJson.decode(string, options)
MultiJson.decode(string)
end
end
def self.dump_json(object, options={})
def self.dump_json(object)
if MultiJson.respond_to?(:dump)
MultiJson.dump(object, options)
MultiJson.dump(object)
else
MultiJson.encode(object, options)
MultiJson.encode(object)
end
end