our-eel-hacks 0.0.1 → 0.0.2

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.
@@ -1,6 +1,13 @@
1
1
  require 'heroku'
2
2
 
3
3
  module OurEelHacks
4
+ class NullLogger
5
+ def debug; end
6
+ def info; end
7
+ def warn; end
8
+ def fatal; end
9
+ end
10
+
4
11
  class Autoscaler
5
12
  class << self
6
13
  def get_instance(flavor)
@@ -75,12 +82,7 @@ module OurEelHacks
75
82
  @upper_limits = UpperLimit.new(30, 50)
76
83
  @soft_duration = 500
77
84
  @scaling_frequency = 200
78
- @logger = nil
79
- end
80
-
81
- def log(msg)
82
- return if @logger.nil
83
- @logger.info(msg)
85
+ @logger = NullLogger.new
84
86
  end
85
87
 
86
88
  def configure
@@ -109,14 +111,17 @@ module OurEelHacks
109
111
  end
110
112
 
111
113
  def scale(metric)
114
+ logger.debug{ "Scaling request for #{@ps_type}: metric is: #{metric}" }
112
115
  moment = Time.now
113
116
  if elapsed(last_scaled, moment) < scaling_frequency
117
+ logger.debug{ "Not scaling: elapsed #{elapsed(last_scaled, moment)} less than configured #{scaling_frequency}" }
114
118
  return
115
119
  end
116
120
 
117
121
  target_dynos = target_scale(metric, moment)
118
122
 
119
123
  target_dynos = [[target_dynos, max_dynos].min, min_dynos].max
124
+ logger.debug{ "Target dynos at: #{min_dynos}/#{target_dynos}/#{max_dynos} (vs. current: #{@dynos})" }
120
125
 
121
126
  set_dynos(target_dynos)
122
127
 
@@ -191,8 +196,17 @@ module OurEelHacks
191
196
  end
192
197
 
193
198
  def set_dynos(count)
194
- return if count == dynos or not dynos_stable?
195
- heroko.ps_scale(app_name, :type => ps_type, :qty => count)
199
+ if count == dynos
200
+ logger.debug{ "Not scaling: #{count} ?= #{dynos}" }
201
+ return
202
+ end
203
+
204
+ if not (stable = dynos_stable?)
205
+ logger.debug{ "Not scaling: dynos not stable (iow: not all #{ps_type} dynos are up)" }
206
+ return
207
+ end
208
+ logger.info{ "Scaling from #{dynos} to #{count} dynos for #{ps_type}" }
209
+ heroku.ps_scale(app_name, :type => ps_type, :qty => count)
196
210
  @last_scaled = Time.now
197
211
  end
198
212
  end
@@ -0,0 +1,13 @@
1
+ require 'celluloid'
2
+
3
+ module OurEelHacks
4
+ module Defer
5
+ module Celluloid
6
+ def trigger_scaling(*args)
7
+ ::Celluloid::Future.new do
8
+ super
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,7 +2,7 @@ require 'eventmachine'
2
2
  module OurEelHacks
3
3
  module Defer
4
4
  module EventMachine
5
- def autoscale(*args)
5
+ def trigger_scaling(*args)
6
6
  EM.defer do
7
7
  super
8
8
  end
@@ -9,7 +9,16 @@ module OurEelHacks
9
9
  protected
10
10
 
11
11
  def autoscale(metric)
12
+ now = Time.now
13
+ if @scaling_at.nil? or (now - @scaling_at) > 60
14
+ @scaling_at = now
15
+ trigger_scaling(metric)
16
+ end
17
+ end
18
+
19
+ def trigger_scaling(metric)
12
20
  Autoscaler.instance_for(@flavor).scale(metric)
21
+ @scaling_at = nil
13
22
  end
14
23
  end
15
24
  end
@@ -1,9 +1,9 @@
1
1
  require 'our-eel-hacks/middleware'
2
- require 'our-eel-hacks/defer/event-machine'
2
+ require 'our-eel-hacks/defer/celluloid'
3
3
 
4
4
  module OurEelHacks
5
5
  class Sidekiq < Middleware
6
- include Defer::EventMachine
6
+ include Defer::Celluloid
7
7
  def initialize(flavor=:sidekiq)
8
8
  super
9
9
  end
data/spec/autoscaler.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'our-eel-hacks/rack'
3
+ require 'logger'
3
4
 
4
5
  describe OurEelHacks::Autoscaler do
5
6
  before :each do
@@ -52,6 +53,10 @@ describe OurEelHacks::Autoscaler do
52
53
  Time.stub!(:now).and_return(Time.at(starting_time, millis))
53
54
  end
54
55
 
56
+ let :logger do
57
+ Logger.new($stdout).tap{|lgr| lgr.level = Logger::INFO }
58
+ end
59
+
55
60
  let :autoscaler do
56
61
  time_adjust(0)
57
62
  OurEelHacks::Autoscaler.new.tap do |test|
@@ -67,16 +72,22 @@ describe OurEelHacks::Autoscaler do
67
72
 
68
73
  test.upper_limits.soft = 30
69
74
  test.upper_limits.hard = 50
75
+
76
+ #test.logger = logger
70
77
  end
71
78
  end
72
79
  end
73
80
 
81
+ let :heroku do
82
+ autoscaler.heroku
83
+ end
84
+
74
85
  it "should get a count of dynos at start" do
75
86
  autoscaler.dynos.should == 3 #happens to be the number of web dynos right now
76
87
  end
77
88
 
78
89
  before :each do
79
- autoscaler.stub!(:set_dynos)
90
+ heroku.stub!(:ps_scale)
80
91
  time_adjust(0)
81
92
  autoscaler.scale(ideal_value)
82
93
  end
@@ -86,14 +97,14 @@ describe OurEelHacks::Autoscaler do
86
97
  it "should not scale too soon" do
87
98
  time_adjust(scaling_freq - 5)
88
99
 
89
- autoscaler.should_not_receive(:set_dynos)
100
+ heroku.should_not_receive(:ps_scale)
90
101
  autoscaler.scale(hard_high)
91
102
  end
92
103
 
93
104
  it "should scale up if time has elapsed and hard limit exceeded" do
94
105
  time_adjust(scaling_freq + 5)
95
106
 
96
- autoscaler.should_receive(:set_dynos).with(4)
107
+ heroku.should_receive(:ps_scale).with(app_name, hash_including(:qty => 4))
97
108
  autoscaler.scale(hard_high)
98
109
  end
99
110
  end
@@ -104,7 +115,7 @@ describe OurEelHacks::Autoscaler do
104
115
  end
105
116
 
106
117
  it "should scale down if hard lower limit exceeded" do
107
- autoscaler.should_receive(:set_dynos).with(2)
118
+ heroku.should_receive(:ps_scale).with(app_name, hash_including(:qty => 2))
108
119
  autoscaler.scale(hard_low)
109
120
  end
110
121
  end
@@ -118,7 +129,7 @@ describe OurEelHacks::Autoscaler do
118
129
  describe "if soft_duration hasn't elapsed" do
119
130
  before :each do
120
131
  time_adjust((scaling_freq * 2) + soft_dur - 5)
121
- autoscaler.should_receive(:set_dynos).with(3)
132
+ heroku.should_not_receive(:ps_scale)
122
133
  end
123
134
 
124
135
  it "should not scale up" do
@@ -136,12 +147,12 @@ describe OurEelHacks::Autoscaler do
136
147
  end
137
148
 
138
149
  it "should scale up if above upper soft limit" do
139
- autoscaler.should_receive(:set_dynos).with(4)
150
+ heroku.should_receive(:ps_scale).with(app_name, hash_including(:qty => 4))
140
151
  autoscaler.scale(soft_high)
141
152
  end
142
153
 
143
154
  it "should not scale down if below lower soft limit" do
144
- autoscaler.should_receive(:set_dynos).with(3)
155
+ heroku.should_not_receive(:ps_scale)
145
156
  autoscaler.scale(soft_low)
146
157
  end
147
158
  end
@@ -156,7 +167,7 @@ describe OurEelHacks::Autoscaler do
156
167
  describe "if soft_duration hasn't elapsed" do
157
168
  before :each do
158
169
  time_adjust(scaling_freq * 2 + soft_dur - 5)
159
- autoscaler.should_receive(:set_dynos).with(3)
170
+ heroku.should_not_receive(:ps_scale)
160
171
  end
161
172
 
162
173
  it "should not scale up" do
@@ -174,12 +185,12 @@ describe OurEelHacks::Autoscaler do
174
185
  end
175
186
 
176
187
  it "should not scale up even if above upper soft limit" do
177
- autoscaler.should_receive(:set_dynos).with(3)
188
+ heroku.should_not_receive(:ps_scale)
178
189
  autoscaler.scale(soft_high)
179
190
  end
180
191
 
181
192
  it "should scale down if below lower soft limit" do
182
- autoscaler.should_receive(:set_dynos).with(2)
193
+ heroku.should_receive(:ps_scale).with(app_name, hash_including(:qty => 2))
183
194
  autoscaler.scale(soft_low)
184
195
  end
185
196
  end
@@ -29,7 +29,7 @@ http_interactions:
29
29
  server:
30
30
  - nginx
31
31
  date:
32
- - Fri, 04 May 2012 23:49:24 GMT
32
+ - Mon, 07 May 2012 19:52:48 GMT
33
33
  content-type:
34
34
  - application/xml; charset=utf-8
35
35
  connection:
@@ -39,7 +39,7 @@ http_interactions:
39
39
  etag:
40
40
  - ! '"e32026fbb1ab6519a01cf80025f08660"'
41
41
  x-runtime:
42
- - '227'
42
+ - '281'
43
43
  content-length:
44
44
  - '871'
45
45
  cache-control:
@@ -48,19 +48,86 @@ http_interactions:
48
48
  - max-age=500
49
49
  body:
50
50
  encoding: US-ASCII
51
- string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<app>\n <created-at
52
- type=\"datetime\">2012-02-26T21:42:49-08:00</created-at>\n <dynos type=\"integer\">0</dynos>\n
53
- \ <name>sbmp</name>\n <repo-size type=\"integer\">220864512</repo-size>\n
54
- \ <requested-stack nil=\"true\"></requested-stack>\n <slug-size type=\"integer\">85061632</slug-size>\n
55
- \ <stack>cedar</stack>\n <workers type=\"integer\">0</workers>\n <create-status
56
- type=\"symbol\">complete</create-status>\n <repo-migrate-status type=\"symbol\">complete</repo-migrate-status>\n
57
- \ <buildpack-provided-description>Ruby/Rails</buildpack-provided-description>\n
58
- \ <id>app3049118@heroku.com</id>\n <domain_name>sbmp.herokuapp.com</domain_name>\n
59
- \ <owner>aws@salesbump.com</owner>\n <web_url>http://sbmp.herokuapp.com/</web_url>\n
60
- \ <git_url>git@heroku.com:sbmp.git</git_url>\n <database_size></database_size>\n
61
- \ <stateless-codex>true</stateless-codex>\n</app>\n"
51
+ string: !str
52
+ str: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<app>\n <created-at type=\"datetime\">2012-02-26T21:42:49-08:00</created-at>\n
53
+ \ <dynos type=\"integer\">0</dynos>\n <name>sbmp</name>\n <repo-size type=\"integer\">220864512</repo-size>\n
54
+ \ <requested-stack nil=\"true\"></requested-stack>\n <slug-size type=\"integer\">85061632</slug-size>\n
55
+ \ <stack>cedar</stack>\n <workers type=\"integer\">0</workers>\n <create-status
56
+ type=\"symbol\">complete</create-status>\n <repo-migrate-status type=\"symbol\">complete</repo-migrate-status>\n
57
+ \ <buildpack-provided-description>Ruby/Rails</buildpack-provided-description>\n
58
+ \ <id>app3049118@heroku.com</id>\n <domain_name>sbmp.herokuapp.com</domain_name>\n
59
+ \ <owner>aws@salesbump.com</owner>\n <web_url>http://sbmp.herokuapp.com/</web_url>\n
60
+ \ <git_url>git@heroku.com:sbmp.git</git_url>\n <database_size></database_size>\n
61
+ \ <stateless-codex>true</stateless-codex>\n</app>\n"
62
+ net_http_res: &79789840 !ruby/object:Net::HTTPOK
63
+ http_version: '1.0'
64
+ code: '200'
65
+ message: OK
66
+ header:
67
+ server:
68
+ - nginx
69
+ date:
70
+ - Mon, 07 May 2012 19:52:48 GMT
71
+ content-type:
72
+ - application/xml; charset=utf-8
73
+ connection:
74
+ - keep-alive
75
+ status:
76
+ - 200 OK
77
+ etag:
78
+ - ! '"e32026fbb1ab6519a01cf80025f08660"'
79
+ x-runtime:
80
+ - '281'
81
+ content-length:
82
+ - '871'
83
+ cache-control:
84
+ - private, max-age=0, must-revalidate
85
+ strict-transport-security:
86
+ - max-age=500
87
+ body: !str
88
+ str: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<app>\n <created-at
89
+ type=\"datetime\">2012-02-26T21:42:49-08:00</created-at>\n <dynos type=\"integer\">0</dynos>\n
90
+ \ <name>sbmp</name>\n <repo-size type=\"integer\">220864512</repo-size>\n
91
+ \ <requested-stack nil=\"true\"></requested-stack>\n <slug-size type=\"integer\">85061632</slug-size>\n
92
+ \ <stack>cedar</stack>\n <workers type=\"integer\">0</workers>\n <create-status
93
+ type=\"symbol\">complete</create-status>\n <repo-migrate-status type=\"symbol\">complete</repo-migrate-status>\n
94
+ \ <buildpack-provided-description>Ruby/Rails</buildpack-provided-description>\n
95
+ \ <id>app3049118@heroku.com</id>\n <domain_name>sbmp.herokuapp.com</domain_name>\n
96
+ \ <owner>aws@salesbump.com</owner>\n <web_url>http://sbmp.herokuapp.com/</web_url>\n
97
+ \ <git_url>git@heroku.com:sbmp.git</git_url>\n <database_size></database_size>\n
98
+ \ <stateless-codex>true</stateless-codex>\n</app>\n"
99
+ net_http_res: *79789840
100
+ args: &79674040
101
+ :verify_ssl: 1
102
+ :ssl_ca_file: /home/judson/ruby/bundle-paths/rails3/lib/ruby/1.9.1/gems/heroku-2.25.0/data/cacert.pem
103
+ :user: ''
104
+ :password: FakeApiKey
105
+ :method: :get
106
+ :url: https://api.heroku.com/apps/sbmp
107
+ :headers:
108
+ X-Heroku-API-Version: '2'
109
+ User-Agent: heroku-gem/2.25.0
110
+ X-Ruby-Version: 1.9.3
111
+ X-Ruby-Platform: i686-linux
112
+ code: 200
113
+ headers: &79786080
114
+ :server: nginx
115
+ :date: Mon, 07 May 2012 19:52:48 GMT
116
+ :content_type: application/xml; charset=utf-8
117
+ :connection: keep-alive
118
+ :status: 200 OK
119
+ :etag: ! '"e32026fbb1ab6519a01cf80025f08660"'
120
+ :x_runtime: '281'
121
+ :content_length: '871'
122
+ :cache_control: private, max-age=0, must-revalidate
123
+ :strict_transport_security: max-age=500
124
+ read: true
125
+ __read_body_previously_called: true
126
+ args: *79674040
127
+ code: 200
128
+ headers: *79786080
62
129
  http_version: '1.1'
63
- recorded_at: Fri, 04 May 2012 23:47:21 GMT
130
+ recorded_at: Mon, 07 May 2012 19:50:42 GMT
64
131
  - request:
65
132
  method: get
66
133
  uri: https://:FakeApiKey@api.heroku.com/apps/sbmp/collaborators
@@ -90,7 +157,7 @@ http_interactions:
90
157
  server:
91
158
  - nginx
92
159
  date:
93
- - Fri, 04 May 2012 23:49:24 GMT
160
+ - Mon, 07 May 2012 19:52:48 GMT
94
161
  content-type:
95
162
  - application/xml; charset=utf-8
96
163
  connection:
@@ -100,7 +167,7 @@ http_interactions:
100
167
  etag:
101
168
  - ! '"89032632d1ae99be4cc6bc10767a1adc"'
102
169
  x-runtime:
103
- - '73'
170
+ - '23'
104
171
  content-length:
105
172
  - '270'
106
173
  cache-control:
@@ -109,12 +176,73 @@ http_interactions:
109
176
  - max-age=500
110
177
  body:
111
178
  encoding: US-ASCII
112
- string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<collaborators>\n <collaborator>\n
113
- \ <email>aws@salesbump.com</email>\n <access>edit</access>\n </collaborator>\n
114
- \ <collaborator>\n <email>judson@lrdesign.com</email>\n <access>edit</access>\n
115
- \ </collaborator>\n</collaborators>\n"
179
+ string: !str
180
+ str: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<collaborators>\n <collaborator>\n
181
+ \ <email>aws@salesbump.com</email>\n <access>edit</access>\n </collaborator>\n
182
+ \ <collaborator>\n <email>judson@lrdesign.com</email>\n <access>edit</access>\n
183
+ \ </collaborator>\n</collaborators>\n"
184
+ net_http_res: &79863770 !ruby/object:Net::HTTPOK
185
+ http_version: '1.0'
186
+ code: '200'
187
+ message: OK
188
+ header:
189
+ server:
190
+ - nginx
191
+ date:
192
+ - Mon, 07 May 2012 19:52:48 GMT
193
+ content-type:
194
+ - application/xml; charset=utf-8
195
+ connection:
196
+ - keep-alive
197
+ status:
198
+ - 200 OK
199
+ etag:
200
+ - ! '"89032632d1ae99be4cc6bc10767a1adc"'
201
+ x-runtime:
202
+ - '23'
203
+ content-length:
204
+ - '270'
205
+ cache-control:
206
+ - private, max-age=0, must-revalidate
207
+ strict-transport-security:
208
+ - max-age=500
209
+ body: !str
210
+ str: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<collaborators>\n
211
+ \ <collaborator>\n <email>aws@salesbump.com</email>\n <access>edit</access>\n
212
+ \ </collaborator>\n <collaborator>\n <email>judson@lrdesign.com</email>\n
213
+ \ <access>edit</access>\n </collaborator>\n</collaborators>\n"
214
+ net_http_res: *79863770
215
+ args: &79839720
216
+ :verify_ssl: 1
217
+ :ssl_ca_file: /home/judson/ruby/bundle-paths/rails3/lib/ruby/1.9.1/gems/heroku-2.25.0/data/cacert.pem
218
+ :user: ''
219
+ :password: FakeApiKey
220
+ :method: :get
221
+ :url: https://api.heroku.com/apps/sbmp/collaborators
222
+ :headers:
223
+ X-Heroku-API-Version: '2'
224
+ User-Agent: heroku-gem/2.25.0
225
+ X-Ruby-Version: 1.9.3
226
+ X-Ruby-Platform: i686-linux
227
+ code: 200
228
+ headers: &79860560
229
+ :server: nginx
230
+ :date: Mon, 07 May 2012 19:52:48 GMT
231
+ :content_type: application/xml; charset=utf-8
232
+ :connection: keep-alive
233
+ :status: 200 OK
234
+ :etag: ! '"89032632d1ae99be4cc6bc10767a1adc"'
235
+ :x_runtime: '23'
236
+ :content_length: '270'
237
+ :cache_control: private, max-age=0, must-revalidate
238
+ :strict_transport_security: max-age=500
239
+ read: true
240
+ __read_body_previously_called: true
241
+ args: *79839720
242
+ code: 200
243
+ headers: *79860560
116
244
  http_version: '1.1'
117
- recorded_at: Fri, 04 May 2012 23:47:22 GMT
245
+ recorded_at: Mon, 07 May 2012 19:50:42 GMT
118
246
  - request:
119
247
  method: get
120
248
  uri: https://:FakeApiKey@api.heroku.com/apps/sbmp/addons
@@ -144,7 +272,7 @@ http_interactions:
144
272
  server:
145
273
  - nginx
146
274
  date:
147
- - Fri, 04 May 2012 23:49:25 GMT
275
+ - Mon, 07 May 2012 19:52:49 GMT
148
276
  content-type:
149
277
  - application/json; charset=utf-8
150
278
  connection:
@@ -154,7 +282,7 @@ http_interactions:
154
282
  etag:
155
283
  - ! '"3af6412d378895e01d969c520cc169c5"'
156
284
  x-runtime:
157
- - '45'
285
+ - '54'
158
286
  content-length:
159
287
  - '818'
160
288
  cache-control:
@@ -163,13 +291,76 @@ http_interactions:
163
291
  - max-age=500
164
292
  body:
165
293
  encoding: US-ASCII
166
- string: ! '[{"beta":false,"attachable":false,"configured":"mysql2://sbmpdev:sbmpdev2244@dev.c2wvnyihe8jq.us-east-1.rds.amazonaws.com/sbmp","url":"http://devcenter.heroku.com/articles/amazon_rds","state":"public","name":"amazon_rds","description":"Amazon
167
- RDS","price":{"cents":0,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"redistogo:medium","description":"Redis
168
- To Go Medium","price":{"cents":11000,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"sendgrid:starter","description":"SendGrid
169
- Starter","price":{"cents":0,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"shared-database:5mb","description":"Shared
170
- Database 5MB","price":{"cents":0,"unit":"month"}}]'
294
+ string: !str
295
+ str: ! '[{"beta":false,"attachable":false,"configured":"mysql2://sbmpdev:sbmpdev2244@dev.c2wvnyihe8jq.us-east-1.rds.amazonaws.com/sbmp","url":"http://devcenter.heroku.com/articles/amazon_rds","state":"public","name":"amazon_rds","description":"Amazon
296
+ RDS","price":{"cents":0,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"redistogo:medium","description":"Redis
297
+ To Go Medium","price":{"cents":11000,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"sendgrid:starter","description":"SendGrid
298
+ Starter","price":{"cents":0,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"shared-database:5mb","description":"Shared
299
+ Database 5MB","price":{"cents":0,"unit":"month"}}]'
300
+ net_http_res: &79913860 !ruby/object:Net::HTTPOK
301
+ http_version: '1.0'
302
+ code: '200'
303
+ message: OK
304
+ header:
305
+ server:
306
+ - nginx
307
+ date:
308
+ - Mon, 07 May 2012 19:52:49 GMT
309
+ content-type:
310
+ - application/json; charset=utf-8
311
+ connection:
312
+ - keep-alive
313
+ status:
314
+ - 200 OK
315
+ etag:
316
+ - ! '"3af6412d378895e01d969c520cc169c5"'
317
+ x-runtime:
318
+ - '54'
319
+ content-length:
320
+ - '818'
321
+ cache-control:
322
+ - private, max-age=0, must-revalidate
323
+ strict-transport-security:
324
+ - max-age=500
325
+ body: !str
326
+ str: ! '[{"beta":false,"attachable":false,"configured":"mysql2://sbmpdev:sbmpdev2244@dev.c2wvnyihe8jq.us-east-1.rds.amazonaws.com/sbmp","url":"http://devcenter.heroku.com/articles/amazon_rds","state":"public","name":"amazon_rds","description":"Amazon
327
+ RDS","price":{"cents":0,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"redistogo:medium","description":"Redis
328
+ To Go Medium","price":{"cents":11000,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"sendgrid:starter","description":"SendGrid
329
+ Starter","price":{"cents":0,"unit":"month"}},{"beta":false,"attachable":false,"configured":true,"url":null,"state":"public","name":"shared-database:5mb","description":"Shared
330
+ Database 5MB","price":{"cents":0,"unit":"month"}}]'
331
+ net_http_res: *79913860
332
+ args: &79890530
333
+ :verify_ssl: 1
334
+ :ssl_ca_file: /home/judson/ruby/bundle-paths/rails3/lib/ruby/1.9.1/gems/heroku-2.25.0/data/cacert.pem
335
+ :user: ''
336
+ :password: FakeApiKey
337
+ :method: :get
338
+ :url: https://api.heroku.com/apps/sbmp/addons
339
+ :headers:
340
+ X-Heroku-API-Version: '2'
341
+ User-Agent: heroku-gem/2.25.0
342
+ X-Ruby-Version: 1.9.3
343
+ X-Ruby-Platform: i686-linux
344
+ :accept: application/json
345
+ code: 200
346
+ headers: &79927450
347
+ :server: nginx
348
+ :date: Mon, 07 May 2012 19:52:49 GMT
349
+ :content_type: application/json; charset=utf-8
350
+ :connection: keep-alive
351
+ :status: 200 OK
352
+ :etag: ! '"3af6412d378895e01d969c520cc169c5"'
353
+ :x_runtime: '54'
354
+ :content_length: '818'
355
+ :cache_control: private, max-age=0, must-revalidate
356
+ :strict_transport_security: max-age=500
357
+ read: true
358
+ __read_body_previously_called: true
359
+ args: *79890530
360
+ code: 200
361
+ headers: *79927450
171
362
  http_version: '1.1'
172
- recorded_at: Fri, 04 May 2012 23:47:22 GMT
363
+ recorded_at: Mon, 07 May 2012 19:50:42 GMT
173
364
  - request:
174
365
  method: get
175
366
  uri: https://:FakeApiKey@api.heroku.com/apps/sbmp/ps
@@ -202,7 +393,7 @@ http_interactions:
202
393
  bmdpbng=
203
394
  !binary "ZGF0ZQ==":
204
395
  - !binary |-
205
- RnJpLCAwNCBNYXkgMjAxMiAyMzo0OToyNiBHTVQ=
396
+ TW9uLCAwNyBNYXkgMjAxMiAxOTo1Mjo1MCBHTVQ=
206
397
  !binary "Y29udGVudC10eXBl":
207
398
  - !binary |-
208
399
  YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
@@ -217,10 +408,10 @@ http_interactions:
217
408
  MjAwIE9L
218
409
  !binary "ZXRhZw==":
219
410
  - !binary |-
220
- IjNlNzc1OWE1ZDJmZWIyMWRjYzViZDc2NTQ3YjEyMmJkIg==
411
+ IjE2YWY5NTFmMjk3ZTYwMzBiMTUwZmZlNDM3M2UwY2VjIg==
221
412
  !binary "eC1ydW50aW1l":
222
413
  - !binary |-
223
- OTQ=
414
+ OTY=
224
415
  !binary "Y2FjaGUtY29udHJvbA==":
225
416
  - !binary |-
226
417
  cHJpdmF0ZSwgbWF4LWFnZT0wLCBtdXN0LXJldmFsaWRhdGU=
@@ -233,17 +424,18 @@ http_interactions:
233
424
  body:
234
425
  encoding: ASCII-8BIT
235
426
  string: !binary |-
236
- H4sIAAAAAAAAA9yU0U7DIBSGX4UQLzsHpS20L+FivDOmYe2pa0YpAp1O47sL
237
- JsarmS5bemG4Oj/wn8OXc3j8wE5Nz7jCedeJhohaApQ4wdKYWssBwo7bDiYo
238
- k+nbEGWsJJzkIijNOAxSR3E76VYBgjdokJW9csiBPYBFftdrtDLoZnN3/xBt
239
- G9+POtyYoqWxYwPOhfAVtrc0KBZ0C++HcXL1ZBWu9KRUgkFJ4yAkopSIIsH+
240
- aGJhGxcdvZfNLm52UjmIpuD9sXZeevhOhLrRIrYLZ3+1EHgrtetjOdDW0gc5
241
- JTRdk3xNMkRZlWUVK9EqPJbgz+R8TllKilyQ63NK53HKluOU0Us45SIsfpKT
242
- 61vY9y9o1SAq/kIz2j3YeV1EOV+KDquIuJjO6Wk7k86s3qFcLEiHX0CnFFSI
243
- orj+jLF/9RcVeUlyxq82Y7PoUF4u2EXFD52nLwAAAP//AwAciwvl0wYAAA==
427
+ H4sIAAAAAAAAA7yUy07DMBBFf8WyWKbUjzpx/BNUiB1CkZtMaNTECbZTKIh/
428
+ x2YBq0L6UOTV3LHH9tHcefzArh2fscKirmVJZKEBcpxgPQyF0R2EjNt0Q1DG
429
+ oalCtOI5yYiQQSn7rtMmipvRVC0geIMSWd20Djmwe7DIbxuDFgO6Wd/dP8Sy
430
+ pW96E06MseRg+xKcC+ErbG5pUCyYCt73/eiK0bZYmbFtEwytHhyEiySlqyzB
431
+ /jDEh61drOi9LrcxWevWQSwK3h8K57WH74tQ3VvE2DZs/hVD4K02ronvgarQ
432
+ PsiMULYkYklSRFeKEcUYWoTfEvyZnA5qxUgqJLk+KPY/qEzmgp0Hip4MSqRK
433
+ ZJeAEjKs7Cgo11Swa17QokRU/sWmtzuwU/ookykl8+ARijDF84vxHDfciXgm
434
+ dI8klNK5bMYzxeUFeHJJpUzT69uMTwEl8nS2eZQrzs8HlYqcCJ5dzWZT8IQJ
435
+ OFsfkeC0nz56+gIAAP//AwBcT1uH2QYAAA==
244
436
  http_version: !binary |-
245
437
  MS4x
246
- recorded_at: Fri, 04 May 2012 23:47:23 GMT
438
+ recorded_at: Mon, 07 May 2012 19:50:42 GMT
247
439
  - request:
248
440
  method: get
249
441
  uri: https://:FakeApiKey@api.heroku.com/apps/sbmp/ps
@@ -276,7 +468,7 @@ http_interactions:
276
468
  bmdpbng=
277
469
  !binary "ZGF0ZQ==":
278
470
  - !binary |-
279
- U2F0LCAwNSBNYXkgMjAxMiAwMDoyNjozOSBHTVQ=
471
+ TW9uLCAwNyBNYXkgMjAxMiAxOTo1Mzo0NCBHTVQ=
280
472
  !binary "Y29udGVudC10eXBl":
281
473
  - !binary |-
282
474
  YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
@@ -291,10 +483,10 @@ http_interactions:
291
483
  MjAwIE9L
292
484
  !binary "ZXRhZw==":
293
485
  - !binary |-
294
- IjIyOTA5YzI5YzhjMzUxODNlZTY5YjgzNjdlNjIyYTgxIg==
486
+ IjI4MTBmZDg5NWFkODQyMTk5YTBkM2FjMDE5ODY2ZDlkIg==
295
487
  !binary "eC1ydW50aW1l":
296
488
  - !binary |-
297
- MzE5
489
+ MTAy
298
490
  !binary "Y2FjaGUtY29udHJvbA==":
299
491
  - !binary |-
300
492
  cHJpdmF0ZSwgbWF4LWFnZT0wLCBtdXN0LXJldmFsaWRhdGU=
@@ -307,17 +499,18 @@ http_interactions:
307
499
  body:
308
500
  encoding: ASCII-8BIT
309
501
  string: !binary |-
310
- H4sIAAAAAAAAA9yU0U7DIBSGX4UQLzsHhba0L+FivDOmYe2pa0YpAp1O47sL
311
- JsarmS5bemG4Oj/wn8OXc3j8wE5Nz7jCWdeJhohaApQ4wdKYWssBwo7bDiYo
312
- k+nbEHFWkoJkIijNOAxSR3E76VYBgjdokJW9csiBPYBFftdrtDLoZnN3/xBt
313
- G9+POtyYoqWxYwPOhfAVtrc0KBZ0C++HcXL1ZBWu9KRUgkFJ4yAkooylJMH+
314
- aGJhGxcdvZfNLm52UjmIpuD9sXZeevhOhLrRIrYLZ3+1EHgrtetjOdDW0gc5
315
- JTRdk2xNOKKs4rxiJVqFxxL8mZzPiackzwS5Pqd0FicqluPE6SWcMhFWcZKT
316
- 61vY9y9o1SAq/kIz2j3YeV3EKV2KDquIuJjO6Wk7k86s3lmWTnEBnVJQIfL8
317
- +jPG/tVflGclyVhxtRmbRYfTdMEuyn/oPH0BAAD//wMAvvFamtMGAAA=
502
+ H4sIAAAAAAAAA7yUy07DMBBFf8WyWKZ07NSO45+gQuwQitxkQqPmhe0UCuLf
503
+ cVjAqpA+FHk118kd52SuHz+oq4dnqqkoS5WDygxiSiNq+j5rTYNhx22aPihD
504
+ XxWhWsUpJCBUUPKuaUw7ipuhLWok+IY5saaqHXFo92iJ31YtWfTkZn13/zDa
505
+ 5r7q2vDGMFr2tsvRuVC+4uaWBcViW+D7vhtcNtia6nao64hibXqHoZFiHFhE
506
+ /aEfD7Z2o6P3Jt+Om6WpHY6m6P0hc954/G5Eys4Szrfh4V8xFN6a1lXjebDI
507
+ jA9yMOdLEEuQhK00B805WYSvBfoZnQ5qxUEKBdcHxf8HlaQAyXmg2MmghNQi
508
+ uQSUUGElR0G5qsBd9UIWOWHqLzad3aGdMkeJknI1Dx6hges4vRjP8cCdiGfC
509
+ 9ChgUs4VszjRsboAT6qYCr/z+jGLp4CSAma7j1Idx+eDkiIFESdXi9kUPJwx
510
+ MRceCEn7maOnLwAAAP//AwCjlgWN2QYAAA==
318
511
  http_version: !binary |-
319
512
  MS4x
320
- recorded_at: Sat, 05 May 2012 00:24:35 GMT
513
+ recorded_at: Mon, 07 May 2012 19:51:38 GMT
321
514
  - request:
322
515
  method: get
323
516
  uri: https://:FakeApiKey@api.heroku.com/apps/sbmp/ps
@@ -350,7 +543,7 @@ http_interactions:
350
543
  bmdpbng=
351
544
  !binary "ZGF0ZQ==":
352
545
  - !binary |-
353
- U2F0LCAwNSBNYXkgMjAxMiAwMDo1NDo0OCBHTVQ=
546
+ TW9uLCAwNyBNYXkgMjAxMiAxOTo1Mzo0NSBHTVQ=
354
547
  !binary "Y29udGVudC10eXBl":
355
548
  - !binary |-
356
549
  YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
@@ -365,10 +558,10 @@ http_interactions:
365
558
  MjAwIE9L
366
559
  !binary "ZXRhZw==":
367
560
  - !binary |-
368
- IjViM2E5NWUyNjY2ZmVjYWEwYTUwZGQyNTExMTAxZTJiIg==
561
+ ImQ0MWNmNzhkNzFjZjdmZmI5NjZhOTcyZGQwMDM5NWY3Ig==
369
562
  !binary "eC1ydW50aW1l":
370
563
  - !binary |-
371
- MTAz
564
+ MTAy
372
565
  !binary "Y2FjaGUtY29udHJvbA==":
373
566
  - !binary |-
374
567
  cHJpdmF0ZSwgbWF4LWFnZT0wLCBtdXN0LXJldmFsaWRhdGU=
@@ -381,15 +574,91 @@ http_interactions:
381
574
  body:
382
575
  encoding: ASCII-8BIT
383
576
  string: !binary |-
384
- H4sIAAAAAAAAA9yUUU+DMBDHv0rT+MjcFSgUvoSL8c0Y0sHhyEqpbZlO43e3
385
- mBifZli28GD6dP+2/7v+ctfHD+rU+ExLyttW1CAqiVjQiEpjKi17DDtu25ug
386
- jKZrQpQmBeTARVDqoe+lnsTtqBuFBN+wJlZ2yhGH9oCW+F2nycqQm83d/cNk
387
- W/tu0OHGOFkaO9ToXAhfcXvLgmJRN/h+GEZXjVbRUo9KRRSVNA5DIsYBioj6
388
- o5kK27jJ0XtZ76bNViqHkyl6f6yclx6/E5F2sCTdhbO/Wgi8ldp1UznYVNIH
389
- OQYWr4GvISUsKdO0TAqyCo8F+hmdzymNIeMCrs8pnscpX45Tyi7hxEVY+UlO
390
- rmtw372QVU2Y+AvNYPdo53URA1iKTlKCuJjO6Wk7k86s3lmWTn4BnUIwIbLs
391
- +jOW/Ku/KOMF8CS/2ozNosOALdhF2Q+dpy8AAAD//wMAdKO+7NMGAAA=
577
+ H4sIAAAAAAAAA7yU207EIBCGX4UQL7vuQBdKeQk3xjtjGradus32JNDV1fju
578
+ Ui/0arV7SMPV/MAMfMzP4wd19fBMNRVlqXJQmUFMaURN32etaTDMuE3TB2Xo
579
+ qyJEqziFBIQKSt41jWlHcTO0RY0E3zAn1lS1Iw7tHi3x26oli57crO/uH8a0
580
+ ua+6NuwYxpS97XJ0LoSvuLllQbHYFvi+7waXDbamuh3qOqJYm95hKKQYBx5R
581
+ f+jHg63dmNF7k2/HydLUDsek6P0hc954/C5Eys4Szrdh8a8YAm9N66rxPFhk
582
+ xgeZA+NLEEuQhK00B805WYTbAv2MTge14iCFguuD4v+DSlIAdR4odjIoIbVI
583
+ LgElVBjJUVCuKnBXvZBFTpj6i01nd2in9FGipBTz4BEauI7Ti/EcN9yJeCZ0
584
+ jwImk7lsFic6VhfgSRVT4Tmvb7N4Cigp2Gz/Uarj+HxQUqQg4uRqNpuChzMm
585
+ 58IDwWk/ffT0BQAA//8DALTDAA/ZBgAA
392
586
  http_version: !binary |-
393
587
  MS4x
394
- recorded_at: Sat, 05 May 2012 00:52:44 GMT
588
+ recorded_at: Mon, 07 May 2012 19:51:39 GMT
589
+ - request:
590
+ method: get
591
+ uri: https://:FakeApiKey@api.heroku.com/apps/sbmp/ps
592
+ body:
593
+ encoding: US-ASCII
594
+ string: ''
595
+ headers:
596
+ accept:
597
+ - application/json
598
+ accept-encoding:
599
+ - gzip, deflate
600
+ x-heroku-api-version:
601
+ - '2'
602
+ user-agent:
603
+ - heroku-gem/2.25.0
604
+ x-ruby-version:
605
+ - 1.9.3
606
+ x-ruby-platform:
607
+ - i686-linux
608
+ authorization:
609
+ - Basic OjYzMWJiYjJhYWI1NjhkOTNmMTk3Mzc1MDY5NjM0N2Y3ZjlmZWE4ZjY=
610
+ response:
611
+ status:
612
+ code: 200
613
+ message: !binary |-
614
+ T0s=
615
+ headers:
616
+ !binary "c2VydmVy":
617
+ - !binary |-
618
+ bmdpbng=
619
+ !binary "ZGF0ZQ==":
620
+ - !binary |-
621
+ TW9uLCAwNyBNYXkgMjAxMiAxOTo1Mzo0NiBHTVQ=
622
+ !binary "Y29udGVudC10eXBl":
623
+ - !binary |-
624
+ YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
625
+ !binary "dHJhbnNmZXItZW5jb2Rpbmc=":
626
+ - !binary |-
627
+ Y2h1bmtlZA==
628
+ !binary "Y29ubmVjdGlvbg==":
629
+ - !binary |-
630
+ a2VlcC1hbGl2ZQ==
631
+ !binary "c3RhdHVz":
632
+ - !binary |-
633
+ MjAwIE9L
634
+ !binary "ZXRhZw==":
635
+ - !binary |-
636
+ IjU3ODQzZDZhNWJkMTk1NjZjNmU4YWYzNTFkZjI0NTNmIg==
637
+ !binary "eC1ydW50aW1l":
638
+ - !binary |-
639
+ OTc=
640
+ !binary "Y2FjaGUtY29udHJvbA==":
641
+ - !binary |-
642
+ cHJpdmF0ZSwgbWF4LWFnZT0wLCBtdXN0LXJldmFsaWRhdGU=
643
+ !binary "c3RyaWN0LXRyYW5zcG9ydC1zZWN1cml0eQ==":
644
+ - !binary |-
645
+ bWF4LWFnZT01MDA=
646
+ !binary "Y29udGVudC1lbmNvZGluZw==":
647
+ - !binary |-
648
+ Z3ppcA==
649
+ body:
650
+ encoding: ASCII-8BIT
651
+ string: !binary |-
652
+ H4sIAAAAAAAAA7yU204DIRCGX4UQL7d2gMKyvISN8c6YDd2d2k33JLDVanx3
653
+ WS/0qro9pOFqfmAGPubn8YP6enimhsr1Whegc4uY0YTavs9b22Cc8aumj8rQ
654
+ V2WMFiKDFKSOStE1jW1HcTW0ZY0E37Agzla1Jx7dDh0Jm6ols57cLO/uH8a0
655
+ Rai6Nu4YxpS96wr0PoavuLplUXHYlvi+6wafD66mph3qOqFY295jLKQZB5HQ
656
+ sO/Hgy39mDEEW2zGybWtPY5JMYR97oMN+F2IrDtHON/Exb9iDIKzra/G82CZ
657
+ 2xBlDozPQc5BEbYwHAznZBZvC/QzOR7UgoOSGi4Piv8PKs0A9Gmg2NGgpDIy
658
+ PQeU1HGkB0H5qsRt9UJmBWH6Lzad26Kb0kepVkpdB480wI3IzsZz2HBH4pnQ
659
+ PRqYOrF7jreZSI3QZ+DJNNPxOS9vMzEFlJL8av9RZoQ4HZSSGUiRXsxmU/Bw
660
+ xtJr4YHotJ8+evoCAAD//wMAXgb+4tkGAAA=
661
+ http_version: !binary |-
662
+ MS4x
663
+ recorded_at: Mon, 07 May 2012 19:51:39 GMT
395
664
  recorded_with: VCR 2.1.1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: our-eel-hacks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-05 00:00:00.000000000 Z
12
+ date: 2012-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: corundum
16
- requirement: &74599810 !ruby/object:Gem::Requirement
16
+ requirement: &79604900 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.0.1
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *74599810
24
+ version_requirements: *79604900
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: heroku
27
- requirement: &74615920 !ruby/object:Gem::Requirement
27
+ requirement: &79747270 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>'
@@ -34,7 +34,7 @@ dependencies:
34
34
  - 0
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *74615920
37
+ version_requirements: *79747270
38
38
  description: ! " Middleware for Rack and Sidekiq to scale heroku.\n\n A heroku process
39
39
  knows everything it needs in order to scale itself. A little configuration, and
40
40
  you're set.\n"
@@ -47,6 +47,7 @@ files:
47
47
  - lib/our-eel-hacks/autoscaler.rb
48
48
  - lib/our-eel-hacks/rack.rb
49
49
  - lib/our-eel-hacks/defer/event-machine.rb
50
+ - lib/our-eel-hacks/defer/celluloid.rb
50
51
  - lib/our-eel-hacks/sidekiq.rb
51
52
  - lib/our-eel-hacks/middleware.rb
52
53
  - spec/autoscaler.rb
@@ -65,7 +66,7 @@ rdoc_options:
65
66
  - --main
66
67
  - doc/README
67
68
  - --title
68
- - our-eel-hacks-0.0.1 RDoc
69
+ - our-eel-hacks-0.0.2 RDoc
69
70
  require_paths:
70
71
  - lib/
71
72
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -76,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
77
  version: '0'
77
78
  segments:
78
79
  - 0
79
- hash: 1006788495
80
+ hash: -1065536863
80
81
  required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  none: false
82
83
  requirements: