airbrake_tools 1.0.4 → 1.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60c8a85763a48a82f351a2676f27b93cf35531b1
4
- data.tar.gz: 9ca5f913fe9b0c71906205b3e094f13bb01ce96d
3
+ metadata.gz: 5ea49b72235f6a62e753102f6d07f2d41c7bc5b7
4
+ data.tar.gz: 9f514717ab71fbcdc045d6c336d756e43ccea9de
5
5
  SHA512:
6
- metadata.gz: dd591d63c546aabec69a7397eb5d92258ff61a9d74ce4ca3b3e2f7d27345e7e3acc24d12fe2546000f6f7b8df1aff8fedf351360cdbfda90f0837f29e7f918b2
7
- data.tar.gz: 9a4a336576e653f1dd71c1dfbd7568bd51ae45dd229950618a9686a2ab71378ee496274b4a4697b669944d3c6366e5a91d514c9f660f4facf1f73444ab6fab4a
6
+ metadata.gz: 712710f12d95219862c76da872901b7471d9b4ae2665d78949660efb75a665cfbd81dc0c4e79d90ae71a11ce6e0d48995d4ac3059bd5cb2329f8075073d56adc
7
+ data.tar.gz: 5dd5acce0938678613d8f2f06045658de4b737baa56218216811771c136f7b57dd909cfb88afa5a10ec3d77fa5519cbcfa6a5ad7238261167a25a3f197b2b389
data/Gemfile CHANGED
@@ -4,3 +4,4 @@ gemspec
4
4
  gem "bump", "0.3.8"
5
5
  gem "rake"
6
6
  gem "rspec", "~>2"
7
+ gem "launchy"
data/Gemfile.lock CHANGED
@@ -1,12 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- airbrake_tools (1.0.4)
4
+ airbrake_tools (1.0.5)
5
5
  airbrake-api (>= 4.5.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
+ addressable (2.3.6)
10
11
  airbrake-api (4.6.0)
11
12
  faraday_middleware
12
13
  hashie
@@ -19,6 +20,8 @@ GEM
19
20
  faraday_middleware (0.9.0)
20
21
  faraday (>= 0.7.4, < 0.9)
21
22
  hashie (2.0.5)
23
+ launchy (2.4.2)
24
+ addressable (~> 2.3)
22
25
  multi_xml (0.5.5)
23
26
  multipart-post (1.2.0)
24
27
  parallel (0.9.2)
@@ -38,5 +41,6 @@ PLATFORMS
38
41
  DEPENDENCIES
39
42
  airbrake_tools!
40
43
  bump (= 0.3.8)
44
+ launchy
41
45
  rake
42
46
  rspec (~> 2)
@@ -1,3 +1,3 @@
1
1
  module AirbrakeTools
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  # encoding: UTF-8
2
2
  require "airbrake_tools/version"
3
3
  require "airbrake-api"
4
+ require "launchy"
4
5
 
5
6
  module AirbrakeTools
6
7
  DEFAULT_HOT_PAGES = 1
@@ -37,8 +38,10 @@ module AirbrakeTools
37
38
  summary(ARGV[3] || raise("Need error id"), options)
38
39
  when "new"
39
40
  print_errors(new(options))
41
+ when "open"
42
+ open(ARGV[3] || raise("Need error id"), ARGV[4])
40
43
  else
41
- raise "Unknown command #{ARGV[2].inspect} try hot/new/list/summary"
44
+ raise "Unknown command #{ARGV[2].inspect} try hot/new/list/summary/open"
42
45
  end
43
46
  return 0
44
47
  end
@@ -83,6 +86,19 @@ module AirbrakeTools
83
86
  end
84
87
  end
85
88
 
89
+ def open(error_id, notice_id=nil)
90
+ error = AirbrakeAPI.error(error_id)
91
+ raise URI::InvalidURIError if error.nil?
92
+
93
+ if notice_id.nil?
94
+ Launchy.open "https://#{AirbrakeAPI.account}.airbrake.io/projects/#{error.project_id}/groups/#{error_id}"
95
+ else
96
+ Launchy.open "https://#{AirbrakeAPI.account}.airbrake.io/projects/#{error.project_id}/groups/#{error_id}/notices/#{notice_id}"
97
+ end
98
+ rescue URI::InvalidURIError
99
+ puts "Error id does not map to any error on Airbrake"
100
+ end
101
+
86
102
  private
87
103
 
88
104
  def present_line(line)
@@ -197,6 +213,7 @@ module AirbrakeTools
197
213
  hot: list hottest errors
198
214
  list: list errors 1-by-1 so you can e.g. grep -> search
199
215
  summary: analyze occurrences and backtrace origins
216
+ open: opens specified error in your default browser
200
217
 
201
218
  Usage:
202
219
  airbrake-tools subdomain auth-token command [options]
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Cheatham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-06 00:00:00.000000000 Z
11
+ date: 2014-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-api
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.5.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.5.1
27
27
  description:
@@ -31,7 +31,7 @@ executables:
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - .gitignore
34
+ - ".gitignore"
35
35
  - Gemfile
36
36
  - Gemfile.lock
37
37
  - Rakefile
@@ -54,18 +54,19 @@ require_paths:
54
54
  - lib
55
55
  required_ruby_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - '>='
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - '>='
62
+ - - ">="
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 2.0.14
67
+ rubygems_version: 2.2.2
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: Power tools for Airbrake
71
71
  test_files: []
72
+ has_rdoc: