uoregon-multissh 0.3.4 → 0.3.5

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
  SHA256:
3
- metadata.gz: '097fb0d438ad8612a245a114c4a0a0ea83ca4ef4ba805991bc89ac5d07214947'
4
- data.tar.gz: 0b962624d18475092a037a59c34d8680d0c7ed799c4441ebaee692723c5afcc8
3
+ metadata.gz: c50dffc0f04f0205fb1b0cd28c65497c6bd1a788ea2c9980f7e7fd29fa9e6119
4
+ data.tar.gz: 7571b3c5ae53384e7cf1279a2ae72fd454ccbb2ac762a1b321aacf8201e70657
5
5
  SHA512:
6
- metadata.gz: da3a07426ac6106e01434cd93a7bb8bb62523ea2d9cc6d22578de9c9a35bbcb8b7b630a6a22409c6ca5bbe291200f82504443f2baf6ef32e0fc76f9503cd8a2b
7
- data.tar.gz: 97a9c74220b38105b4bba788b7deef67fc5803b12285c11f850b0af8f0e741504ca7e6f48332164307df8039552ebacbb205d65e3e26624ac374276006b5d00e
6
+ metadata.gz: b0fe50fe1f5cc7211f777e9ce39b3f1f1a65ccb61bebffe6264effc10bbd174d6467c332b9c8c4c262e280308506aef9dcf760673af77d4aa4dbc4e7f45dcb89
7
+ data.tar.gz: a12b9c780a98df4fcca029cf41857b7bcdb0455cb066827e30acb16cc54f769671cb3f269c852cbb74cd30d730a4960429546af96104a588c846a6955df6e576
data/.gitignore CHANGED
@@ -3,4 +3,3 @@ tests.txt
3
3
  command.txt
4
4
  nodes.txt
5
5
  build
6
- dev
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, 'r') do |f|
80
- f.each_line do |line|
81
- line.chomp!.strip!
82
- unless line.start_with?('#') || line.empty?
83
- node_list << line
84
- end
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, 'r') do |f|
109
- f.each_line do |line|
110
- line.chomp!.strip!
111
- unless line.start_with?('#') || line.empty?
112
- command_list << line
113
- end
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
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'uoregon-multissh'
3
- spec.version = '0.3.4'
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uoregon-multissh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Crownover