marathon_client 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 373a4dd26360c174192c911f7f5077ea9c1822a6
4
- data.tar.gz: 73a66e779cb50071b726fa554e4fecf5708fe46d
3
+ metadata.gz: 53171e6715047b18e37963ba74ceede10e550017
4
+ data.tar.gz: fb86411956e49e2e8beee8e91def241db5f7e0d2
5
5
  SHA512:
6
- metadata.gz: 4d07a14c8e6b562e84f4dfc83cf00b9eaa1c66b19d8fcdfc4dcd6398ae29cf131e9e577b95dfc46a09bbd14e95e07a7c75440dfd82a9b5e864d346237abf4efa
7
- data.tar.gz: e6b8abd1120b3dd4e39be8b13dfc3cb1a77597eeba0fdcaa53febfc11b1ea0f1c64f25120d8fc1515c5b4a4562cb8075bc25d760a708981b583f3723f70919c4
6
+ metadata.gz: b858b6ad2485eadf7f52cca583da9d72889b0e05605ff71037f0da3aa04f3210d48a41f2fbafd3a79bf5b939d8c22296f1803d0b912176a74b1a6da9916bde91
7
+ data.tar.gz: 6623e7a5c3464829edcef5976501cc4e8711f65a73002f00b990bc628d3bba7161bdcc7ea21953ce030c11bdaa6340078472f0073a0c8a5a1d66b599d04ed5b3
@@ -62,9 +62,14 @@ module Marathon
62
62
  wrap_request(:post, '/v1/apps/stop', :body => body)
63
63
  end
64
64
 
65
- def kill_tasks(appId, host = '*', scale = false)
65
+ def kill_tasks(appId, params = {})
66
66
  body = {}
67
- params = {:scale => scale, :host => host, :appId => appId}
67
+ params = {
68
+ :scale => false,
69
+ :host => '*',
70
+ :appId => appId,
71
+ :id => nil
72
+ }.merge(params)
68
73
  wrap_request(:post, "/v1/tasks/kill?#{query_params(params)}", :body => body)
69
74
  end
70
75
 
@@ -79,6 +84,7 @@ module Marathon
79
84
  end
80
85
 
81
86
  def query_params(hash)
87
+ hash = hash.select { |k,v| !v.nil? }
82
88
  URI.escape(hash.map { |k,v| "#{k}=#{v}" }.join('&'))
83
89
  end
84
90
  end
@@ -1,3 +1,3 @@
1
1
  module Marathon
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.2.0
4
+ version: 0.2.1
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-11-22 00:00:00.000000000 Z
11
+ date: 2013-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop