dogell 0.0.4 → 0.0.5

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
- SHA1:
3
- metadata.gz: f226bd6c1cde45ee2a9d2e41792063ecafb8a4d8
4
- data.tar.gz: 6a18fbc5366ad70cbd2f01b168d3b87b01a50a27
2
+ SHA256:
3
+ metadata.gz: 3de9a96f559b6416db4aee4b68d3957811c94ed40861449019e76236579ae1f5
4
+ data.tar.gz: 442a9ec4e0e13a9d363aa337e06967fc84cb4df7de662d78835f66c36dd0b474
5
5
  SHA512:
6
- metadata.gz: 3752305d06008a8b6cd54ce27bf371f4461ba57a519b9aafa4e03a3878ef48f5fba786a83a51e65e914b018b3d2cec5eb210e24dc6db7ef1d4aad72d4ea7ccc8
7
- data.tar.gz: 1ac93b41eecd98b96ac34337970fe5d72903679407ecf8e4e2ae94fa5293e6aed58041cfc9878fbed66087bbee32fc158de82499cc708c537cb4f17cf50eec97
6
+ metadata.gz: 21890e311d3e90eaf5d290a397d9bfbe3dff24f95f3c0739f2ac0440b74376063439c16856167eeb3405ab76fdcd580438406cb8ae04566a7d42f194ada76f67
7
+ data.tar.gz: 0a5ceb195dd20dc6c629caa3114245809338f255c402e2cc470ac70eeba418481a5201f6f959522208711d4b4b7f81303349d719d88a81fdbada61fc9dac2f27
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dogell (0.0.4)
4
+ dogell (0.0.5)
5
5
  net-ssh-multi (~> 1.2.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -32,8 +32,8 @@ Dogell use Datadog host tags to query the servers with the `-t`/ `--tag` flags,
32
32
 
33
33
  ## TODO
34
34
 
35
- 1. Transform this project into a gem
36
- 2. Separate concerns
35
+ 1. Separate concerns
36
+ 2. Add specs
37
37
 
38
38
  ## Contributing
39
39
 
data/exe/dogell CHANGED
@@ -81,10 +81,16 @@ verify_options!(options)
81
81
 
82
82
  servers = options[:hosts] || get_servers_ips(options[:api_key], options[:app_key], options[:tag])
83
83
 
84
+ begin
85
+ Thread.report_on_exception = false
84
86
  Net::SSH::Multi.start do |session|
85
- servers.each do |server|
86
- session.use(options[:user] ? "#{options[:user]}@#{server}" : server)
87
- end
87
+ servers.each do |server|
88
+ session.use(options[:user] ? "#{options[:user]}@#{server}" : server)
89
+ end
90
+
91
+ session.exec options[:command]
92
+ end
88
93
 
89
- session.exec options[:command]
94
+ rescue Net::SSH::ConnectionTimeout => e
95
+ error("Error: Can't connect to hosts #{servers}")
90
96
  end
@@ -1,3 +1,3 @@
1
1
  module Dogell
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
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.4
4
+ version: 0.0.5
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-07-20 00:00:00.000000000 Z
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh-multi
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.6.8
111
+ rubygems_version: 2.7.6
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Run commands on multiple servers in your Datadog Infrastructure