diff --git a/.gitignore b/.gitignore
index 07ac24fa..fe20728d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,5 @@ TAGS
.idea
spec_all_rubies.sh
.rbx
-vendor
\ No newline at end of file
+vendor
+*.gem
\ No newline at end of file
diff --git a/CHANGELOG b/CHANGELOG
index fbf0387f..e9a24286 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@ Features under the section marked 'Current' are completed but pending release as
Features under a numbered section are complete and available in the Wrest gem.
+== 1.4.7
+ * Switch to using multi_json to manage Json backend to play nice with Rails 3.1.
+
== 1.4.6
* Bump Builder dependency to allow both Builder 2.x and 3.x to be used
diff --git a/README.rdoc b/README.rdoc
index b9516226..78f40d2f 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,4 +1,4 @@
-= Wrest 1.4.6
+= Wrest 1.4.7
(c) Copyright 2009-2011 {Sidu Ponnappa}[http://blog.sidu.in]. All Rights Reserved.
@@ -224,6 +224,13 @@ in your Gemfile. You can now do Uri.new('http://localhost') to build Ur
The Wrest logger can be set and accessed through Wrest.logger and is configured by default to log to STDOUT. If you're using Wrest in a Rails application, you can configure logging by adding a config/initializers/wrest.rb file with the following contents :
Wrest.logger = Rails.logger
+=== Json Backend
+
+Wrest uses the multi_json gem to manage Json backends, allowing it to play nice with Rails 3.1. To change the backend used, you can do the following:
+ MultiJson.engine = :json_gem
+
+For more information, look up the {multi_json}[http://github.com/intridea/multi_json] documentation.
+
=== Build
Standard options are available and can be listed using rake -T. Use rake:rcov for coverage and rake:rdoc to generate documentation. The link to the continuous integration build is over at the C42 Engineering {open source}[http://c42.in/open_source] page.
diff --git a/lib/wrest.rb b/lib/wrest.rb
index 60dd700a..e0087ef9 100644
--- a/lib/wrest.rb
+++ b/lib/wrest.rb
@@ -7,7 +7,6 @@
# See the License for the specific language governing permissions and limitations under the License.
require 'rubygems'
-gem 'activesupport', '~> 3.0'
require 'net/http'
require 'net/https'
@@ -17,6 +16,7 @@
require 'base64'
require 'logger'
require 'benchmark'
+require 'multi_json'
require 'active_support'
require 'active_support/core_ext/string'
require 'active_support/core_ext/hash'
@@ -55,9 +55,6 @@ def self.use_curl!
Wrest.logger = ActiveSupport::BufferedLogger.new(STDOUT)
Wrest.logger.level = Logger::DEBUG
-gem('json', '~> 1.5')
-ActiveSupport::JSON.backend = "JSONGem"
-
require "#{Wrest::Root}/wrest/core_ext/string"
require "#{Wrest::Root}/wrest/hash_with_case_insensitive_access"
diff --git a/lib/wrest/version.rb b/lib/wrest/version.rb
index 6e753a45..fe91b76c 100644
--- a/lib/wrest/version.rb
+++ b/lib/wrest/version.rb
@@ -8,5 +8,5 @@
# See the License for the specific language governing permissions and limitations under the License.
module Wrest
- VERSION = "1.4.6"
+ VERSION = "1.4.7"
end
diff --git a/wrest.gemspec b/wrest.gemspec
index 87cbb67d..a4df2f2f 100644
--- a/wrest.gemspec
+++ b/wrest.gemspec
@@ -29,14 +29,13 @@ Gem::Specification.new do |s|
s.add_development_dependency "rubyforge"
# Test dependencies
- s.add_development_dependency "rspec", ["~> 2.5.0"]
+ s.add_development_dependency "rspec", ["~> 2.6"]
s.add_development_dependency "sinatra", ["~> 1.0.0"]
s.add_development_dependency "metric_fu" unless Object.const_defined?('RUBY_ENGINE') && RUBY_ENGINE =~ /rbx/
- s.add_runtime_dependency "activesupport", ["~> 3.0"]
+ s.add_runtime_dependency "activesupport", ["~> 3"]
s.add_runtime_dependency "builder", ["> 2.0"]
- s.add_runtime_dependency "i18n", ['~> 0.4']
- s.add_runtime_dependency("json", ["~> 1.5"])
+ s.add_runtime_dependency("multi_json", ["~> 1.0"])
case RUBY_PLATFORM
when /java/