Skip to content

Commit

Permalink
Switch to using multi_json to manage json backends and bump to 1.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwren committed Aug 18, 2011
1 parent 3462e76 commit 8b55520
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ TAGS
.idea
spec_all_rubies.sh
.rbx
vendor
vendor
*.gem
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -224,6 +224,13 @@ in your Gemfile. You can now do <tt>Uri.new('http://localhost')</tt> 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 <tt>rake -T</tt>. 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.
Expand Down
5 changes: 1 addition & 4 deletions lib/wrest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion lib/wrest/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 3 additions & 4 deletions wrest.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 8b55520

Please sign in to comment.