houcho 0.0.11 → 0.0.12

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: c7c23a4ef5cf93e240094423d9ac76d943403b3f
4
- data.tar.gz: 9194233d1018017bcdcdee212947f957c1b1c7c6
3
+ metadata.gz: b2d8f35e74b7f3cd8939a62d0d5c35f29b5f5920
4
+ data.tar.gz: 22d10e8bb0db16d9ca931c6192987a27b6d3bc3e
5
5
  SHA512:
6
- metadata.gz: 34ec4bece0fdbd4a3c67d4841c2d9351449b2d090065f992c9c7ce91ad88d263fd83f38ab2c8ca42b23c6d6dac90a581b323eb48a65b0a2ff796e9b105572a81
7
- data.tar.gz: f78039031014a62a8f0afc7248c2fd4b249b9681e2f7f713cce724b4603d6c60e7a68157844c29cc1e2b0bdb2f6181bc07020c23652528515deac0edc0d541a3
6
+ metadata.gz: 9bde052dcc898119dbcdf5d44745e4251942ae0b3a3e90aad9d82fa67f3c402c683fc3a7f985d02f16daa60a7233ccf6e553f95fca9a3d668b5db8890917981f
7
+ data.tar.gz: 329947f03908790e3af09a020238697b5c715ba46d00e4a2e3a028ed7399c0bed48ececcf88147123958099f01491f820e294e0dbf3c79313b3138425fc0b934
@@ -22,20 +22,26 @@ module Houcho
22
22
  end
23
23
 
24
24
 
25
- desc "set", "set attribute"
25
+ desc "set [key1:value1 key2:value2...]", "set attribute"
26
26
  option :target, :type => :hash, :required => true, :desc => "assign target of hash"
27
- option :value, :type => :hash, :required => true, :desc => "assign attribute of hash"
28
27
  option :force, :type => :boolean, :desc => "update attribute if defined already"
29
- def set
28
+ def set(*args)
29
+ Houcho::CLI::Main.empty_args(self, shell, __method__) if args.empty?
30
+
31
+ value = {}
32
+ args.each do |v|
33
+ value = value.merge(Hash[*v.split(":")])
34
+ end
35
+
30
36
  options[:target].each do |target_type, target_name|
31
37
  obj = Houcho::CLI::Attribute.target_type_obj(target_type)
32
38
  begin
33
39
  if options[:force]
34
- obj.set_attr!(target_name, options[:value])
40
+ obj.set_attr!(target_name, value)
35
41
  else
36
- obj.set_attr(target_name, options[:value])
42
+ obj.set_attr(target_name, value)
37
43
  end
38
- rescue Houcho::AttributeExceptiotn=> e
44
+ rescue Houcho::AttributeExceptiotn => e
39
45
  puts e.message
40
46
  exit!
41
47
  end
@@ -202,7 +202,7 @@ class Spec
202
202
  u = CI::UkigumoClient.new(ukigumo["host"], ukigumo["port"])
203
203
  ukigumo_report = u.post({
204
204
  :status => result_status,
205
- :project => "This is test " + host.gsub(/\./, "-"),
205
+ :project => host.gsub(/\./, "-"),
206
206
  :branch => role,
207
207
  :repo => "_",
208
208
  :revision => spec.join(", "),
@@ -1,3 +1,3 @@
1
1
  module Houcho
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: houcho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi SUZUKI