octoevent 0.1.1 → 0.1.2
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.
- data/lib/OctoEvent.rb +3 -0
- metadata +1 -1
data/lib/OctoEvent.rb
CHANGED
@@ -59,6 +59,7 @@ class OctoEvent
|
|
59
59
|
update_target if @config_url
|
60
60
|
|
61
61
|
result = {}
|
62
|
+
puts target_array
|
62
63
|
target_array.each do |target|
|
63
64
|
events = events_for target, acceptable_events
|
64
65
|
result[target] = events unless events.empty?
|
@@ -82,6 +83,7 @@ class OctoEvent
|
|
82
83
|
obj = @parsing_block.call(obj) if @parsing_block
|
83
84
|
|
84
85
|
obj.each do |target|
|
86
|
+
@target_array = []
|
85
87
|
name = target["name"]
|
86
88
|
type = target["type"]
|
87
89
|
target_array << path_for(name, type)
|
@@ -98,6 +100,7 @@ class OctoEvent
|
|
98
100
|
page = 1
|
99
101
|
while page <= 10
|
100
102
|
result = @clnt.get(url, {client_id: @client_id, client_secret: @client_secret}, {"If-None-Match" => etag})
|
103
|
+
puts result.body
|
101
104
|
break unless result.status_code == 200
|
102
105
|
events = JSON.load result.body
|
103
106
|
if page == 1 # etag and last event should be set when querying the very first page
|