marathon-api 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/marathon/app.rb +2 -1
- data/lib/marathon/version.rb +1 -1
- data/spec/marathon/app_spec.rb +17 -8
- 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: 18dfb2bbd620994b9743ba35487c66ecc678e456
|
4
|
+
data.tar.gz: 67101ba5cc9a33a361dc3be0a827362c2d567cac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be046867b571a4a7a5a58097a98584a1f6d9600ee2899a648ed7441a2fabfa531844f0d61878b2bb3724ad70d224c4852711281c12df2273618c0015e4db1b76
|
7
|
+
data.tar.gz: 6a6445bdc794c0c9f761be4e1e4fc931e5c6621b4c7305995f00c16e25bcfbe54253e1a6ab3d324ebb40a64b12a1f09ae3c0e81142b063f42edcd473ec355326
|
data/lib/marathon/app.rb
CHANGED
data/lib/marathon/version.rb
CHANGED
data/spec/marathon/app_spec.rb
CHANGED
@@ -43,7 +43,7 @@ describe Marathon::App do
|
|
43
43
|
subject { described_class.new({ 'id' => '/app/foo' }) }
|
44
44
|
|
45
45
|
let(:expected_string) do
|
46
|
-
'{"env":{},"ports":[],"uris":[],"id":"/app/foo"}'
|
46
|
+
'{"env":{},"labels":{},"ports":[],"uris":[],"id":"/app/foo"}'
|
47
47
|
end
|
48
48
|
|
49
49
|
its(:to_json) { should == expected_string }
|
@@ -78,12 +78,21 @@ describe Marathon::App do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
describe '#labels' do
|
81
|
-
|
81
|
+
describe 'w/ lables' do
|
82
|
+
subject { described_class.new({'id' => '/ubuntu2', 'labels' => {'env' => 'abc', 'xyz' => '123'}}) }
|
83
|
+
it 'has keywordized labels' do
|
84
|
+
expect(subject.labels).to be_instance_of(Hash)
|
85
|
+
expect(subject.labels).to have_key(:env)
|
86
|
+
end
|
87
|
+
|
82
88
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
89
|
+
end
|
90
|
+
|
91
|
+
describe 'w/o labels' do
|
92
|
+
subject { described_class.new({'id' => '/ubuntu2'}) }
|
93
|
+
it 'has empty labels' do
|
94
|
+
expect(subject.labels).to eq({})
|
95
|
+
end
|
87
96
|
end
|
88
97
|
end
|
89
98
|
|
@@ -129,7 +138,7 @@ describe Marathon::App do
|
|
129
138
|
expect(subject).to receive(:check_read_only)
|
130
139
|
expect(described_class).to receive(:change).with(
|
131
140
|
'/app/foo',
|
132
|
-
{:env=>{}, :ports=>[], :uris=>[], :id=>"/app/foo"},
|
141
|
+
{:env=>{}, :labels=>{}, :ports=>[], :uris=>[], :id=>"/app/foo"},
|
133
142
|
false
|
134
143
|
)
|
135
144
|
subject.start!
|
@@ -139,7 +148,7 @@ describe Marathon::App do
|
|
139
148
|
expect(described_class).to receive(:change)
|
140
149
|
.with(
|
141
150
|
'/app/foo',
|
142
|
-
{:env=>{}, :ports=>[], :uris=>[], :id=>"/app/foo"},
|
151
|
+
{:env=>{}, :labels=>{}, :ports=>[], :uris=>[], :id=>"/app/foo"},
|
143
152
|
false
|
144
153
|
)
|
145
154
|
subject.start!
|
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: 1.3.
|
4
|
+
version: 1.3.4
|
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-04-
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|