overlay 2.2.3 → 2.2.4

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: b0196cac93ca14970e72c2fd161f6f8efc2c14d1
4
- data.tar.gz: 10b91bc9e4eafd22c5898bac7d0a9e0f92224d73
3
+ metadata.gz: 75f9b6308f9fca7a3a8556be56da05e604d89deb
4
+ data.tar.gz: 04793a956c55a9370859bb5de1d90a5e2a59a1b3
5
5
  SHA512:
6
- metadata.gz: 871fce47300bdf5ff9b0efd3f606a6bf7bf6f972a4e51583fc64d3286e0a320a7f2739cb954b914dfbf3887a516d0571fee659216c81be524c66621d95f74810
7
- data.tar.gz: 96a74a0b26d62aaae727d6c587328cec323044988c64b5785337a73784635286f6b9cbd98a2325675955c19753269faad692ce34e5db9cb9d2c78073b15b82a8
6
+ metadata.gz: 2f255d5d6e2cae044c497bcc5eb935d3d12509f53a24c04688b045df7fb1e7d004b90e7188a9261b5dd8cec9f3cee19867e9f5f5d338c3032ef21838bef821b9
7
+ data.tar.gz: c7a383457bfcfde005a4dae91e1d18bc9ec92e89ebae889d0c5ae1bc958e4774db9b5dd06288d799e2890ceeea77e38ab66948fcaa99ed5e537aa93372679ba6
@@ -4,6 +4,7 @@ require 'socket'
4
4
  require 'singleton'
5
5
  require 'redis'
6
6
  require 'net/http'
7
+ require 'timeout'
7
8
 
8
9
  # The github class is responsible for managing overlaying
9
10
  # directories in a Github repo on the current application.
@@ -112,11 +113,18 @@ module Overlay
112
113
 
113
114
  github_api = repo_config.github_api
114
115
 
115
- # Retrieve current web hooks
116
- current_hooks = github_api.hooks.list(repo_config.org, repo_config.repo).response.body
117
- if current_hooks.find {|hook| hook.config.url == uri}.nil?
118
- # register hook
119
- github_api.hooks.create(repo_config.org, repo_config.repo, name: 'web', active: true, config: {:url => uri, :content_type => 'json'})
116
+ begin
117
+ timeout(30) {
118
+ # Retrieve current web hooks
119
+ current_hooks = github_api.hooks.list(repo_config.org, repo_config.repo).response.body
120
+ if current_hooks.find {|hook| hook.config.url == uri}.nil?
121
+ # register hook
122
+ github_api.hooks.create(repo_config.org, repo_config.repo, name: 'web', active: true, config: {:url => uri, :content_type => 'json'})
123
+ end
124
+ }
125
+ rescue Timeout::Error
126
+ Rails.logger.info "Overlay timed out while hegistering web hook"
127
+ raise "Overlay timed out while hegistering web hook"
120
128
  end
121
129
  end
122
130
 
@@ -128,20 +136,27 @@ module Overlay
128
136
  # Validate our settings
129
137
  repo_config.validate
130
138
 
131
- # Register this repo with the manager
132
- uri = ::URI.parse(repo_config.registration_server)
133
- http = ::Net::HTTP.new(uri.host, uri.port)
134
- request = ::Net::HTTP::Post.new("/register")
135
- request.add_field('Content-Type', 'application/json')
136
- request.body = {
137
- 'organization' => repo_config.org,
138
- 'repo' => repo_config.repo,
139
- 'auth' => repo_config.auth,
140
- 'endpoint' => repo_config.endpoint,
141
- 'site' => repo_config.site
142
- }.to_json
143
-
144
- response = http.request(request)
139
+ begin
140
+ response = timeout(30) {
141
+ # Register this repo with the manager
142
+ uri = ::URI.parse(repo_config.registration_server)
143
+ http = ::Net::HTTP.new(uri.host, uri.port)
144
+ request = ::Net::HTTP::Post.new("/register")
145
+ request.add_field('Content-Type', 'application/json')
146
+ request.body = {
147
+ 'organization' => repo_config.org,
148
+ 'repo' => repo_config.repo,
149
+ 'auth' => repo_config.auth,
150
+ 'endpoint' => repo_config.endpoint,
151
+ 'site' => repo_config.site
152
+ }.to_json
153
+
154
+ http.request(request)
155
+ }
156
+ rescue Timeout::Error
157
+ Rails.logger.info "Overlay timed out while registering with publisher: #{repo_config.registration_server}"
158
+ raise "Overlay timed out while registering with #{repo_config.registration_server}"
159
+ end
145
160
 
146
161
  # Retrieve publish key
147
162
  publish_key = JSON.parse(response.read_body)['publish_key']
@@ -170,7 +185,9 @@ module Overlay
170
185
  if root != '/'
171
186
  overlay_directory(root, repo_config)
172
187
  else
173
- root_entries = repo_config.github_api.contents.get(repo_config.org, repo_config.repo, root, ref: repo_config.branch).response.body
188
+ root_entries = timeout(30) {
189
+ rrepo_config.github_api.contents.get(repo_config.org, repo_config.repo, root, ref: repo_config.branch).response.body
190
+ }
174
191
 
175
192
  # We aren't pulling anything out of root. Cycle through directories and overlay
176
193
  root_entries.each do |entry|
@@ -179,6 +196,10 @@ module Overlay
179
196
  end
180
197
  end
181
198
  end
199
+ rescue Timeout::Error
200
+ Rails.logger.info "Overlay timed out while retrieving root directories and is retrying"
201
+ sleep 5
202
+ retry
182
203
  rescue => e
183
204
  Rails.logger.error "Overlay encountered an error during overlay_repo and is retrying: #{e.message}"
184
205
  sleep 5
@@ -190,7 +211,15 @@ module Overlay
190
211
 
191
212
  def overlay_directory path, repo_config
192
213
  FileUtils.mkdir_p(destination_path(path, repo_config)) unless File.exists?(destination_path(path, repo_config))
193
- directory_entries = repo_config.github_api.contents.get(repo_config.org, repo_config.repo, path, ref: repo_config.branch).response.body
214
+
215
+ begin
216
+ directory_entries = timeout(30) {
217
+ repo_config.github_api.contents.get(repo_config.org, repo_config.repo, path, ref: repo_config.branch).response.body
218
+ }
219
+ rescue Timeout::Error
220
+ Rails.logger.info "Overlay timed out during overlay_directory for path: #{path}"
221
+ raise "Overlay timed out during overlay_directory for path: #{path}"
222
+ end
194
223
 
195
224
  directory_entries.each do |entry|
196
225
  if entry.type == 'dir'
@@ -202,7 +231,15 @@ module Overlay
202
231
  end
203
232
 
204
233
  def clone_file path, repo_config
205
- file = repo_config.github_api.contents.get(repo_config.org, repo_config.repo, path, ref: repo_config.branch).response.body.content
234
+ begin
235
+ file = timeout(30) {
236
+ repo_config.github_api.contents.get(repo_config.org, repo_config.repo, path, ref: repo_config.branch).response.body.content
237
+ }
238
+ rescue Timeout::Error
239
+ Rails.logger.error "Overlay timed out while cloning file: #{path}"
240
+ raise "Overlay timed out while cloning file: #{path}"
241
+ end
242
+
206
243
  File.open(destination_path(path, repo_config), "wb") { |f| f.write(Base64.decode64(file)) }
207
244
  Rails.logger.info "Overlay cloned file: #{path}"
208
245
  end
@@ -1,3 +1,3 @@
1
1
  module Overlay
2
- VERSION = "2.2.3"
2
+ VERSION = "2.2.4"
3
3
  end
@@ -2540,3 +2540,153 @@ Completed 200 OK in 7ms (Views: 6.4ms)
2540
2540
  Processing by Overlay::GithubController#update as HTML
2541
2541
  Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2542
2542
  Completed 200 OK in 0ms (Views: 0.2ms)
2543
+ Processing by Overlay::GithubController#update as HTML
2544
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2545
+ Rendered text template (0.0ms)
2546
+ Completed 200 OK in 4ms (Views: 3.3ms)
2547
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007fdddab66a88 @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:0x007fdddab66a10 @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.3", :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.3", @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>>
2548
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2549
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2550
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2551
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2552
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007fdddab66a88 @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:0x007fdddab66a10 @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.3", :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.3", @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>>
2553
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2554
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2555
+ Overlay found added file in hook: lib/test/test_added.rb
2556
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2557
+ Overlay found added file in hook: lib/test/test_added.rb
2558
+ Overlay found modified file in hook: lib/test/test_modified.rb
2559
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2560
+ Overlay found added file in hook: lib/test/test_added.rb
2561
+ Overlay found modified file in hook: lib/test/test_modified.rb
2562
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2563
+ Overlay found added file in hook: lib/test/test_added.rb
2564
+ Overlay found modified file in hook: lib/test/test_modified.rb
2565
+ Overlay found added file in hook: lib/test/test_added.rb
2566
+ Overlay found modified file in hook: lib/test/test_modified.rb
2567
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2568
+ Overlay found modified file in hook: lib/test/test_modified.rb
2569
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2570
+ Overlay found added file in hook: lib/test/test_added.rb
2571
+ Overlay found modified file in hook: lib/test/test_modified.rb
2572
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2573
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2574
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2575
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2576
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2577
+ Overlay subscribe closed for unknown reason.
2578
+ Processing by Overlay::GithubController#update as HTML
2579
+ Completed 200 OK in 0ms (Views: 0.2ms)
2580
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2581
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2582
+ Overlay found added file in hook: lib/test/test_added.rb
2583
+ Overlay found modified file in hook: lib/test/test_modified.rb
2584
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2585
+ Overlay found added file in hook: lib/test/test_added.rb
2586
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2587
+ Overlay found added file in hook: lib/test/test_added.rb
2588
+ Overlay found modified file in hook: lib/test/test_modified.rb
2589
+ Overlay found added file in hook: lib/test/test_added.rb
2590
+ Overlay found modified file in hook: lib/test/test_modified.rb
2591
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2592
+ Overlay found modified file in hook: lib/test/test_modified.rb
2593
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2594
+ Overlay found added file in hook: lib/test/test_added.rb
2595
+ Overlay found modified file in hook: lib/test/test_modified.rb
2596
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2597
+ Overlay found added file in hook: lib/test/test_added.rb
2598
+ Overlay found modified file in hook: lib/test/test_modified.rb
2599
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2600
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2601
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2602
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2603
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2604
+ Overlay subscribe closed for unknown reason.
2605
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007fdbdac21808 @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:0x007fdbdac21538 @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.3", :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.3", @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>>
2606
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2607
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2608
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2609
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2610
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007fdbdac21808 @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:0x007fdbdac21538 @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.3", :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.3", @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>>
2611
+ Processing by Overlay::GithubController#update as HTML
2612
+ Rendered text template (0.0ms)
2613
+ Completed 200 OK in 4ms (Views: 4.0ms)
2614
+ Processing by Overlay::GithubController#update as HTML
2615
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2616
+ Completed 200 OK in 0ms (Views: 0.2ms)
2617
+ Overlay found added file in hook: lib/test/test_added.rb
2618
+ Overlay found modified file in hook: lib/test/test_modified.rb
2619
+ Overlay found added file in hook: lib/test/test_added.rb
2620
+ Overlay found modified file in hook: lib/test/test_modified.rb
2621
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2622
+ Overlay found added file in hook: lib/test/test_added.rb
2623
+ Overlay found modified file in hook: lib/test/test_modified.rb
2624
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2625
+ Overlay found added file in hook: lib/test/test_added.rb
2626
+ Overlay found modified file in hook: lib/test/test_modified.rb
2627
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2628
+ Overlay found modified file in hook: lib/test/test_modified.rb
2629
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2630
+ Overlay found added file in hook: lib/test/test_added.rb
2631
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2632
+ Overlay found added file in hook: lib/test/test_added.rb
2633
+ Overlay found modified file in hook: lib/test/test_modified.rb
2634
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2635
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2636
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2637
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007f970955fd28 @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:0x007f970955fb70 @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.3", :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.3", @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>>
2638
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2639
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2640
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2641
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2642
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007f970955fd28 @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:0x007f970955fb70 @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.3", :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.3", @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>>
2643
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2644
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2645
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2646
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2647
+ Overlay subscribe closed for unknown reason.
2648
+ Overlay subscribing to redis channel: test_key
2649
+ Processing by Overlay::GithubController#update as HTML
2650
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2651
+ Rendered text template (0.0ms)
2652
+ Completed 200 OK in 4ms (Views: 3.4ms)
2653
+ Processing by Overlay::GithubController#update as HTML
2654
+ Completed 200 OK in 0ms (Views: 0.2ms)
2655
+ Overlay found modified file in hook: lib/test/test_modified.rb
2656
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2657
+ Overlay found added file in hook: lib/test/test_added.rb
2658
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2659
+ Overlay found added file in hook: lib/test/test_added.rb
2660
+ Overlay found modified file in hook: lib/test/test_modified.rb
2661
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2662
+ Overlay found added file in hook: lib/test/test_added.rb
2663
+ Overlay found modified file in hook: lib/test/test_modified.rb
2664
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2665
+ Overlay found added file in hook: lib/test/test_added.rb
2666
+ Overlay found modified file in hook: lib/test/test_modified.rb
2667
+ Overlay found added file in hook: lib/test/test_added.rb
2668
+ Overlay found modified file in hook: lib/test/test_modified.rb
2669
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2670
+ Overlay found added file in hook: lib/test/test_added.rb
2671
+ Overlay found modified file in hook: lib/test/test_modified.rb
2672
+ Overlay found deleted file in hook: lib/test/test_removed.rb
2673
+ Overlay started processing repo with config #<Overlay::GithubRepo:0x007fed7810ad98 @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:0x007fed7810ad20 @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.3", :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.3", @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>>
2674
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2675
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2676
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2677
+ Overlay encountered an error during overlay_repo and is retrying: StandardError
2678
+ Overlay finished processing repo with config #<Overlay::GithubRepo:0x007fed7810ad98 @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:0x007fed7810ad20 @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.3", :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.3", @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>>
2679
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2680
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2681
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2682
+ Overlay encountered an error during subscribe_to_channel on key test and is retrying: StandardError
2683
+ Overlay subscribe closed for unknown reason.
2684
+ Overlay subscribing to redis channel: test_key
2685
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2686
+ Overlay register webhook for repo: org => test_org, repo => test_repo
2687
+ Processing by Overlay::GithubController#update as HTML
2688
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test_repo"}}
2689
+ Rendered text template (0.0ms)
2690
+ Completed 200 OK in 4ms (Views: 3.8ms)
2691
+ Processing by Overlay::GithubController#update as HTML
2692
+ Completed 200 OK in 0ms (Views: 0.2ms)
data/spec/github_spec.rb CHANGED
@@ -32,7 +32,6 @@ describe Overlay::Github do
32
32
  allow(Overlay::Github.instance).to receive(:fork_it).with(:overlay_repo, config).and_return
33
33
 
34
34
  stub_request(:get, /api.github.com/).
35
- with(:headers => {'Accept'=>'application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1', 'Accept-Charset'=>'utf-8', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Github Ruby Gem 0.11.2'}).
36
35
  to_return(:status => 200, :body => '[]', :headers => {})
37
36
 
38
37
  expect(repo_config.github_api.hooks).to receive(:create).with(
@@ -53,7 +52,6 @@ describe Overlay::Github do
53
52
  allow(Overlay::Github.instance).to receive(:fork_it).with(:overlay_repo, config).and_return
54
53
 
55
54
  stub_request(:get, /www.test.com/).
56
- with(:headers => {'Accept'=>'application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1', 'Accept-Charset'=>'utf-8', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Github Ruby Gem 0.11.2'}).
57
55
  to_return(:status => 200, :body => '[]', :headers => {})
58
56
 
59
57
  expect(repo_config.github_api.hooks).to receive(:create).with(
@@ -114,7 +112,6 @@ describe Overlay::Github do
114
112
  expect(Overlay::Github.instance).to receive(:fork_it).with(:subscribe_to_channel, "test_key", config).and_return
115
113
 
116
114
  stub_request(:post, /www.test.com/).
117
- with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}).
118
115
  to_return(status: 200, body: "{\"publish_key\": \"test_key\"}", headers: {})
119
116
 
120
117
  Overlay::Github.instance.process_overlays
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overlay
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Saarinen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails