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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ca744bf251cab3720bec9fabf61109ea7b8846f
4
- data.tar.gz: f85a52180533ac04d0e58663ea84406bdcc457d7
3
+ metadata.gz: 18dfb2bbd620994b9743ba35487c66ecc678e456
4
+ data.tar.gz: 67101ba5cc9a33a361dc3be0a827362c2d567cac
5
5
  SHA512:
6
- metadata.gz: 457a375a24eae7a8a4f7ecc8e485e42a7ef563c58fc5dbebda8348300b3f0dc7f0818c5c5b597400816054d1b32ef540c6454692a931010b1acc7fff0d54bffc
7
- data.tar.gz: 640d3fccae2b106c2d3bb9a28a93db86131b52a005351024369c6f0535c5d88ca919d259667353b61c4392b56b666c405590dfc86e4130996527e5c89afec886
6
+ metadata.gz: be046867b571a4a7a5a58097a98584a1f6d9600ee2899a648ed7441a2fabfa531844f0d61878b2bb3724ad70d224c4852711281c12df2273618c0015e4db1b76
7
+ data.tar.gz: 6a6445bdc794c0c9f761be4e1e4fc931e5c6621b4c7305995f00c16e25bcfbe54253e1a6ab3d324ebb40a64b12a1f09ae3c0e81142b063f42edcd473ec355326
data/lib/marathon/app.rb CHANGED
@@ -8,8 +8,9 @@ class Marathon::App < Marathon::Base
8
8
 
9
9
  DEFAULTS = {
10
10
  :env => {},
11
+ :labels => {},
11
12
  :ports => [],
12
- :uris => []
13
+ :uris => [],
13
14
  }
14
15
 
15
16
  attr_reader :healthChecks, :constraints, :container, :read_only, :tasks
@@ -1,3 +1,3 @@
1
1
  module Marathon
2
- VERSION = '1.3.3'
2
+ VERSION = '1.3.4'
3
3
  end
@@ -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
- subject { described_class.new({ 'id' => '/ubuntu2', 'labels' => { 'env'=>'abc','xyz'=>'123'}}) }
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
- it 'has labels' do
84
- expect(subject.labels).to be_instance_of(Hash)
85
- puts subject.labels
86
- expect(subject.labels).to have_key(:env)
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.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-05 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json