panteras_api 0.0.16 → 0.0.17

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: ca6a38bde5cd64365bcb24023295b110f42d9afd
4
- data.tar.gz: 9b23a5f026241a44ca561f3e41a1aa52a4f03d7e
3
+ metadata.gz: e4b955251eddc394db7699452f1cc4e118886992
4
+ data.tar.gz: b24fc0cf6a97bc65c5c2ff09762e67c11dc1af61
5
5
  SHA512:
6
- metadata.gz: f1d2f36df45e2c5968a8818fe0a61ed73cc17e1c8ed5176e1aa6fd2e3c1eb503fae1546b4a81b913b5e0cdd04c4707706b7aded0b13d605873c7012199404d7a
7
- data.tar.gz: 5945f23202dfeedf7ab1138c4f461051b4dc2849656c1a9d329dffb5640e9986cd0fa87da5faaa57defaab4e8a5c1b5e41f50b4850a5d8c4c7a9c84a52d62fc7
6
+ metadata.gz: bfce7735f8bb000e42710f6c516a925d28c7616b1584012e06942255e5afff93ec8f375cdb16b79b5522588f7dd5b6ef19cb7b8a81c6e68bffd7e07c0ae81d3e
7
+ data.tar.gz: 6fab7f571aed7b8b93009f11dacad2328410a440d7e95952dce1e4e3b66f31dec67d56416529de3f06df9c801d20aad4dcb0562b4815f9a66e64b1acc2a0558f
@@ -2,7 +2,7 @@ class ChronosEndpoint
2
2
  include HTTPUtils
3
3
  include Utils
4
4
 
5
- def initialize(host, port=8080)
5
+ def initialize(host, port=4400)
6
6
  @host = host
7
7
  @port = port
8
8
  end
@@ -51,7 +51,7 @@ class MesosCluster
51
51
 
52
52
  def tasks(framework = nil)
53
53
  results = frameworks.collect do |a|
54
- if a[:name] == framework
54
+ if a[:name].include? framework
55
55
  a[:tasks].collect { |t| t[:slave_hostname] = slave_hostname_by_id(t[:slave_id]) ; t }
56
56
  end
57
57
  end
@@ -64,6 +64,11 @@ class MesosCluster
64
64
 
65
65
  def my_tasks_ids(hostname, framework)
66
66
  raise ArgumentError, "missing hostname argument", caller if hostname.nil?
67
+ # use only the first string before "-" if the task list is empty for framework
68
+ # this is needed to make sure we use the right framework name for the mesos version
69
+ if tasks(framework).nil?
70
+ framework = framework.gsub(/-[^\s]+/,"")
71
+ end
67
72
  new_tasks = tasks(framework)
68
73
  if ! new_tasks.nil?
69
74
  new_tasks.select { |t| t[:slave_hostname] =~ /^#{hostname}$/ }.collect { |t| t[:id] }
@@ -1,3 +1,3 @@
1
1
  module PanterasApi
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panteras_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Colby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler