Skip to content

Commit

Permalink
Switch to built-in JSON module
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Jun 10, 2016
1 parent 944e72b commit 29a7374
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 667 deletions.
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- 'examples/**/*'
- 'lib/raven/okjson.rb'
- 'lib/raven/utils/deep_merge.rb'

Style/SignalException:
Expand Down
1 change: 0 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ Style/SpaceAroundOperators:
- 'lib/raven/event.rb'
- 'lib/raven/integrations/sidekiq.rb'
- 'lib/raven/interfaces/stack_trace.rb'
- 'spec/raven/okjson_spec.rb'
- 'spec/raven/processors/sanitizedata_processor_spec.rb'

# Offense count: 6
Expand Down
6 changes: 3 additions & 3 deletions lib/raven/client.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true
require 'zlib'
require 'base64'
require 'json'
require 'zlib'

require 'raven/version'
require 'raven/okjson'
require 'raven/transports/http'

module Raven
Expand Down Expand Up @@ -73,7 +73,7 @@ def configuration_allows_sending

def encode(event)
hash = @processors.reduce(event.to_hash) { |memo, p| p.process(memo) }
encoded = OkJson.encode(hash)
encoded = JSON.generate(hash)

case configuration.encoding
when 'gzip'
Expand Down
Loading

0 comments on commit 29a7374

Please sign in to comment.