teamd-discover 0.3.2 → 0.3.3

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: 7cfebede3c9310f3403d2d8d96d1f3aaf561f232
4
- data.tar.gz: c0d53f564c214bf07bc14f3ca30faa64f4419c5f
3
+ metadata.gz: e800789c0bd64cf4dc2b1eda10fac12b4da8b3b9
4
+ data.tar.gz: 8c05480d752d09d3cba35810bd032388a5a4399f
5
5
  SHA512:
6
- metadata.gz: e285f268ede54d332be8c65478073a0d65117e57832f30265d97ef91828d18e2887d5f67f495e8fe4987c2d770f06a7b0c38da250c178cb17eedd199c0e72f0a
7
- data.tar.gz: b3e55c5b070aad0ce66192e07a15e99a0d40732e7b915f50c6604fa1f2bfb9bbfd2de55013541bd6f1b0611daa1f3ec3dadd0190a82e301bc4a2b8b8e8854565
6
+ metadata.gz: c610a69e4f1b0b333ec18b4e77fb2c7cb0cb2934868394ef0ed87275dd9dcac4c2817d90b6ce744cbc54cb8d7a31eefc84b99cd0c6e8d4921cfee1c8a6e67374
7
+ data.tar.gz: a8a35775e978d2d20424c731ac878c35eb7ea661c66b663c9fc132ecb06d56506be51953a0ed22369af86850d63a8ea6cf66ad953f91c8e263e54cf9f991be4c
@@ -4,6 +4,6 @@ MAINTAINER Mathias Kaufmann <me@stei.gr>
4
4
  RUN apk update && \
5
5
  apk add ruby ruby-dev ca-certificates && \
6
6
  gem update --system --no-ri --no-rdoc
7
- RUN gem install --no-ri --no-rdoc --version 0.3.2 teamd-discover
7
+ RUN gem install --no-ri --no-rdoc --version 0.3.3 teamd-discover
8
8
 
9
9
  ENTRYPOINT ["/usr/bin/teamd-discover"]
@@ -11,7 +11,7 @@ module Teamd
11
11
  @tid ||= SecureRandom.hex(8)
12
12
  end
13
13
  def domain
14
- Socket.gethostname.split(".",2).last
14
+ Socket.gethostname.split(".",2).last rescue "local"
15
15
  end
16
16
  end
17
17
  def initialize
@@ -10,7 +10,7 @@ module Teamd
10
10
  add_clusters_from_files "/run/teamd/config"
11
11
  end
12
12
  def add cluster
13
- STDERR.write "Adding Cluster with token: #{cluster.token} and domain: #{cluster.domain}\n"
13
+ STDERR.write "Adding Cluster with token: #{cluster.token} and name: #{cluster.name}\n"
14
14
  @clusters << cluster unless find cluster
15
15
  end
16
16
  def remove matching_property
@@ -34,7 +34,7 @@ module Teamd
34
34
  def add_cluster_from_environment
35
35
  uri = URI ENV['ETCD_DISCOVERY'] rescue nil
36
36
  token = uri.path.split("/").last rescue nil
37
- domain = Peer.domain rescue ""
37
+ domain = Peer.domain
38
38
  add Cluster.new(name: domain, token: token) if token && domain
39
39
  end
40
40
  def add_clusters_from_files pattern
@@ -1,5 +1,5 @@
1
1
  module Teamd
2
2
  module Discover
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamd-discover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann