Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing the Heroku::API calls

  • Loading branch information...
commit a07dd3d86f0d8d1167b145ec85dbc42c9bd7588f 1 parent 8ae008d
Nikolay Nemshilov authored
2  lib/save_your_dosh/mangler.rb
View
@@ -28,7 +28,7 @@ def mangle_workers!
# a little wrapper to avoid problems with setting/getting
# a wrong thing
def mangle!(what, &block)
- qty = @heroku.get_app(@config.heroku['app_id']).body[0][what.to_s]
+ qty = @heroku.get_app(@config.heroku['app_id']).body[what.to_s]
new_qty = yield(qty)
min_qty = @config.send(what)['min']
4 save-your-dosh.gemspec
View
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'save-your-dosh'
- s.version = '1.0.2'
- s.date = '2013-01-16'
+ s.version = '1.0.3'
+ s.date = '2013-01-17'
s.summary = "Heroku dynos auto-scaling thing"
s.description = "This gem can automatically scale the dynos amount on your heroku app depending on your system busyness"
2  spec/lib/save_your_dosh/mangler_spec.rb
View
@@ -22,7 +22,7 @@
before do
@heroku.should_receive(:get_app).
with(@config.heroku['app_id']).
- and_return(Struct.new(:body).new([{'dynos' => 2, 'workers' => 1}]))
+ and_return(Struct.new(:body).new({'dynos' => 2, 'workers' => 1}))
SaveYourDosh::NewRelic.should_receive(:get_dynos_load).
and_return(40)
Please sign in to comment.
Something went wrong with that request. Please try again.