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.
Files changed (2) hide show
  1. data/lib/fingercap/recipes/notify.rb +13 -6
  2. 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
- fingercap = YAML.load_file(File.expand_path('~/.fingercap.yml'))
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 "[!] See examples/fingercap.yml on how to configure credentials for Campfire."
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fingercap
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manfred Stienstra