uoregon-multissh 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/lib/cli.rb +16 -14
- data/uoregon-multissh.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c50dffc0f04f0205fb1b0cd28c65497c6bd1a788ea2c9980f7e7fd29fa9e6119
|
4
|
+
data.tar.gz: 7571b3c5ae53384e7cf1279a2ae72fd454ccbb2ac762a1b321aacf8201e70657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0fe50fe1f5cc7211f777e9ce39b3f1f1a65ccb61bebffe6264effc10bbd174d6467c332b9c8c4c262e280308506aef9dcf760673af77d4aa4dbc4e7f45dcb89
|
7
|
+
data.tar.gz: a12b9c780a98df4fcca029cf41857b7bcdb0455cb066827e30acb16cc54f769671cb3f269c852cbb74cd30d730a4960429546af96104a588c846a6955df6e576
|
data/.gitignore
CHANGED
data/lib/cli.rb
CHANGED
@@ -68,7 +68,7 @@ class Cli
|
|
68
68
|
# If '@' is used, return a list of nodes from a file
|
69
69
|
# Otherwise return a list of nodes parsed from comma-separated input from cli
|
70
70
|
#
|
71
|
-
@util.dbg("nodes: #{nodes}")
|
71
|
+
@util.dbg("input nodes: #{nodes}")
|
72
72
|
if nodes.start_with?('@')
|
73
73
|
node_list = []
|
74
74
|
file_path = nodes[1..-1]
|
@@ -76,12 +76,13 @@ class Cli
|
|
76
76
|
@util.dbg("nodes_file: #{expanded_file_path}")
|
77
77
|
raise "File not found" unless File.exists?(expanded_file_path)
|
78
78
|
|
79
|
-
File.open(expanded_file_path
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
79
|
+
node_file = File.open(expanded_file_path).read
|
80
|
+
node_file.each_line do |line|
|
81
|
+
@util.dbg("raw node: #{line}")
|
82
|
+
line.chomp!.strip!
|
83
|
+
unless line.start_with?('#') || line.empty?
|
84
|
+
@util.dbg("valid node: #{line}")
|
85
|
+
node_list << line
|
85
86
|
end
|
86
87
|
end
|
87
88
|
|
@@ -97,7 +98,7 @@ class Cli
|
|
97
98
|
# If '@' is used, return a command string from a file
|
98
99
|
# Otherwise return specified command
|
99
100
|
#
|
100
|
-
@util.dbg("command: #{command}")
|
101
|
+
@util.dbg("input command: #{command}")
|
101
102
|
if command.start_with?('@')
|
102
103
|
command_list = []
|
103
104
|
file_path = command[1..-1]
|
@@ -105,12 +106,13 @@ class Cli
|
|
105
106
|
@util.dbg("command_file: #{expanded_file_path}")
|
106
107
|
raise "File not found" unless File.exists?(expanded_file_path)
|
107
108
|
|
108
|
-
File.open(expanded_file_path
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
109
|
+
command_file = File.open(expanded_file_path).read
|
110
|
+
command_file.each_line do |line|
|
111
|
+
@util.dbg("raw command: #{line}")
|
112
|
+
line.chomp!.strip!
|
113
|
+
unless line.start_with?('#') || line.empty?
|
114
|
+
@util.dbg("valid command: #{line}")
|
115
|
+
command_list << line
|
114
116
|
end
|
115
117
|
end
|
116
118
|
|
data/uoregon-multissh.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'uoregon-multissh'
|
3
|
-
spec.version = '0.3.
|
3
|
+
spec.version = '0.3.5'
|
4
4
|
spec.date = '2019-05-14'
|
5
5
|
spec.summary = "Do all the things everywhere at the same time"
|
6
6
|
spec.description = "Quickly run multiple commands on many boxes at the same time"
|