overlay 1.0.2 → 1.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ed05419c605456a3e589d764edffffd9bf2e948
4
- data.tar.gz: 2a2aa2902a7ea17e2edfaf86096e3b08b8ea474b
3
+ metadata.gz: 4f835d9fc9945c192cba88fcb620f14191f03c9f
4
+ data.tar.gz: 75e0784d89629e6231cfbc16f80ac0e890d28f3e
5
5
  SHA512:
6
- metadata.gz: f20b278a41aa09ebf5859f0cea3d82279a0f940be37625d0323761494d6988e9609a7eac44ad78aa5a799418af1281a2a8bd855bd58f1751e169c59b8814204c
7
- data.tar.gz: c07ba69e4cff6fcdb1c36d110ee2acd48dbf338b3310212bea99f86917fcf42a93058b3e800cbc018c7b7197045a06afbf3c6da9851865d9038dc3c72ec84f76
6
+ metadata.gz: 83cfc8bb96be3614f45a00523300be7717d74d7a5aa1c4a49c69caa0eda663e2e5c3fb2bdbf1f61cbe37cbc4048969be215b7b3e4fb4c68ab9b6c22f738b4feb
7
+ data.tar.gz: 82f2e126c6a6be4389b7ffb198513ea4e2d9b23dfb1125d406a7e4c994c2ca31baa5b9d269d413805f11e3e60f0ee2aa70d80d2aab389bf5710d30a1158c0bc1
@@ -5,15 +5,13 @@ module Overlay
5
5
  def update
6
6
  render nothing: true
7
7
 
8
- logger.info "Received update post for repo: #{params[:repository]} and ref: #{params[:ref]}"
9
8
  Overlay.configuration.repositories.each do |repo_config|
10
- logger.info "Processing config for repo: #{repo_config[:repo]} and branch: #{repo_config[:branch] || 'master'}"
11
9
  next unless repo_config.class == GithubRepo
12
10
  branch = repo_config[:branch] || 'master'
13
11
  if (params[:repository] && params[:ref])
14
12
  if (params[:repository][:name] == repo_config[:repo]) && (params[:ref] == "refs/heads/#{branch}")
15
- logger.info "Processing overlay for repo: #{repo_config[:repo]} and branch: #{repo_config[:branch] || 'master'}"
16
- Overlay::Github.process_overlays
13
+ logger.info "Enqueueing GithubJob for repo: #{repo_config[:repo]} and branch: #{repo_config[:branch] || 'master'}"
14
+ SuckerPunch::Queue[:github_queue].async.perform repo_config
17
15
  end
18
16
  end
19
17
  end
@@ -0,0 +1,5 @@
1
+ require 'sucker_punch'
2
+
3
+ SuckerPunch.config do
4
+ queue name: :github_queue, worker: Overlay::GithubJob, workers: 5
5
+ end
@@ -29,7 +29,7 @@ module Overlay
29
29
 
30
30
  register_web_hook(repo_config)
31
31
 
32
- GithubJob.new.async.perform repo_config
32
+ SuckerPunch::Queue[:github_queue].async.perform repo_config
33
33
  end
34
34
  end
35
35
 
@@ -126,7 +126,7 @@ module Overlay
126
126
  end
127
127
 
128
128
  class GithubJob
129
- include SuckerPunch::Job
129
+ include SuckerPunch::Worker
130
130
 
131
131
  def perform(repo_config)
132
132
  Rails.logger.info "SuckerPunch processing job for #{repo_config[:repo]}"
@@ -1,3 +1,3 @@
1
1
  module Overlay
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -295,3 +295,20 @@ Processing by Overlay::GithubController#update as HTML
295
295
  Completed 200 OK in 1ms (Views: 0.2ms)
296
296
  Terminating 3 actors...
297
297
  Shutdown completed cleanly
298
+ Processing by Overlay::GithubController#update as HTML
299
+ Rendered text template (0.0ms)
300
+ Received update post for repo: and ref:
301
+ Completed 200 OK in 40ms (Views: 39.2ms)
302
+ Processing by Overlay::GithubController#update as HTML
303
+ Parameters: {"ref"=>"refs/heads/master", "repository"=>{"name"=>"test"}}
304
+ Received update post for repo: {"name"=>"test"} and ref: refs/heads/master
305
+ Processing config for repo: test and branch: master
306
+ Processing overlay for repo: test and branch: master
307
+ SuckerPunch processing job for test
308
+ Completed 200 OK in 1ms (Views: 0.2ms)
309
+ SuckerPunch processing job for overlay
310
+ SuckerPunch processing job for overlay
311
+ SuckerPunch processing job for overlay
312
+ SuckerPunch processing job for overlay
313
+ Terminating 6 actors...
314
+ Shutdown completed cleanly
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: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Saarinen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-08 00:00:00.000000000 Z
11
+ date: 2013-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.0.beta2
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.0.beta2
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-rails
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -78,6 +78,7 @@ files:
78
78
  - app/controllers/overlay/github_controller.rb
79
79
  - app/helpers/overlay/application_helper.rb
80
80
  - app/views/layouts/overlay/application.html.erb
81
+ - config/initializers/sucker_punch.rb
81
82
  - config/routes.rb
82
83
  - lib/overlay/configuration.rb
83
84
  - lib/overlay/engine.rb