marathon-api 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/bin/marathon +1 -1
- data/lib/marathon.rb +4 -6
- data/lib/marathon/app.rb +27 -21
- data/lib/marathon/connection.rb +11 -11
- data/lib/marathon/constraint.rb +1 -1
- data/lib/marathon/container.rb +2 -2
- data/lib/marathon/container_docker.rb +2 -2
- data/lib/marathon/container_docker_port_mapping.rb +2 -2
- data/lib/marathon/container_volume.rb +1 -1
- data/lib/marathon/deployment.rb +4 -1
- data/lib/marathon/deployment_action.rb +1 -0
- data/lib/marathon/deployment_info.rb +3 -2
- data/lib/marathon/deployment_step.rb +1 -1
- data/lib/marathon/error.rb +24 -16
- data/lib/marathon/event_subscriptions.rb +1 -1
- data/lib/marathon/group.rb +2 -1
- data/lib/marathon/health_check.rb +7 -7
- data/lib/marathon/leader.rb +1 -1
- data/lib/marathon/queue.rb +2 -1
- data/lib/marathon/task.rb +7 -3
- data/lib/marathon/util.rb +7 -7
- data/lib/marathon/version.rb +1 -1
- data/spec/marathon/app_spec.rb +58 -54
- data/spec/marathon/base_spec.rb +10 -10
- data/spec/marathon/container_docker_port_mapping_spec.rb +7 -7
- data/spec/marathon/container_docker_spec.rb +13 -13
- data/spec/marathon/container_spec.rb +9 -9
- data/spec/marathon/container_volume_spec.rb +4 -4
- data/spec/marathon/deployment_action_spec.rb +1 -1
- data/spec/marathon/deployment_info_spec.rb +2 -2
- data/spec/marathon/deployment_spec.rb +19 -19
- data/spec/marathon/deployment_step_spec.rb +4 -4
- data/spec/marathon/error_spec.rb +7 -7
- data/spec/marathon/group_spec.rb +47 -47
- data/spec/marathon/marathon_spec.rb +1 -1
- data/spec/marathon/queue_spec.rb +9 -9
- data/spec/marathon/task_spec.rb +12 -12
- data/spec/marathon/util_spec.rb +17 -17
- metadata +2 -2
data/spec/marathon/task_spec.rb
CHANGED
@@ -4,12 +4,12 @@ describe Marathon::Task do
|
|
4
4
|
|
5
5
|
describe '#to_s' do
|
6
6
|
subject { described_class.new({
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
'id' => 'task-id-foo',
|
8
|
+
'appId' => '/app/foo',
|
9
|
+
'host' => 'foo-host',
|
10
|
+
'ports' => [31000, 31001],
|
11
|
+
'version' => 'foo-version'
|
12
|
+
}, double(Marathon::MarathonInstance)) }
|
13
13
|
|
14
14
|
let(:expected_string) do
|
15
15
|
"Marathon::Task { :id => task-id-foo :appId => /app/foo :host => foo-host }"
|
@@ -31,10 +31,10 @@ describe Marathon::Task do
|
|
31
31
|
|
32
32
|
describe '#to_json' do
|
33
33
|
subject { described_class.new({
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
'id' => 'task-id-foo',
|
35
|
+
'appId' => '/app/foo',
|
36
|
+
'host' => 'foo-host',
|
37
|
+
}, double(Marathon::MarathonInstance)) }
|
38
38
|
|
39
39
|
let(:expected_string) do
|
40
40
|
'{"id":"task-id-foo","appId":"/app/foo","host":"foo-host"}'
|
@@ -45,8 +45,8 @@ describe Marathon::Task do
|
|
45
45
|
|
46
46
|
describe '#delete!' do
|
47
47
|
let(:task) { described_class.new({
|
48
|
-
|
49
|
-
|
48
|
+
'id' => 'task_123', 'appId' => '/app/foo'
|
49
|
+
}, double(Marathon::MarathonInstance)) }
|
50
50
|
|
51
51
|
it 'deletes the task' do
|
52
52
|
expect(described_class).to receive(:delete).with('task_123', false)
|
data/spec/marathon/util_spec.rb
CHANGED
@@ -46,20 +46,20 @@ describe Marathon::Util do
|
|
46
46
|
|
47
47
|
it 'keywordizes the hash' do
|
48
48
|
hash = {
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
'foo' => 'bar',
|
50
|
+
'f00' => {'w00h00' => 'yeah'},
|
51
|
+
'bang' => [{'tricky' => 'one'}],
|
52
|
+
'env' => {'foo' => 'bar'},
|
53
|
+
'null' => nil
|
54
54
|
}
|
55
55
|
|
56
56
|
expect(subject.keywordize_hash!(hash)).to eq({
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
:foo => 'bar',
|
58
|
+
:f00 => {:w00h00 => 'yeah'},
|
59
|
+
:bang => [{:tricky => 'one'}],
|
60
|
+
:env => {'foo' => 'bar'},
|
61
|
+
:null => nil
|
62
|
+
})
|
63
63
|
# make sure, it changes the hash w/o creating a new one
|
64
64
|
expect(hash[:foo]).to eq('bar')
|
65
65
|
end
|
@@ -70,15 +70,15 @@ describe Marathon::Util do
|
|
70
70
|
|
71
71
|
it 'removes keys from hash' do
|
72
72
|
hash = {
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
:foo => 'bar',
|
74
|
+
:deleteme => {'w00h00' => 'yeah'},
|
75
|
+
:blah => [{:deleteme => :foo}, 1]
|
76
76
|
}
|
77
77
|
|
78
78
|
expect(subject.remove_keys(hash, [:deleteme])).to eq({
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
:foo => 'bar',
|
80
|
+
:blah => [{}, 1]
|
81
|
+
})
|
82
82
|
# make sure, it does not changes the original hash
|
83
83
|
expect(hash.size).to eq(3)
|
84
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marathon-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Bechstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|