overlay 2.1.6 → 2.2.0

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: 002727d7c83076cee89989a93a02782b495b8c6e
4
- data.tar.gz: 095bd4654b2102672962922a99bea069578b40e3
3
+ metadata.gz: 40209f5a3f90eb0e0d419a56852c206682fc018b
4
+ data.tar.gz: 557e94ab77d1ad47dc2b2e2ce8e600b4d9e936dd
5
5
  SHA512:
6
- metadata.gz: a4224c70752c4813b13279c79cb323185cda00afc5ea84715c067954199048b00f7addf04190945e1f76df228ecbdf51c1dff36ab1031ec32c45c14e02dfe1d7
7
- data.tar.gz: ebd03859f18bd2006e0d26f031e87a92bb42356e3b77d11db311d130a4a0e8163112414e941848a114a77b10f83d910dacb4549a9c6224e3be67d2aa55d75d6e
6
+ metadata.gz: 01e8a094a9f4495bf35db856de6bdfb916adcd2b4102bb6bc2c4f665b8f6a1b122b5b5c0e9a7afbc78ec9cc779cc230e01b0d65dc0001e7822a07c08f798f130
7
+ data.tar.gz: 6b903dbab503768ccb890c4a3b673ea49fb77c611d20ee9f1fce780cbfa8720fc9b0498ebb230a3b72743a889bf084c04035a6ce0f01b73261e1488f0306791e
@@ -155,26 +155,35 @@ module Overlay
155
155
 
156
156
  # Overlay all the files specifiec by the repo_config. This
157
157
  # process can be long_running so we fork. We should only be running
158
- # this method in initialization of the application.
158
+ # this method in initialization of the application or on explicit call.
159
+ # This method must succeed to completion to guarantee we have all the files
160
+ # we need so we will continue to retyr until we are complete
159
161
  def overlay_repo repo_config
160
162
  Rails.logger.info "Overlay started processing repo with config #{repo_config.inspect}"
161
163
 
162
164
  # Get our root entries
163
165
  root = repo_config.root_source_path || '/'
164
166
 
165
- # If we have a root defined, jump right into it
166
- if root != '/'
167
- overlay_directory(root, repo_config)
168
- else
169
- root_entries = repo_config.github_api.contents.get(repo_config.org, repo_config.repo, root, ref: repo_config.branch).response.body
167
+ begin
168
+ # If we have a root defined, jump right into it
169
+ if root != '/'
170
+ overlay_directory(root, repo_config)
171
+ else
172
+ root_entries = repo_config.github_api.contents.get(repo_config.org, repo_config.repo, root, ref: repo_config.branch).response.body
170
173
 
171
- # We aren't pulling anything out of root. Cycle through directories and overlay
172
- root_entries.each do |entry|
173
- if entry.type == 'dir'
174
- overlay_directory(entry.path, repo_config)
174
+ # We aren't pulling anything out of root. Cycle through directories and overlay
175
+ root_entries.each do |entry|
176
+ if entry.type == 'dir'
177
+ overlay_directory(entry.path, repo_config)
178
+ end
175
179
  end
176
180
  end
181
+ rescue => e
182
+ Rails.logger.error "Overlay encountered an error during overlay_repo and is retrying: #{e.message}"
183
+ sleep 5
184
+ retry
177
185
  end
186
+
178
187
  Rails.logger.info "Overlay finished processing repo with config #{repo_config.inspect}"
179
188
  end
180
189
 
@@ -199,23 +208,31 @@ module Overlay
199
208
 
200
209
  # Fork a new process and subscribe to a redis channel
201
210
  def subscribe_to_channel key, repo_config
202
- redis = Redis.new(:timeout => 30, :host => repo_config.redis_server, :port => repo_config.redis_port)
211
+ redis = Redis.new(:host => repo_config.redis_server, :port => repo_config.redis_port)
203
212
 
204
213
  # This key is going to receive a publish event
205
214
  # for any changes to the target repo. We need to verify
206
- # that the payload references our branch and our watch direstory
207
- redis.subscribe(key) do |on|
208
- on.message do |channel, msg|
209
- Rails.logger.info "Overlay received publish event for channel #{key} with payload: #{msg}"
210
- hook = JSON.parse(msg)
211
-
212
- # Make sure this is the branch we are watching
213
- if (hook['ref'] == "refs/heads/#{repo_config.branch}")
214
- Rails.logger.info "Overlay enqueueing Github hook processing job for repo: #{repo_config.repo} and branch: #{repo_config.branch}"
215
- process_hook(hook, repo_config)
216
- Rails.logger.info "Overlay done processing job for repo: #{repo_config.repo} and branch: #{repo_config.branch}"
215
+ # that the payload references our branch and our watch direstory.
216
+ # The subscribe call is persistent.
217
+ begin
218
+ redis.subscribe(key) do |on|
219
+ on.message do |channel, msg|
220
+ Rails.logger.info "Overlay received publish event for channel #{key} with payload: #{msg}"
221
+ hook = JSON.parse(msg)
222
+
223
+ # Make sure this is the branch we are watching
224
+ if (hook['ref'] == "refs/heads/#{repo_config.branch}")
225
+ Rails.logger.info "Overlay enqueueing Github hook processing job for repo: #{repo_config.repo} and branch: #{repo_config.branch}"
226
+ process_hook(hook, repo_config)
227
+ Rails.logger.info "Overlay done processing job for repo: #{repo_config.repo} and branch: #{repo_config.branch}"
228
+ end
217
229
  end
218
230
  end
231
+ Rails.logger.error "Overlay subscribe closed for unknown reason."
232
+ rescue => e
233
+ Rails.logger.error "Overlay encountered an error during subscribe_to_channel on key #{key} and is retrying: #{e.message}"
234
+ sleep 5
235
+ retry
219
236
  end
220
237
  end
221
238
 
@@ -1,3 +1,3 @@
1
1
  module Overlay
2
- VERSION = "2.1.6"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -2041,3 +2041,388 @@ Overlay found modified file in hook: lib/test/test_modified.rb
2041
2041
  Overlay subscribing to redis channel: test_key
2042
2042
  Overlay register webhook for repo: org => test_org, repo => test_repo
2043
2043
  Overlay register webhook for repo: org => test_org, repo => test_repo
2044
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2045
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2046
+ Overlay subscribing to redis channel: test_key
2047
+ Overlay found added file in hook: lib/test/test_added.rb
2048
+ Overlay found modified file in hook: lib/test/test_modified.rb
2049
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2050
+ Overlay found added file in hook: lib/test/test_added.rb
2051
+ Overlay found modified file in hook: lib/test/test_modified.rb
2052
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2053
+ Overlay found added file in hook: lib/test/test_added.rb
2054
+ Overlay found modified file in hook: lib/test/test_modified.rb
2055
+ Overlay found added file in hook: lib/test/test_added.rb
2056
+ Overlay found modified file in hook: lib/test/test_modified.rb
2057
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2058
+ Overlay found modified file in hook: lib/test/test_modified.rb
2059
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2060
+ Overlay found added file in hook: lib/test/test_added.rb
2061
+ Overlay found modified file in hook: lib/test/test_modified.rb
2062
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2063
+ Overlay found added file in hook: lib/test/test_added.rb
2064
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2065
+ Processing by Overlay::GithubController#update as HTML
2066
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2067
+ Rendered text template (0.0ms)
2068
+ Completed 200 OK in 7ms (Views: 6.7ms)
2069
+ Processing by Overlay::GithubController#update as HTML
2070
+ Completed 200 OK in 0ms (Views: 0.2ms)
2071
+ Processing by Overlay::GithubController#update as HTML
2072
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2073
+ Rendered text template (0.0ms)
2074
+ Completed 200 OK in 4ms (Views: 3.2ms)
2075
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2076
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2077
+ Overlay subscribing to redis channel: test_key
2078
+ Overlay found added file in hook: lib/test/test_added.rb
2079
+ Overlay found modified file in hook: lib/test/test_modified.rb
2080
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2081
+ Overlay found modified file in hook: lib/test/test_modified.rb
2082
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2083
+ Overlay found added file in hook: lib/test/test_added.rb
2084
+ Overlay found modified file in hook: lib/test/test_modified.rb
2085
+ Overlay found added file in hook: lib/test/test_added.rb
2086
+ Overlay found modified file in hook: lib/test/test_modified.rb
2087
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2088
+ Overlay found added file in hook: lib/test/test_added.rb
2089
+ Overlay found modified file in hook: lib/test/test_modified.rb
2090
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2091
+ Overlay found added file in hook: lib/test/test_added.rb
2092
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2093
+ Overlay found added file in hook: lib/test/test_added.rb
2094
+ Overlay found modified file in hook: lib/test/test_modified.rb
2095
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2096
+ Processing by Overlay::GithubController#update as HTML
2097
+ Completed 200 OK in 0ms (Views: 0.2ms)
2098
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2099
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2100
+ Overlay subscribing to redis channel: test_key
2101
+ Overlay subscribe closed for unknown reason.
2102
+ Overlay found added file in hook: lib/test/test_added.rb
2103
+ Overlay found modified file in hook: lib/test/test_modified.rb
2104
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2105
+ Overlay found modified file in hook: lib/test/test_modified.rb
2106
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2107
+ Overlay found added file in hook: lib/test/test_added.rb
2108
+ Overlay found modified file in hook: lib/test/test_modified.rb
2109
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2110
+ Overlay found added file in hook: lib/test/test_added.rb
2111
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2112
+ Overlay found added file in hook: lib/test/test_added.rb
2113
+ Overlay found modified file in hook: lib/test/test_modified.rb
2114
+ Overlay found added file in hook: lib/test/test_added.rb
2115
+ Overlay found modified file in hook: lib/test/test_modified.rb
2116
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2117
+ Overlay found added file in hook: lib/test/test_added.rb
2118
+ Overlay found modified file in hook: lib/test/test_modified.rb
2119
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2120
+ Processing by Overlay::GithubController#update as HTML
2121
+ Rendered text template (0.0ms)
2122
+ Completed 200 OK in 4ms (Views: 3.2ms)
2123
+ Processing by Overlay::GithubController#update as HTML
2124
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2125
+ Completed 200 OK in 0ms (Views: 0.1ms)
2126
+ Overlay subscribing to redis channel: test_key
2127
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2128
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2129
+ Overlay found added file in hook: lib/test/test_added.rb
2130
+ Overlay found modified file in hook: lib/test/test_modified.rb
2131
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2132
+ Overlay found added file in hook: lib/test/test_added.rb
2133
+ Overlay found modified file in hook: lib/test/test_modified.rb
2134
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2135
+ Overlay found modified file in hook: lib/test/test_modified.rb
2136
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2137
+ Overlay found added file in hook: lib/test/test_added.rb
2138
+ Overlay found modified file in hook: lib/test/test_modified.rb
2139
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2140
+ Overlay found added file in hook: lib/test/test_added.rb
2141
+ Overlay found modified file in hook: lib/test/test_modified.rb
2142
+ Overlay found added file in hook: lib/test/test_added.rb
2143
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2144
+ Overlay found added file in hook: lib/test/test_added.rb
2145
+ Overlay found modified file in hook: lib/test/test_modified.rb
2146
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2147
+ Processing by Overlay::GithubController#update as HTML
2148
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2149
+ Rendered text template (0.0ms)
2150
+ Completed 200 OK in 4ms (Views: 3.2ms)
2151
+ Processing by Overlay::GithubController#update as HTML
2152
+ Completed 200 OK in 0ms (Views: 0.1ms)
2153
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2154
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2155
+ Overlay subscribing to redis channel: test_key
2156
+ Overlay subscribe closed for unknown reason.
2157
+ Overlay found added file in hook: lib/test/test_added.rb
2158
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2159
+ Overlay found added file in hook: lib/test/test_added.rb
2160
+ Overlay found modified file in hook: lib/test/test_modified.rb
2161
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2162
+ Overlay found added file in hook: lib/test/test_added.rb
2163
+ Overlay found modified file in hook: lib/test/test_modified.rb
2164
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2165
+ Overlay found modified file in hook: lib/test/test_modified.rb
2166
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2167
+ Overlay found added file in hook: lib/test/test_added.rb
2168
+ Overlay found modified file in hook: lib/test/test_modified.rb
2169
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2170
+ Overlay found added file in hook: lib/test/test_added.rb
2171
+ Overlay found modified file in hook: lib/test/test_modified.rb
2172
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2173
+ Overlay found added file in hook: lib/test/test_added.rb
2174
+ Overlay found modified file in hook: lib/test/test_modified.rb
2175
+ Processing by Overlay::GithubController#update as HTML
2176
+ Rendered text template (0.0ms)
2177
+ Completed 200 OK in 5ms (Views: 4.2ms)
2178
+ Processing by Overlay::GithubController#update as HTML
2179
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2180
+ Completed 200 OK in 0ms (Views: 0.2ms)
2181
+ Processing by Overlay::GithubController#update as HTML
2182
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2183
+ Rendered text template (0.0ms)
2184
+ Completed 200 OK in 4ms (Views: 3.3ms)
2185
+ Processing by Overlay::GithubController#update as HTML
2186
+ Completed 200 OK in 0ms (Views: 0.2ms)
2187
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2188
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2189
+ Overlay subscribing to redis channel: test_key
2190
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2191
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2192
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2193
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2194
+ Overlay subscribe closed for unknown reason.
2195
+ Overlay found added file in hook: lib/test/test_added.rb
2196
+ Overlay found modified file in hook: lib/test/test_modified.rb
2197
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2198
+ Overlay found added file in hook: lib/test/test_added.rb
2199
+ Overlay found modified file in hook: lib/test/test_modified.rb
2200
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2201
+ Overlay found added file in hook: lib/test/test_added.rb
2202
+ Overlay found modified file in hook: lib/test/test_modified.rb
2203
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2204
+ Overlay found added file in hook: lib/test/test_added.rb
2205
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2206
+ Overlay found modified file in hook: lib/test/test_modified.rb
2207
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2208
+ Overlay found added file in hook: lib/test/test_added.rb
2209
+ Overlay found modified file in hook: lib/test/test_modified.rb
2210
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2211
+ Overlay found added file in hook: lib/test/test_added.rb
2212
+ Overlay found modified file in hook: lib/test/test_modified.rb
2213
+ Processing by Overlay::GithubController#update as HTML
2214
+ Rendered text template (0.0ms)
2215
+ Completed 200 OK in 4ms (Views: 3.4ms)
2216
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2217
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2218
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2219
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2220
+ Overlay subscribe closed for unknown reason.
2221
+ Overlay subscribing to redis channel: test_key
2222
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2223
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2224
+ Overlay found modified file in hook: lib/test/test_modified.rb
2225
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2226
+ Overlay found added file in hook: lib/test/test_added.rb
2227
+ Overlay found modified file in hook: lib/test/test_modified.rb
2228
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2229
+ Overlay found added file in hook: lib/test/test_added.rb
2230
+ Overlay found modified file in hook: lib/test/test_modified.rb
2231
+ Overlay found added file in hook: lib/test/test_added.rb
2232
+ Overlay found modified file in hook: lib/test/test_modified.rb
2233
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2234
+ Overlay found added file in hook: lib/test/test_added.rb
2235
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2236
+ Overlay found added file in hook: lib/test/test_added.rb
2237
+ Overlay found modified file in hook: lib/test/test_modified.rb
2238
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2239
+ Overlay found added file in hook: lib/test/test_added.rb
2240
+ Overlay found modified file in hook: lib/test/test_modified.rb
2241
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2242
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007fbcdf3344f8 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="/", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007fbcdf334480 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2243
+ Processing by Overlay::GithubController#update as HTML
2244
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2245
+ Completed 200 OK in 0ms (Views: 0.2ms)
2246
+ Processing by Overlay::GithubController#update as HTML
2247
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2248
+ Rendered text template (0.0ms)
2249
+ Completed 200 OK in 4ms (Views: 3.2ms)
2250
+ Processing by Overlay::GithubController#update as HTML
2251
+ Completed 200 OK in 0ms (Views: 0.2ms)
2252
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007f9f8ec41fc8 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007f9f8ec41f28 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2253
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2254
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2255
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2256
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2257
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007f9f8ec41fc8 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007f9f8ec41f28 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2258
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2259
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2260
+ Overlay subscribing to redis channel: test_key
2261
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2262
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2263
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2264
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2265
+ Overlay subscribe closed for unknown reason.
2266
+ Overlay found added file in hook: lib/test/test_added.rb
2267
+ Overlay found modified file in hook: lib/test/test_modified.rb
2268
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2269
+ Overlay found added file in hook: lib/test/test_added.rb
2270
+ Overlay found modified file in hook: lib/test/test_modified.rb
2271
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2272
+ Overlay found added file in hook: lib/test/test_added.rb
2273
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2274
+ Overlay found modified file in hook: lib/test/test_modified.rb
2275
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2276
+ Overlay found added file in hook: lib/test/test_added.rb
2277
+ Overlay found modified file in hook: lib/test/test_modified.rb
2278
+ Overlay found added file in hook: lib/test/test_added.rb
2279
+ Overlay found modified file in hook: lib/test/test_modified.rb
2280
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2281
+ Overlay found added file in hook: lib/test/test_added.rb
2282
+ Overlay found modified file in hook: lib/test/test_modified.rb
2283
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2284
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2285
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2286
+ Overlay found added file in hook: lib/test/test_added.rb
2287
+ Overlay found modified file in hook: lib/test/test_modified.rb
2288
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2289
+ Overlay found added file in hook: lib/test/test_added.rb
2290
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2291
+ Overlay found added file in hook: lib/test/test_added.rb
2292
+ Overlay found modified file in hook: lib/test/test_modified.rb
2293
+ Overlay found added file in hook: lib/test/test_added.rb
2294
+ Overlay found modified file in hook: lib/test/test_modified.rb
2295
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2296
+ Overlay found modified file in hook: lib/test/test_modified.rb
2297
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2298
+ Overlay found added file in hook: lib/test/test_added.rb
2299
+ Overlay found modified file in hook: lib/test/test_modified.rb
2300
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2301
+ Overlay found added file in hook: lib/test/test_added.rb
2302
+ Overlay found modified file in hook: lib/test/test_modified.rb
2303
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2304
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007ff436b9a398 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007ff436b9a320 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2305
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2306
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007ff436b9a398 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007ff436b9a320 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2307
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2308
+ Overlay subscribing to redis channel: test_key
2309
+ Processing by Overlay::GithubController#update as HTML
2310
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2311
+ Rendered text template (0.0ms)
2312
+ Completed 200 OK in 5ms (Views: 4.4ms)
2313
+ Processing by Overlay::GithubController#update as HTML
2314
+ Completed 200 OK in 0ms (Views: 0.1ms)
2315
+ Overlay found added file in hook: lib/test/test_added.rb
2316
+ Overlay found modified file in hook: lib/test/test_modified.rb
2317
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2318
+ Overlay found added file in hook: lib/test/test_added.rb
2319
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2320
+ Overlay found added file in hook: lib/test/test_added.rb
2321
+ Overlay found modified file in hook: lib/test/test_modified.rb
2322
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2323
+ Overlay found added file in hook: lib/test/test_added.rb
2324
+ Overlay found modified file in hook: lib/test/test_modified.rb
2325
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2326
+ Overlay found added file in hook: lib/test/test_added.rb
2327
+ Overlay found modified file in hook: lib/test/test_modified.rb
2328
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2329
+ Overlay found modified file in hook: lib/test/test_modified.rb
2330
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2331
+ Overlay found added file in hook: lib/test/test_added.rb
2332
+ Overlay found modified file in hook: lib/test/test_modified.rb
2333
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2334
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2335
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2336
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2337
+ Overlay subscribe closed for unknown reason.
2338
+ Overlay subscribing to redis channel: test_key
2339
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2340
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2341
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007fb11a5c2448 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007fb11a5c23a8 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2342
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2343
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2344
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2345
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2346
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007fb11a5c2448 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007fb11a5c23a8 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2347
+ Processing by Overlay::GithubController#update as HTML
2348
+ Rendered text template (0.0ms)
2349
+ Completed 200 OK in 4ms (Views: 3.6ms)
2350
+ Processing by Overlay::GithubController#update as HTML
2351
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2352
+ Completed 200 OK in 0ms (Views: 0.2ms)
2353
+ Processing by Overlay::GithubController#update as HTML
2354
+ Rendered text template (0.0ms)
2355
+ Completed 200 OK in 4ms (Views: 3.5ms)
2356
+ Processing by Overlay::GithubController#update as HTML
2357
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2358
+ Completed 200 OK in 0ms (Views: 0.2ms)
2359
+ Overlay subscribing to redis channel: test_key
2360
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2361
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2362
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2363
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2364
+ Overlay subscribe closed for unknown reason.
2365
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007fb5ffc23640 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007fb5ffc23578 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2366
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2367
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2368
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2369
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2370
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007fb5ffc23640 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007fb5ffc23578 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2371
+ Overlay found added file in hook: lib/test/test_added.rb
2372
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2373
+ Overlay found added file in hook: lib/test/test_added.rb
2374
+ Overlay found modified file in hook: lib/test/test_modified.rb
2375
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2376
+ Overlay found added file in hook: lib/test/test_added.rb
2377
+ Overlay found modified file in hook: lib/test/test_modified.rb
2378
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2379
+ Overlay found modified file in hook: lib/test/test_modified.rb
2380
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2381
+ Overlay found added file in hook: lib/test/test_added.rb
2382
+ Overlay found modified file in hook: lib/test/test_modified.rb
2383
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2384
+ Overlay found added file in hook: lib/test/test_added.rb
2385
+ Overlay found modified file in hook: lib/test/test_modified.rb
2386
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2387
+ Overlay found added file in hook: lib/test/test_added.rb
2388
+ Overlay found modified file in hook: lib/test/test_modified.rb
2389
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2390
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2391
+ Processing by Overlay::GithubController#update as HTML
2392
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2393
+ Rendered text template (0.0ms)
2394
+ Completed 200 OK in 3ms (Views: 3.2ms)
2395
+ Processing by Overlay::GithubController#update as HTML
2396
+ Completed 200 OK in 0ms (Views: 0.2ms)
2397
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2398
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2399
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007fce6ebf16b8 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007fce6ebf1640 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2400
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2401
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2402
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2403
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2404
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007fce6ebf16b8 @org="test_org", @repo="test_repo", @auth="test_user:test_pass", @root_source_path="spec", @root_dest_path="spec", @redis_server=nil, @redis_port=nil, @registration_server=nil, @endpoint=nil, @site=nil, @branch="master", @use_publisher=false, @github_api=#<Github::Repos:0x007fce6ebf1640 @current_options={:adapter=>:net_http, :client_id=>nil, :client_secret=>nil, :oauth_token=>nil, :endpoint=>"https://api.github.com", :site=>"https://github.com", :ssl=>{:verify=>false}, :mime_type=>:json, :user_agent=>"Github Ruby Gem 0.11.2", :connection_options=>{}, :repo=>"test_repo", :user=>nil, :org=>"test_org", :login=>"test_user", :password=>"test_pass", :basic_auth=>"test_user:test_pass", :auto_pagination=>false}, @adapter=:net_http, @client_id=nil, @client_secret=nil, @oauth_token=nil, @endpoint="https://api.github.com", @site="https://github.com", @ssl={:verify=>false}, @mime_type=:json, @user_agent="Github Ruby Gem 0.11.2", @connection_options={}, @repo="test_repo", @user=nil, @org="test_org", @login="test_user", @password="test_pass", @basic_auth="test_user:test_pass", @auto_pagination=false>>
2405
+ Overlay subscribing to redis channel: test_key
2406
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2407
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2408
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2409
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2410
+ Overlay subscribe closed for unknown reason.
2411
+ Overlay found added file in hook: lib/test/test_added.rb
2412
+ Overlay found modified file in hook: lib/test/test_modified.rb
2413
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2414
+ Overlay found added file in hook: lib/test/test_added.rb
2415
+ Overlay found modified file in hook: lib/test/test_modified.rb
2416
+ Overlay found added file in hook: lib/test/test_added.rb
2417
+ Overlay found modified file in hook: lib/test/test_modified.rb
2418
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2419
+ Overlay found modified file in hook: lib/test/test_modified.rb
2420
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2421
+ Overlay found added file in hook: lib/test/test_added.rb
2422
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2423
+ Overlay found added file in hook: lib/test/test_added.rb
2424
+ Overlay found modified file in hook: lib/test/test_modified.rb
2425
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2426
+ Overlay found added file in hook: lib/test/test_added.rb
2427
+ Overlay found modified file in hook: lib/test/test_modified.rb
2428
+ Overlay found deleted file in hook: lib/test/test_removed.rb
@@ -68,6 +68,18 @@ describe Overlay::Github do
68
68
  end
69
69
  end
70
70
 
71
+ describe 'initial overlay_repo' do
72
+ it 'should retry overlay_repo until completion' do
73
+ @times_called = 0
74
+ allow(Overlay::Github.instance).to receive(:sleep).and_return
75
+ expect(Overlay::Github.instance).to receive(:overlay_directory).exactly(5).times.and_return do
76
+ @times_called += 1
77
+ raise StandardError unless @times_called == 5
78
+ end
79
+ Overlay::Github.instance.send(:overlay_repo, repo_config)
80
+ end
81
+ end
82
+
71
83
  describe 'subscribe to a redis publisher' do
72
84
  before :each do
73
85
  # Configure the overlay
@@ -80,7 +92,7 @@ describe Overlay::Github do
80
92
 
81
93
  config = repo_config
82
94
  config.use_publisher = true
83
- config.redis_server = 'localhost'
95
+ config.redis_server = 'unreachable'
84
96
  config.redis_port = 6734
85
97
  config.registration_server = "http://www.test.com"
86
98
 
@@ -107,6 +119,19 @@ describe Overlay::Github do
107
119
 
108
120
  Overlay::Github.instance.process_overlays
109
121
  end
122
+
123
+ it 'should retry on error' do
124
+ allow(Overlay::Github.instance).to receive(:sleep).and_return
125
+ @times_called = 0
126
+ redis = double("Redis")
127
+ Redis.stub(:new).and_return(redis)
128
+ redis.stub(:subscribe).and_return do
129
+ @times_called += 1
130
+ raise StandardError unless @times_called == 5
131
+ end
132
+ expect(redis).to receive(:subscribe).exactly(5).times
133
+ Overlay::Github.instance.send(:subscribe_to_channel, "test", Overlay.configuration.repositories.first)
134
+ end
110
135
  end
111
136
 
112
137
  describe 'process webhook payload' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overlay
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Saarinen