marathon_client 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/marathon/client.rb +12 -1
- data/lib/marathon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0718e26141aec8cea9dcdb90f4cfb778e8f526c
|
4
|
+
data.tar.gz: c29f5c7a4b25432c0dd81522c911f10937176a27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53958c6cd6e9adc408bd1f7fd01f1530acb84f9cfe70c5a5d33c67e77411f50fcea2f65fad46ae7d2c5e894119bc2cb3e0d5e8957887b954551fc43713a1ed80
|
7
|
+
data.tar.gz: 6a93f093622d71a876e3401eb2545ad17cf5b346ee927877dae234be4d832973697326e55bfb2118657f7eb66adb5e901760f97b3206d4d964b1bf9971d739b6
|
data/lib/marathon/client.rb
CHANGED
@@ -2,7 +2,10 @@ module Marathon
|
|
2
2
|
class Client
|
3
3
|
include HTTParty
|
4
4
|
|
5
|
-
headers
|
5
|
+
headers(
|
6
|
+
'Content-Type' => 'application/json',
|
7
|
+
'Accept' => 'application/json'
|
8
|
+
)
|
6
9
|
query_string_normalizer proc { |query| MultiJson.dump(query) }
|
7
10
|
maintain_method_across_redirects
|
8
11
|
default_timeout 5
|
@@ -21,6 +24,14 @@ module Marathon
|
|
21
24
|
wrap_request(:get, '/v1/apps')
|
22
25
|
end
|
23
26
|
|
27
|
+
def endpoints(id = nil)
|
28
|
+
if id.nil?
|
29
|
+
wrap_request(:get, "/v1/endpoints")
|
30
|
+
else
|
31
|
+
wrap_request(:get, "/v1/endpoints/#{id}")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
24
35
|
def start(id, opts)
|
25
36
|
body = opts.dup
|
26
37
|
body[:id] = id
|
data/lib/marathon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marathon_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobi Knaup
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|