Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

use multi_json 1.3 - avoid deprecation warnings

  • Loading branch information...
commit faab3a6d7e00c40eb99860e38485193e367ae573 1 parent 5928531
Kristian Mandrup authored
4 HISTORY.md
Source Rendered
... ... @@ -1,3 +1,7 @@
  1 +## 1.21.0 (2012-04-23)
  2 +
  3 +# Use multi_json 1.3+ API
  4 +
1 5 ## 1.20.0 (2012-02-17)
2 6
3 7 * Fixed demos for ruby 1.9 (@BMorearty, #445)
6 lib/resque/multi_json_coder.rb
@@ -3,21 +3,21 @@
3 3
4 4 # OkJson won't work because it doesn't serialize symbols
5 5 # in the same way yajl and json do.
6   -if MultiJson.engine.to_s == 'MultiJson::Engines::OkJson'
  6 +if MultiJson.adapter.to_s == 'MultiJson::Adapters::OkJson'
7 7 raise "Please install the yajl-ruby or json gem"
8 8 end
9 9
10 10 module Resque
11 11 class MultiJsonCoder < Coder
12 12 def encode(object)
13   - ::MultiJson.encode(object)
  13 + ::MultiJson.dump(object)
14 14 end
15 15
16 16 def decode(object)
17 17 return unless object
18 18
19 19 begin
20   - ::MultiJson.decode(object)
  20 + ::MultiJson.load(object)
21 21 rescue ::MultiJson::DecodeError => e
22 22 raise DecodeException, e.message, e.backtrace
23 23 end
2  lib/resque/version.rb
... ... @@ -1,3 +1,3 @@
1 1 module Resque
2   - Version = VERSION = '1.20.0'
  2 + Version = VERSION = '1.21.0'
3 3 end
2  resque.gemspec
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24 24 s.add_dependency "redis-namespace", "~> 1.0.2"
25 25 s.add_dependency "vegas", "~> 0.1.2"
26 26 s.add_dependency "sinatra", ">= 0.9.2"
27   - s.add_dependency "multi_json", "~> 1.0"
  27 + s.add_dependency "multi_json", "~> 1.3"
28 28
29 29 s.description = <<description
30 30 Resque is a Redis-backed Ruby library for creating background jobs,

0 comments on commit faab3a6

Please sign in to comment.
Something went wrong with that request. Please try again.