octoevent 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/OctoEvent.rb +3 -0
  2. 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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octoevent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: