deis_client 1.5.3 → 1.6.0
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 +37 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18bc17e3f3d5c5469ec3c6f415b43017c78ca9b6
|
4
|
+
data.tar.gz: 053eb3f5964fec97ab71dce05c7af31eaa650ee9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f67090f8c19c796c951ddddcbedd89e6cf4f13123737d4aa446b83b056180dd669f576b3d4f815152e282aa0c088adfb94cacb72ef1ce3dd76d1d7e9d7b82eed
|
7
|
+
data.tar.gz: 1219cd42b1c2bd734cb010b0c390b74e8ae1fe858ded2998a64309411afeaa310bf3cdad1ac0ffb0e4c19cb0f713e2e6d67aa42e22f2cdf6ce0c30d1c2106078
|
data/lib/deis_client.rb
CHANGED
@@ -58,6 +58,7 @@ module Deis
|
|
58
58
|
@@methods = {
|
59
59
|
# method => HTTP-verb, path
|
60
60
|
login: [:post, '/auth/login/'],
|
61
|
+
change_password: [:post, '/auth/passwd/'],
|
61
62
|
apps: [:get, '/apps'],
|
62
63
|
create_app: [:post, '/apps/'],
|
63
64
|
delete_app: [:delete, '/apps/:app/'],
|
@@ -79,7 +80,11 @@ module Deis
|
|
79
80
|
create_build: [:post, '/apps/:app/builds/'],
|
80
81
|
releases: [:get, '/apps/:app/releases/'],
|
81
82
|
release: [:get, '/apps/:app/releases/:release/'],
|
82
|
-
rollback_release: [:post, '/apps/:app/releases/rollback/']
|
83
|
+
rollback_release: [:post, '/apps/:app/releases/rollback/'],
|
84
|
+
create_cert: [:post, '/certs/'],
|
85
|
+
delete_cert: [:delete, '/certs/:domain'],
|
86
|
+
certs: [:get, '/certs'],
|
87
|
+
cert: [:get, '/certs/:domain']
|
83
88
|
}
|
84
89
|
|
85
90
|
def initialize(deis_url, username, password)
|
@@ -99,6 +104,17 @@ module Deis
|
|
99
104
|
response
|
100
105
|
end
|
101
106
|
|
107
|
+
def change_password(old, new, opts = {})
|
108
|
+
body = {
|
109
|
+
password: old,
|
110
|
+
new_password: new
|
111
|
+
}
|
112
|
+
|
113
|
+
body[:username] = opts[:username] if opts[:username]
|
114
|
+
|
115
|
+
perform :change_password, {}, body
|
116
|
+
end
|
117
|
+
|
102
118
|
def apps
|
103
119
|
perform :apps
|
104
120
|
end
|
@@ -191,6 +207,26 @@ module Deis
|
|
191
207
|
perform :rollback_release, { app: app_id }, release: release
|
192
208
|
end
|
193
209
|
|
210
|
+
def create_cert(certificate, key, name = nil)
|
211
|
+
if name.nil?
|
212
|
+
perform :create_cert, { }, { certificate: certificate, key: key }
|
213
|
+
else
|
214
|
+
perform :create_cert, { }, { certificate: certificate, key: key, common_name: name }
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
def delete_cert(domain)
|
219
|
+
perform :delete_cert, { domain: domain }
|
220
|
+
end
|
221
|
+
|
222
|
+
def certs
|
223
|
+
perform :certs
|
224
|
+
end
|
225
|
+
|
226
|
+
def cert(domain)
|
227
|
+
perform :cert, { domain: domain }
|
228
|
+
end
|
229
|
+
|
194
230
|
protected
|
195
231
|
|
196
232
|
def perform(method_sym, interpolations = {}, body = {}, try_twice = true)
|
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.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franz Liedke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -55,9 +55,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|
57
57
|
rubyforge_project:
|
58
|
-
rubygems_version: 2.
|
58
|
+
rubygems_version: 2.5.2
|
59
59
|
signing_key:
|
60
60
|
specification_version: 4
|
61
61
|
summary: Client library to communicate with a [Deis](http://deis.io/) Controller
|
62
62
|
test_files: []
|
63
|
-
has_rdoc:
|