qcmd 0.1.1 → 0.1.2

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.
data/lib/qcmd/cli.rb CHANGED
@@ -96,6 +96,9 @@ module Qcmd
96
96
  when 'connect'
97
97
  Qcmd.debug "(connect command received args: #{ args.inspect })"
98
98
 
99
+ # remove quoted strings
100
+ args = args.map {|a| a.gsub(/^"/, '').gsub(/"$/, '')}
101
+
99
102
  machine_name = args.shift
100
103
  passcode = args.shift
101
104
 
@@ -51,7 +51,20 @@ module Qcmd
51
51
  end
52
52
  else
53
53
  # haven't selected a machine yet
54
- commands = commands + Qcmd::Network.names.grep(matcher)
54
+ machine_names = Qcmd::Network.names
55
+ quoted_names = machine_names.map {|mn| %["#{mn}"]}
56
+ names = (quoted_names + machine_names).grep(matcher)
57
+ names = names.map {|wsn|
58
+ if / / =~ wsn && /"/ !~ wsn
59
+ # if workspace name has a space and is not already quoted
60
+ %["#{ wsn }"]
61
+ else
62
+ wsn
63
+ end
64
+ }
65
+
66
+ # unquote
67
+ commands = commands + names
55
68
  end
56
69
 
57
70
  commands
data/lib/qcmd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qcmd
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qcmd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Bachman