talking-capistrano 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in talking-capistrano.gemspec
4
3
  gemspec
5
4
 
6
5
  gem "capistrano"
7
- gem "skypemac"
@@ -1,5 +1,5 @@
1
1
  module Talking
2
2
  module Capistrano
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
@@ -7,20 +7,22 @@ module TalkingCapistrano
7
7
  require 'skype_script_invoker'
8
8
 
9
9
  class << self;
10
- attr_accessor :topic;
10
+ attr_accessor :topic;
11
+ attr_accessor :skyper;
12
+
11
13
  end
12
14
 
13
15
  def self.set_notify(topic_exist)
14
16
  @notify = topic_exist
15
17
  @topic = topic_exist if topic_exist
18
+ @skyper = SkypeScriptInvoker.new(@topic)
16
19
  end
17
20
  def self.notify?
18
21
  @notify
19
22
  end
20
23
 
21
24
  def self.notify(text)
22
- skyper = SkypeScriptInvoker.new(@topic)
23
- skyper.send_message(pad_text text) unless @topic.nil?
25
+ @skyper.send_message(pad_text text) unless @topic.nil?
24
26
  end
25
27
 
26
28
  def self.pad_text(text)
@@ -38,7 +40,6 @@ module TalkingCapistrano
38
40
  end
39
41
 
40
42
  def self.say_deploy_started
41
-
42
43
  get_item(:say_deploy_started).sub! "ENV", @local_rails_env
43
44
  end
44
45
  def self.say_deploy_completed
@@ -80,9 +81,7 @@ Capistrano::Configuration.instance.load do
80
81
  task :update_code, :except => { :no_release => true } do
81
82
  on_rollback do
82
83
  `#{say_command} #{TalkingCapistrano::say_deploy_failed} -v #{TalkingCapistrano::say_speaker_name} &`;
83
- if TalkingCapistrano::SkypeNotification.notify?
84
- TalkingCapistrano::SkypeNotification.notify(TalkingCapistrano::say_deploy_failed)
85
- end
84
+ TalkingCapistrano::SkypeNotification.notify(TalkingCapistrano::say_deploy_failed)
86
85
  run "rm -rf #{release_path}; true"
87
86
  end
88
87
  strategy.deploy!
@@ -96,9 +95,7 @@ Capistrano::Configuration.instance.load do
96
95
  TalkingCapistrano::SkypeNotification.set_notify(fetch(:skype_topic, false))
97
96
  end
98
97
  task :send_about_to_deploy do
99
- if TalkingCapistrano::SkypeNotification.notify?
100
98
  TalkingCapistrano::SkypeNotification.notify(TalkingCapistrano::say_deploy_started)
101
- end
102
99
  end
103
100
  end
104
101
  end
@@ -115,9 +112,7 @@ Capistrano::Configuration.instance.load do
115
112
  # Say + Skype notifications on deploy stages - hack to avoid stack too deep exception
116
113
  after "deploy" do
117
114
  `#{say_command} #{TalkingCapistrano::say_deploy_completed} -v '#{TalkingCapistrano::say_speaker_name}' &`
118
- if TalkingCapistrano::SkypeNotification.notify?
119
115
  TalkingCapistrano::SkypeNotification.notify(TalkingCapistrano::say_deploy_completed)
120
- end
121
116
  end
122
117
 
123
118
  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.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: