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 +4 -4
- data/lib/houcho/cli/attribute.rb +12 -6
- data/lib/houcho/spec/runner.rb +1 -1
- data/lib/houcho/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2d8f35e74b7f3cd8939a62d0d5c35f29b5f5920
|
4
|
+
data.tar.gz: 22d10e8bb0db16d9ca931c6192987a27b6d3bc3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bde052dcc898119dbcdf5d44745e4251942ae0b3a3e90aad9d82fa67f3c402c683fc3a7f985d02f16daa60a7233ccf6e553f95fca9a3d668b5db8890917981f
|
7
|
+
data.tar.gz: 329947f03908790e3af09a020238697b5c715ba46d00e4a2e3a028ed7399c0bed48ececcf88147123958099f01491f820e294e0dbf3c79313b3138425fc0b934
|
data/lib/houcho/cli/attribute.rb
CHANGED
@@ -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,
|
40
|
+
obj.set_attr!(target_name, value)
|
35
41
|
else
|
36
|
-
obj.set_attr(target_name,
|
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
|
data/lib/houcho/spec/runner.rb
CHANGED
@@ -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 =>
|
205
|
+
:project => host.gsub(/\./, "-"),
|
206
206
|
:branch => role,
|
207
207
|
:repo => "_",
|
208
208
|
:revision => spec.join(", "),
|
data/lib/houcho/version.rb
CHANGED