canary_notifier 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'canary_notifier'
3
- s.version = '0.0.6'
3
+ s.version = '0.0.7'
4
4
  s.authors = ["Henry Scudder"]
5
5
  s.date = %q{2011-10-27}
6
6
  s.summary = "Exception notification to Canary for Rails apps"
@@ -8,7 +8,6 @@ class CanaryNotifier
8
8
  def call(env)
9
9
  @app.call(env)
10
10
  rescue Exception => e
11
- puts "CANARY!!!"
12
11
  url = 'http://stark:abc123@bugdrop.canary.io/notify'
13
12
  first_line = e.backtrace.first
14
13
  (file_name, line_number, method) = first_line.split(':')
@@ -31,6 +30,7 @@ class CanaryNotifier
31
30
  data["code_sample"] = lines[start_line..end_line].join
32
31
 
33
32
  data["code_sample_line_start"] = line_number.to_i - 3
33
+ data["code_sample_line_start"] = 1 if data["code_sample_line_start"] < 1
34
34
  RestClient.post url, data.to_json
35
35
 
36
36
  raise e
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canary_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
16
- requirement: &70193536300340 !ruby/object:Gem::Requirement
16
+ requirement: &70133943410040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70193536300340
24
+ version_requirements: *70133943410040
25
25
  description:
26
26
  email: support@canaryhq.com
27
27
  executables: []