deis_client 1.5.1.dev3 → 1.5.1.dev4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deis_client.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d012ece9f65eefb776fca662aba749a60436d696
|
4
|
+
data.tar.gz: b5111f493af2f76f621a1de12c867f7660f742ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92acc5d9261fa90d8a2c7bad0f72c615c8ca88d5b75f28e9d7e384d0f6648040b1194bffc11ca6febbce629512a220df9f11219479917a669317c9bca0a15997
|
7
|
+
data.tar.gz: 5d07338cc91a10f0062b879e37b31c3e9c6f9d44daf8c235a0699f12c82a2853bafcbb1308735d772bf11631967ffa81b5cb19cb97d4006048c8d652747f9e20
|
data/lib/deis_client.rb
CHANGED
@@ -2,6 +2,8 @@ require 'httparty'
|
|
2
2
|
|
3
3
|
module Deis
|
4
4
|
class Error < StandardError
|
5
|
+
attr_reader :status, :message, :data
|
6
|
+
|
5
7
|
def initialize(http_status = nil, message = nil, data = nil)
|
6
8
|
@status = http_status
|
7
9
|
@message = message
|
@@ -63,6 +65,7 @@ module Deis
|
|
63
65
|
app_logs: [:get, '/apps/:app/logs/'],
|
64
66
|
app_run: [:post, '/apps/:app/run/'],
|
65
67
|
containers: [:get, '/apps/:app/containers/'],
|
68
|
+
scale: [:get, '/apps/:app/scale/'],
|
66
69
|
config: [:get, '/apps/:app/config/'],
|
67
70
|
domains: [:get, '/apps/:app/domains/'],
|
68
71
|
builds: [:get, '/apps/:app/builds/'],
|
@@ -120,6 +123,10 @@ module Deis
|
|
120
123
|
perform :containers, {app: app_id}
|
121
124
|
end
|
122
125
|
|
126
|
+
def scale(app_id, type_number_hash)
|
127
|
+
perform :containers, type_number_hash.merge({app: app_id})
|
128
|
+
end
|
129
|
+
|
123
130
|
def config(app_id)
|
124
131
|
perform :config, {app: app_id}
|
125
132
|
end
|
@@ -183,7 +190,7 @@ module Deis
|
|
183
190
|
end
|
184
191
|
|
185
192
|
def interpolate_path(path, body)
|
186
|
-
|
193
|
+
%r{/:(?<key>\w+)/?} =~ path
|
187
194
|
return path unless key
|
188
195
|
|
189
196
|
value = body[key.to_sym]
|