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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc8e5a271a620f4ef59c7b83ab5a30fb1603b68f
4
- data.tar.gz: cbf0cc228892d9508fa8afd66df733da3e8ff18b
3
+ metadata.gz: 8e938b9d4693ba53787f155cb39737c9d515ebe9
4
+ data.tar.gz: 0cebe01e047889fa770e1ed59323f48cf4c232f8
5
5
  SHA512:
6
- metadata.gz: 3f57b52b2a1aa0a53ae8c731399b91b6b6fd86be9bcced1be434a44c6d516681c40e632f93cc41bdb2171139913721b8c6cad3e9596ea46a5f014e50526a788c
7
- data.tar.gz: c9d4eeda469f586d0a5302bfe5a4507b8fbaaaed0c88ff2e0c47ba41580638271f49266d77327f548750946600947ec0d886186615072df99c8fda7fbb7c8d0e
6
+ metadata.gz: 0788a4f00d105e08289bee13a4419dc659fa20a91c9abf572c4e8c5d132508c4c1425e42d6700aa5b6201555794638af3a6614a46527a463cf511abe46c336ef
7
+ data.tar.gz: bab69021608975fe5b07d8b21de248df6831d71f9b942546f604feb6bebc191c97129ca542249b8f410d56ec65689272be96460cccf110a126059f75c3c77800
@@ -0,0 +1,11 @@
1
+ ### Master
2
+
3
+ * Adds support for showing how to click on a link in terminal - 0xced
4
+
5
+ ### 1.0.3
6
+
7
+ * Fixes for URLs with spaces - orta
8
+
9
+ ### 1.0.0
10
+
11
+ * Initial major release - orta + krausefx
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 implmentation at
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.search_query "Someone set us up the bomb", ArtsyUI.new
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 recieved a report with more than one issue.
71
- - `inspector_recieved_empty_report(report, inspector)` - Called once the report has been recieved, but when there are no issues found.
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
 
@@ -1,3 +1,3 @@
1
1
  module GhInspector
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
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.2
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: 2016-06-26 00:00:00.000000000 Z
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: