raygun4ruby 1.4.0 → 1.5.0

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: 997889cefe9c1b82cdd6d6705b89d180735022ab
4
- data.tar.gz: 4639a0dc7117a6f0645927e22411670f117e759f
3
+ metadata.gz: 87bcff1d09782d4e215f3c5bcaec19c5ab14d43e
4
+ data.tar.gz: 4d033882abae5990a864817801f3c928981bb60a
5
5
  SHA512:
6
- metadata.gz: 878194b16e28a4acd08c76c2a164169162811eb4d033dfe251f5412a8ccbcc3c433fd28cd8bead36701dae82f360eba77fbbdef6d99b051725b3e467aced5c0e
7
- data.tar.gz: 6a16be23e16879c829630638123a34ed28551739d91c86970a748d7a06530401e80218f9aa8ae55b4df0b01e54f3a169b1f7647d5aa7b6e988edc43476d1348a
6
+ metadata.gz: 683c9f6446683722f334a370ec6e4c463fcdc43699deb9146c1bb44bfa8f9017324271036396c77639e9129e21a749655ddfbb0a9c750f0bcfa8fed7bf3c59ef
7
+ data.tar.gz: 47c6be6d9106a7eff502f64f15cc72ea751534ad239e392224388f186d8fea8e1b0c2c7b7480f5f8d585db960a711f1afc6242b3b3687577040437a36e81b5c7
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## 1.4.0
1
+ ## 1.5.0 (16/03/2017)
2
+
3
+ Features
4
+ - Send utcOffset with Raygun payload to calculate local server time in Raygun dashboard
5
+
6
+ ## 1.4.0 (14/03/2017)
2
7
 
3
8
  Features:
4
9
  - Raygun API url is now configurable via `Configuration.api_url`
data/lib/raygun/client.rb CHANGED
@@ -176,7 +176,10 @@ module Raygun
176
176
  error: error_details(exception_instance),
177
177
  userCustomData: exception_custom_data.merge(custom_data).merge(configured_custom_data),
178
178
  tags: Raygun.configuration.tags.concat(tags).compact.uniq,
179
- request: request_information(env)
179
+ request: request_information(env),
180
+ environment: {
181
+ utcOffset: Time.now.utc_offset / 3600
182
+ }
180
183
  }
181
184
 
182
185
  error_details.merge!(groupingKey: grouping_key) if grouping_key
@@ -250,6 +253,5 @@ module Raygun
250
253
  def print_api_key_warning
251
254
  $stderr.puts(NO_API_KEY_MESSAGE)
252
255
  end
253
-
254
256
  end
255
257
  end
@@ -1,3 +1,3 @@
1
1
  module Raygun
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -30,6 +30,9 @@ class ClientTest < Raygun::UnitTest
30
30
  super
31
31
  @client = Raygun::Client.new
32
32
  fake_successful_entry
33
+
34
+ # Force NZ time zone for utcOffset tests
35
+ ENV['TZ'] = 'UTC-13'
33
36
  end
34
37
 
35
38
  def test_api_key_required_message
@@ -57,6 +60,12 @@ class ClientTest < Raygun::UnitTest
57
60
  assert_equal expected_message, @client.send(:error_details, e)[:message]
58
61
  end
59
62
 
63
+ def test_utc_offset
64
+ expected = 13
65
+
66
+ assert_equal expected, @client.send(:build_payload_hash, test_exception, sample_env_hash)[:details][:environment][:utcOffset]
67
+ end
68
+
60
69
  def test_inner_error_details
61
70
  oe = TestException.new("A test message")
62
71
  oe.set_backtrace(["/some/folder/some_file.rb:123:in `some_method_name'"])
@@ -178,7 +187,10 @@ class ClientTest < Raygun::UnitTest
178
187
  userCustomData: {},
179
188
  tags: ["test"],
180
189
  request: {},
181
- groupingKey: grouping_key
190
+ groupingKey: grouping_key,
191
+ environment: {
192
+ utcOffset: 13
193
+ }
182
194
  }
183
195
  }
184
196
 
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.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindscape
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-14 00:00:00.000000000 Z
12
+ date: 2017-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty