collins-cli 0.2.7 → 0.2.8

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
  SHA1:
3
- metadata.gz: 09ebb413b3a13f3ab2adc523ec0c433102f2a8ed
4
- data.tar.gz: 82023ce98845f35fea17cc1dbd92e0189bc149c7
3
+ metadata.gz: 1adf33462faee02565ceba544e367478eb18abeb
4
+ data.tar.gz: 02d03d3e418d3ae9ffb2780de7397d27d979a77a
5
5
  SHA512:
6
- metadata.gz: 0b631cd3cdcf84859da995f35830a764ebffd4ac8de0e598c3fbbb302fe28590d1b63946c389f8404ab7734684d4441022a1dfb9ab7165639eb898b8b39bee44
7
- data.tar.gz: 272acbd2aaac068d4fce93adfc4a2eade966f8d93bf4f62fd841cc8f025f15b21742f5a1001226a000d3bd028dedd4e1c2bcc0a976f214beb05b12eb49a1f23c
6
+ metadata.gz: ee817fe2dbaa4618a130faff3cc8738c1967e9a54aebf12c7c68a318eff189d5b1f32ccf2068ea7fda9705b01f0e6414a332353b005450d4423cf8e2de6c8371
7
+ data.tar.gz: f1b895f097d610bca81aebf2e2ddbd5a1308420979111f02ee6f0a7d71dc84be3f05957e0141b7aac7bbe60002226bc59e4cf3848d2021b3a56d52bc5d531df8
@@ -61,7 +61,7 @@ module Collins::CLI
61
61
  end
62
62
  opts.on('-a','--attribute attribute[:value[,...]]',String,"Arbitrary attributes and values to match in query. : between key and value") do |x|
63
63
  x.split(',').each do |p|
64
- a,v = p.split(':')
64
+ a,v = p.split(':', 2) # attribute:value where value might contain :s
65
65
  a = a.to_sym
66
66
  if not search_attrs[a].nil? and not search_attrs[a].is_a? Array
67
67
  # its a single value, turn it into an array
@@ -36,9 +36,8 @@ module Collins::CLI
36
36
  puts opts.help
37
37
  exit 1
38
38
  end
39
- a,*v = x.split(':')
40
- # handle values with : in them :)
41
- @options[:attributes][a.upcase.to_sym] = v.join(":")
39
+ a,v = x.split(':', 2) # attribute:value where value might contain :s
40
+ @options[:attributes][a.upcase.to_sym] = v
42
41
  end
43
42
  opts.on('-d','--delete-attribute attribute',String,"Delete attribute.") {|v| @options[:delete_attributes] << v.to_sym }
44
43
  opts.on('-S','--set-status status[:state]',String,'Set status (and optionally state) to status:state. Requires --reason') do |v|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collins-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabe Conradi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2015-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -89,24 +89,24 @@ executables:
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
- - lib/collins/cli/provision.rb
93
- - lib/collins/cli/power.rb
94
- - lib/collins/cli/ipam.rb
95
- - lib/collins/cli/mixins.rb
96
92
  - lib/collins/cli/find.rb
97
93
  - lib/collins/cli/formatter.rb
94
+ - lib/collins/cli/ipam.rb
95
+ - lib/collins/cli/log.rb
96
+ - lib/collins/cli/mixins.rb
98
97
  - lib/collins/cli/modify.rb
98
+ - lib/collins/cli/power.rb
99
+ - lib/collins/cli/provision.rb
99
100
  - lib/collins/cli/state.rb
100
- - lib/collins/cli/log.rb
101
101
  - lib/collins-cli.rb
102
102
  - bin/collins
103
103
  - README.md
104
- - spec/spec_helper.rb
105
- - spec/collins__cli__power_spec.rb
106
- - spec/collins__cli__provision_spec.rb
107
- - spec/collins__cli__log_spec.rb
108
104
  - spec/collins__cli__find_spec.rb
105
+ - spec/collins__cli__log_spec.rb
109
106
  - spec/collins__cli__modify_spec.rb
107
+ - spec/collins__cli__power_spec.rb
108
+ - spec/collins__cli__provision_spec.rb
109
+ - spec/spec_helper.rb
110
110
  homepage: http://github.com/byxorna/collins-cli
111
111
  licenses:
112
112
  - Apache License 2.0
@@ -132,9 +132,9 @@ signing_key:
132
132
  specification_version: 4
133
133
  summary: CLI utilities to interact with the Collins API
134
134
  test_files:
135
- - spec/spec_helper.rb
136
- - spec/collins__cli__power_spec.rb
137
- - spec/collins__cli__provision_spec.rb
138
- - spec/collins__cli__log_spec.rb
139
135
  - spec/collins__cli__find_spec.rb
136
+ - spec/collins__cli__log_spec.rb
140
137
  - spec/collins__cli__modify_spec.rb
138
+ - spec/collins__cli__power_spec.rb
139
+ - spec/collins__cli__provision_spec.rb
140
+ - spec/spec_helper.rb