Skip to content

Commit

Permalink
Replace multi_json with the json gem to get consistent output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Pfenniger committed Jul 9, 2013
1 parent 7350b7d commit eb39f88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions lib/raven/client.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'multi_json'
require 'zlib'
require 'base64'
require 'json'
require 'zlib'

require 'raven/version'
require 'raven/transports/http'
Expand Down Expand Up @@ -53,13 +53,7 @@ def encode(event)
processor.process(memo)
end

new_adapter = configuration.json_adapter
begin
old_adapter, MultiJson.adapter = MultiJson.adapter, new_adapter if new_adapter
encoded = MultiJson.encode(hash)
ensure
MultiJson.adapter = old_adapter if new_adapter
end
encoded = JSON.dump(hash)

case self.configuration.encoding
when 'gzip'
Expand Down
2 changes: 1 addition & 1 deletion sentry-raven.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |gem|

gem.add_dependency "faraday", ">= 0.7.6"
gem.add_dependency "uuidtools"
gem.add_dependency "multi_json", "~> 1.0"
gem.add_dependency "json"
gem.add_dependency "hashie", ">= 1.1.0"

gem.add_development_dependency "rake"
Expand Down

0 comments on commit eb39f88

Please sign in to comment.