capistrano-notification 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/capistrano-notification.rb +5 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -32,10 +32,12 @@ module CapistranoNotification
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
def initialize(vars = {})
|
35
|
+
def initialize(vars = {}, &block)
|
36
36
|
vars.each do |k, v|
|
37
37
|
send k, v
|
38
38
|
end
|
39
|
+
|
40
|
+
block.call(self) if block
|
39
41
|
end
|
40
42
|
|
41
43
|
validates_presence_of :name
|
@@ -61,8 +63,8 @@ module CapistranoNotification
|
|
61
63
|
end
|
62
64
|
end
|
63
65
|
|
64
|
-
def irc(opts)
|
65
|
-
add IRC.new(opts)
|
66
|
+
def irc(opts = {}, &block)
|
67
|
+
add IRC.new(opts, &block)
|
66
68
|
end
|
67
69
|
|
68
70
|
def add(notification)
|