Skip to content
Browse files

merged textgoeshere/master, improved readme, updated changelog, and t…

…weaked a few things.
  • Loading branch information...
1 parent 4b89a08 commit c1ad9edc49bb0eb302e0dcbfd3afe0f1b3a8b940 @pboling pboling committed Jan 13, 2010
Showing with 71 additions and 36 deletions.
  1. +8 −0 CHANGELOG
  2. +30 −11 README.rdoc
  3. +6 −6 Rakefile
  4. +1 −1 about.yml
  5. +11 −10 capistrano_mailer.gemspec
  6. +7 −2 lib/cap_mailer.rb
  7. +8 −6 views/cap_mailer/notification_email.text.html.erb
View
8 CHANGELOG
@@ -1,3 +1,11 @@
+Version 3.2.1 2010-01-13
+- Added deprecation warning for configure_capistrano_mailer
+- commented :site_url, doesn't appear to be a native capistrano variable, if sent in will still be rendered.
+
+Version 3.2.0 textgoeshere fork
+- config/cap_mailer_settings.rb is not longer a hard coded configuration location requirement.
+- refactoring core cap mailer class
+
Version 3.1.10 2010-01-07
- included _section.text.erb view in gem manifest
- text version of email should render the text partials, not html
View
41 README.rdoc
@@ -1,4 +1,4 @@
-= Capistrano Mailer v3.1.3 (20090925)
+= Capistrano Mailer
* For Capistrano Deployment Email Notification
* It is a Capistrano Plugin / Ruby Gem that requires ActionMailer
@@ -22,7 +22,7 @@ The first time you deploy to a server (a 'cold' deploy) capistrano mailer will c
== Home Page
-http://github.com/pboling/capistrano_mailer/tree/master
+http://github.com/pboling/capistrano_mailer
== Credit where Credit is Due
@@ -62,7 +62,7 @@ Then cd to your rails app to optionally freeze the gem into your app:
rake gems:freeze GEM=capistrano_mailer
# You do NOT need to add a config.gem line to environment.rb for capistrano mailer,
- # But in order to use the gems:freeze task you DO need ot add it as a config.gem, at least temporarily.
+ # But in order to use the gems:freeze task you DO need to add it as a config.gem, at least temporarily.
Plugin using Git:
@@ -75,9 +75,14 @@ Using SVN (deprecated, repository is no longer updated):
== Upgrading
-From version 2.1.0 to version 3.x.x:
+From version 3.1.x to version 3.2.x
-1. Update the way CapistranoMailer is configured using the new method: CapMailer.configure_capistrano_mailer, see below.
+1. Update the way CapistranoMailer is configured using the new method: CapMailer.configure (see Usage below).
+2. require the cap mailer config file (see Usage below)
+
+From version 2.1.0 to version 3.1.x:
+
+1. Update the way CapistranoMailer is configured using the new method: CapMailer.configure_capistrano_mailer (changed in later versions to just 'configure') (see Usage below).
2. Update the require statement at the top of deploy.rb, see below (note for plugin change from capistrano_mailer to capistrano/mailer).
3. Change the mailer.send to mailer.send_notification_email in your cap recipe.
@@ -87,17 +92,21 @@ From version 2.1.0 to version 3.x.x:
2. Add this line to the top of your config/deploy.rb:
- # For gem:
- # You do NOT need to register the gem in your environment file using config.gem
- require 'capistrano/mailer'
-
# For plugin:
# You must make capistrano_mailer's libraries available in Ruby's load path. This is one way to do that:
# Add to the top of your config/deploy.rb file:
$:.unshift 'vendor/plugins/capistrano_mailer/lib'
+
+ # then for gem or plugin:
+ ####################################
+ # Capistrano Plugins go here
require 'capistrano/mailer'
+ #configure capistrano_mailer:
+ # The configuration file can go anywhere, but in past versions of the gem it was required to be in the config/ dir.
+ require 'config/cap_mailer_settings'
+ ####################################
- 3. Add cap_mailer configuration to deploy (or place it in another file and require it after capistrano/mailer':
+ 3. Configure Caistrano Mailer in the settings file required in step 2:
# If installed as a plugin might need the require here as well
@@ -112,7 +121,7 @@ From version 2.1.0 to version 3.x.x:
:authentication => :login }
ActionMailer::Base.default_charset = "utf-8"# or "latin1" or whatever you are using
- CapMailer.configure_capistrano_mailer do |config|
+ CapMailer.configure do |config|
config[:recipient_addresses] = ["dev1@example.com"]
# 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.
# https://rails.lighthouseapp.com/projects/8994/tickets/2340
@@ -183,6 +192,16 @@ From version 2.1.0 to version 3.x.x:
Take a look at the templates that comes with the plugin to see how it is done (views/cap_mailer/...)
+== Authors
+
+Peter Boling (pboling) - Wrote original
+Dave Nolan (textgoeshere) - lots of refactoring merged into 3.2 release
+
+== Contributors
+
+Dustin Deyoung - HTML Email Templates
+mixonix - SCMs compatibility
+greut - SCMs compatibility
----------------------------------------------------------------------------------
This plugin is a collaboration between Sagebit, LLC (http://www.sagebit.com) and Peter Boling (http://www.peterboling.com).
View
12 Rakefile
@@ -5,11 +5,11 @@ require 'rake/rdoctask'
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
- gemspec.name = "textgoeshere-capistrano_mailer"
- gemspec.summary = "Fork of Capistrano Deployment Email Notification"
- gemspec.description = %q{Fork of Capistrano Deployment Email Notification. Keep the whole team informed of each release!}
- gemspec.email = "dave@textgoeshere.org.uk"
- gemspec.homepage = "http://github.com/textgoeshere/capistrano_mailer"
+ gemspec.name = "capistrano_mailer"
+ gemspec.summary = "Capistrano Deployment Email Notification"
+ gemspec.description = %q{Capistrano Deployment Email Notification. Keep the whole team informed of each release!}
+ gemspec.email = ["peter.boling@gmail.com", "dave@textgoeshere.org.uk"]
+ gemspec.homepage = "http://github.com/pboling/capistrano_mailer"
gemspec.authors = ["Peter Boling", "Dave Nolan"]
gemspec.add_dependency 'actionmailer'
gemspec.files = ["README.rdoc",
@@ -29,7 +29,7 @@ begin
end
Jeweler::GemcutterTasks.new
rescue LoadError
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
+ puts "Jeweler not available. Install it with: sudo gem install jeweler"
end
desc 'Default: run unit tests.'
View
2 about.yml
@@ -5,5 +5,5 @@ summary: Sends rails deployment notification emails from Capistrano
homepage: http://github.com/pboling/capistrano_mailer/tree/master
plugin: http://github.com/pboling/capistrano_mailer.git
license: MIT
-version: 3.1.3
+version: 3.2.1
rails_version: 1.2.6+
View
21 capistrano_mailer.gemspec
@@ -1,17 +1,17 @@
# Generated by jeweler
-# DO NOT EDIT THIS FILE
-# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = %q{textgoeshere-capistrano_mailer}
- s.version = "3.2.0"
+ s.name = %q{capistrano_mailer}
+ s.version = "3.2.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Peter Boling", "Dave Nolan"]
- s.date = %q{2010-01-12}
- s.description = %q{Fork of Capistrano Deployment Email Notification. Keep the whole team informed of each release!}
- s.email = %q{dave@textgoeshere.org.uk}
+ s.date = %q{2010-01-13}
+ s.description = %q{Capistrano Deployment Email Notification. Keep the whole team informed of each release!}
+ s.email = ["peter.boling@gmail.com", "dave@textgoeshere.org.uk"]
s.extra_rdoc_files = [
"README.rdoc"
]
@@ -20,21 +20,21 @@ Gem::Specification.new do |s|
"Rakefile",
"VERSION.yml",
"about.yml",
+ "capistrano_mailer.gemspec",
"init.rb",
"lib/cap_mailer.rb",
"lib/capistrano/mailer.rb",
"views/cap_mailer/_section.html.erb",
"views/cap_mailer/_section.text.erb",
"views/cap_mailer/_section_custom.html.erb",
- "views/cap_mailer/_section_custom.html.erb",
"views/cap_mailer/notification_email.text.html.erb",
"views/cap_mailer/notification_email.text.plain.erb"
]
- s.homepage = %q{http://github.com/textgoeshere/capistrano_mailer}
+ s.homepage = %q{http://github.com/pboling/capistrano_mailer}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.5}
- s.summary = %q{Fork of Capistrano Deployment Email Notification}
+ s.summary = %q{Capistrano Deployment Email Notification}
s.test_files = [
"test/build_gem_test.rb"
]
@@ -52,3 +52,4 @@ Gem::Specification.new do |s|
s.add_dependency(%q<actionmailer>, [">= 0"])
end
end
+
View
9 lib/cap_mailer.rb
@@ -21,6 +21,10 @@ def self.configure(&block)
yield @@default_base_config
end
+ def self.configure_capistrano_mailer(&block)
+ puts "Deprecated 'configure_capistrano_mailer'. Please update your capistrano_mailer configuration to use 'configure' instead of 'configure_capistrano_mailer'"
+ end
+
self.template_root = default_base_config[:template_root]
def self.reloadable?() false end
@@ -53,8 +57,9 @@ def notification_email(cap, config = {}, *args)
:latest_revision => cap.latest_revision,
:previous_revision => cap.previous_revision,
:run_method => cap.run_method,
- :latest_release => cap.latest_release,
- :site_url => cap.site_url
+ :latest_release => cap.latest_release
+ #This does not appear to be a capistrano variable:
+ #:site_url => cap.site_url
}))
@date = Date.today.to_s
View
14 views/cap_mailer/notification_email.text.html.erb
@@ -7,15 +7,17 @@
<body style="font: 14px normal Helvetica, Arial, Sans; background: #999;">
<div style="width:800px; margin: 10px auto; background: #fff; border: 10px solid #aaa;">
-
+
<h1 style="clear: both; margin: 0; padding: 40px 20px 5px 20px; border-bottom: 1px dotted; background: #ccc;">
<%= @site_name %> <%=@task_name.titleize unless @task_name.nil? %>
</h1>
-
- <p style="margin: 8px 0 20px 20px; padding: 0px; font-style: italic;" >
- View site: <a href="<%= @site_url -%>"><%= @site_url -%></a>
- </p>
-
+
+ <% unless @site_url.nil? %>
+ <p style="margin: 8px 0 20px 20px; padding: 0px; font-style: italic;" >
+ View site: <a href="<%= @site_url -%>"><%= @site_url -%></a>
+ </p>
+ <% end %>
+
<p style="margin: 10px 20px; font-weight: bold;">Released: <%= @date %> at <%= @time %></p>
<%= @sections.map { |section|

0 comments on commit c1ad9ed

Please sign in to comment.
Something went wrong with that request. Please try again.