sentry-raven 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sentry-raven might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6edaa8907b593e814f5fac83ed1fcedd5f48138d
4
- data.tar.gz: a5ba9906fdee7ae55db2245962b605d194c8bc78
3
+ metadata.gz: 183f7bb0f9258b5240479894362ea94c69874fd9
4
+ data.tar.gz: 146ab626134eccee42463bde492a45a47ade0e17
5
5
  SHA512:
6
- metadata.gz: a8755f16a1d1ee91c7195d9cca81fc4257acf6f9913e4d0452772d282efaece4448cb7ea701175f0768102fae2e09454325cdb238ef505df600fcf6a7067139b
7
- data.tar.gz: 7a993be651953b5d57dd582baef3eecf4d9d791b8465b5dce2eee901610f38ba452e68f09c07c178cb410d03c77cdb0281627ea5c32d827ba6b51032d6c8656a
6
+ metadata.gz: 712128a1d219122988b9f1a6891fdb3de5d7d3a43885020c0f4f0bd2105b677200015dc222909e078d99168968f8cbca96a4138ef286f6614d249b6471ab3888
7
+ data.tar.gz: d34a51caadd2fdec5126a71ff987a8a07c7d501410b5cea1b957dc409b0b056d4013d43c1bbf135c1346fa3ababaae88fc1a6278ae2de9c3bbcf9c788078b57b
@@ -272,7 +272,7 @@ private
272
272
  elsif m[2]
273
273
  [:val, m[0], Float(m[0])]
274
274
  else
275
- [:val, m[0], Integer(m[1])*(10**Integer(m[3][1..-1]))]
275
+ [:val, m[0], Integer(m[1])*(10**m[3][1..-1].to_i(10))]
276
276
  end
277
277
  else
278
278
  []
@@ -6,20 +6,34 @@ module Raven
6
6
  VALUES_RE = /^\d{16}$/
7
7
 
8
8
  def process(value)
9
- value.merge(value) do |k, v|
10
- if v.is_a?(Hash)
9
+ value.inject(value) do |value,(k,v)|
10
+ v = k if v.nil?
11
+ if v.is_a?(Hash) || v.is_a?(Array)
11
12
  process(v)
12
- elsif v.is_a?(String) && (json_hash = parse_json_or_nil(v))
13
+ elsif v.is_a?(String) && (json = parse_json_or_nil(v))
13
14
  #if this string is actually a json obj, convert and sanitize
14
- process(json_hash).to_json
15
- elsif v.is_a?(Integer) && (VALUES_RE.match(v.to_s) || FIELDS_RE.match(k))
16
- INT_MASK
17
- elsif VALUES_RE.match(v.to_s) || FIELDS_RE.match(k)
18
- STRING_MASK
15
+ value = modify_in_place(value, [k,v], process(json).to_json)
16
+ elsif v.is_a?(Integer) && (VALUES_RE.match(v.to_s) || FIELDS_RE.match(k.to_s))
17
+ value = modify_in_place(value, [k,v], INT_MASK)
18
+ elsif VALUES_RE.match(v.to_s) || FIELDS_RE.match(k.to_s)
19
+ value = modify_in_place(value, [k,v], STRING_MASK)
19
20
  else
20
- v
21
+ value
21
22
  end
22
23
  end
24
+ value
25
+ end
26
+
27
+ private
28
+
29
+ def modify_in_place(original_parent, original_child, new_child)
30
+ if original_parent.is_a?(Array)
31
+ index = original_parent.index(original_child[0])
32
+ original_parent[index] = new_child
33
+ elsif original_parent.is_a?(Hash)
34
+ original_parent[original_child[0]] = new_child
35
+ end
36
+ original_parent
23
37
  end
24
38
  end
25
39
  end
@@ -9,7 +9,9 @@ module Raven
9
9
 
10
10
  def send(auth_header, data, options = {})
11
11
  project_id = self.configuration[:project_id]
12
- response = conn.post "/api/#{project_id}/store/" do |req|
12
+ path = self.configuration[:path].gsub('/sentry', '') + "/"
13
+
14
+ response = conn.post "#{path}api/#{project_id}/store/" do |req|
13
15
  req.headers['Content-Type'] = options[:content_type]
14
16
  req.headers['X-Sentry-Auth'] = auth_header
15
17
  req.body = data
@@ -1,3 +1,3 @@
1
1
  module Raven
2
- VERSION = "0.11.1"
2
+ VERSION = "0.11.2"
3
3
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-raven
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
- - Noah Kantrowitz
8
- - David Cramer
7
+ - Sentry Team
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-11-02 00:00:00.000000000 Z
11
+ date: 2014-11-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
@@ -110,7 +109,7 @@ dependencies:
110
109
  - !ruby/object:Gem::Version
111
110
  version: '0'
112
111
  description:
113
- email: noah@coderanger.net
112
+ email: getsentry@googlegroups.com
114
113
  executables:
115
114
  - raven
116
115
  extensions: []