Permalink
Browse files

Small change trying to get GitHub to rebuild the gem.

  • Loading branch information...
1 parent ef510be commit b360c6e85cc3e16a6006fa5706e3f71d3deb5043 @grimen grimen committed Sep 10, 2009
Showing with 35 additions and 36 deletions.
  1. +2 −2 awesome_email.gemspec
  2. +1 −1 rails/init.rb
  3. +32 −33 test/awesome_email_test.rb
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{awesome_email}
- s.version = "0.1.1"
+ s.version = "0.1.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["imedo GmbH"]
- s.date = %q{2009-09-09}
+ s.date = %q{2009-09-11}
s.description = %q{Rails ActionMailer with HTML layouts, inline CSS and entity substitution.}
s.email = %q{entwickler@imedo.de}
s.extra_rdoc_files = [
View
@@ -1 +1 @@
-require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'awesome_email.rb'))
+require File.expand_path(File.join(File.dirname(__FILE__), *%w(.. lib awesome_email)))
View
@@ -16,7 +16,7 @@
ActionMailer::Base.delivery_method = :test
-RAILS_ROOT = '/' << File.join('some', 'dir')
+RAILS_ROOT = File.join('', 'some', 'dir')
CSS_TEST_FILE = File.join(RAILS_ROOT, 'public', 'stylesheets', 'mails', 'test.css')
#################################################################
@@ -29,35 +29,35 @@ def test
layout 'test'
end
- protected
-
- def setup_multipart_mail
- headers 'Content-transfer-encoding' => '8bit'
- sent_on Time.now
- content_type 'text/html'
- end
-
- def html_part?(method_name)
- true
- end
-
- def render_content_for_layout(method_name, template)
- 'test inner content'
- end
-
- # mock rendering
- def render_layout_template(template, method_name, layout_path = File.join('layouts', 'mailers'))
- return template.render(:inline => "<html><body><h1>Fäncy</h1><p><%= yield %></p></body></html>")
- html = %{
- <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">
- <html>
- <head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head>
- <body><p><%= yield %></p></body>
- </html>
- }
- return template.render(:inline => html)
- end
-
+ protected
+
+ def setup_multipart_mail
+ headers 'Content-transfer-encoding' => '8bit'
+ sent_on Time.now
+ content_type 'text/html'
+ end
+
+ def html_part?(method_name)
+ true
+ end
+
+ def render_content_for_layout(method_name, template)
+ 'test inner content'
+ end
+
+ # mock rendering
+ def render_layout_template(template, method_name, layout_path = File.join('layouts', 'mailers'))
+ return template.render(:inline => "<html><body><h1>Fäncy</h1><p><%= yield %></p></body></html>")
+ html = %{
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">
+ <html>
+ <head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head>
+ <body><p><%= yield %></p></body>
+ </html>
+ }
+ return template.render(:inline => html)
+ end
+
end
###############################################################
@@ -103,8 +103,7 @@ def setup
#######################
def test_should_build_correct_find_css_file_name
-
- assert_equal CSS_TEST_FILE, @mailer.build_css_file_name("test")
+ assert_equal CSS_TEST_FILE, @mailer.build_css_file_name('test')
end
def test_should_build_correct_file_name_from_set_css
@@ -166,7 +165,7 @@ def test_should_replace_entities
def test_should_extend_with_mailer_name
template_name = 'some_mail'
result = @mailer.extend_with_mailer_name(template_name)
- assert_equal "my_mailer/#{template_name}", result
+ assert_equal File.join('my_mailer', template_name), result
end
# make sure the accessors are available

0 comments on commit b360c6e

Please sign in to comment.