marathon_deploy 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3984f0e1489687f090fb7438ce506f62611e8bd3
4
- data.tar.gz: 364f06a351cf2cb41f69d5f1336aab52747ab18c
3
+ metadata.gz: 3736662fd87e158bf3d5fecdff15c4a77731e901
4
+ data.tar.gz: 861afb34bd02892b8da74f5e471c3d4b309a7075
5
5
  SHA512:
6
- metadata.gz: 1aff8009aef6664f73c3ae2ea8044b5bcb3faf1f3a8bd48ffc409c9e99d00c1664c3e48a7e1c12f72a025482758662847b8ff4247d9318db6719cc193ef9a734
7
- data.tar.gz: 3349b76cfd389703a474fcc74bf52a716b7d3b61b9f05caf1fc609446bd6b39d2d8e2457cda353112bd10e35874f686134cc4ccec68b8a107e7a38b7b0c68b80
6
+ metadata.gz: 724bc252726a9bd7ce3c33b1be70324c1dd1ab0a77c71ed786f5c22e5df7d1a3093893e19792fc05af046b52d91bce26266de0151fd155e990bc2dd2f9e44af8
7
+ data.tar.gz: fdaee19a8ffe931d5475e1fe5f671db00cec4b759715fca8f6f16ba5ace5e291e25c49f29b563eb0d76c9f838453c2aabf5d0c2862ee51ced2b1ea8814840c7a
@@ -61,6 +61,10 @@ module MarathonDeploy
61
61
  @json = MarathonDefaults.overlay_preproduction_settings(@json)
62
62
  end
63
63
 
64
+ def health_checks
65
+ return json[:healthChecks]
66
+ end
67
+
64
68
  def add_identifier
65
69
  random = Utils.random
66
70
  # Time.now.to_i
@@ -152,13 +152,9 @@ module MarathonDeploy
152
152
  end
153
153
 
154
154
  def health_checks_defined?
155
- response = list_app
156
- return false unless response.kind_of? Net::HTTPSuccess
157
- response_body = Utils.response_body(response)
158
- return false if response_body[:app].nil?
159
- health_check_json = response_body[:app][:healthChecks]
160
- return false if health_check_json.nil?
161
- return health_check_json.size == 0 ? false : true
155
+ health_checks = @application.health_checks
156
+ return true unless health_checks.nil? or health_checks.empty?
157
+ return false
162
158
  end
163
159
 
164
160
  ####### PRIVATE METHODS ##########
@@ -1,3 +1,3 @@
1
1
  module MarathonDeploy
2
- VERSION = "0.1.15"
2
+ VERSION = "0.1.16"
3
3
  end
@@ -34,4 +34,10 @@ class ApplicationTest < Minitest::Test
34
34
  refute_empty(unique_id,msg)
35
35
  end
36
36
 
37
+ def test_health_checks_defined
38
+ app = MarathonDeploy::Application.new(:deployfile => @yml)
39
+ refute_nil(app.health_checks, "health checks returned nil")
40
+ refute_empty(app.health_checks, "health checks returned empty")
41
+ end
42
+
37
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marathon_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Colby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.4.6
200
+ rubygems_version: 2.4.5
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Mesos/Marathon deployment tool.
@@ -207,4 +207,3 @@ test_files:
207
207
  - test/fixtures/deploy.json
208
208
  - test/fixtures/deploy.yml
209
209
  - test/test_helper.rb
210
- has_rdoc: