capistrano_mailer 4.0.2 → 4.1.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,107 @@
1
+ ## Version 4.0.2 2013-01-21
2
+ * Git Release Notes by Mark Sim (marksim)
3
+ * Style improvements by Bartłomiej Danek (bartekd)
4
+ * Improved Readme by Peter Boling (pboling)
5
+
6
+ ## Version 4.0.1 2011-12-11
7
+ * Fixed issues with README
8
+
9
+ ## Version 4.0.0 2011-12-11
10
+ * Using the new way of sending a mail by passing the mail command a hash of options and setting instance variables. (jrust)
11
+ * Using Notifier.email_name().deliver instead (jrust)
12
+ * Using prepend_view_path for the template root (jrust)
13
+ * Remove the content_type setting since just sends a multipart email.(jrust)
14
+ * commented out the new release_notes variable, because even with version 2.9 of capistrano there was no cap method called release notes. (jrust)
15
+ * file cleanup (pboling)
16
+ * Improved Readme (pboling)
17
+
18
+ ## Version 3.2.5 2010-04-29
19
+ * Remove Active Support dependency
20
+
21
+ ## Version 3.2.4 2010-01-13
22
+ * Fixed subject line format (mail client filters are based on format of subject line)
23
+
24
+ ## Version 3.2.3 2010-01-13
25
+ * config[:user] is now optional.
26
+
27
+ ## Version 3.2.2 2010-01-13
28
+ * Improved Readme
29
+
30
+ ## Version 3.2.1 2010-01-13
31
+ * Added deprecation warning for configure_capistrano_mailer
32
+ * commented :site_url, doesn't appear to be a native capistrano variable, if sent in will still be rendered.
33
+
34
+ ## Version 3.2.0 textgoeshere fork
35
+ * config/cap_mailer_settings.rb is not longer a hard coded configuration location requirement.
36
+ * refactoring core cap mailer class
37
+
38
+ ## Version 3.1.10 2010-01-07
39
+ * included _section.text.erb view in gem manifest
40
+ * text version of email should render the text partials, not html
41
+
42
+ ## Version 3.1.9 2010-01-07
43
+ * Fixed URL for capistrano_mailer repo on github in HTML email message
44
+
45
+ ## Version 3.1.8 2010-01-07
46
+ * Improved Readme
47
+
48
+ ## Version 3.1.6 2009-11-10
49
+ * Fixed installation instructions to reference gemcutter instead of github
50
+
51
+ ## Version 3.1.3 2009-09-29
52
+ * Added Git as known compatable SCM to readme
53
+ * Credited Dustin Deyoung as Author of HTML Email templates
54
+ * Removed MIT-LICENSE file from gemspec (because github refuses to build with it there)
55
+ * Still trying to get github to build the gem
56
+
57
+ ## Version 3.1.2 2009-09-25
58
+ * Fixed footer copyright
59
+ * Trying to get github to build the gem
60
+
61
+ ## Version 3.1.1 2009-09-24
62
+ * Added back compatability with svn which broke when fixing for perforce (thanks to Matthew Beale / mixonic)
63
+ * Improved Readme for plugin installation. Tested as a plugin. Verified continued compatibility with Deprec.
64
+
65
+ ## Version 3.1.0 2009-09-17
66
+ * Added compatability with perforce (thanks to Andy Kock / ak47)
67
+
68
+ ## Version 3.0.3 2009-09-03
69
+ * Improved readme and upgrade instructions
70
+
71
+ ## Version 3.0.2 2009-08-27
72
+ * Fixed some typos in readme referencing outdated API
73
+
74
+ ## Version 3.0.1 2009-08-21
75
+ * removed a stray puts used in debugging
76
+
77
+ ## Version 3.0.0 2009-08-19
78
+ * turned into a gem
79
+ * New API for configuration
80
+ * improved email templates (hardened against crappy data)
81
+ * added simple testing framwork and Rakefile
82
+ * still compatible with deprec
83
+
84
+ ## Version 2.1.0 2008-11-15
85
+ * improved readme, and other stuff I don't remember
86
+
87
+ ## Version 2.0.1 2008-07-30
88
+ * Works when deploying to a server without capistrano installed
89
+ * Updated README and WIKI (improved documentation)
90
+
91
+ ## Version 2.0 2008-07-25
92
+ * Works with Rails 2.1
93
+ * Works with Capistrano 2.4.3
94
+ * Added access to many of Capistrano's internal variables (~25) so the emails can be more informative
95
+ * Added inferred_command, repo_end and some other derived variables that give more insight into a deployment
96
+ * Parameters are now sent in a hash
97
+ * Emails updated with new information
98
+ * HTML email improved layout, and added styling (thanks to Dustin Deyoung @ Sagebit)
99
+
100
+ ## Version 1.0.1 2008-03-26
101
+ * Works with Rails 2.0.2
102
+ * Works with Capistrano 2.1.0 - 2.2.0
103
+ * Compatability with Deprec verified
104
+
105
+ ## Version 1.0 2008-02-11
106
+ * Works with Rails 2.0.2
107
+ * Works with Capistrano 2.1.0
data/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ Copyright (c) 2008-2014 Peter Boling
2
+ Copyright (c) 2007-8 Peter Boling & Sagebit, LLC
3
+
4
+ MIT License
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,246 @@
1
+ # CapistranoMailer
2
+
3
+ A Gem For Capistrano Deployment Email Notification
4
+
5
+ | Project | Capistrano Mailer |
6
+ |------------------------ | ----------------- |
7
+ | gem name | capistrano_mailer |
8
+ | license | MIT |
9
+ | moldiness | [![Maintainer Status](http://stillmaintained.com/pboling/capistrano_mailer.png)](http://stillmaintained.com/pboling/capistrano_mailer) |
10
+ | version | [![Gem Version](https://badge.fury.io/rb/capistrano_mailer.png)](http://badge.fury.io/rb/capistrano_mailer) |
11
+ | dependencies | [![Dependency Status](https://gemnasium.com/pboling/capistrano_mailer.png)](https://gemnasium.com/pboling/capistrano_mailer) |
12
+ | code quality | [![Code Climate](https://codeclimate.com/github/pboling/capistrano_mailer.png)](https://codeclimate.com/github/pboling/capistrano_mailer) |
13
+ | continuous integration | [![Build Status](https://secure.travis-ci.org/pboling/capistrano_mailer.png?branch=master)](https://travis-ci.org/pboling/capistrano_mailer) |
14
+ | test coverage | [![Coverage Status](https://coveralls.io/repos/pboling/capistrano_mailer/badge.png)](https://coveralls.io/r/pboling/capistrano_mailer) |
15
+ | homepage | [https://github.com/pboling/capistrano_mailer][homepage] |
16
+ | documentation | [http://rdoc.info/github/pboling/capistrano_mailer/frames][documentation] |
17
+ | author | [Peter Boling](https://coderbits.com/pboling) |
18
+ | Spread ~♡ⓛⓞⓥⓔ♡~ | [![Endorse Me](https://api.coderwall.com/pboling/endorsecount.png)](http://coderwall.com/pboling) |
19
+
20
+ ## Summary
21
+
22
+ * It is a Capistrano Plugin / Ruby Gem that requires ActionMailer
23
+ * It is MIT licensed
24
+ * It is old as duck, and it might be almost dead, maybe. (I started this project in 2007)
25
+ * Requires at least Rails 3.0 (might work with older versions, but has not been tested)
26
+ * Requires at least Capistrano 2.4.3 (might work with capistrano as old as 2.1.0, but has not been tested)
27
+ * Known to be compatible with SCMs as of version 3.1.2: Perforce, SVN, and Git
28
+ * Known to be compatible with, but does not require, the deprec gem.
29
+
30
+ ## About
31
+
32
+ Ever wanted to be emailed whenever someone on the team does a cap deploy of trunk or some tag to some server.
33
+ Wouldn't it be nice to know about it every time a release was deployed? For large rails projects this type of coordination is essential,
34
+ and this plugin makes sure everyone on the need to know list is notified when something new is deployed.
35
+
36
+ This plugin/gem is an extension to Capistrano.
37
+
38
+ That means it registers itself with Capistrano as a plugin and is therefore available to call in your recipes.
39
+
40
+ If you are looking to roll your own email integration into capistrano then try this pastie:
41
+ http://pastie.org/146264 (thanks to Mislav Marohnić).
42
+ But if you want to take the easy road to riches then keep reading ;)
43
+ -- figurative "riches" of course, I promise nothing in return for your using this plugin
44
+
45
+ ### Important Note:
46
+
47
+ The first time you deploy to a server (a 'cold' deploy) capistrano mailer will cause an error because it uses capistrano's previous release variables, and when there are no previous releases capistrano throws an error. In the next version this will be fixed, just don't have time at the moment. If you would like to work on this 'first deploy' problem please fork my repo and work on it!
48
+
49
+ ## Installation
50
+
51
+ Add this line to your application's Gemfile:
52
+
53
+ gem 'capistrano_mailer'
54
+
55
+ And then execute:
56
+
57
+ $ bundle
58
+
59
+ Or install it yourself as:
60
+
61
+ $ gem install capistrano_mailer
62
+
63
+ ### With Rails >= 3.x.x
64
+
65
+ The 4.x+ versions of this gem require at least Rails 3
66
+
67
+ ### With Rails <= 2.3.x
68
+
69
+ Switch to the rails2 branch (releases will be in 3.x range)
70
+
71
+
72
+ ## Usage
73
+
74
+ 1) You need to have already setup capistrano in the project, including the 'capify .' command.
75
+
76
+ 2) Add this line to the top of your config/deploy.rb:
77
+
78
+ # For plugin:
79
+ # You must make capistrano_mailer's libraries available in Ruby's load path. This is one way to do that:
80
+ # Add to the top of your config/deploy.rb file:
81
+ $:.unshift 'vendor/plugins/capistrano_mailer/lib'
82
+
83
+ # For frozen gem:
84
+ # You must make capistrano_mailer's libraries available in Ruby's load path. This is one way to do that:
85
+ # Add to the top of your config/deploy.rb file:
86
+ $:.unshift 'vendor/gems/capistrano_mailer-x.x.x/lib'
87
+
88
+ # then for gem or plugin:
89
+ ####################################
90
+ # Capistrano Plugins go here
91
+ require 'capistrano/mailer'
92
+ #configure capistrano_mailer:
93
+ # The configuration file can go anywhere, but in past versions of the gem it was required to be in the config/ dir.
94
+ require 'config/cap_mailer_settings'
95
+ ####################################
96
+
97
+ 3) Configure Caistrano Mailer in the settings file required in step 2:
98
+
99
+ # If installed as a plugin might need the require here as well
100
+
101
+ ActionMailer::Base.delivery_method = :smtp # or :sendmail, or whatever
102
+ ActionMailer::Base.smtp_settings = { # if using :smtp
103
+ :address => "mail.example.com",
104
+ :port => 25,
105
+ :domain => 'default.com',
106
+ :perform_deliveries => true,
107
+ :user_name => "releases@example.com",
108
+ :password => "mypassword",
109
+ :authentication => :login }
110
+ ActionMailer::Base.default_charset = "utf-8"# or "latin1" or whatever you are using
111
+
112
+ CapMailer.configure do |config|
113
+ config[:recipient_addresses] = ["dev1@example.com"]
114
+ # NOTE: THERE IS A BUG IN RAILS 2.3.3 which forces us to NOT use anything but a simple email address string for the sender address.
115
+ # https://rails.lighthouseapp.com/projects/8994/tickets/2340
116
+ # Therefore %("Capistrano Deployment" <releases@example.com>) style addresses may not work in Rails 2.3.3
117
+ config[:sender_address] = "deployment@example.com"
118
+ config[:subject_prepend] = "[EMPTY-CAP-DEPLOY]"
119
+ config[:site_name] = "Empty Example.com App"
120
+ end
121
+
122
+ 4) Add these two tasks to your deploy.rb:
123
+
124
+ namespace :show do
125
+ desc "Show some internal Cap-Fu: What's mah NAYM?!?"
126
+ task :me do
127
+ set :task_name, task_call_frames.first.task.fully_qualified_name
128
+ #puts "Running #{task_name} task"
129
+ end
130
+ end
131
+
132
+ namespace :deploy do
133
+ ...
134
+
135
+ desc "Send email notification of deployment (only send variables you want to be in the email)"
136
+ task :notify, :roles => :app do
137
+ show.me # this sets the task_name variable
138
+ mailer.send_notification_email(self)
139
+ end
140
+
141
+ ...
142
+ end
143
+
144
+ 5) Make _sure_ you've defined `rails_env`, `repository`, `deploy_to`, `host`, and `application`. `task_name` is defined by the show:me task above, and the others are defined behind the scenes by Capistrano!
145
+
146
+ 6) The only parameter to mailer.send_notification_email that is *required* is the first. _Minimally_ you need to define the capistrano variables:
147
+
148
+ :rails_env
149
+ :repository
150
+ :task_name (provided by the show:me task included in this readme)
151
+ :deploy_to
152
+ :host
153
+ :application
154
+
155
+ But there are tons of others - just take a look at lib/mailer/cap_mailer.rb.
156
+
157
+ If anyone has a cool way of recording the *output* into a capistrano accessible variable,
158
+ so that it can be shoved into the release email that would be an excellent contribution!
159
+
160
+ 7) Then add the hook somewhere in your deploy.rb:
161
+
162
+ after "deploy", "deploy:notify"
163
+
164
+ 8) Enjoy and Happy Capping!
165
+
166
+ ## Customization
167
+
168
+ If you want to use your own views you'll need to recreate the notification_email view:
169
+ First you need to define where your templates are:
170
+
171
+ CapMailer.configure_capistrano_mailer do |config|
172
+ config[:template_root] = "app/views/capistrano_mailer/"
173
+ end
174
+
175
+ Then you'll need to create templates there called:
176
+
177
+ `notification_email.text.html.erb`
178
+
179
+ and / or
180
+
181
+ `notification_email.text.plain.erb`
182
+
183
+ Take a look at the templates that comes with the plugin to see how it is done (views/cap_mailer/...)
184
+
185
+ ## Credit where Credit is Due
186
+
187
+ [Peter Boling (pboling)](https://github.com/pboling) - Wrote original & maintainer
188
+ [Dave Nolan (textgoeshere)](https://github.com/textgoeshere) - lots of refactoring for 3.2 release
189
+ [Jason Rust (jrust)](https://github.com/jrust) - Updated for Rails 3 compatibility
190
+
191
+ Thanks to [Dustin Deyoung (ddeyoung)](https://github.com/ddeyoung) for the beautiful HTML email templates.
192
+ Thanks to mixonix and [Yoan Blanc (greut)](https://github.com/greut) for work on SCMs compatibility
193
+
194
+ ## How you can help!
195
+
196
+ Take a look at the `reek` list which is the file called `REEK` and stat fixing things. Once you complete a change, run the tests:
197
+
198
+ ```
199
+ bundle exec rake test:all
200
+ ```
201
+
202
+ If the tests pass refresh the `reek` list:
203
+
204
+ ```
205
+ bundle exec rake reek > REEK
206
+ ```
207
+
208
+ Follow the instructions for "Contributing" below.
209
+
210
+ ## Contributing
211
+
212
+ 1. Fork it
213
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
214
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
215
+ 4. Push to the branch (`git push origin my-new-feature`)
216
+ 5. Create new Pull Request
217
+
218
+ ## Versioning
219
+
220
+ This library aims to adhere to [Semantic Versioning 2.0.0][semver].
221
+ Violations of this scheme should be reported as bugs. Specifically,
222
+ if a minor or patch version is released that breaks backward
223
+ compatibility, a new version should be immediately released that
224
+ restores compatibility. Breaking changes to the public API will
225
+ only be introduced with new major versions.
226
+
227
+ As a result of this policy, you can (and should) specify a
228
+ dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision.
229
+
230
+ For example:
231
+
232
+ spec.add_dependency 'capistrano_mailer', '~> 0.5'
233
+
234
+ ## License
235
+
236
+ * MIT License - See LICENSE file in this project
237
+ * Copyright (c) 2008-2014 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
238
+ * Copyright (c) 2007-8 Peter Boling & Sagebit, LLC
239
+
240
+ [semver]: http://semver.org/
241
+ [pvc]: http://docs.rubygems.org/read/chapter/16#page74
242
+ [railsbling]: http://www.railsbling.com
243
+ [peterboling]: http://www.peterboling.com
244
+ [documentation]: http://rdoc.info/github/pboling/capistrano_mailer/frames
245
+ [homepage]: https://github.com/pboling/capistrano_mailer
246
+
data/Rakefile CHANGED
@@ -1,23 +1,5 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
- require 'rdoc/task'
4
-
5
- begin
6
- require 'jeweler'
7
- Jeweler::Tasks.new do |gemspec|
8
- gemspec.name = "capistrano_mailer"
9
- gemspec.summary = "Capistrano Deployment Email Notification"
10
- gemspec.description = %q{Capistrano Deployment Email Notification. Keep the whole team informed of each release!}
11
- gemspec.email = ["peter.boling@gmail.com", "dave@textgoeshere.org.uk", "jason@rustedcode.com"]
12
- gemspec.homepage = "http://github.com/pboling/capistrano_mailer"
13
- gemspec.authors = ["Peter Boling", "Dave Nolan", "Jason Rust"]
14
- gemspec.add_dependency 'actionmailer'
15
- gemspec.files = `git ls-files`.split("\n")
16
- end
17
- Jeweler::GemcutterTasks.new
18
- rescue LoadError
19
- puts "Jeweler not available. Install it with: sudo gem install jeweler"
20
- end
21
3
 
22
4
  desc 'Default: run unit tests.'
23
5
  task :default => :test
@@ -31,7 +13,9 @@ Rake::TestTask.new(:test) do |t|
31
13
  end
32
14
 
33
15
  desc 'Generate documentation for the capistrano_mailer gem.'
34
- Rake::RDocTask.new(:rdoc) do |rdoc|
16
+ require 'rdoc'
17
+ require 'rdoc/task'
18
+ RDoc::Task.new do |rdoc|
35
19
  rdoc.rdoc_dir = 'rdoc'
36
20
  rdoc.title = 'capistrano_mailer'
37
21
  rdoc.options << '--line-numbers' << '--inline-source'
@@ -37,7 +37,7 @@ class CapMailer < ActionMailer::Base
37
37
  @options = { :release_data => {}, :extra_information => {}, :data => {} }.merge(args.extract_options!)
38
38
  @config = default_base_config.merge(config.reverse_merge({
39
39
  :rails_env => cap.rails_env,
40
- :host => cap.host,
40
+ :host => (cap.host rescue ''),
41
41
  :task_name => cap.task_name,
42
42
  :application => cap.application,
43
43
  :repository => cap.repository,
@@ -47,7 +47,7 @@ class CapMailer < ActionMailer::Base
47
47
  :revision => cap.revision,
48
48
  :real_revision => cap.real_revision,
49
49
  :release_name => cap.release_name,
50
- :release_notes => cap.release_notes,
50
+ :release_notes => (cap.release_notes rescue ''),
51
51
  :version_dir => cap.version_dir,
52
52
  :shared_dir => cap.shared_dir,
53
53
  :current_dir => cap.current_dir,
@@ -1,14 +1,16 @@
1
- require 'rubygems' unless defined?(Rubygems)
2
- require 'capistrano' unless defined?(Capistrano)
1
+ require 'capistrano_mailer/version'
2
+
3
+ require 'capistrano'
3
4
 
4
5
  unless Capistrano::Configuration.respond_to?(:instance)
5
- abort "capistrano/mailer requires Capistrano 2"
6
+ abort 'capistrano/mailer requires Capistrano 2'
6
7
  end
7
8
 
8
9
  require 'capistrano/log_with_awesome'
9
10
  require 'inline-style'
10
- require 'action_mailer' unless defined?(ActionMailer)
11
- require 'cap_mailer' unless defined?(CapMailer)
11
+ require 'action_mailer'
12
+
13
+ require 'cap_mailer'
12
14
 
13
15
  module Capistrano
14
16
  class Configuration
@@ -0,0 +1,4 @@
1
+ require 'capistrano/mailer'
2
+
3
+ module CapistranoMailer
4
+ end
@@ -0,0 +1,3 @@
1
+ module CapistranoMailer
2
+ VERSION = "4.1.0.pre1"
3
+ end
@@ -19,7 +19,7 @@
19
19
  <% if key.is_a?(Symbol) && !data[key].nil?-%>
20
20
  <p class="data-item">
21
21
  <span class="key"><%= key.to_s.titleize %></span>
22
- <span class="value"><%= data[key].is_a?(Array) ? data[key].to_sentence : data[key].is_a?(String) ? data[key].gsub(/\n/, '<br>').gsub(/\n/, '<br>').html_safe : data[key].inspect.html_safe %></span>
22
+ <span class="value"><%= data[key].is_a?(Array) ? data[key].try(:to_sentence) : data[key].is_a?(String) ? data[key].gsub(/\n/, '<br>').gsub(/\n/, '<br>').html_safe : data[key].inspect.html_safe %></span>
23
23
  </p>
24
24
  <% end -%>
25
25
  <% end -%>
@@ -17,7 +17,7 @@
17
17
  <% if !arr.nil? && arr.is_a?(Array) %>
18
18
  <% arr.each do |key| -%>
19
19
  <% if key.is_a?(Symbol) && !data[key].nil?-%>
20
- <%= key.to_s.titleize %> <%= data[key].is_a?(Array) ? data[key].to_sentence : data[key].is_a?(String) ? data[key] : data[key].inspect %>
20
+ <%= key.to_s.titleize %> <%= data[key].is_a?(Array) ? data[key].try(:to_sentence) : data[key].is_a?(String) ? data[key] : data[key].inspect %>
21
21
  <% end -%>
22
22
  <% end -%>
23
23
  <% end -%>
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
5
- prerelease:
4
+ version: 4.1.0.pre1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Peter Boling
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-01-22 00:00:00.000000000 Z
14
+ date: 2014-01-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: capistrano-log_with_awesome
@@ -53,6 +53,9 @@ dependencies:
53
53
  - - ! '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
+ - - <
57
+ - !ruby/object:Gem::Version
58
+ version: '4'
56
59
  type: :runtime
57
60
  prerelease: false
58
61
  version_requirements: !ruby/object:Gem::Requirement
@@ -61,6 +64,9 @@ dependencies:
61
64
  - - ! '>='
62
65
  - !ruby/object:Gem::Version
63
66
  version: '0'
67
+ - - <
68
+ - !ruby/object:Gem::Version
69
+ version: '4'
64
70
  description: Capistrano Deployment Email Notification. Keep the whole team informed
65
71
  of each release!
66
72
  email:
@@ -70,22 +76,17 @@ email:
70
76
  executables: []
71
77
  extensions: []
72
78
  extra_rdoc_files:
73
- - README.rdoc
79
+ - CHANGELOG.md
80
+ - LICENSE
81
+ - README.md
74
82
  files:
75
- - .gitignore
76
- - CHANGELOG
77
- - Gemfile
78
- - Gemfile.lock
79
- - MIT-LICENSE
80
- - README.rdoc
81
- - Rakefile
82
- - VERSION.yml
83
83
  - assets/stylesheets/failure.css
84
84
  - assets/stylesheets/success.css
85
- - capistrano_mailer.gemspec
86
85
  - lib/cap_mailer.rb
87
86
  - lib/capistrano/mailer.rb
88
87
  - lib/capistrano/mailer_recipes.rb
88
+ - lib/capistrano_mailer/version.rb
89
+ - lib/capistrano_mailer.rb
89
90
  - test/build_gem_test.rb
90
91
  - views/cap_mailer/_message_body.html.erb
91
92
  - views/cap_mailer/_message_body.text.erb
@@ -97,6 +98,10 @@ files:
97
98
  - views/cap_mailer/failed.notification_email.text.erb
98
99
  - views/cap_mailer/notification_email.html.erb
99
100
  - views/cap_mailer/notification_email.text.erb
101
+ - LICENSE
102
+ - README.md
103
+ - CHANGELOG.md
104
+ - Rakefile
100
105
  homepage: http://github.com/pboling/capistrano_mailer
101
106
  licenses: []
102
107
  post_install_message:
@@ -109,19 +114,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
114
  - - ! '>='
110
115
  - !ruby/object:Gem::Version
111
116
  version: '0'
112
- segments:
113
- - 0
114
- hash: -676042409470164499
115
117
  required_rubygems_version: !ruby/object:Gem::Requirement
116
118
  none: false
117
119
  requirements:
118
- - - ! '>='
120
+ - - ! '>'
119
121
  - !ruby/object:Gem::Version
120
- version: '0'
122
+ version: 1.3.1
121
123
  requirements: []
122
124
  rubyforge_project:
123
- rubygems_version: 1.8.24
125
+ rubygems_version: 1.8.25
124
126
  signing_key:
125
127
  specification_version: 3
126
128
  summary: Capistrano Deployment Email Notification
127
- test_files: []
129
+ test_files:
130
+ - test/build_gem_test.rb
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- *.sw?
2
- .DS_Store
3
- coverage
4
- *.gem
5
- doc
6
- .project
7
- .idea
data/CHANGELOG DELETED
@@ -1,107 +0,0 @@
1
- Version 4.0.2 2013-01-21
2
- - Git Release Notes by Mark Sim (marksim)
3
- - Style improvements by Bartłomiej Danek (bartekd)
4
- - Improved Readme by Peter Boling (pboling)
5
-
6
- Version 4.0.1 2011-12-11
7
- - Fixed issues with README
8
-
9
- Version 4.0.0 2011-12-11
10
- - Using the new way of sending a mail by passing the mail command a hash of options and setting instance variables. (jrust)
11
- - Using Notifier.email_name().deliver instead (jrust)
12
- - Using prepend_view_path for the template root (jrust)
13
- - Remove the content_type setting since just sends a multipart email.(jrust)
14
- - commented out the new release_notes variable, because even with version 2.9 of capistrano there was no cap method called release notes. (jrust)
15
- - file cleanup (pboling)
16
- - Improved Readme (pboling)
17
-
18
- Version 3.2.5 2010-04-29
19
- - Remove Active Support dependency
20
-
21
- Version 3.2.4 2010-01-13
22
- - Fixed subject line format (mail client filters are based on format of subject line)
23
-
24
- Version 3.2.3 2010-01-13
25
- - config[:user] is now optional.
26
-
27
- Version 3.2.2 2010-01-13
28
- - Improved Readme
29
-
30
- Version 3.2.1 2010-01-13
31
- - Added deprecation warning for configure_capistrano_mailer
32
- - commented :site_url, doesn't appear to be a native capistrano variable, if sent in will still be rendered.
33
-
34
- Version 3.2.0 textgoeshere fork
35
- - config/cap_mailer_settings.rb is not longer a hard coded configuration location requirement.
36
- - refactoring core cap mailer class
37
-
38
- Version 3.1.10 2010-01-07
39
- - included _section.text.erb view in gem manifest
40
- - text version of email should render the text partials, not html
41
-
42
- Version 3.1.9 2010-01-07
43
- - Fixed URL for capistrano_mailer repo on github in HTML email message
44
-
45
- Version 3.1.8 2010-01-07
46
- - Improved Readme
47
-
48
- Version 3.1.6 2009-11-10
49
- - Fixed installation instructions to reference gemcutter instead of github
50
-
51
- Version 3.1.3 2009-09-29
52
- - Added Git as known compatable SCM to readme
53
- - Credited Dustin Deyoung as Author of HTML Email templates
54
- - Removed MIT-LICENSE file from gemspec (because github refuses to build with it there)
55
- - Still trying to get github to build the gem
56
-
57
- Version 3.1.2 2009-09-25
58
- - Fixed footer copyright
59
- - Trying to get github to build the gem
60
-
61
- Version 3.1.1 2009-09-24
62
- - Added back compatability with svn which broke when fixing for perforce (thanks to Matthew Beale / mixonic)
63
- - Improved Readme for plugin installation. Tested as a plugin. Verified continued compatibility with Deprec.
64
-
65
- Version 3.1.0 2009-09-17
66
- - Added compatability with perforce (thanks to Andy Kock / ak47)
67
-
68
- Version 3.0.3 2009-09-03
69
- - Improved readme and upgrade instructions
70
-
71
- Version 3.0.2 2009-08-27
72
- - Fixed some typos in readme referencing outdated API
73
-
74
- Version 3.0.1 2009-08-21
75
- - removed a stray puts used in debugging
76
-
77
- Version 3.0.0 2009-08-19
78
- - turned into a gem
79
- - New API for configuration
80
- - improved email templates (hardened against crappy data)
81
- - added simple testing framwork and Rakefile
82
- - still compatible with deprec
83
-
84
- Version 2.1.0 2008-11-15
85
- - improved readme, and other stuff I don't remember
86
-
87
- Version 2.0.1 2008-07-30
88
- - Works when deploying to a server without capistrano installed
89
- - Updated README and WIKI (improved documentation)
90
-
91
- Version 2.0 2008-07-25
92
- - Works with Rails 2.1
93
- - Works with Capistrano 2.4.3
94
- - Added access to many of Capistrano's internal variables (~25) so the emails can be more informative
95
- - Added inferred_command, repo_end and some other derived variables that give more insight into a deployment
96
- - Parameters are now sent in a hash
97
- - Emails updated with new information
98
- - HTML email improved layout, and added styling (thanks to Dustin Deyoung @ Sagebit)
99
-
100
- Version 1.0.1 2008-03-26
101
- - Works with Rails 2.0.2
102
- - Works with Capistrano 2.1.0 - 2.2.0
103
- - Compatability with Deprec verified
104
-
105
- Version 1.0 2008-02-11
106
- - Works with Rails 2.0.2
107
- - Works with Capistrano 2.1.0
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- gem 'capistrano-log_with_awesome'
4
- gem 'inline-style'
@@ -1,46 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- addressable (2.3.2)
5
- capistrano (2.12.0)
6
- highline
7
- net-scp (>= 1.0.0)
8
- net-sftp (>= 2.0.0)
9
- net-ssh (>= 2.0.14)
10
- net-ssh-gateway (>= 1.1.0)
11
- capistrano-log_with_awesome (0.0.2)
12
- capistrano (>= 2.5.14)
13
- css_parser (1.2.6)
14
- addressable
15
- rdoc
16
- facets (2.9.3)
17
- ffi (1.3.1)
18
- ffi (1.3.1-x86-mingw32)
19
- highline (1.6.12)
20
- inline-style (0.5.0)
21
- css_parser
22
- facets
23
- maca-fork-csspool
24
- nokogiri
25
- json (1.7.6)
26
- maca-fork-csspool (2.0.2)
27
- ffi
28
- net-scp (1.0.4)
29
- net-ssh (>= 1.99.1)
30
- net-sftp (2.0.5)
31
- net-ssh (>= 2.0.9)
32
- net-ssh (2.5.2)
33
- net-ssh-gateway (1.1.0)
34
- net-ssh (>= 1.99.1)
35
- nokogiri (1.5.6)
36
- nokogiri (1.5.6-x86-mingw32)
37
- rdoc (3.12)
38
- json (~> 1.4)
39
-
40
- PLATFORMS
41
- ruby
42
- x86-mingw32
43
-
44
- DEPENDENCIES
45
- capistrano-log_with_awesome
46
- inline-style
@@ -1,21 +0,0 @@
1
- # Copyright (c) 2009 9thBit LLC (http://www.9thbit.net)
2
- # Copyright (c) 2007-8 Sagebit, LLC (http://www.sagebit.com)
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining
5
- # a copy of this software and associated documentation files (the
6
- # "Software"), to deal in the Software without restriction, including
7
- # without limitation the rights to use, copy, modify, merge, publish,
8
- # distribute, sublicense, and/or sell copies of the Software, and to
9
- # permit persons to whom the Software is furnished to do so, subject to
10
- # the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be
13
- # included in all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,204 +0,0 @@
1
- = Capistrano Mailer {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/pboling/capistrano_mailer] {<img src="http://api.coderwall.com/pboling/endorsecount.png" />}[http://coderwall.com/pboling]
2
-
3
- * For Capistrano Deployment Email Notification
4
- * It is a Capistrano Plugin / Ruby Gem that requires ActionMailer
5
- * It is MIT-LICENSE
6
-
7
- Ever wanted to be emailed whenever someone on the team does a cap deploy of trunk or some tag to some server.
8
- Wouldn't it be nice to know about it every time a release was deployed? For large rails projects this type of coordination is essential,
9
- and this plugin makes sure everyone on the need to know list is notified when something new is deployed.
10
-
11
- This plugin/gem is an extension to Capistrano.
12
-
13
- That means it registers itself with Capistrano as a plugin and is therefore available to call in your recipes.
14
-
15
- If you are looking to roll your own email integration into capistrano then try this pastie:
16
- http://pastie.org/146264 (thanks to Mislav Marohnić).
17
- But if you want to take the easy road to riches then keep reading ;)
18
- -- figurative "riches" of course, I promise nothing in return for your using this plugin
19
-
20
- Important Note:
21
- The first time you deploy to a server (a 'cold' deploy) capistrano mailer will cause an error because it uses capistrano's previous release variables, and when there are no previous releases capistrano throws an error. In the next version this will be fixed, just don't have time at the moment. If you would like to work on this 'first deploy' problem please fork my repo and work on it!
22
-
23
- == Home Page
24
-
25
- http://github.com/pboling/capistrano_mailer
26
-
27
-
28
- == Credit where Credit is Due
29
-
30
- * Thanks to Dustin Deyoung of Sagebit, LLC (http://www.sagebit.com) for the beautiful HTML email templates.
31
-
32
-
33
- == Requirements
34
-
35
- * at least Rails 3.0 (might work with older versions, but has not been tested)
36
-
37
- * at least Capistrano 2.4.3 (might work with capistrano as old as 2.1.0, but has not been tested)
38
-
39
- * Known to be compatible with SCMs as of version 3.1.2: Perforce, SVN, and Git
40
-
41
- * Known to be compatible with, but does not require, the deprec gem.
42
-
43
-
44
- == Usage with Rails >= 3.x.x
45
-
46
- The > 4.x versions of this gem require at least Rails 3
47
-
48
- === Installation
49
-
50
- Install as a gem:
51
-
52
- [sudo] gem install capistrano_mailer
53
-
54
- == Usage with Rails <= 2.3.x
55
-
56
- Switch to the rails2 branch (releases will be in 3.x range)
57
-
58
- == Setup
59
-
60
- 1) You need to have already setup capistrano in the project, including the 'capify .' command.
61
-
62
- 2) Add this line to the top of your config/deploy.rb:
63
-
64
- # For plugin:
65
- # You must make capistrano_mailer's libraries available in Ruby's load path. This is one way to do that:
66
- # Add to the top of your config/deploy.rb file:
67
- $:.unshift 'vendor/plugins/capistrano_mailer/lib'
68
-
69
- # For frozen gem:
70
- # You must make capistrano_mailer's libraries available in Ruby's load path. This is one way to do that:
71
- # Add to the top of your config/deploy.rb file:
72
- $:.unshift 'vendor/gems/capistrano_mailer-x.x.x/lib'
73
-
74
- # then for gem or plugin:
75
- ####################################
76
- # Capistrano Plugins go here
77
- require 'capistrano/mailer'
78
- #configure capistrano_mailer:
79
- # The configuration file can go anywhere, but in past versions of the gem it was required to be in the config/ dir.
80
- require 'config/cap_mailer_settings'
81
- ####################################
82
-
83
- 3) Configure Caistrano Mailer in the settings file required in step 2:
84
-
85
- # If installed as a plugin might need the require here as well
86
-
87
- ActionMailer::Base.delivery_method = :smtp # or :sendmail, or whatever
88
- ActionMailer::Base.smtp_settings = { # if using :smtp
89
- :address => "mail.example.com",
90
- :port => 25,
91
- :domain => 'default.com',
92
- :perform_deliveries => true,
93
- :user_name => "releases@example.com",
94
- :password => "mypassword",
95
- :authentication => :login }
96
- ActionMailer::Base.default_charset = "utf-8"# or "latin1" or whatever you are using
97
-
98
- CapMailer.configure do |config|
99
- config[:recipient_addresses] = ["dev1@example.com"]
100
- # NOTE: THERE IS A BUG IN RAILS 2.3.3 which forces us to NOT use anything but a simple email address string for the sender address.
101
- # https://rails.lighthouseapp.com/projects/8994/tickets/2340
102
- # Therefore %("Capistrano Deployment" <releases@example.com>) style addresses may not work in Rails 2.3.3
103
- config[:sender_address] = "deployment@example.com"
104
- config[:subject_prepend] = "[EMPTY-CAP-DEPLOY]"
105
- config[:site_name] = "Empty Example.com App"
106
- end
107
-
108
- 4) Add these two tasks to your deploy.rb:
109
-
110
- namespace :show do
111
- desc "Show some internal Cap-Fu: What's mah NAYM?!?"
112
- task :me do
113
- set :task_name, task_call_frames.first.task.fully_qualified_name
114
- #puts "Running #{task_name} task"
115
- end
116
- end
117
-
118
- namespace :deploy do
119
- ...
120
-
121
- desc "Send email notification of deployment (only send variables you want to be in the email)"
122
- task :notify, :roles => :app do
123
- show.me # this sets the task_name variable
124
- mailer.send_notification_email(self)
125
- end
126
-
127
- ...
128
- end
129
-
130
- 5) Make _sure_ you've defined `rails_env`, `repository`, `deploy_to`, `host`, and `application`. `task_name` is defined by the show:me task above, and the others are defined behind the scenes by Capistrano!
131
-
132
- 6) The only parameter to mailer.send_notification_email that is *required* is the first. _Minimally_ you need to define the capistrano variables:
133
-
134
- :rails_env
135
- :repository
136
- :task_name (provided by the show:me task included in this readme)
137
- :deploy_to
138
- :host
139
- :application
140
-
141
- But there are tons of others - just take a look at lib/mailer/cap_mailer.rb.
142
-
143
- If anyone has a cool way of recording the *output* into a capistrano accessible variable,
144
- so that it can be shoved into the release email that would be an excellent contribution!
145
-
146
- 7) Then add the hook somewhere in your deploy.rb:
147
-
148
- after "deploy", "deploy:notify"
149
-
150
- 8) Enjoy and Happy Capping!
151
-
152
- 9) Customization
153
-
154
- If you want to use your own views you'll need to recreate the notification_email view:
155
- First you need to define where your templates are:
156
-
157
- CapMailer.configure_capistrano_mailer do |config|
158
- config[:template_root] = "app/views/capistrano_mailer/"
159
- end
160
-
161
- Then you'll need to create templates there called:
162
- `notification_email.text.html.erb`
163
- and / or
164
- `notification_email.text.plain.erb`
165
-
166
- Take a look at the templates that comes with the plugin to see how it is done (views/cap_mailer/...)
167
-
168
- == Authors
169
-
170
- Peter Boling (pboling) - Wrote original & maintainer
171
- Dave Nolan (textgoeshere) - lots of refactoring merged into 3.2 release
172
- Jason Rust (jrust) - Updated for Rails 3 compatibility
173
-
174
- == Contributors
175
-
176
- Dustin Deyoung - HTML Email Templates
177
- mixonix - SCMs compatibility
178
- greut - SCMs compatibility
179
-
180
- == Versioning
181
-
182
- This library aims to adhere to {Semantic Versioning 2.0.0}[http://semver.org/].
183
- Violations of this scheme should be reported as bugs. Specifically,
184
- if a minor or patch version is released that breaks backward
185
- compatibility, a new version should be immediately released that
186
- restores compatibility. Breaking changes to the public API will
187
- only be introduced with new major versions.
188
-
189
- As a result of this policy, you can (and should) specify a
190
- dependency on this gem using the {Pessimistic Version Constraint}[http://docs.rubygems.org/read/chapter/16#page74] with two digits of precision.
191
-
192
- For example:
193
-
194
- spec.add_dependency 'capistrano_mailer', '~> 4.0'
195
-
196
-
197
- ----------------------------------------------------------------------------------
198
- This plugin started out as a collaboration between Sagebit, LLC (http://www.sagebit.com) and Peter Boling (http://www.peterboling.com).
199
- Written initially while Peter Boling was working at Sagebit for use in various projects.
200
-
201
- Author: Peter Boling, peter.boling at gmail dot com
202
-
203
- Copyright (c) 2009-2011 Peter Boling of 9thBit LLC, released under the MIT license
204
- Copyright (c) 2007-2008 Sagebit LLC, released under the MIT license
@@ -1,5 +0,0 @@
1
- ---
2
- :major: 4
3
- :minor: 0
4
- :patch: 2
5
- :build:
@@ -1,68 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "capistrano_mailer"
8
- s.version = "4.0.2"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Peter Boling", "Dave Nolan", "Jason Rust"]
12
- s.date = "2013-01-22"
13
- s.description = "Capistrano Deployment Email Notification. Keep the whole team informed of each release!"
14
- s.email = ["peter.boling@gmail.com", "dave@textgoeshere.org.uk", "jason@rustedcode.com"]
15
- s.extra_rdoc_files = [
16
- "README.rdoc"
17
- ]
18
- s.files = [
19
- ".gitignore",
20
- "CHANGELOG",
21
- "Gemfile",
22
- "Gemfile.lock",
23
- "MIT-LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION.yml",
27
- "assets/stylesheets/failure.css",
28
- "assets/stylesheets/success.css",
29
- "capistrano_mailer.gemspec",
30
- "lib/cap_mailer.rb",
31
- "lib/capistrano/mailer.rb",
32
- "lib/capistrano/mailer_recipes.rb",
33
- "test/build_gem_test.rb",
34
- "views/cap_mailer/_message_body.html.erb",
35
- "views/cap_mailer/_message_body.text.erb",
36
- "views/cap_mailer/_section.html.erb",
37
- "views/cap_mailer/_section.text.erb",
38
- "views/cap_mailer/_section_custom.html.erb",
39
- "views/cap_mailer/_section_custom.text.erb",
40
- "views/cap_mailer/failed.notification_email.html.erb",
41
- "views/cap_mailer/failed.notification_email.text.erb",
42
- "views/cap_mailer/notification_email.html.erb",
43
- "views/cap_mailer/notification_email.text.erb"
44
- ]
45
- s.homepage = "http://github.com/pboling/capistrano_mailer"
46
- s.require_paths = ["lib"]
47
- s.rubygems_version = "1.8.24"
48
- s.summary = "Capistrano Deployment Email Notification"
49
-
50
- if s.respond_to? :specification_version then
51
- s.specification_version = 3
52
-
53
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
- s.add_runtime_dependency(%q<capistrano-log_with_awesome>, [">= 0"])
55
- s.add_runtime_dependency(%q<inline-style>, [">= 0"])
56
- s.add_runtime_dependency(%q<actionmailer>, [">= 0"])
57
- else
58
- s.add_dependency(%q<capistrano-log_with_awesome>, [">= 0"])
59
- s.add_dependency(%q<inline-style>, [">= 0"])
60
- s.add_dependency(%q<actionmailer>, [">= 0"])
61
- end
62
- else
63
- s.add_dependency(%q<capistrano-log_with_awesome>, [">= 0"])
64
- s.add_dependency(%q<inline-style>, [">= 0"])
65
- s.add_dependency(%q<actionmailer>, [">= 0"])
66
- end
67
- end
68
-