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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0dddea00e0b867220ccaa8670fdd42178a30cd1c
4
- data.tar.gz: 0ff510c9e5845d36748782f71cb6369718493fde
3
+ metadata.gz: e301bdf655b581106e65e8a54f87ea60015bb7d8
4
+ data.tar.gz: 22589a8113fafb575041d6dc5fae133b805c1049
5
5
  SHA512:
6
- metadata.gz: 7a2e727df50471f72d3426692ed06aa7da4fbaac5cb9228685eb022ac46709817839ecce76ae90e978510cd13a406d46e443d0c281ba965303873ec49619b3be
7
- data.tar.gz: 88013a83313d4d1642bf686b1165893ed5622aefd83c8f273d6416f9085d421da56528d68242f44a1363934bd8d1915f8f4621c9897dd6eeeab267d479bd7170
6
+ metadata.gz: d877311738757e363d5eb99cb34c94cfa115fde65730a40dbb24dc849ce5817e4487d3c4f49f7392fece35b6b934013fb8e5cf7513fc32bde3e3b82ec68adad7
7
+ data.tar.gz: 50e677e0908bf74ecc930db00125711771ee49fa1f82bc6e2ce926688d52db39b3d3a0aed2dd4110e5c73fb72afcf37041a8e3a24cb4da55be55ab75b458780d
@@ -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} seconds."
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
- SkypeBot.message @event, message
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
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Skype
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-skype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Star Chow