Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

freezing 1.0.5

  • Loading branch information...
commit 7799862e0e80ec9350b17a0bd7c35680f3a97d1f 1 parent ee65453
Oleg GBH authored
Showing with 80 additions and 47 deletions.
  1. +0 −1  vendor/gems/postageapp-1.0.4/VERSION
  2. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/.document
  3. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/.gitignore
  4. +19 −6 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/.specification
  5. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/LICENSE
  6. +6 −4 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/README.md
  7. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/Rakefile
  8. +1 −0  vendor/gems/postageapp-1.0.5/VERSION
  9. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/generators/postageapp/postageapp_generator.rb
  10. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/generators/postageapp/templates/initializer.rb
  11. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/generators/postageapp/templates/postageapp_tasks.rake
  12. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/generators/postageapp/postageapp_generator.rb
  13. +0 −1  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp.rb
  14. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/configuration.rb
  15. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/failed_request.rb
  16. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/logger.rb
  17. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/mailer.rb
  18. +6 −6 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/mailer/mailer_2.rb
  19. +9 −13 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/mailer/mailer_3.rb
  20. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/rails/rails.rb
  21. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/rails/railtie.rb
  22. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/request.rb
  23. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/response.rb
  24. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/utils.rb
  25. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/lib/postageapp/version.rb
  26. +10 −6 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/postageapp.gemspec
  27. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/rails/init.rb
  28. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/configuration_test.rb
  29. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/failed_request_test.rb
  30. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/helper.rb
  31. +12 −1 vendor/gems/{postageapp-1.0.4/test/request_integration_test.rb → postageapp-1.0.5/test/live_test.rb}
  32. +2 −2 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/mailer/action_mailer_2/notifier.rb
  33. 0  ...postageapp-1.0.4 → postageapp-1.0.5}/test/mailer/action_mailer_2/notifier/with_body_and_attachment.erb
  34. 0  ...b → postageapp-1.0.5/test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.html.erb}
  35. 0  ... → postageapp-1.0.5/test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.plain.erb}
  36. 0  ...-1.0.4 → postageapp-1.0.5}/test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.html.erb
  37. 0  ...1.0.4 → postageapp-1.0.5}/test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.plain.erb
  38. 0  ...t/mailer/action_mailer_3 → postageapp-1.0.5/test/mailer/action_mailer_2}/notifier/with_simple_view.erb
  39. 0  ...eapp-1.0.4 → postageapp-1.0.5}/test/mailer/action_mailer_2/notifier/with_text_only_view.text.plain.erb
  40. +4 −4 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/mailer/action_mailer_3/notifier.rb
  41. 0  ...ml.erb → postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_custom_postage_variables.html.erb}
  42. 0  ...xt.erb → postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_custom_postage_variables.text.erb}
  43. +1 −0  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_html_and_text_views.html.erb
  44. 0  ...geapp-1.0.4 → postageapp-1.0.5}/test/mailer/action_mailer_3/notifier/with_html_and_text_views.text.erb
  45. +1 −0  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_old_api.html.erb
  46. +1 −0  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_old_api.text.erb
  47. 0  ...t/mailer/action_mailer_2 → postageapp-1.0.5/test/mailer/action_mailer_3}/notifier/with_simple_view.erb
  48. +1 −0  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_text_only_view.text.erb
  49. +4 −2 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/mailer_2_test.rb
  50. +3 −1 vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/mailer_3_test.rb
  51. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/mailer_helper_methods_test.rb
  52. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/postageapp_test.rb
  53. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/rails_initialization_test.rb
  54. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/request_test.rb
  55. 0  vendor/gems/{postageapp-1.0.4 → postageapp-1.0.5}/test/response_test.rb
1  vendor/gems/postageapp-1.0.4/VERSION
View
@@ -1 +0,0 @@
-1.0.4
0  vendor/gems/postageapp-1.0.4/.document → vendor/gems/postageapp-1.0.5/.document
View
File renamed without changes
0  vendor/gems/postageapp-1.0.4/.gitignore → vendor/gems/postageapp-1.0.5/.gitignore
View
File renamed without changes
25 vendor/gems/postageapp-1.0.4/.specification → vendor/gems/postageapp-1.0.5/.specification
View
@@ -1,12 +1,13 @@
--- !ruby/object:Gem::Specification
name: postageapp
version: !ruby/object:Gem::Version
+ hash: 29
prerelease: false
segments:
- 1
- 0
- - 4
- version: 1.0.4
+ - 5
+ version: 1.0.5
platform: ruby
authors:
- Oleg Khabarov, The Working Group Inc
@@ -14,16 +15,18 @@ autorequire:
bindir: bin
cert_chain: []
-date: 2010-07-27 00:00:00 -04:00
+date: 2010-07-30 00:00:00 -04:00
default_executable:
dependencies:
- !ruby/object:Gem::Dependency
name: json
prerelease: false
requirement: &id001 !ruby/object:Gem::Requirement
+ none: false
requirements:
- - "="
- !ruby/object:Gem::Version
+ hash: 23
segments:
- 1
- 2
@@ -35,9 +38,11 @@ dependencies:
name: mocha
prerelease: false
requirement: &id002 !ruby/object:Gem::Requirement
+ none: false
requirements:
- - ">="
- !ruby/object:Gem::Version
+ hash: 43
segments:
- 0
- 9
@@ -83,13 +88,18 @@ files:
- test/configuration_test.rb
- test/failed_request_test.rb
- test/helper.rb
+- test/live_test.rb
- test/mailer/action_mailer_2/notifier.rb
- test/mailer/action_mailer_2/notifier/with_body_and_attachment.erb
+- test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.html.erb
+- test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.plain.erb
- test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.html.erb
- test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.plain.erb
- test/mailer/action_mailer_2/notifier/with_simple_view.erb
- test/mailer/action_mailer_2/notifier/with_text_only_view.text.plain.erb
- test/mailer/action_mailer_3/notifier.rb
+- test/mailer/action_mailer_3/notifier/with_custom_postage_variables.html.erb
+- test/mailer/action_mailer_3/notifier/with_custom_postage_variables.text.erb
- test/mailer/action_mailer_3/notifier/with_html_and_text_views.html.erb
- test/mailer/action_mailer_3/notifier/with_html_and_text_views.text.erb
- test/mailer/action_mailer_3/notifier/with_old_api.html.erb
@@ -101,7 +111,6 @@ files:
- test/mailer_helper_methods_test.rb
- test/postageapp_test.rb
- test/rails_initialization_test.rb
-- test/request_integration_test.rb
- test/request_test.rb
- test/response_test.rb
has_rdoc: true
@@ -114,23 +123,27 @@ rdoc_options:
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
+ none: false
requirements:
- - ">="
- !ruby/object:Gem::Version
+ hash: 3
segments:
- 0
version: "0"
required_rubygems_version: !ruby/object:Gem::Requirement
+ none: false
requirements:
- - ">="
- !ruby/object:Gem::Version
+ hash: 3
segments:
- 0
version: "0"
requirements: []
rubyforge_project:
-rubygems_version: 1.3.6
+rubygems_version: 1.3.7
signing_key:
specification_version: 3
summary: Easier way to send email from web apps
@@ -138,6 +151,7 @@ test_files:
- test/configuration_test.rb
- test/failed_request_test.rb
- test/helper.rb
+- test/live_test.rb
- test/mailer/action_mailer_2/notifier.rb
- test/mailer/action_mailer_3/notifier.rb
- test/mailer_2_test.rb
@@ -145,6 +159,5 @@ test_files:
- test/mailer_helper_methods_test.rb
- test/postageapp_test.rb
- test/rails_initialization_test.rb
-- test/request_integration_test.rb
- test/request_test.rb
- test/response_test.rb
0  vendor/gems/postageapp-1.0.4/LICENSE → vendor/gems/postageapp-1.0.5/LICENSE
View
File renamed without changes
10 vendor/gems/postageapp-1.0.4/README.md → vendor/gems/postageapp-1.0.5/README.md
View
@@ -87,6 +87,8 @@ ActionMailer Integration
------------------------
You can quickly convert your existing mailers to use PostageApp service by simply changing `class MyMailer < ActionMailer::Base` to `class MyMailer < PostageApp::Mailer`. If you using ActionMailer from outside of Rails make sure you have this line somewhere: `require 'postageapp/mailer'`
+There are custom methods that allow setting of `template` and `variables` parts of the API call. They are `postageapp_template` and `postageapp_variables`. Examples how they are used are below. For details what they do please see [documentation](http://help.postageapp.com/faqs)
+
### Rails 3.x
Here's an example of a mailer in Rails 3 environment:
@@ -102,8 +104,8 @@ Here's an example of a mailer in Rails 3 environment:
headers['Special-Header'] = 'SpecialValue'
# PostageApp specific elements:
- postage_template 'example_template'
- postage_variables 'global_variable' => 'value'
+ postageapp_template 'example_template'
+ postageapp_variables 'global_variable' => 'value'
mail(
:from => 'test@test.test',
@@ -154,8 +156,8 @@ Here's an example of a mailer you'd set in in a Rails 2 environment:
:body => File.read('/path/to/example.zip')
# PostageApp specific elements:
- postage_template 'example_template'
- postage_variables 'global_variable' => 'value'
+ postageapp_template 'example_template'
+ postageapp_variables 'global_variable' => 'value'
end
end
0  vendor/gems/postageapp-1.0.4/Rakefile → vendor/gems/postageapp-1.0.5/Rakefile
View
File renamed without changes
1  vendor/gems/postageapp-1.0.5/VERSION
View
@@ -0,0 +1 @@
+1.0.5
0  ...0.4/generators/postageapp/postageapp_generator.rb → ...0.5/generators/postageapp/postageapp_generator.rb
View
File renamed without changes
0  ....4/generators/postageapp/templates/initializer.rb → ....5/generators/postageapp/templates/initializer.rb
View
File renamed without changes
0  ...rators/postageapp/templates/postageapp_tasks.rake → ...rators/postageapp/templates/postageapp_tasks.rake
View
File renamed without changes
0  ...lib/generators/postageapp/postageapp_generator.rb → ...lib/generators/postageapp/postageapp_generator.rb
View
File renamed without changes
1  vendor/gems/postageapp-1.0.4/lib/postageapp.rb → vendor/gems/postageapp-1.0.5/lib/postageapp.rb
View
@@ -51,6 +51,5 @@ def logger
)
end
end
-
end
end
0  .../postageapp-1.0.4/lib/postageapp/configuration.rb → .../postageapp-1.0.5/lib/postageapp/configuration.rb
View
File renamed without changes
0  ...postageapp-1.0.4/lib/postageapp/failed_request.rb → ...postageapp-1.0.5/lib/postageapp/failed_request.rb
View
File renamed without changes
0  ...or/gems/postageapp-1.0.4/lib/postageapp/logger.rb → ...or/gems/postageapp-1.0.5/lib/postageapp/logger.rb
View
File renamed without changes
0  ...or/gems/postageapp-1.0.4/lib/postageapp/mailer.rb → ...or/gems/postageapp-1.0.5/lib/postageapp/mailer.rb
View
File renamed without changes
12 ...ostageapp-1.0.4/lib/postageapp/mailer/mailer_2.rb → ...ostageapp-1.0.5/lib/postageapp/mailer/mailer_2.rb
View
@@ -16,8 +16,8 @@
#
# Postage::Mailer introduces a few mailer methods specific to Postage:
#
-# * postage_template - template name that is defined in your PostageApp project
-# * postage_variables - extra variables you want to send along with the message
+# * template - template name that is defined in your PostageApp project
+# * variables - extra variables you want to send along with the message
#
# Sending email
#
@@ -29,8 +29,8 @@ class PostageApp::Mailer < ActionMailer::Base
# Using :test as a delivery method if set somewhere else
self.delivery_method = :postage unless (self.delivery_method == :test)
- adv_attr_accessor :postage_template
- adv_attr_accessor :postage_variables
+ adv_attr_accessor :postageapp_template
+ adv_attr_accessor :postageapp_variables
def perform_delivery_postage(mail)
mail.send
@@ -71,8 +71,8 @@ def create_mail
end
end
- params['template'] = self.postage_template unless self.postage_template.blank?
- params['variables'] = self.postage_variables unless self.postage_variables.blank?
+ params['template'] = self.postageapp_template unless self.postageapp_template.blank?
+ params['variables'] = self.postageapp_variables unless self.postageapp_variables.blank?
params.delete('headers') if params['headers'].blank?
params.delete('content') if params['content'].blank?
22 ...ostageapp-1.0.4/lib/postageapp/mailer/mailer_3.rb → ...ostageapp-1.0.5/lib/postageapp/mailer/mailer_3.rb
View
@@ -18,8 +18,8 @@
#
# Postage::Mailer introduces a few mailer methods specific to Postage:
#
-# * postage_template - template name that is defined in your PostageApp project
-# * postage_variables - extra variables you want to send along with the message
+# * postageapp_template - template name that is defined in your PostageApp project
+# * postageapp_variables - extra variables you want to send along with the message
#
# Sending email
#
@@ -57,25 +57,21 @@ def []=(filename, attachment)
end
end
- # In API call we can specify PostageApp template that will be used
- # to generate content of the message
- attr_accessor :postage_template
-
- # Hash of variables that will be used to inject into the content
- attr_accessor :postage_variables
-
# Instead of initializing Mail object, we prepare PostageApp::Request
def initialize(method_name = nil, *args)
@_message = PostageApp::Request.new(:send_message)
process(method_name, *args) if method_name
end
- def postage_template(value)
- @_message.arguments['template'] = value
+ # In API call we can specify PostageApp template that will be used
+ # to generate content of the message
+ def postageapp_template(value = nil)
+ value ? @_message.arguments['template'] = value : @_message.arguments['template']
end
- def postage_variables(variables = {})
- @_message.arguments['variables'] = variables
+ # Hash of variables that will be used to inject into the content
+ def postageapp_variables(value = nil)
+ value ? @_message.arguments['variables'] = value : @_message.arguments['variables']
end
def attachments
0  ...ms/postageapp-1.0.4/lib/postageapp/rails/rails.rb → ...ms/postageapp-1.0.5/lib/postageapp/rails/rails.rb
View
File renamed without changes
0  .../postageapp-1.0.4/lib/postageapp/rails/railtie.rb → .../postageapp-1.0.5/lib/postageapp/rails/railtie.rb
View
File renamed without changes
0  ...r/gems/postageapp-1.0.4/lib/postageapp/request.rb → ...r/gems/postageapp-1.0.5/lib/postageapp/request.rb
View
File renamed without changes
0  .../gems/postageapp-1.0.4/lib/postageapp/response.rb → .../gems/postageapp-1.0.5/lib/postageapp/response.rb
View
File renamed without changes
0  vendor/gems/postageapp-1.0.4/lib/postageapp/utils.rb → vendor/gems/postageapp-1.0.5/lib/postageapp/utils.rb
View
File renamed without changes
0  ...r/gems/postageapp-1.0.4/lib/postageapp/version.rb → ...r/gems/postageapp-1.0.5/lib/postageapp/version.rb
View
File renamed without changes
16 vendor/gems/postageapp-1.0.4/postageapp.gemspec → vendor/gems/postageapp-1.0.5/postageapp.gemspec
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{postageapp}
- s.version = "1.0.4"
+ s.version = "1.0.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Oleg Khabarov, The Working Group Inc"]
- s.date = %q{2010-07-27}
+ s.date = %q{2010-07-30}
s.description = %q{Gem that interfaces with PostageApp.com service to send emails from web apps}
s.email = %q{oleg@twg.ca}
s.extra_rdoc_files = [
@@ -45,13 +45,18 @@ Gem::Specification.new do |s|
"test/configuration_test.rb",
"test/failed_request_test.rb",
"test/helper.rb",
+ "test/live_test.rb",
"test/mailer/action_mailer_2/notifier.rb",
"test/mailer/action_mailer_2/notifier/with_body_and_attachment.erb",
+ "test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.html.erb",
+ "test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.plain.erb",
"test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.html.erb",
"test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.plain.erb",
"test/mailer/action_mailer_2/notifier/with_simple_view.erb",
"test/mailer/action_mailer_2/notifier/with_text_only_view.text.plain.erb",
"test/mailer/action_mailer_3/notifier.rb",
+ "test/mailer/action_mailer_3/notifier/with_custom_postage_variables.html.erb",
+ "test/mailer/action_mailer_3/notifier/with_custom_postage_variables.text.erb",
"test/mailer/action_mailer_3/notifier/with_html_and_text_views.html.erb",
"test/mailer/action_mailer_3/notifier/with_html_and_text_views.text.erb",
"test/mailer/action_mailer_3/notifier/with_old_api.html.erb",
@@ -63,19 +68,19 @@ Gem::Specification.new do |s|
"test/mailer_helper_methods_test.rb",
"test/postageapp_test.rb",
"test/rails_initialization_test.rb",
- "test/request_integration_test.rb",
"test/request_test.rb",
"test/response_test.rb"
]
s.homepage = %q{http://github.com/theworkinggroup/postageapp-gem}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.6}
+ s.rubygems_version = %q{1.3.7}
s.summary = %q{Easier way to send email from web apps}
s.test_files = [
"test/configuration_test.rb",
"test/failed_request_test.rb",
"test/helper.rb",
+ "test/live_test.rb",
"test/mailer/action_mailer_2/notifier.rb",
"test/mailer/action_mailer_3/notifier.rb",
"test/mailer_2_test.rb",
@@ -83,7 +88,6 @@ Gem::Specification.new do |s|
"test/mailer_helper_methods_test.rb",
"test/postageapp_test.rb",
"test/rails_initialization_test.rb",
- "test/request_integration_test.rb",
"test/request_test.rb",
"test/response_test.rb"
]
@@ -92,7 +96,7 @@ Gem::Specification.new do |s|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<json>, ["= 1.2.4"])
s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
else
0  vendor/gems/postageapp-1.0.4/rails/init.rb → vendor/gems/postageapp-1.0.5/rails/init.rb
View
File renamed without changes
0  .../gems/postageapp-1.0.4/test/configuration_test.rb → .../gems/postageapp-1.0.5/test/configuration_test.rb
View
File renamed without changes
0  ...gems/postageapp-1.0.4/test/failed_request_test.rb → ...gems/postageapp-1.0.5/test/failed_request_test.rb
View
File renamed without changes
0  vendor/gems/postageapp-1.0.4/test/helper.rb → vendor/gems/postageapp-1.0.5/test/helper.rb
View
File renamed without changes
13 ...postageapp-1.0.4/test/request_integration_test.rb → vendor/gems/postageapp-1.0.5/test/live_test.rb
View
@@ -1,6 +1,6 @@
require File.expand_path('../helper', __FILE__)
-class RequestIntegrationTest < Test::Unit::TestCase
+class LiveTest < Test::Unit::TestCase
# Note: Need access to a live PostageApp.com account
# See helper.rb to set host / api key
@@ -74,5 +74,16 @@ def test_request_timeout
assert_equal 'fail', response.status
end
+ def test_deliver_with_custom_postage_variables
+ response = if ActionMailer::VERSION::MAJOR < 3
+ require File.expand_path('../mailer/action_mailer_2/notifier', __FILE__)
+ Notifier.deliver_with_custom_postage_variables
+ else
+ require File.expand_path('../mailer/action_mailer_3/notifier', __FILE__)
+ Notifier.with_custom_postage_variables.deliver
+ end
+ assert response.ok?
+ end
+
end
end
4 ...app-1.0.4/test/mailer/action_mailer_2/notifier.rb → ...app-1.0.5/test/mailer/action_mailer_2/notifier.rb
View
@@ -49,8 +49,8 @@ def with_custom_postage_variables
'test1@test.text' => { 'name' => 'Test 1' },
'test2@test.text' => { 'name' => 'Test 2' }
})
- postage_template 'test_template'
- postage_variables 'variable' => 'value'
+ postageapp_template 'test-template'
+ postageapp_variables 'variable' => 'value'
end
private
0  ...on_mailer_2/notifier/with_body_and_attachment.erb → ...on_mailer_2/notifier/with_body_and_attachment.erb
View
File renamed without changes
0  ...er/action_mailer_3/notifier/with_old_api.html.erb → ...ifier/with_custom_postage_variables.text.html.erb
View
File renamed without changes
0  ...on_mailer_3/notifier/with_text_only_view.text.erb → ...fier/with_custom_postage_variables.text.plain.erb
View
File renamed without changes
0  ...2/notifier/with_html_and_text_views.text.html.erb → ...2/notifier/with_html_and_text_views.text.html.erb
View
File renamed without changes
0  .../notifier/with_html_and_text_views.text.plain.erb → .../notifier/with_html_and_text_views.text.plain.erb
View
File renamed without changes
0  ...ler/action_mailer_3/notifier/with_simple_view.erb → ...ler/action_mailer_2/notifier/with_simple_view.erb
View
File renamed without changes
0  ...ler_2/notifier/with_text_only_view.text.plain.erb → ...ler_2/notifier/with_text_only_view.text.plain.erb
View
File renamed without changes
8 ...app-1.0.4/test/mailer/action_mailer_3/notifier.rb → ...app-1.0.5/test/mailer/action_mailer_3/notifier.rb
View
@@ -47,8 +47,8 @@ def with_custom_postage_variables
headers['CustomHeader1'] = 'CustomValue1'
headers 'CustomHeader2' => 'CustomValue2'
- postage_template 'test_template'
- postage_variables 'variable' => 'value'
+ postageapp_template 'test-template'
+ postageapp_variables 'variable' => 'value'
mail(
:from => 'test@test.test',
@@ -85,8 +85,8 @@ def with_old_api_and_manual_parts
:filename => 'foo.jpg',
:body => '123456789'
- postage_template 'test_template'
- postage_variables 'variable' => 'value'
+ postageapp_template 'test-template'
+ postageapp_variables 'variable' => 'value'
end
private
0  ...iler_3/notifier/with_html_and_text_views.html.erb → ...3/notifier/with_custom_postage_variables.html.erb
View
File renamed without changes
0  ...er/action_mailer_3/notifier/with_old_api.text.erb → ...3/notifier/with_custom_postage_variables.text.erb
View
File renamed without changes
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_html_and_text_views.html.erb
View
@@ -0,0 +1 @@
+html content
0  ...iler_3/notifier/with_html_and_text_views.text.erb → ...iler_3/notifier/with_html_and_text_views.text.erb
View
File renamed without changes
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_old_api.html.erb
View
@@ -0,0 +1 @@
+html content
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_old_api.text.erb
View
@@ -0,0 +1 @@
+text content
0  ...ler/action_mailer_2/notifier/with_simple_view.erb → ...ler/action_mailer_3/notifier/with_simple_view.erb
View
File renamed without changes
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_text_only_view.text.erb
View
@@ -0,0 +1 @@
+text content
6 vendor/gems/postageapp-1.0.4/test/mailer_2_test.rb → vendor/gems/postageapp-1.0.5/test/mailer_2_test.rb
View
@@ -1,7 +1,7 @@
require File.expand_path('../helper', __FILE__)
# tests for ActionMailer bundled with Rails 2
-class Mailer3Test < Test::Unit::TestCase
+class Mailer2Test < Test::Unit::TestCase
if ActionMailer::VERSION::MAJOR < 3
@@ -67,10 +67,12 @@ def test_create_with_body_and_attachment
def test_create_with_custom_postage_variables
assert mail = Notifier.create_with_custom_postage_variables
- assert_equal 'test_template', mail.arguments['template']
+ assert_equal 'test-template', mail.arguments['template']
assert_equal ({ 'variable' => 'value' }), mail.arguments['variables']
assert_equal ({ 'test2@test.text' => { 'name' => 'Test 2'},
'test1@test.text' => { 'name' => 'Test 1'}}), mail.arguments['recipients']
+ assert_equal 'text content', mail.arguments['content']['text/plain']
+ assert_equal 'html content', mail.arguments['content']['text/html']
end
def test_create_with_recipient_override
4 vendor/gems/postageapp-1.0.4/test/mailer_3_test.rb → vendor/gems/postageapp-1.0.5/test/mailer_3_test.rb
View
@@ -62,10 +62,12 @@ def test_create_with_custom_postage_variables
'test1@test.test' => { 'name' => 'Test 1'},
'test2@test.test' => { 'name' => 'Test 2'}
}), mail.arguments['recipients']
- assert_equal 'test_template', mail.arguments['template']
+ assert_equal 'test-template', mail.arguments['template']
assert_equal ({ 'variable' => 'value' }), mail.arguments['variables']
assert_equal 'CustomValue1', mail.arguments['headers']['CustomHeader1']
assert_equal 'CustomValue2', mail.arguments['headers']['CustomHeader2']
+ assert_equal 'text content', mail.arguments['content']['text/plain']
+ assert_equal 'html content', mail.arguments['content']['text/html']
end
def test_create_with_old_api
0  ...stageapp-1.0.4/test/mailer_helper_methods_test.rb → ...stageapp-1.0.5/test/mailer_helper_methods_test.rb
View
File renamed without changes
0  vendor/gems/postageapp-1.0.4/test/postageapp_test.rb → vendor/gems/postageapp-1.0.5/test/postageapp_test.rb
View
File renamed without changes
0  ...ostageapp-1.0.4/test/rails_initialization_test.rb → ...ostageapp-1.0.5/test/rails_initialization_test.rb
View
File renamed without changes
0  vendor/gems/postageapp-1.0.4/test/request_test.rb → vendor/gems/postageapp-1.0.5/test/request_test.rb
View
File renamed without changes
0  vendor/gems/postageapp-1.0.4/test/response_test.rb → vendor/gems/postageapp-1.0.5/test/response_test.rb
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.