dynobattery 0.1.4 → 0.1.5
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.
- data/Rakefile +1 -1
- data/dynobattery.gemspec +1 -1
- data/lib/dynobattery.rb +2 -7
- metadata +2 -2
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'echoe'
|
|
4
4
|
require 'net/http'
|
5
5
|
require 'heroku'
|
6
6
|
|
7
|
-
Echoe.new('dynobattery', '0.1.
|
7
|
+
Echoe.new('dynobattery', '0.1.5') do |p|
|
8
8
|
p.description = "Submit request operations for dyno calculations on Heroku"
|
9
9
|
p.url = "http://github.com/fedesoria/dynobattery"
|
10
10
|
p.author = "Federico Soria"
|
data/dynobattery.gemspec
CHANGED
data/lib/dynobattery.rb
CHANGED
@@ -35,27 +35,22 @@ class DynoBattery
|
|
35
35
|
|
36
36
|
|
37
37
|
|
38
|
-
|
39
|
-
def get_dynos
|
40
|
-
setup_heroku_client
|
41
|
-
@heroku_app = @heroku.info(DYNO_DOMAIN)
|
42
|
-
end
|
38
|
+
|
43
39
|
|
44
40
|
|
45
41
|
def add_dyno
|
46
42
|
setup_heroku_client
|
47
|
-
get_dynos
|
48
43
|
@heroku.set_dynos(@heroku_app[:name],@heroku_app[:dynos] + 1)
|
49
44
|
end
|
50
45
|
|
51
46
|
def remove_dyno
|
52
47
|
setup_heroku_client
|
53
|
-
get_dynos
|
54
48
|
@heroku.set_dynos(@heroku_app[:name],@heroku_app[:dynos] - 1)
|
55
49
|
end
|
56
50
|
|
57
51
|
def setup_heroku_client
|
58
52
|
@heroku = Heroku::Client.new(DYNO_USER, DYNO_PASSWORD)
|
53
|
+
@heroku_app = @heroku.info(DYNO_DOMAIN)
|
59
54
|
end
|
60
55
|
|
61
56
|
end
|