xing-cap_gun 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/.travis.yml +1 -4
- data/README.markdown +13 -2
- data/cap_gun.gemspec +1 -1
- data/lib/cap_gun.rb +1 -1
- data/spec/presenter_spec.rb +4 -4
- metadata +5 -23
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NjgzMDhhNTliYTlkYzNiM2YyODJmOTk1OGNjMDkyZThjNWU2NWE5Zg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzI1YmI4ZmU3MTJmMzY2ZWIyZWM4YTNmOTFkOTYxYjNlNWMwMWFlYg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NzdlOGYzYzEyNTNkOGU0ZDdmM2U3ZDYxMmY4ZDUyYTVmMDcyM2FmMzZiMzky
|
10
|
+
MDQ0YjYzYTBiMzFjNTA1MDQxYmVhN2VmNzQ0NTE1Nzg5YmM3M2ExYTM2MDMz
|
11
|
+
OGMwOGI3OGZhN2M0YjI3ZjUwMWU3NmFjYTEyODBhYTdjMzdiODQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZWNjYWI0NzFhZTdhNGExMzE2MDkwYWJlMDk3OWJhM2Q1NTc0YzhhMzlmZGVj
|
14
|
+
MjA4MmQzYTg3OWNhNzdmM2ZiZTU1YTJlYzkwMzc0YjY0YzA0N2UzNmRlNTYx
|
15
|
+
ZjNmYjk2ODMwOGI1MGNjMmY2MzkxODA3NmY5ODkxYmJmMmZhMzc=
|
data/.travis.yml
CHANGED
data/README.markdown
CHANGED
@@ -35,7 +35,16 @@ In your Capistrano config file (usually `deploy.rb`):
|
|
35
35
|
```ruby
|
36
36
|
require "cap_gun"
|
37
37
|
|
38
|
-
#
|
38
|
+
# Setup ActionMailer (if not done in Rails environment already)
|
39
|
+
#
|
40
|
+
# See http://api.rubyonrails.org/classes/ActionMailer/Base.html
|
41
|
+
# for all available configuration options.
|
42
|
+
#
|
43
|
+
# Using Sendmail
|
44
|
+
# ActionMailer::Base.delivery_method = :sendmail
|
45
|
+
#
|
46
|
+
# Using SMTP (Gmail example)
|
47
|
+
ActionMailer::Base.delivery_method = :smtp
|
39
48
|
ActionMailer::Base.smtp_settings = {
|
40
49
|
:address => "smtp.gmail.com",
|
41
50
|
:port => 587,
|
@@ -59,7 +68,9 @@ set :cap_gun_email_envelope, {
|
|
59
68
|
after "deploy:restart", "cap_gun:email"
|
60
69
|
```
|
61
70
|
|
62
|
-
Test everything out by running
|
71
|
+
Test everything out by running
|
72
|
+
|
73
|
+
$ cap cap_gun:email
|
63
74
|
|
64
75
|
## Usage
|
65
76
|
|
data/cap_gun.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
|
12
12
|
gem.name = "xing-cap_gun"
|
13
13
|
gem.require_paths = ["lib"]
|
14
|
-
gem.version = "0.3.
|
14
|
+
gem.version = "0.3.1"
|
15
15
|
|
16
16
|
gem.add_dependency("activesupport")
|
17
17
|
gem.add_dependency("actionmailer", ">= 3.0.0")
|
data/lib/cap_gun.rb
CHANGED
@@ -72,7 +72,7 @@ if Object.const_defined?("Capistrano")
|
|
72
72
|
desc "Send notification of the current release and the previous release via email."
|
73
73
|
task :email, :roles => :app do
|
74
74
|
CapGun::Mailer.load_mailer_config(self)
|
75
|
-
CapGun::Mailer.deployment_notification(self).deliver
|
75
|
+
CapGun::Mailer.deployment_notification(self).deliver unless dry_run
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
data/spec/presenter_spec.rb
CHANGED
@@ -26,14 +26,14 @@ describe CapGun::Presenter do
|
|
26
26
|
capistrano = {:scm => :git, :previous_revision => "previous-sha", :current_revision => "current-sha" }
|
27
27
|
presenter = CapGun::Presenter.new(capistrano)
|
28
28
|
presenter.stub(:`).and_return("fatal: Not a git repo")
|
29
|
-
presenter.stub(:exit_code).and_return(
|
29
|
+
presenter.stub(:exit_code).and_return(double("process status", :success? => false))
|
30
30
|
presenter.scm_log_messages.should == "N/A"
|
31
31
|
end
|
32
32
|
|
33
33
|
it "calls git log with previous_rev..current_rev" do
|
34
34
|
capistrano = {:scm => :git, :previous_revision => "previous-sha", :current_revision => "current-sha" }
|
35
35
|
presenter = CapGun::Presenter.new(capistrano)
|
36
|
-
presenter.stub(:exit_code).and_return(
|
36
|
+
presenter.stub(:exit_code).and_return(double("process status", :success? => true))
|
37
37
|
presenter.should_receive(:`).with(/git log previous-sha..current-sha/)
|
38
38
|
presenter.scm_log_messages
|
39
39
|
end
|
@@ -43,14 +43,14 @@ describe CapGun::Presenter do
|
|
43
43
|
capistrano = {:scm => :subversion, :previous_revision => "42", :current_revision => "46" }
|
44
44
|
presenter = CapGun::Presenter.new(capistrano)
|
45
45
|
presenter.stub(:`).and_return("fatal: Not a working copy")
|
46
|
-
presenter.stub(:exit_code).and_return(
|
46
|
+
presenter.stub(:exit_code).and_return(double("process status", :success? => false))
|
47
47
|
presenter.scm_log_messages.should == "N/A"
|
48
48
|
end
|
49
49
|
|
50
50
|
it "calls svn log with -r previous_rev+1:current_rev" do
|
51
51
|
capistrano = {:scm => :subversion, :previous_revision => "42", :current_revision => "46" }
|
52
52
|
presenter = CapGun::Presenter.new(capistrano)
|
53
|
-
presenter.stub(:exit_code).and_return(
|
53
|
+
presenter.stub(:exit_code).and_return(double("process status", :success? => true))
|
54
54
|
presenter.should_receive(:`).with(/svn log -r 43:46/)
|
55
55
|
presenter.scm_log_messages
|
56
56
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xing-cap_gun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Sebastian Röbke
|
@@ -12,12 +11,11 @@ authors:
|
|
12
11
|
autorequire:
|
13
12
|
bindir: bin
|
14
13
|
cert_chain: []
|
15
|
-
date:
|
14
|
+
date: 2013-08-08 00:00:00.000000000 Z
|
16
15
|
dependencies:
|
17
16
|
- !ruby/object:Gem::Dependency
|
18
17
|
name: activesupport
|
19
18
|
requirement: !ruby/object:Gem::Requirement
|
20
|
-
none: false
|
21
19
|
requirements:
|
22
20
|
- - ! '>='
|
23
21
|
- !ruby/object:Gem::Version
|
@@ -25,7 +23,6 @@ dependencies:
|
|
25
23
|
type: :runtime
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
27
|
- - ! '>='
|
31
28
|
- !ruby/object:Gem::Version
|
@@ -33,7 +30,6 @@ dependencies:
|
|
33
30
|
- !ruby/object:Gem::Dependency
|
34
31
|
name: actionmailer
|
35
32
|
requirement: !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
33
|
requirements:
|
38
34
|
- - ! '>='
|
39
35
|
- !ruby/object:Gem::Version
|
@@ -41,7 +37,6 @@ dependencies:
|
|
41
37
|
type: :runtime
|
42
38
|
prerelease: false
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
41
|
- - ! '>='
|
47
42
|
- !ruby/object:Gem::Version
|
@@ -49,7 +44,6 @@ dependencies:
|
|
49
44
|
- !ruby/object:Gem::Dependency
|
50
45
|
name: rake
|
51
46
|
requirement: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
47
|
requirements:
|
54
48
|
- - ! '>='
|
55
49
|
- !ruby/object:Gem::Version
|
@@ -57,7 +51,6 @@ dependencies:
|
|
57
51
|
type: :development
|
58
52
|
prerelease: false
|
59
53
|
version_requirements: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
54
|
requirements:
|
62
55
|
- - ! '>='
|
63
56
|
- !ruby/object:Gem::Version
|
@@ -65,7 +58,6 @@ dependencies:
|
|
65
58
|
- !ruby/object:Gem::Dependency
|
66
59
|
name: rdoc
|
67
60
|
requirement: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
61
|
requirements:
|
70
62
|
- - ! '>='
|
71
63
|
- !ruby/object:Gem::Version
|
@@ -73,7 +65,6 @@ dependencies:
|
|
73
65
|
type: :development
|
74
66
|
prerelease: false
|
75
67
|
version_requirements: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
68
|
requirements:
|
78
69
|
- - ! '>='
|
79
70
|
- !ruby/object:Gem::Version
|
@@ -81,7 +72,6 @@ dependencies:
|
|
81
72
|
- !ruby/object:Gem::Dependency
|
82
73
|
name: rspec
|
83
74
|
requirement: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
75
|
requirements:
|
86
76
|
- - ! '>='
|
87
77
|
- !ruby/object:Gem::Version
|
@@ -89,7 +79,6 @@ dependencies:
|
|
89
79
|
type: :development
|
90
80
|
prerelease: false
|
91
81
|
version_requirements: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
82
|
requirements:
|
94
83
|
- - ! '>='
|
95
84
|
- !ruby/object:Gem::Version
|
@@ -116,32 +105,25 @@ files:
|
|
116
105
|
- spec/spec_helper.rb
|
117
106
|
homepage: https://github.com/xing/cap_gun
|
118
107
|
licenses: []
|
108
|
+
metadata: {}
|
119
109
|
post_install_message:
|
120
110
|
rdoc_options: []
|
121
111
|
require_paths:
|
122
112
|
- lib
|
123
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
-
none: false
|
125
114
|
requirements:
|
126
115
|
- - ! '>='
|
127
116
|
- !ruby/object:Gem::Version
|
128
117
|
version: '0'
|
129
|
-
segments:
|
130
|
-
- 0
|
131
|
-
hash: -373725717446903416
|
132
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
-
none: false
|
134
119
|
requirements:
|
135
120
|
- - ! '>='
|
136
121
|
- !ruby/object:Gem::Version
|
137
122
|
version: '0'
|
138
|
-
segments:
|
139
|
-
- 0
|
140
|
-
hash: -373725717446903416
|
141
123
|
requirements: []
|
142
124
|
rubyforge_project:
|
143
|
-
rubygems_version:
|
125
|
+
rubygems_version: 2.0.5
|
144
126
|
signing_key:
|
145
|
-
specification_version:
|
127
|
+
specification_version: 4
|
146
128
|
summary: Super simple capistrano deployment notifications. Forked from relevance/cap_gun.
|
147
129
|
test_files: []
|