heroku_resque_autoscaler 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a613c71641b59071fcd4c1fc538a68f9cfda9319
4
+ data.tar.gz: 360442559f1a22ebf96ce90de9007c8769845de2
5
+ SHA512:
6
+ metadata.gz: b6a60327b925f9e11f0c482c3ba0d6f94595bef48882e96ccf7688637b053fa3430583ef08666ede7d3f404da676564073d663cc06ed8b70853ca687efd71bc3
7
+ data.tar.gz: cf96ced05969bc7635932249af6609579df5bcf2ef0e7ad55ee310d307e57cbfd60e98213e6f288e913485172e4f687b5de411379e92fb41c5f965f9d27b6a39
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ script: bundle exec rspec
5
+ notifications:
6
+ campfire:
7
+ rooms:
8
+ secure: RDYRySh76nHSmVzZ114QSWIuzlDUDJedfLGTRBDWlbQF51BjeqXZPcc2IPvRTXsjBrmdUYau0TfyXfjU0nRnKxooeN8OCHoDKcNuLpCpLtkMfSHiySssKmVbGwba/pwPJGs4qCWCNecmXadttJv84OH8X5f7GkL8Ago147uiizU=
9
+ on_success: change
10
+ on_failure: always
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Heroku Resque Autoscaler
2
2
 
3
+ [![Build Status](https://travis-ci.org/G5/heroku_resque_autoscaler.png)](https://travis-ci.org/G5/heroku_resque_autoscaler)
4
+ [![Code Climate](https://codeclimate.com/github/G5/heroku_resque_autoscaler.png)](https://codeclimate.com/github/G5/heroku_resque_autoscaler)
5
+
3
6
  Uses Resque Job Hooks and the Heroku API gem to autoscale Heroku Resque workers
4
7
 
5
8
  Inspired by [@darkhelmet](https://github.com/darkhelmet)'s
@@ -16,11 +16,10 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
 
18
18
  gem.add_dependency "heroku-api", "~> 0.3.5"
19
- gem.add_dependency "resque", "~> 1.23.0"
19
+ gem.add_dependency "resque", "~> 1.0"
20
20
 
21
21
  gem.add_development_dependency "simplecov", "~> 0.7.1"
22
22
  gem.add_development_dependency "rspec", "~> 2.11.0"
23
23
  gem.add_development_dependency "guard-rspec", "~> 2.1.0"
24
24
  gem.add_development_dependency "rb-fsevent", "~> 0.9.2"
25
- gem.add_development_dependency "debugger", "~> 1.2.1"
26
25
  end
@@ -55,5 +55,7 @@ module HerokuResqueAutoscaler
55
55
  return scale_info[:workers]
56
56
  end
57
57
  end
58
+
59
+ 0
58
60
  end
59
61
  end
@@ -1,3 +1,3 @@
1
1
  module HerokuResqueAutoscaler
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -96,6 +96,14 @@ describe HerokuResqueAutoscaler do
96
96
  HerokuResqueAutoscaler::Scaler.stub(:job_count).and_return(num_jobs)
97
97
  HerokuResqueAutoscalerTestClass.num_desired_heroku_workers.should == 5
98
98
  end
99
+
100
+ context "when Scaler.job_count returns 0" do
101
+ it "returns 0" do
102
+ num_jobs = 0
103
+ HerokuResqueAutoscaler::Scaler.stub(:job_count).and_return(num_jobs)
104
+ HerokuResqueAutoscalerTestClass.num_desired_heroku_workers.should == 0
105
+ end
106
+ end
99
107
  end
100
108
 
101
109
  context ".after_perform_scale_down" do
metadata CHANGED
@@ -1,128 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_resque_autoscaler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jessica Lynn Suttles
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-21 00:00:00.000000000 Z
11
+ date: 2014-03-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: heroku-api
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.3.5
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.3.5
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: resque
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: 1.23.0
33
+ version: '1.0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
- version: 1.23.0
40
+ version: '1.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: simplecov
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: 0.7.1
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: 0.7.1
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: 2.11.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: 2.11.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: guard-rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ~>
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
75
  version: 2.1.0
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ~>
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
82
  version: 2.1.0
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rb-fsevent
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ~>
87
+ - - "~>"
100
88
  - !ruby/object:Gem::Version
101
89
  version: 0.9.2
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ~>
94
+ - - "~>"
108
95
  - !ruby/object:Gem::Version
109
96
  version: 0.9.2
110
- - !ruby/object:Gem::Dependency
111
- name: debugger
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- version: 1.2.1
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ~>
124
- - !ruby/object:Gem::Version
125
- version: 1.2.1
126
97
  description: Uses Resque Job Hooks and the Heroku API gem to autoscale Heroku Resque
127
98
  workers
128
99
  email:
@@ -131,8 +102,9 @@ executables: []
131
102
  extensions: []
132
103
  extra_rdoc_files: []
133
104
  files:
134
- - .gitignore
135
- - .rspec
105
+ - ".gitignore"
106
+ - ".rspec"
107
+ - ".travis.yml"
136
108
  - Gemfile
137
109
  - LICENSE
138
110
  - README.md
@@ -148,27 +120,26 @@ files:
148
120
  - spec/spec_helper.rb
149
121
  homepage: https://github.com/G5/heroku_resque_autoscaler
150
122
  licenses: []
123
+ metadata: {}
151
124
  post_install_message:
152
125
  rdoc_options: []
153
126
  require_paths:
154
127
  - lib
155
128
  required_ruby_version: !ruby/object:Gem::Requirement
156
- none: false
157
129
  requirements:
158
- - - ! '>='
130
+ - - ">="
159
131
  - !ruby/object:Gem::Version
160
132
  version: '0'
161
133
  required_rubygems_version: !ruby/object:Gem::Requirement
162
- none: false
163
134
  requirements:
164
- - - ! '>='
135
+ - - ">="
165
136
  - !ruby/object:Gem::Version
166
137
  version: '0'
167
138
  requirements: []
168
139
  rubyforge_project:
169
- rubygems_version: 1.8.24
140
+ rubygems_version: 2.2.2
170
141
  signing_key:
171
- specification_version: 3
142
+ specification_version: 4
172
143
  summary: Uses Resque Job Hooks and the Heroku API gem to autoscale Heroku Resque workers
173
144
  test_files:
174
145
  - spec/lib/heroku_resque_autoscaler/configuration_spec.rb