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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/deis_client.rb +8 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91244b20bfcb418319c9b9fcbb5d7bd799bd3017
4
- data.tar.gz: 1f86918cc17e74dcc8b29c6554bacc0b15235445
3
+ metadata.gz: d012ece9f65eefb776fca662aba749a60436d696
4
+ data.tar.gz: b5111f493af2f76f621a1de12c867f7660f742ae
5
5
  SHA512:
6
- metadata.gz: 3813b2230e0dc6a09048da2f6153a4fbf429f1bc7f5d4a0f48ba462c0c0a6e76752fa4793793df355b11efe4c5fcc57c80dfd13d9b460bbfd4f61bccfe8fa60d
7
- data.tar.gz: d6cc27ac19b18d8954ebdd31cebba766a328d24bf5573707a26f161e42e55ec05e0131cb2076f25ec4e10914fe5c6a8072a4d0378970cb1139009b9cba23e06b
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
- /\/:(?<key>\w+)\/?/ =~ path
193
+ %r{/:(?<key>\w+)/?} =~ path
187
194
  return path unless key
188
195
 
189
196
  value = body[key.to_sym]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deis_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1.dev3
4
+ version: 1.5.1.dev4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franz Liedke