Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use multi_json 1.3 - avoid deprecation warnings

  • Loading branch information...
commit faab3a6d7e00c40eb99860e38485193e367ae573 1 parent 5928531
@kristianmandrup authored
View
4 HISTORY.md
@@ -1,3 +1,7 @@
+## 1.21.0 (2012-04-23)
+
+# Use multi_json 1.3+ API
+
## 1.20.0 (2012-02-17)
* Fixed demos for ruby 1.9 (@BMorearty, #445)
View
6 lib/resque/multi_json_coder.rb
@@ -3,21 +3,21 @@
# OkJson won't work because it doesn't serialize symbols
# in the same way yajl and json do.
-if MultiJson.engine.to_s == 'MultiJson::Engines::OkJson'
+if MultiJson.adapter.to_s == 'MultiJson::Adapters::OkJson'
raise "Please install the yajl-ruby or json gem"
end
module Resque
class MultiJsonCoder < Coder
def encode(object)
- ::MultiJson.encode(object)
+ ::MultiJson.dump(object)
end
def decode(object)
return unless object
begin
- ::MultiJson.decode(object)
+ ::MultiJson.load(object)
rescue ::MultiJson::DecodeError => e
raise DecodeException, e.message, e.backtrace
end
View
2  lib/resque/version.rb
@@ -1,3 +1,3 @@
module Resque
- Version = VERSION = '1.20.0'
+ Version = VERSION = '1.21.0'
end
View
2  resque.gemspec
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.add_dependency "redis-namespace", "~> 1.0.2"
s.add_dependency "vegas", "~> 0.1.2"
s.add_dependency "sinatra", ">= 0.9.2"
- s.add_dependency "multi_json", "~> 1.0"
+ s.add_dependency "multi_json", "~> 1.3"
s.description = <<description
Resque is a Redis-backed Ruby library for creating background jobs,
Please sign in to comment.
Something went wrong with that request. Please try again.