raygun4ruby 1.1.9 → 1.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 948bcdc9141a38ab0524a598be9ca328ff7b8c35
4
- data.tar.gz: aad6104c08a9c47522161db169ac629b284f36fa
3
+ metadata.gz: 7b22ae9933b9637f53a24773b8800aee07dfd2a7
4
+ data.tar.gz: b3315855c999c88dfdfb6f76480af30686f88d07
5
5
  SHA512:
6
- metadata.gz: 9d1f50d82d0041a687966d19f331334c09bc54c2e024e306d1536cff70dab0be5b1518fda5eee3a98bc453940b6e08888c21369d089a46a492139c54307bfa4e
7
- data.tar.gz: b3c5524aae5fd995bdc6c980c2cca0e6f770d4441ccb986dd078db3f48689b738d88700c75ac750865fc528ec7e1689c1df0f2bcd3b57155c4faf1999e8c49a1
6
+ metadata.gz: 010a55d887baaa612b9756dd46f37dbb9735556308af92ab1e34e91cd3f271cd64687d52ac8823b2fecdbc42b245cf5d28f2271558965381cefd3c5acefdb21f
7
+ data.tar.gz: c2334158d5b54824430fe98a18faad05a8341cb96741a66e99833b82042bf8161411382dc72389c5fa30b7db118d04fb0f71d4a2c9a42b1f3274171778113344
data/.travis.yml CHANGED
@@ -1,9 +1,14 @@
1
1
  before_install:
2
2
  - gem install bundler
3
3
 
4
+ script:
5
+ - bundle exec rake
6
+
4
7
  rvm:
5
8
  - 1.9.3
6
9
  - 2.0.0
10
+ - 2.2.5
11
+ - 2.3.1
7
12
 
8
13
  gemfile:
9
- - Gemfile
14
+ - Gemfile
data/Rakefile CHANGED
@@ -7,14 +7,12 @@ namespace :test do
7
7
 
8
8
  desc "Test the basics of the adapter"
9
9
  Rake::TestTask.new(:units) do |t|
10
- t.libs << "lib/raygun"
11
10
  t.test_files = FileList["test/unit/*_test.rb"]
12
11
  t.verbose = true
13
12
  end
14
13
 
15
14
  desc "Run a test against the live API"
16
15
  Rake::TestTask.new(:integration) do |t|
17
- t.libs << "lib/raygun"
18
16
  t.test_files = FileList["test/integration/*_test.rb"]
19
17
  t.verbose = true
20
18
  end
data/lib/raygun/client.rb CHANGED
@@ -141,6 +141,8 @@ module Raygun
141
141
  tags = env.delete(:tags) || []
142
142
  tags << rack_env if rack_env_present?
143
143
 
144
+ grouping_key = env.delete(:grouping_key)
145
+
144
146
  error_details = {
145
147
  machineName: hostname,
146
148
  version: version,
@@ -151,6 +153,8 @@ module Raygun
151
153
  request: request_information(env)
152
154
  }
153
155
 
156
+ error_details.merge!(groupingKey: grouping_key) if grouping_key
157
+
154
158
  error_details.merge!(user: user_information(env)) if affected_user_present?(env)
155
159
 
156
160
  {
@@ -160,7 +164,7 @@ module Raygun
160
164
  end
161
165
 
162
166
  def create_entry(payload_hash)
163
- self.class.post("/entries", headers: @headers, body: JSON.generate(payload_hash))
167
+ self.class.post("/entries", verify_peer: true, verify: true, headers: @headers, body: JSON.generate(payload_hash))
164
168
  end
165
169
 
166
170
  def filter_params(params_hash, extra_filter_keys = nil)
@@ -4,18 +4,26 @@ class Raygun::Railtie < Rails::Railtie
4
4
 
5
5
  # Thanks Airbrake: See https://github.com/rails/rails/pull/8624
6
6
  middleware = if defined?(ActionDispatch::DebugExceptions)
7
- # Rails >= 3.2.0
8
- "ActionDispatch::DebugExceptions"
7
+ if Rails::VERSION::STRING >= "5"
8
+ ActionDispatch::DebugExceptions
9
+ else
10
+ # Rails >= 3.2.0
11
+ "ActionDispatch::DebugExceptions"
12
+ end
9
13
  else
10
14
  # Rails < 3.2.0
11
15
  "ActionDispatch::ShowExceptions"
12
16
  end
13
17
 
14
- app.config.middleware.insert_after middleware, "Raygun::Middleware::RackExceptionInterceptor"
18
+ raygun_middleware = Raygun::Middleware::RackExceptionInterceptor
19
+ raygun_middleware = raygun_middleware.to_s unless Rails::VERSION::STRING >= "5"
20
+ app.config.middleware.insert_after middleware, raygun_middleware
15
21
 
16
22
  # Affected User tracking
17
23
  require "raygun/middleware/rails_insert_affected_user"
18
- app.config.middleware.insert_after Raygun::Middleware::RackExceptionInterceptor, "Raygun::Middleware::RailsInsertAffectedUser"
24
+ affected_user_middleware = Raygun::Middleware::RailsInsertAffectedUser
25
+ affected_user_middleware = affected_user_middleware.to_s unless Rails::VERSION::STRING >= "5"
26
+ app.config.middleware.insert_after Raygun::Middleware::RackExceptionInterceptor, affected_user_middleware
19
27
  end
20
28
 
21
29
  config.to_prepare do
@@ -27,4 +35,4 @@ class Raygun::Railtie < Rails::Railtie
27
35
  load "tasks/raygun.tasks"
28
36
  end
29
37
 
30
- end
38
+ end
@@ -1,3 +1,3 @@
1
1
  module Raygun
2
- VERSION = "1.1.9"
2
+ VERSION = "1.1.11"
3
3
  end
data/raygun4ruby.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = []
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency "httparty", "~> 0.11"
22
+ spec.add_runtime_dependency "httparty", "~> 0.13.7"
23
23
  spec.add_runtime_dependency "json"
24
24
  spec.add_runtime_dependency "rack"
25
25
 
@@ -145,6 +145,8 @@ class ClientTest < Raygun::UnitTest
145
145
  e.set_backtrace(["/some/folder/some_file.rb:123:in `some_method_name'",
146
146
  "/another/path/foo.rb:1234:in `block (3 levels) run'"])
147
147
 
148
+ grouping_key = "my custom group"
149
+
148
150
  expected_hash = {
149
151
  occurredOn: Time.now.utc.iso8601,
150
152
  details: {
@@ -165,11 +167,12 @@ class ClientTest < Raygun::UnitTest
165
167
  },
166
168
  userCustomData: {},
167
169
  tags: ["test"],
168
- request: {}
170
+ request: {},
171
+ groupingKey: grouping_key
169
172
  }
170
173
  }
171
174
 
172
- assert_equal expected_hash, @client.send(:build_payload_hash, e)
175
+ assert_equal expected_hash, @client.send(:build_payload_hash, e, { grouping_key: grouping_key })
173
176
  end
174
177
  end
175
178
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun4ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindscape
@@ -9,62 +9,62 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-18 00:00:00.000000000 Z
12
+ date: 2016-07-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0.11'
20
+ version: 0.13.7
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0.11'
27
+ version: 0.13.7
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: json
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rack
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: bundler
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.1'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.1'
70
70
  - !ruby/object:Gem::Dependency
@@ -85,104 +85,104 @@ dependencies:
85
85
  name: fakeweb
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ~>
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
90
  version: '1.3'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ~>
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: '1.3'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: timecop
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: minitest
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ~>
116
+ - - "~>"
117
117
  - !ruby/object:Gem::Version
118
118
  version: '4.2'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ~>
123
+ - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: '4.2'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: redis-namespace
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: 1.3.1
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: 1.3.1
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: resque
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - '>='
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: sidekiq
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: '3'
161
- - - <
161
+ - - "<"
162
162
  - !ruby/object:Gem::Version
163
163
  version: 3.2.2
164
164
  type: :development
165
165
  prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - '>='
168
+ - - ">="
169
169
  - !ruby/object:Gem::Version
170
170
  version: '3'
171
- - - <
171
+ - - "<"
172
172
  - !ruby/object:Gem::Version
173
173
  version: 3.2.2
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: mocha
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  type: :development
182
182
  prerelease: false
183
183
  version_requirements: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - '>='
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  description: Ruby Adapter for Raygun.io
@@ -192,8 +192,8 @@ executables: []
192
192
  extensions: []
193
193
  extra_rdoc_files: []
194
194
  files:
195
- - .gitignore
196
- - .travis.yml
195
+ - ".gitignore"
196
+ - ".travis.yml"
197
197
  - Gemfile
198
198
  - LICENSE.txt
199
199
  - README.md
@@ -230,17 +230,17 @@ require_paths:
230
230
  - lib
231
231
  required_ruby_version: !ruby/object:Gem::Requirement
232
232
  requirements:
233
- - - '>='
233
+ - - ">="
234
234
  - !ruby/object:Gem::Version
235
235
  version: '0'
236
236
  required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  requirements:
238
- - - '>='
238
+ - - ">="
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
242
  rubyforge_project:
243
- rubygems_version: 2.4.6
243
+ rubygems_version: 2.5.0
244
244
  signing_key:
245
245
  specification_version: 4
246
246
  summary: This gem provides support for Ruby and Ruby on Rails for the Raygun.io error
@@ -253,3 +253,4 @@ test_files:
253
253
  - test/unit/rails_insert_affected_user_test.rb
254
254
  - test/unit/resque_failure_test.rb
255
255
  - test/unit/sidekiq_failure_test.rb
256
+ has_rdoc: