marathon-template 0.0.4 → 0.0.5

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: d766a363e0ddf69758daf3c587845130c0925de4
4
- data.tar.gz: a9cf5b79a225efa5615e4334fcf7cd0464e7834f
3
+ metadata.gz: b21896fde507b47f8f44d96dd5b1441df94a8f51
4
+ data.tar.gz: 848374a49709d44dc9ec88f541b2d3ae79b7a415
5
5
  SHA512:
6
- metadata.gz: abcb11242efdce1e81c5ba68ccd9b2d4655898f2a8005b11313d05f252f8cdd9b27a134a2f0f2ec136e648ded93191b995b246f2ec9f43c653974760b11f8499
7
- data.tar.gz: 1dba41a5a8808cb3305aa1d4d82b26dea4ed150cecf50b45ecf3e1d3c24d9c0c76cfaef44602ade302993ac35b9ac8ad88434948180115bf24d521fc6ddb03d1
6
+ metadata.gz: 22350c213b1f8b52c74eff1f8d49506ff7cce88b1198f5247a4d08e9e6fcce5d3b1019649341621b2edad2139c65cc92608d77bac524525a943c7c507c261ca0
7
+ data.tar.gz: 13f6a7dd95e52f13cb5e5a4111f7e85cb1e4706801caea275105d945095bbc7863ac46981cf10b08ae83e3041b64e7ad4acfb97c3f2dce1da52ff5f0f2320bce
@@ -108,7 +108,7 @@ module Marathon_template
108
108
  servers = get_servers(app_name)
109
109
  LOG.info "#{app_name}: #{servers}"
110
110
  servers.each do |host, port|
111
- f.write "\tserver #{app_name} #{host}:#{port.first} #{options}\n"
111
+ f.write "\tserver #{app_name} #{host.split('_').first}:#{port.first} #{options}\n"
112
112
  end
113
113
  elsif values.kind_of?(Array)
114
114
  values.each do |value|
@@ -141,7 +141,12 @@ module Marathon_template
141
141
  json = JSON.parse(response.body)
142
142
  tasks = json['app']['tasks']
143
143
  tasks.each_with_index do |task, i|
144
- return_hash[task['host']] = task['ports']
144
+ LOG.info "Found host #{task['host']} and port #{task['ports']}"
145
+ return_hash["#{task['host']}_#{i}"] = task['ports']
146
+ # if task['ports'].length == 1
147
+ #+ LOG.info "Found host #{task['host']} and port #{task['ports']}"
148
+ # return_hash[i] = { task['host'] => task['port'] }
149
+ # return_array << "#{task['host']}:#{task['ports'][1]}"
145
150
  end
146
151
  else
147
152
  if response.code == '404'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marathon-template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Malnick