gh_inspector 1.0.2 → 1.0.3
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 +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +17 -4
- data/lib/gh_inspector/evidence.rb +9 -0
- data/lib/gh_inspector/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e938b9d4693ba53787f155cb39737c9d515ebe9
|
4
|
+
data.tar.gz: 0cebe01e047889fa770e1ed59323f48cf4c232f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0788a4f00d105e08289bee13a4419dc659fa20a91c9abf572c4e8c5d132508c4c1425e42d6700aa5b6201555794638af3a6614a46527a463cf511abe46c336ef
|
7
|
+
data.tar.gz: bab69021608975fe5b07d8b21de248df6831d71f9b942546f604feb6bebc191c97129ca542249b8f410d56ec65689272be96460cccf110a126059f75c3c77800
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -27,6 +27,9 @@ based on your raised exception, or as a direct query yourself.
|
|
27
27
|
``` ruby
|
28
28
|
require 'gh_inspector'
|
29
29
|
inspector = GhInspector::Inspector.new "orta", "eigen"
|
30
|
+
# Either use an error:
|
31
|
+
inspector.search_exception an_error, ArtsyUI.new
|
32
|
+
# Or use a specific query:
|
30
33
|
inspector.search_query "Someone set us up the bomb"
|
31
34
|
```
|
32
35
|
|
@@ -54,7 +57,7 @@ considered the protocol for other classes wanting to provide a user interface.
|
|
54
57
|
|
55
58
|
Your custom objects will be verified at runtime that they conform to the protocol.
|
56
59
|
|
57
|
-
You can see the default
|
60
|
+
You can see the default implementation at
|
58
61
|
[lib/evidence.rb](/orta/gh-issues-inspector/tree/master/lib/evidence.rb).
|
59
62
|
|
60
63
|
Both `search_query` and `search_exception` take your custom delegate as a 2nd optional parameter.
|
@@ -62,13 +65,23 @@ Both `search_query` and `search_exception` take your custom delegate as a 2nd op
|
|
62
65
|
``` ruby
|
63
66
|
require 'gh_inspector'
|
64
67
|
inspector = GhInspector::Inspector.new "orta", "eigen"
|
65
|
-
inspector.
|
68
|
+
inspector.search_exception an_error, ArtsyUI.new
|
66
69
|
```
|
70
|
+
|
71
|
+
or
|
72
|
+
|
73
|
+
``` ruby
|
74
|
+
require 'gh_inspector'
|
75
|
+
inspector = GhInspector::Inspector.new "fastlane", "fastlane"
|
76
|
+
inspector.search_query "Someone set us up the bomb", FastlaneUI.new
|
77
|
+
```
|
78
|
+
|
79
|
+
|
67
80
|
Protocol for custom objects:
|
68
81
|
|
69
82
|
- `inspector_started_query(query, inspector)` - Called just as the investigation has begun.
|
70
|
-
- `inspector_successfully_recieved_report(report, inspector)` - Called once the inspector has
|
71
|
-
- `inspector_recieved_empty_report(report, inspector)` - Called once the report has been
|
83
|
+
- `inspector_successfully_recieved_report(report, inspector)` - Called once the inspector has received a report with more than one issue.
|
84
|
+
- `inspector_recieved_empty_report(report, inspector)` - Called once the report has been received, but when there are no issues found.
|
72
85
|
- `inspector_could_not_create_report(error, query, inspector)` - Called when there have been networking issues in creating the report.
|
73
86
|
|
74
87
|
|
@@ -37,12 +37,15 @@ module GhInspector
|
|
37
37
|
puts "and #{report.total_results - NUMBER_OF_ISSUES_INLINE} more at: #{report.url}"
|
38
38
|
puts ""
|
39
39
|
end
|
40
|
+
|
41
|
+
print_open_link_hint
|
40
42
|
end
|
41
43
|
|
42
44
|
# Called once the report has been recieved, but when there are no issues found.
|
43
45
|
def inspector_recieved_empty_report(report, inspector)
|
44
46
|
puts "Found no similar issues. To create a new issue, please visit:"
|
45
47
|
puts "https://github.com/#{inspector.repo_owner}/#{inspector.repo_name}/issues/new"
|
48
|
+
print_open_link_hint(true)
|
46
49
|
end
|
47
50
|
|
48
51
|
# Called when there have been networking issues in creating the report.
|
@@ -50,6 +53,7 @@ module GhInspector
|
|
50
53
|
puts "Could not access the GitHub API, you may have better luck via the website."
|
51
54
|
puts "https://github.com/#{inspector.repo_owner}/#{inspector.repo_name}/search?q=#{query}&type=Issues&utf8=✓"
|
52
55
|
puts "Error: #{error.name}"
|
56
|
+
print_open_link_hint(true)
|
53
57
|
end
|
54
58
|
|
55
59
|
private
|
@@ -60,6 +64,11 @@ module GhInspector
|
|
60
64
|
puts " #{Time.parse(issue.updated_at).to_pretty}"
|
61
65
|
puts ""
|
62
66
|
end
|
67
|
+
|
68
|
+
def print_open_link_hint(newline = false)
|
69
|
+
puts "" if newline
|
70
|
+
puts "You can ⌘ + double-click on links to open them directly in your browser. 🔗" if /darwin/ =~ RUBY_PLATFORM
|
71
|
+
end
|
63
72
|
end
|
64
73
|
end
|
65
74
|
|
data/lib/gh_inspector/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh_inspector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Orta Therox
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- ".rspec"
|
101
101
|
- ".rubocop.yml"
|
102
102
|
- ".travis.yml"
|
103
|
+
- CHANGELOG.md
|
103
104
|
- Gemfile
|
104
105
|
- README.md
|
105
106
|
- Rakefile
|
@@ -138,4 +139,3 @@ specification_version: 4
|
|
138
139
|
summary: Search through GitHub issues for your project for existing issues about a
|
139
140
|
Ruby Error.
|
140
141
|
test_files: []
|
141
|
-
has_rdoc:
|