fingercap 0.2 → 0.2.1
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/lib/fingercap/recipes/notify.rb +13 -6
- metadata +1 -1
@@ -6,7 +6,18 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
6
6
|
require 'tinder'
|
7
7
|
rescue LoadError
|
8
8
|
def notify(action)
|
9
|
-
|
9
|
+
puts "[!] Please `gem install tinder' to post deployment messages to Campfire."
|
10
|
+
end
|
11
|
+
else
|
12
|
+
def notify(action)
|
13
|
+
fingercap = nil
|
14
|
+
begin
|
15
|
+
fingercap = YAML.load_file(File.expand_path('~/.fingercap.yml'))
|
16
|
+
rescue Errno::ENOENT
|
17
|
+
puts "[!] Fingercap can't find it's configuration file"
|
18
|
+
puts File.read(File.expand_path('../../../../examples/fingercap.yml', __FILE__))
|
19
|
+
exit -1
|
20
|
+
end
|
10
21
|
if config = fingercap['campfire']
|
11
22
|
campfire = Tinder::Campfire.new(config['account'], :ssl => (config['use_ssl']||false))
|
12
23
|
if campfire.login(config['username'], config['password'])
|
@@ -15,13 +26,9 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
15
26
|
end
|
16
27
|
end
|
17
28
|
else
|
18
|
-
puts "[!]
|
29
|
+
puts "[!] Fingercap can't post deployment messages to Campfire because there are no credentials in the configuration file (~/.fingercap.yml)"
|
19
30
|
end
|
20
31
|
end
|
21
|
-
else
|
22
|
-
def notify(action)
|
23
|
-
puts "[!] Please `gem install tinder' to post deployment messages to Campfire."
|
24
|
-
end
|
25
32
|
end
|
26
33
|
|
27
34
|
desc "Posts a `deployed' message to Campfire"
|