capistrano-notifier 0.1.1 → 0.1.2

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.
@@ -4,8 +4,8 @@ require File.expand_path('../lib/capistrano/notifier/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Justin Campbell", "Nathan L Smith"]
6
6
  gem.email = ["sysadmin@cramerdev.com"]
7
- gem.description = %q{Capistrano Notifier}
8
7
  gem.summary = %q{Capistrano Notifier}
8
+ gem.description = %q{Simple notification hooks for Capistrano}
9
9
  gem.homepage = "http://github.com/cramerdev/capistrano-notifier"
10
10
 
11
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -13,7 +13,7 @@ class Capistrano::Notifier::Mail < Capistrano::Notifier::Base
13
13
  end
14
14
  end
15
15
 
16
- after 'deploy', 'deploy:notify:mail'
16
+ after 'deploy:restart', 'deploy:notify:mail'
17
17
  end
18
18
  end
19
19
 
@@ -15,7 +15,7 @@ class Capistrano::Notifier::StatsD < Capistrano::Notifier::Base
15
15
  end
16
16
  end
17
17
 
18
- after 'deploy', 'deploy:notify:statsd'
18
+ after 'deploy:restart', 'deploy:notify:statsd'
19
19
  end
20
20
  end
21
21
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Notifier
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
@@ -6,12 +6,19 @@ describe Capistrano::Notifier::Base do
6
6
  let(:configuration) { Capistrano::Configuration.new }
7
7
  subject { described_class.new configuration }
8
8
 
9
- it 'uses configured branch if not specified in configuration' do
10
- configuration.load { set :branch, 'foo' }
11
- subject.send(:branch).should == 'foo'
12
- end
9
+ describe "#branch" do
10
+ it "defaults to master" do
11
+ subject.send(:branch).should == 'master'
12
+ end
13
+
14
+ context "when a branch is specified" do
15
+ before :each do
16
+ configuration.load { set :branch, 'foo' }
17
+ end
13
18
 
14
- it 'uses master branch if not specified in configuration' do
15
- subject.send(:branch).should == 'master'
19
+ it "uses the specified branch" do
20
+ subject.send(:branch).should == 'foo'
21
+ end
22
+ end
16
23
  end
17
24
  end
@@ -6,9 +6,7 @@ describe Capistrano::Notifier::StatsD do
6
6
  subject { described_class.new configuration }
7
7
 
8
8
  before :each do
9
- configuration.load do |configuration|
10
- set :application, 'example'
11
- end
9
+ configuration.load { set :application, 'example' }
12
10
  end
13
11
 
14
12
  it "sets defaults" do
@@ -31,7 +29,7 @@ describe Capistrano::Notifier::StatsD do
31
29
 
32
30
  context "with a stage" do
33
31
  before :each do
34
- configuration.load do |configuration|
32
+ configuration.load do
35
33
  set :application, 'example'
36
34
  set :stage, 'test'
37
35
  end
@@ -44,7 +42,7 @@ describe Capistrano::Notifier::StatsD do
44
42
 
45
43
  context "with statsd options" do
46
44
  before :each do
47
- configuration.load do |configuration|
45
+ configuration.load do
48
46
  set :notifier_statsd_options, {
49
47
  :host => '10.0.0.1',
50
48
  :port => '1234'
@@ -62,7 +60,7 @@ describe Capistrano::Notifier::StatsD do
62
60
 
63
61
  context "with a gauge" do
64
62
  before :each do
65
- configuration.load do |configuration|
63
+ configuration.load do
66
64
  set :notifier_statsd_options, {
67
65
  :with => :gauge
68
66
  }
@@ -76,9 +74,7 @@ describe Capistrano::Notifier::StatsD do
76
74
 
77
75
  context "with an uppercase application" do
78
76
  before :each do
79
- configuration.load do
80
- set :application, 'Example'
81
- end
77
+ configuration.load { set :application, 'Example' }
82
78
 
83
79
  it "lowercases the application" do
84
80
  subject.send(:packet).should == "example.deploy:1|c"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-02 00:00:00.000000000 Z
13
+ date: 2012-05-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionmailer
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description: Capistrano Notifier
111
+ description: Simple notification hooks for Capistrano
112
112
  email:
113
113
  - sysadmin@cramerdev.com
114
114
  executables: []