mina-skype 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mina/skype/tasks.rb +13 -2
- data/lib/mina/skype/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: e301bdf655b581106e65e8a54f87ea60015bb7d8
|
4
|
+
data.tar.gz: 22589a8113fafb575041d6dc5fae133b805c1049
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d877311738757e363d5eb99cb34c94cfa115fde65730a40dbb24dc849ce5817e4487d3c4f49f7392fece35b6b934013fb8e5cf7513fc32bde3e3b82ec68adad7
|
7
|
+
data.tar.gz: 50e677e0908bf74ecc930db00125711771ee49fa1f82bc6e2ce926688d52db39b3d3a0aed2dd4110e5c73fb72afcf37041a8e3a24cb4da55be55ab75b458780d
|
data/lib/mina/skype/tasks.rb
CHANGED
@@ -20,7 +20,7 @@ namespace :skype do
|
|
20
20
|
start_time = fetch(:start_time)
|
21
21
|
elapsed = end_time.to_i - start_time.to_i
|
22
22
|
|
23
|
-
announcement = "#{announced_deployer} successfully deployed #{announced_application_name} in #{elapsed}
|
23
|
+
announcement = "#{announced_deployer} successfully deployed #{announced_application_name} in #{humanize(elapsed)}."
|
24
24
|
|
25
25
|
post_skype_message(announcement)
|
26
26
|
else
|
@@ -68,6 +68,17 @@ namespace :skype do
|
|
68
68
|
def post_skype_message(message)
|
69
69
|
config_skype unless @skype_is_configured
|
70
70
|
|
71
|
-
|
71
|
+
# Bold in skype
|
72
|
+
SkypeBot.message @event, "**#{message}**"
|
73
|
+
end
|
74
|
+
|
75
|
+
def humanize secs
|
76
|
+
[[60, :seconds], [60, :minutes], [24, :hours], [1000, :days]].inject([]){ |s, (count, name)|
|
77
|
+
if secs > 0
|
78
|
+
secs, n = secs.divmod(count)
|
79
|
+
s.unshift "#{n.to_i} #{name}"
|
80
|
+
end
|
81
|
+
s
|
82
|
+
}.join(' ')
|
72
83
|
end
|
73
84
|
end
|
data/lib/mina/skype/version.rb
CHANGED