gh_inspector 1.1.0 → 1.1.1

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: bc631a268c46ddf8d681b061dc5f0d9b05b47955
4
- data.tar.gz: 8ef73fba20dbe881e33add01f48c3f5daba9d1bf
3
+ metadata.gz: 87ebad675ac89d32c464cb575b64fb0c7cd4a6a0
4
+ data.tar.gz: 2f511263536426b39583daac41577cb49e35552f
5
5
  SHA512:
6
- metadata.gz: 141da60a8452e22094e68c4588458dcc5bb757c97963cd051ba74229cf9111bd0049090371f57ba93845feb6b834c4c77e43525fb65f1ecc25aa8bc5277ce23d
7
- data.tar.gz: ab2aa3aa2a07397c0481d794f4d07ad440c6e9a19697ed2c216b1c31d7c50df1e190b9f6739648c9dddf7c5b6e487367cf56e47f1adc0d22ffd284fed9476c0e
6
+ metadata.gz: 8ecfa65327a763e07dfc422fc8fa924b164e1bdd4fd7ef49cb22fdd8c345e9cf10c3557e76d9e11c9785cf188f950dec6cb3a74cc5e29daa79371e0b035ef91a
7
+ data.tar.gz: 76ff3baaea94f8dbbf1dcd3e886e33ec7652abaec64b2699b8507b5cd521443d1e1bb51f20c19da5e0ef223b5e354af1583c7864385530b069c7a05657db0d72
@@ -1,5 +1,9 @@
1
1
  ### Master
2
2
 
3
+ ### 1.1.1
4
+
5
+ * Allow either all typoes, or all no typoes in the delegate call - revolter
6
+
3
7
  ### 1.1.0
4
8
 
5
9
  * Fixes typos in the delegate methods - revolter
@@ -7,12 +7,13 @@ module GhInspector
7
7
  # then pass them back to the inspector who gets the public API credit.
8
8
 
9
9
  class Sidekick
10
- attr_accessor :repo_owner, :repo_name, :inspector
10
+ attr_accessor :repo_owner, :repo_name, :inspector, :using_deprecated_method
11
11
 
12
12
  def initialize(inspector, repo_owner, repo_name)
13
13
  self.inspector = inspector
14
14
  self.repo_owner = repo_owner
15
15
  self.repo_name = repo_name
16
+ self.using_deprecated_method = false
16
17
  end
17
18
 
18
19
  # Searches for a query, with a UI delegate
@@ -34,9 +35,17 @@ module GhInspector
34
35
  # TODO: progress callback
35
36
 
36
37
  if report.issues.any?
37
- delegate.inspector_successfully_received_report(report, inspector)
38
+ if self.using_deprecated_method
39
+ delegate.inspector_successfully_recieved_report(report, inspector)
40
+ else
41
+ delegate.inspector_successfully_received_report(report, inspector)
42
+ end
38
43
  else
39
- delegate.inspector_received_empty_report(report, inspector)
44
+ if self.using_deprecated_method
45
+ delegate.inspector_recieved_empty_report(report, inspector)
46
+ else
47
+ delegate.inspector_received_empty_report(report, inspector)
48
+ end
40
49
  end
41
50
 
42
51
  report
@@ -85,10 +94,26 @@ module GhInspector
85
94
  end
86
95
 
87
96
  def validate_delegate(delegate)
97
+ deprecated_delegate_methods = [
98
+ :inspector_successfully_recieved_report,
99
+ :inspector_recieved_empty_report
100
+ ]
101
+ new_delegate_methods = [
102
+ :inspector_successfully_received_report,
103
+ :inspector_received_empty_report
104
+ ]
105
+
106
+ deprecated_delegate_methods.each do |deprecated_delegate_method|
107
+ self.using_deprecated_method = true if delegate.methods.include?(deprecated_delegate_method)
108
+ end
109
+
88
110
  e = Evidence.new
89
111
  protocol = e.public_methods false
90
112
  protocol.each do |m|
91
- raise "#{delegate} does not handle #{m}" unless delegate.methods.include? m
113
+ is_deprecated_method = deprecated_delegate_methods.include?(m)
114
+ is_new_delegate_method = new_delegate_methods.include?(m)
115
+
116
+ raise "#{delegate} does not handle #{m}" unless delegate.methods.include?(m) || is_deprecated_method || is_new_delegate_method
92
117
  end
93
118
  end
94
119
  end
@@ -1,3 +1,3 @@
1
1
  module GhInspector
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.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.1.0
4
+ version: 1.1.1
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: 2018-02-01 00:00:00.000000000 Z
12
+ date: 2018-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler