Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

freezing 1.0.5

  • Loading branch information...
commit 7799862e0e80ec9350b17a0bd7c35680f3a97d1f 1 parent ee65453
Oleg GBH authored

Showing 55 changed files with 80 additions and 47 deletions. Show diff stats Hide diff stats

  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  ...r/gems/{postageapp-1.0.4 → 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  ...ew.text.erb → 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  ...r/gems/{postageapp-1.0.4 → 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
... ... @@ -1 +0,0 @@
1   -1.0.4
0  vendor/gems/postageapp-1.0.4/.document → vendor/gems/postageapp-1.0.5/.document
File renamed without changes
0  vendor/gems/postageapp-1.0.4/.gitignore → vendor/gems/postageapp-1.0.5/.gitignore
File renamed without changes
25 vendor/gems/postageapp-1.0.4/.specification → vendor/gems/postageapp-1.0.5/.specification
... ... @@ -1,12 +1,13 @@
1 1 --- !ruby/object:Gem::Specification
2 2 name: postageapp
3 3 version: !ruby/object:Gem::Version
  4 + hash: 29
4 5 prerelease: false
5 6 segments:
6 7 - 1
7 8 - 0
8   - - 4
9   - version: 1.0.4
  9 + - 5
  10 + version: 1.0.5
10 11 platform: ruby
11 12 authors:
12 13 - Oleg Khabarov, The Working Group Inc
@@ -14,16 +15,18 @@ autorequire:
14 15 bindir: bin
15 16 cert_chain: []
16 17
17   -date: 2010-07-27 00:00:00 -04:00
  18 +date: 2010-07-30 00:00:00 -04:00
18 19 default_executable:
19 20 dependencies:
20 21 - !ruby/object:Gem::Dependency
21 22 name: json
22 23 prerelease: false
23 24 requirement: &id001 !ruby/object:Gem::Requirement
  25 + none: false
24 26 requirements:
25 27 - - "="
26 28 - !ruby/object:Gem::Version
  29 + hash: 23
27 30 segments:
28 31 - 1
29 32 - 2
@@ -35,9 +38,11 @@ dependencies:
35 38 name: mocha
36 39 prerelease: false
37 40 requirement: &id002 !ruby/object:Gem::Requirement
  41 + none: false
38 42 requirements:
39 43 - - ">="
40 44 - !ruby/object:Gem::Version
  45 + hash: 43
41 46 segments:
42 47 - 0
43 48 - 9
@@ -83,13 +88,18 @@ files:
83 88 - test/configuration_test.rb
84 89 - test/failed_request_test.rb
85 90 - test/helper.rb
  91 +- test/live_test.rb
86 92 - test/mailer/action_mailer_2/notifier.rb
87 93 - test/mailer/action_mailer_2/notifier/with_body_and_attachment.erb
  94 +- test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.html.erb
  95 +- test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.plain.erb
88 96 - test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.html.erb
89 97 - test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.plain.erb
90 98 - test/mailer/action_mailer_2/notifier/with_simple_view.erb
91 99 - test/mailer/action_mailer_2/notifier/with_text_only_view.text.plain.erb
92 100 - test/mailer/action_mailer_3/notifier.rb
  101 +- test/mailer/action_mailer_3/notifier/with_custom_postage_variables.html.erb
  102 +- test/mailer/action_mailer_3/notifier/with_custom_postage_variables.text.erb
93 103 - test/mailer/action_mailer_3/notifier/with_html_and_text_views.html.erb
94 104 - test/mailer/action_mailer_3/notifier/with_html_and_text_views.text.erb
95 105 - test/mailer/action_mailer_3/notifier/with_old_api.html.erb
@@ -101,7 +111,6 @@ files:
101 111 - test/mailer_helper_methods_test.rb
102 112 - test/postageapp_test.rb
103 113 - test/rails_initialization_test.rb
104   -- test/request_integration_test.rb
105 114 - test/request_test.rb
106 115 - test/response_test.rb
107 116 has_rdoc: true
@@ -114,23 +123,27 @@ rdoc_options:
114 123 require_paths:
115 124 - lib
116 125 required_ruby_version: !ruby/object:Gem::Requirement
  126 + none: false
117 127 requirements:
118 128 - - ">="
119 129 - !ruby/object:Gem::Version
  130 + hash: 3
120 131 segments:
121 132 - 0
122 133 version: "0"
123 134 required_rubygems_version: !ruby/object:Gem::Requirement
  135 + none: false
124 136 requirements:
125 137 - - ">="
126 138 - !ruby/object:Gem::Version
  139 + hash: 3
127 140 segments:
128 141 - 0
129 142 version: "0"
130 143 requirements: []
131 144
132 145 rubyforge_project:
133   -rubygems_version: 1.3.6
  146 +rubygems_version: 1.3.7
134 147 signing_key:
135 148 specification_version: 3
136 149 summary: Easier way to send email from web apps
@@ -138,6 +151,7 @@ test_files:
138 151 - test/configuration_test.rb
139 152 - test/failed_request_test.rb
140 153 - test/helper.rb
  154 +- test/live_test.rb
141 155 - test/mailer/action_mailer_2/notifier.rb
142 156 - test/mailer/action_mailer_3/notifier.rb
143 157 - test/mailer_2_test.rb
@@ -145,6 +159,5 @@ test_files:
145 159 - test/mailer_helper_methods_test.rb
146 160 - test/postageapp_test.rb
147 161 - test/rails_initialization_test.rb
148   -- test/request_integration_test.rb
149 162 - test/request_test.rb
150 163 - test/response_test.rb
0  vendor/gems/postageapp-1.0.4/LICENSE → vendor/gems/postageapp-1.0.5/LICENSE
File renamed without changes
10 vendor/gems/postageapp-1.0.4/README.md → vendor/gems/postageapp-1.0.5/README.md
Source Rendered
@@ -87,6 +87,8 @@ ActionMailer Integration
87 87 ------------------------
88 88 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'`
89 89
  90 +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)
  91 +
90 92 ### Rails 3.x
91 93
92 94 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:
102 104 headers['Special-Header'] = 'SpecialValue'
103 105
104 106 # PostageApp specific elements:
105   - postage_template 'example_template'
106   - postage_variables 'global_variable' => 'value'
  107 + postageapp_template 'example_template'
  108 + postageapp_variables 'global_variable' => 'value'
107 109
108 110 mail(
109 111 :from => 'test@test.test',
@@ -154,8 +156,8 @@ Here's an example of a mailer you'd set in in a Rails 2 environment:
154 156 :body => File.read('/path/to/example.zip')
155 157
156 158 # PostageApp specific elements:
157   - postage_template 'example_template'
158   - postage_variables 'global_variable' => 'value'
  159 + postageapp_template 'example_template'
  160 + postageapp_variables 'global_variable' => 'value'
159 161
160 162 end
161 163 end
0  vendor/gems/postageapp-1.0.4/Rakefile → vendor/gems/postageapp-1.0.5/Rakefile
File renamed without changes
1  vendor/gems/postageapp-1.0.5/VERSION
... ... @@ -0,0 +1 @@
  1 +1.0.5
0  ...0.4/generators/postageapp/postageapp_generator.rb → ...0.5/generators/postageapp/postageapp_generator.rb
File renamed without changes
0  ....4/generators/postageapp/templates/initializer.rb → ....5/generators/postageapp/templates/initializer.rb
File renamed without changes
0  ...rators/postageapp/templates/postageapp_tasks.rake → ...rators/postageapp/templates/postageapp_tasks.rake
File renamed without changes
0  ...lib/generators/postageapp/postageapp_generator.rb → ...lib/generators/postageapp/postageapp_generator.rb
File renamed without changes
1  vendor/gems/postageapp-1.0.4/lib/postageapp.rb → vendor/gems/postageapp-1.0.5/lib/postageapp.rb
@@ -51,6 +51,5 @@ def logger
51 51 )
52 52 end
53 53 end
54   -
55 54 end
56 55 end
0  .../postageapp-1.0.4/lib/postageapp/configuration.rb → .../postageapp-1.0.5/lib/postageapp/configuration.rb
File renamed without changes
0  ...postageapp-1.0.4/lib/postageapp/failed_request.rb → ...postageapp-1.0.5/lib/postageapp/failed_request.rb
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
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
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
@@ -16,8 +16,8 @@
16 16 #
17 17 # Postage::Mailer introduces a few mailer methods specific to Postage:
18 18 #
19   -# * postage_template - template name that is defined in your PostageApp project
20   -# * postage_variables - extra variables you want to send along with the message
  19 +# * template - template name that is defined in your PostageApp project
  20 +# * variables - extra variables you want to send along with the message
21 21 #
22 22 # Sending email
23 23 #
@@ -29,8 +29,8 @@ class PostageApp::Mailer < ActionMailer::Base
29 29 # Using :test as a delivery method if set somewhere else
30 30 self.delivery_method = :postage unless (self.delivery_method == :test)
31 31
32   - adv_attr_accessor :postage_template
33   - adv_attr_accessor :postage_variables
  32 + adv_attr_accessor :postageapp_template
  33 + adv_attr_accessor :postageapp_variables
34 34
35 35 def perform_delivery_postage(mail)
36 36 mail.send
@@ -71,8 +71,8 @@ def create_mail
71 71 end
72 72 end
73 73
74   - params['template'] = self.postage_template unless self.postage_template.blank?
75   - params['variables'] = self.postage_variables unless self.postage_variables.blank?
  74 + params['template'] = self.postageapp_template unless self.postageapp_template.blank?
  75 + params['variables'] = self.postageapp_variables unless self.postageapp_variables.blank?
76 76
77 77 params.delete('headers') if params['headers'].blank?
78 78 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
@@ -18,8 +18,8 @@
18 18 #
19 19 # Postage::Mailer introduces a few mailer methods specific to Postage:
20 20 #
21   -# * postage_template - template name that is defined in your PostageApp project
22   -# * postage_variables - extra variables you want to send along with the message
  21 +# * postageapp_template - template name that is defined in your PostageApp project
  22 +# * postageapp_variables - extra variables you want to send along with the message
23 23 #
24 24 # Sending email
25 25 #
@@ -57,25 +57,21 @@ def []=(filename, attachment)
57 57 end
58 58 end
59 59
60   - # In API call we can specify PostageApp template that will be used
61   - # to generate content of the message
62   - attr_accessor :postage_template
63   -
64   - # Hash of variables that will be used to inject into the content
65   - attr_accessor :postage_variables
66   -
67 60 # Instead of initializing Mail object, we prepare PostageApp::Request
68 61 def initialize(method_name = nil, *args)
69 62 @_message = PostageApp::Request.new(:send_message)
70 63 process(method_name, *args) if method_name
71 64 end
72 65
73   - def postage_template(value)
74   - @_message.arguments['template'] = value
  66 + # In API call we can specify PostageApp template that will be used
  67 + # to generate content of the message
  68 + def postageapp_template(value = nil)
  69 + value ? @_message.arguments['template'] = value : @_message.arguments['template']
75 70 end
76 71
77   - def postage_variables(variables = {})
78   - @_message.arguments['variables'] = variables
  72 + # Hash of variables that will be used to inject into the content
  73 + def postageapp_variables(value = nil)
  74 + value ? @_message.arguments['variables'] = value : @_message.arguments['variables']
79 75 end
80 76
81 77 def attachments
0  ...ms/postageapp-1.0.4/lib/postageapp/rails/rails.rb → ...ms/postageapp-1.0.5/lib/postageapp/rails/rails.rb
File renamed without changes
0  .../postageapp-1.0.4/lib/postageapp/rails/railtie.rb → .../postageapp-1.0.5/lib/postageapp/rails/railtie.rb
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
File renamed without changes
0  .../gems/postageapp-1.0.4/lib/postageapp/response.rb → .../gems/postageapp-1.0.5/lib/postageapp/response.rb
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
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
File renamed without changes
16 vendor/gems/postageapp-1.0.4/postageapp.gemspec → vendor/gems/postageapp-1.0.5/postageapp.gemspec
@@ -5,11 +5,11 @@
5 5
6 6 Gem::Specification.new do |s|
7 7 s.name = %q{postageapp}
8   - s.version = "1.0.4"
  8 + s.version = "1.0.5"
9 9
10 10 s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11 11 s.authors = ["Oleg Khabarov, The Working Group Inc"]
12   - s.date = %q{2010-07-27}
  12 + s.date = %q{2010-07-30}
13 13 s.description = %q{Gem that interfaces with PostageApp.com service to send emails from web apps}
14 14 s.email = %q{oleg@twg.ca}
15 15 s.extra_rdoc_files = [
@@ -45,13 +45,18 @@ Gem::Specification.new do |s|
45 45 "test/configuration_test.rb",
46 46 "test/failed_request_test.rb",
47 47 "test/helper.rb",
  48 + "test/live_test.rb",
48 49 "test/mailer/action_mailer_2/notifier.rb",
49 50 "test/mailer/action_mailer_2/notifier/with_body_and_attachment.erb",
  51 + "test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.html.erb",
  52 + "test/mailer/action_mailer_2/notifier/with_custom_postage_variables.text.plain.erb",
50 53 "test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.html.erb",
51 54 "test/mailer/action_mailer_2/notifier/with_html_and_text_views.text.plain.erb",
52 55 "test/mailer/action_mailer_2/notifier/with_simple_view.erb",
53 56 "test/mailer/action_mailer_2/notifier/with_text_only_view.text.plain.erb",
54 57 "test/mailer/action_mailer_3/notifier.rb",
  58 + "test/mailer/action_mailer_3/notifier/with_custom_postage_variables.html.erb",
  59 + "test/mailer/action_mailer_3/notifier/with_custom_postage_variables.text.erb",
55 60 "test/mailer/action_mailer_3/notifier/with_html_and_text_views.html.erb",
56 61 "test/mailer/action_mailer_3/notifier/with_html_and_text_views.text.erb",
57 62 "test/mailer/action_mailer_3/notifier/with_old_api.html.erb",
@@ -63,19 +68,19 @@ Gem::Specification.new do |s|
63 68 "test/mailer_helper_methods_test.rb",
64 69 "test/postageapp_test.rb",
65 70 "test/rails_initialization_test.rb",
66   - "test/request_integration_test.rb",
67 71 "test/request_test.rb",
68 72 "test/response_test.rb"
69 73 ]
70 74 s.homepage = %q{http://github.com/theworkinggroup/postageapp-gem}
71 75 s.rdoc_options = ["--charset=UTF-8"]
72 76 s.require_paths = ["lib"]
73   - s.rubygems_version = %q{1.3.6}
  77 + s.rubygems_version = %q{1.3.7}
74 78 s.summary = %q{Easier way to send email from web apps}
75 79 s.test_files = [
76 80 "test/configuration_test.rb",
77 81 "test/failed_request_test.rb",
78 82 "test/helper.rb",
  83 + "test/live_test.rb",
79 84 "test/mailer/action_mailer_2/notifier.rb",
80 85 "test/mailer/action_mailer_3/notifier.rb",
81 86 "test/mailer_2_test.rb",
@@ -83,7 +88,6 @@ Gem::Specification.new do |s|
83 88 "test/mailer_helper_methods_test.rb",
84 89 "test/postageapp_test.rb",
85 90 "test/rails_initialization_test.rb",
86   - "test/request_integration_test.rb",
87 91 "test/request_test.rb",
88 92 "test/response_test.rb"
89 93 ]
@@ -92,7 +96,7 @@ Gem::Specification.new do |s|
92 96 current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
93 97 s.specification_version = 3
94 98
95   - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
  99 + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
96 100 s.add_runtime_dependency(%q<json>, ["= 1.2.4"])
97 101 s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
98 102 else
0  vendor/gems/postageapp-1.0.4/rails/init.rb → vendor/gems/postageapp-1.0.5/rails/init.rb
File renamed without changes
0  .../gems/postageapp-1.0.4/test/configuration_test.rb → .../gems/postageapp-1.0.5/test/configuration_test.rb
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
File renamed without changes
0  vendor/gems/postageapp-1.0.4/test/helper.rb → vendor/gems/postageapp-1.0.5/test/helper.rb
File renamed without changes
13 ...postageapp-1.0.4/test/request_integration_test.rb → vendor/gems/postageapp-1.0.5/test/live_test.rb
... ... @@ -1,6 +1,6 @@
1 1 require File.expand_path('../helper', __FILE__)
2 2
3   -class RequestIntegrationTest < Test::Unit::TestCase
  3 +class LiveTest < Test::Unit::TestCase
4 4
5 5 # Note: Need access to a live PostageApp.com account
6 6 # See helper.rb to set host / api key
@@ -74,5 +74,16 @@ def test_request_timeout
74 74 assert_equal 'fail', response.status
75 75 end
76 76
  77 + def test_deliver_with_custom_postage_variables
  78 + response = if ActionMailer::VERSION::MAJOR < 3
  79 + require File.expand_path('../mailer/action_mailer_2/notifier', __FILE__)
  80 + Notifier.deliver_with_custom_postage_variables
  81 + else
  82 + require File.expand_path('../mailer/action_mailer_3/notifier', __FILE__)
  83 + Notifier.with_custom_postage_variables.deliver
  84 + end
  85 + assert response.ok?
  86 + end
  87 +
77 88 end
78 89 end
4 ...app-1.0.4/test/mailer/action_mailer_2/notifier.rb → ...app-1.0.5/test/mailer/action_mailer_2/notifier.rb
@@ -49,8 +49,8 @@ def with_custom_postage_variables
49 49 'test1@test.text' => { 'name' => 'Test 1' },
50 50 'test2@test.text' => { 'name' => 'Test 2' }
51 51 })
52   - postage_template 'test_template'
53   - postage_variables 'variable' => 'value'
  52 + postageapp_template 'test-template'
  53 + postageapp_variables 'variable' => 'value'
54 54 end
55 55
56 56 private
0  ...on_mailer_2/notifier/with_body_and_attachment.erb → ...on_mailer_2/notifier/with_body_and_attachment.erb
File renamed without changes
0  ...iler_3/notifier/with_html_and_text_views.html.erb → ...ifier/with_custom_postage_variables.text.html.erb
File renamed without changes
0  ...iler_3/notifier/with_html_and_text_views.text.erb → ...fier/with_custom_postage_variables.text.plain.erb
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
File renamed without changes
0  .../notifier/with_html_and_text_views.text.plain.erb → .../notifier/with_html_and_text_views.text.plain.erb
File renamed without changes
0  ...ler/action_mailer_2/notifier/with_simple_view.erb → ...ler/action_mailer_2/notifier/with_simple_view.erb
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
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
@@ -47,8 +47,8 @@ def with_custom_postage_variables
47 47 headers['CustomHeader1'] = 'CustomValue1'
48 48 headers 'CustomHeader2' => 'CustomValue2'
49 49
50   - postage_template 'test_template'
51   - postage_variables 'variable' => 'value'
  50 + postageapp_template 'test-template'
  51 + postageapp_variables 'variable' => 'value'
52 52
53 53 mail(
54 54 :from => 'test@test.test',
@@ -85,8 +85,8 @@ def with_old_api_and_manual_parts
85 85 :filename => 'foo.jpg',
86 86 :body => '123456789'
87 87
88   - postage_template 'test_template'
89   - postage_variables 'variable' => 'value'
  88 + postageapp_template 'test-template'
  89 + postageapp_variables 'variable' => 'value'
90 90 end
91 91
92 92 private
0  ...er/action_mailer_3/notifier/with_old_api.html.erb → ...3/notifier/with_custom_postage_variables.html.erb
File renamed without changes
0  ...er/action_mailer_3/notifier/with_old_api.text.erb → ...3/notifier/with_custom_postage_variables.text.erb
File renamed without changes
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_html_and_text_views.html.erb
... ... @@ -0,0 +1 @@
  1 +html content
0  ...on_mailer_3/notifier/with_text_only_view.text.erb → ...iler_3/notifier/with_html_and_text_views.text.erb
File renamed without changes
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_old_api.html.erb
... ... @@ -0,0 +1 @@
  1 +html content
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_old_api.text.erb
... ... @@ -0,0 +1 @@
  1 +text content
0  ...ler/action_mailer_3/notifier/with_simple_view.erb → ...ler/action_mailer_3/notifier/with_simple_view.erb
File renamed without changes
1  vendor/gems/postageapp-1.0.5/test/mailer/action_mailer_3/notifier/with_text_only_view.text.erb
... ... @@ -0,0 +1 @@
  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
... ... @@ -1,7 +1,7 @@
1 1 require File.expand_path('../helper', __FILE__)
2 2
3 3 # tests for ActionMailer bundled with Rails 2
4   -class Mailer3Test < Test::Unit::TestCase
  4 +class Mailer2Test < Test::Unit::TestCase
5 5
6 6 if ActionMailer::VERSION::MAJOR < 3
7 7
@@ -67,10 +67,12 @@ def test_create_with_body_and_attachment
67 67
68 68 def test_create_with_custom_postage_variables
69 69 assert mail = Notifier.create_with_custom_postage_variables
70   - assert_equal 'test_template', mail.arguments['template']
  70 + assert_equal 'test-template', mail.arguments['template']
71 71 assert_equal ({ 'variable' => 'value' }), mail.arguments['variables']
72 72 assert_equal ({ 'test2@test.text' => { 'name' => 'Test 2'},
73 73 'test1@test.text' => { 'name' => 'Test 1'}}), mail.arguments['recipients']
  74 + assert_equal 'text content', mail.arguments['content']['text/plain']
  75 + assert_equal 'html content', mail.arguments['content']['text/html']
74 76 end
75 77
76 78 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
@@ -62,10 +62,12 @@ def test_create_with_custom_postage_variables
62 62 'test1@test.test' => { 'name' => 'Test 1'},
63 63 'test2@test.test' => { 'name' => 'Test 2'}
64 64 }), mail.arguments['recipients']
65   - assert_equal 'test_template', mail.arguments['template']
  65 + assert_equal 'test-template', mail.arguments['template']
66 66 assert_equal ({ 'variable' => 'value' }), mail.arguments['variables']
67 67 assert_equal 'CustomValue1', mail.arguments['headers']['CustomHeader1']
68 68 assert_equal 'CustomValue2', mail.arguments['headers']['CustomHeader2']
  69 + assert_equal 'text content', mail.arguments['content']['text/plain']
  70 + assert_equal 'html content', mail.arguments['content']['text/html']
69 71 end
70 72
71 73 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
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
File renamed without changes
0  ...ostageapp-1.0.4/test/rails_initialization_test.rb → ...ostageapp-1.0.5/test/rails_initialization_test.rb
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
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
File renamed without changes

0 comments on commit 7799862

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