dogell 0.0.5 → 0.0.6

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
  SHA256:
3
- metadata.gz: 3de9a96f559b6416db4aee4b68d3957811c94ed40861449019e76236579ae1f5
4
- data.tar.gz: 442a9ec4e0e13a9d363aa337e06967fc84cb4df7de662d78835f66c36dd0b474
3
+ metadata.gz: 4ad9dfaa89df9a0eb2a6ac0ef221916a0e75e3f55a57cbeccbb03e5e4caad4a0
4
+ data.tar.gz: f5287da1fafe81ae50b62e0ed69a7b3bf8f101cd86af7907b85b1faa370c95a9
5
5
  SHA512:
6
- metadata.gz: 21890e311d3e90eaf5d290a397d9bfbe3dff24f95f3c0739f2ac0440b74376063439c16856167eeb3405ab76fdcd580438406cb8ae04566a7d42f194ada76f67
7
- data.tar.gz: 0a5ceb195dd20dc6c629caa3114245809338f255c402e2cc470ac70eeba418481a5201f6f959522208711d4b4b7f81303349d719d88a81fdbada61fc9dac2f27
6
+ metadata.gz: 6b53868adbb480ff80802b9bd53927c5bff1b530c5224e0d61abcda173e2d5b2b60d4c57d3389f2b4186fc00b87f243dab7300d3d6c7580ccd8627932b418c94
7
+ data.tar.gz: f9327740aece6e60fb82ae388b10024a8d25dcba53c0f707b560f2b7e000686ae9b0a0bd37d416e80acb425a6e3c827d31e72f653db8d5356c6882d6b99a71bb
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dogell (0.0.5)
4
+ dogell (0.0.6)
5
5
  net-ssh-multi (~> 1.2.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  diff-lcs (1.3)
11
- net-ssh (5.0.2)
11
+ net-ssh (5.2.0)
12
12
  net-ssh-gateway (2.0.0)
13
13
  net-ssh (>= 4.0.0)
14
14
  net-ssh-multi (1.2.1)
@@ -39,4 +39,4 @@ DEPENDENCIES
39
39
  rspec (~> 3.0)
40
40
 
41
41
  BUNDLED WITH
42
- 1.16.2
42
+ 1.17.1
data/exe/dogell CHANGED
@@ -24,7 +24,15 @@ end
24
24
  def get_servers_ips(api_key,app_key,tag)
25
25
  uri = URI("https://app.datadoghq.com/reports/v2/overview?api_key=#{api_key}&application_key=#{app_key}&tags=#{tag}&with_meta=true")
26
26
  response = Net::HTTP.get_response(uri)
27
- JSON.parse(response.body)['rows'].map { |server| JSON.parse(server['meta']['gohai'])['network']['ipaddress'] }
27
+ JSON.parse(response.body)['rows'].map do |server|
28
+ info = server['meta']['gohai']
29
+
30
+ if info
31
+ JSON.parse(info)['network']['ipaddress']
32
+ else
33
+ $stderr.puts "[Error] Can't get ip from #{server['host_name']}"
34
+ end
35
+ end.compact
28
36
  end
29
37
 
30
38
  options = {
@@ -1,3 +1,3 @@
1
1
  module Dogell
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Atkinson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-12 00:00:00.000000000 Z
11
+ date: 2019-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh-multi