talking-capistrano 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
data/lib/skype_script_invoker.rb
CHANGED
@@ -34,7 +34,6 @@ class SkypeScriptInvoker
|
|
34
34
|
|
35
35
|
def send_message(message)
|
36
36
|
`osascript #{@@SCRIPT_PATH}skype_send_message.APPLESCRIPT '#{@target_chat_id}' '#{message}'` unless @target_chat_id.nil?
|
37
|
-
#puts "Sending '#{@@target_chat_id}' '#{message}' " unless @target_chat_id.nil?
|
38
37
|
end
|
39
38
|
|
40
39
|
|
data/lib/talking-capistrano.rb
CHANGED
@@ -17,6 +17,7 @@ module TalkingCapistrano
|
|
17
17
|
@topic = topic_exist if topic_exist
|
18
18
|
@skyper = SkypeScriptInvoker.new(@topic)
|
19
19
|
end
|
20
|
+
|
20
21
|
def self.notify?
|
21
22
|
@notify
|
22
23
|
end
|
@@ -26,7 +27,7 @@ module TalkingCapistrano
|
|
26
27
|
end
|
27
28
|
|
28
29
|
def self.pad_text(text)
|
29
|
-
"
|
30
|
+
"\\\\ #{text} //"
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
@@ -39,8 +40,9 @@ module TalkingCapistrano
|
|
39
40
|
attr_accessor :local_rails_env;
|
40
41
|
end
|
41
42
|
|
42
|
-
def self.say_deploy_started
|
43
|
-
|
43
|
+
def self.say_deploy_started(branch = nil)
|
44
|
+
branch_txt = defined?(branch) ? ", branch: " + branch : ""
|
45
|
+
get_item(:say_deploy_started).sub! "ENV", "#{@local_rails_env}#{branch_txt}"
|
44
46
|
end
|
45
47
|
def self.say_deploy_completed
|
46
48
|
get_item(:say_deploy_completed).sub! "ENV", @local_rails_env
|
@@ -68,10 +70,10 @@ Capistrano::Configuration.instance.load do
|
|
68
70
|
namespace :deploy do
|
69
71
|
namespace :say do
|
70
72
|
task :about_to_deploy do
|
71
|
-
`#{say_command} #{TalkingCapistrano::say_deploy_started} -v '#{TalkingCapistrano::say_speaker_name}' &`
|
73
|
+
`#{say_command} #{TalkingCapistrano::say_deploy_started fetch(:branch, nil)} -v '#{TalkingCapistrano::say_speaker_name}' &`
|
72
74
|
end
|
73
75
|
task :setup do
|
74
|
-
TalkingCapistrano.local_rails_env =
|
76
|
+
TalkingCapistrano.local_rails_env = fetch(:stage, "-unknown env-")
|
75
77
|
end
|
76
78
|
end
|
77
79
|
end
|
@@ -95,7 +97,7 @@ Capistrano::Configuration.instance.load do
|
|
95
97
|
TalkingCapistrano::SkypeNotification.set_notify(fetch(:skype_topic, false))
|
96
98
|
end
|
97
99
|
task :send_about_to_deploy do
|
98
|
-
TalkingCapistrano::SkypeNotification.notify(TalkingCapistrano::say_deploy_started)
|
100
|
+
TalkingCapistrano::SkypeNotification.notify(TalkingCapistrano::say_deploy_started fetch(:branch, nil))
|
99
101
|
end
|
100
102
|
end
|
101
103
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: talking-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Capisrano task to notify start|end|erros of a capistrano deploy execution
|
15
15
|
email:
|