mandrill-mailer-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +33 -0
  3. data/Appraisals +19 -0
  4. data/Gemfile +3 -0
  5. data/Gemfile.lock +115 -0
  6. data/LICENSE +21 -0
  7. data/README.md +35 -0
  8. data/Rakefile +4 -0
  9. data/gemfiles/rails_30.gemfile +7 -0
  10. data/gemfiles/rails_30.gemfile.lock +122 -0
  11. data/gemfiles/rails_31.gemfile +7 -0
  12. data/gemfiles/rails_31.gemfile.lock +122 -0
  13. data/gemfiles/rails_32.gemfile +7 -0
  14. data/gemfiles/rails_32.gemfile.lock +122 -0
  15. data/gemfiles/rails_40.gemfile +7 -0
  16. data/gemfiles/rails_40.gemfile.lock +116 -0
  17. data/gemfiles/rails_41.gemfile +7 -0
  18. data/gemfiles/rails_41.gemfile.lock +116 -0
  19. data/lib/mandrill-mailer-rails.rb +2 -0
  20. data/lib/mandrill_action_mailer.rb +10 -0
  21. data/lib/mandrill_action_mailer/delivery_handler.rb +54 -0
  22. data/lib/mandrill_action_mailer/railtie.rb +12 -0
  23. data/mandrill-mailer-rails.gemspec +22 -0
  24. data/spec/integration/deliver_handler_spec.rb +166 -0
  25. data/spec/rails_app/.gitignore +3 -0
  26. data/spec/rails_app/Rakefile +6 -0
  27. data/spec/rails_app/app/mailers/notifier.rb +35 -0
  28. data/spec/rails_app/app/views/notifier/multipart.html.erb +1 -0
  29. data/spec/rails_app/app/views/notifier/multipart.text.erb +1 -0
  30. data/spec/rails_app/app/views/notifier/test.text.erb +1 -0
  31. data/spec/rails_app/bin/bundle +3 -0
  32. data/spec/rails_app/bin/rails +4 -0
  33. data/spec/rails_app/bin/rake +4 -0
  34. data/spec/rails_app/config.ru +4 -0
  35. data/spec/rails_app/config/application.rb +61 -0
  36. data/spec/rails_app/config/boot.rb +5 -0
  37. data/spec/rails_app/config/environment.rb +5 -0
  38. data/spec/rails_app/config/environments/test.rb +39 -0
  39. data/spec/rails_app/config/initializers/assets.rb +8 -0
  40. data/spec/rails_app/config/initializers/cookies_serializer.rb +3 -0
  41. data/spec/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  42. data/spec/rails_app/config/initializers/session_store.rb +3 -0
  43. data/spec/rails_app/config/initializers/wrap_parameters.rb +9 -0
  44. data/spec/rails_app/config/routes.rb +56 -0
  45. data/spec/rails_app/config/secrets.yml +14 -0
  46. data/spec/spec_helper.rb +30 -0
  47. metadata +195 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b0ed029c7a9b67be7053e52fafa05e8b22cbd1ff
4
+ data.tar.gz: 37577c66c4ae50c876f12406269f9d74fd05f622
5
+ SHA512:
6
+ metadata.gz: 6b846dd28090d152c6ca277a6482c5bbcc3216f9b7403d0588b206046cce075041226db28df901eed8d9cfd32c6f021e92dc9245c04c2b57268c1ad9d48ec4ff
7
+ data.tar.gz: 115f94035526206786e1aecd4916f74b9b71884da3b706a9a14118ac25a034eb220ba6e531e67ad358eca44778c00496591a3444b00d73c762c3230ca2de58f9
data/.gitignore ADDED
@@ -0,0 +1,33 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ .ruby-version
30
+ .ruby-gemset
31
+
32
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
33
+ .rvmrc
data/Appraisals ADDED
@@ -0,0 +1,19 @@
1
+ appraise 'rails-30' do
2
+ gem 'rails', '~> 3.0'
3
+ end
4
+
5
+ appraise 'rails-31' do
6
+ gem 'rails', '~> 3.1'
7
+ end
8
+
9
+ appraise 'rails-32' do
10
+ gem 'rails', '~> 3.2'
11
+ end
12
+
13
+ appraise 'rails-40' do
14
+ gem 'rails', '~> 4.0'
15
+ end
16
+
17
+ appraise 'rails-41' do
18
+ gem 'rails', '~> 4.1'
19
+ end
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,115 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mandrill-mailer-rails (0.0.1)
5
+ mandrill-api
6
+ rails (> 3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.1.6)
12
+ actionpack (= 4.1.6)
13
+ actionview (= 4.1.6)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ actionpack (4.1.6)
16
+ actionview (= 4.1.6)
17
+ activesupport (= 4.1.6)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ actionview (4.1.6)
21
+ activesupport (= 4.1.6)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ activemodel (4.1.6)
25
+ activesupport (= 4.1.6)
26
+ builder (~> 3.1)
27
+ activerecord (4.1.6)
28
+ activemodel (= 4.1.6)
29
+ activesupport (= 4.1.6)
30
+ arel (~> 5.0.0)
31
+ activesupport (4.1.6)
32
+ i18n (~> 0.6, >= 0.6.9)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 1.1)
37
+ appraisal (1.0.2)
38
+ bundler
39
+ rake
40
+ thor (>= 0.14.0)
41
+ arel (5.0.1.20140414130214)
42
+ builder (3.2.2)
43
+ diff-lcs (1.2.5)
44
+ erubis (2.7.0)
45
+ excon (0.40.0)
46
+ hike (1.2.3)
47
+ i18n (0.6.11)
48
+ json (1.8.1)
49
+ mail (2.6.1)
50
+ mime-types (>= 1.16, < 3)
51
+ mandrill-api (1.0.52)
52
+ excon (>= 0.16.0, < 1.0)
53
+ json (>= 1.7.7, < 2.0)
54
+ mime-types (2.4.1)
55
+ minitest (5.4.2)
56
+ multi_json (1.10.1)
57
+ rack (1.5.2)
58
+ rack-test (0.6.2)
59
+ rack (>= 1.0)
60
+ rails (4.1.6)
61
+ actionmailer (= 4.1.6)
62
+ actionpack (= 4.1.6)
63
+ actionview (= 4.1.6)
64
+ activemodel (= 4.1.6)
65
+ activerecord (= 4.1.6)
66
+ activesupport (= 4.1.6)
67
+ bundler (>= 1.3.0, < 2.0)
68
+ railties (= 4.1.6)
69
+ sprockets-rails (~> 2.0)
70
+ railties (4.1.6)
71
+ actionpack (= 4.1.6)
72
+ activesupport (= 4.1.6)
73
+ rake (>= 0.8.7)
74
+ thor (>= 0.18.1, < 2.0)
75
+ rake (10.3.2)
76
+ rspec-core (3.1.6)
77
+ rspec-support (~> 3.1.0)
78
+ rspec-expectations (3.1.2)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.1.0)
81
+ rspec-mocks (3.1.3)
82
+ rspec-support (~> 3.1.0)
83
+ rspec-rails (3.1.0)
84
+ actionpack (>= 3.0)
85
+ activesupport (>= 3.0)
86
+ railties (>= 3.0)
87
+ rspec-core (~> 3.1.0)
88
+ rspec-expectations (~> 3.1.0)
89
+ rspec-mocks (~> 3.1.0)
90
+ rspec-support (~> 3.1.0)
91
+ rspec-support (3.1.2)
92
+ sprockets (2.12.2)
93
+ hike (~> 1.2)
94
+ multi_json (~> 1.0)
95
+ rack (~> 1.0)
96
+ tilt (~> 1.1, != 1.3.0)
97
+ sprockets-rails (2.1.4)
98
+ actionpack (>= 3.0)
99
+ activesupport (>= 3.0)
100
+ sprockets (~> 2.8)
101
+ thor (0.19.1)
102
+ thread_safe (0.3.4)
103
+ tilt (1.4.1)
104
+ tzinfo (1.2.2)
105
+ thread_safe (~> 0.1)
106
+
107
+ PLATFORMS
108
+ ruby
109
+
110
+ DEPENDENCIES
111
+ appraisal
112
+ mandrill-mailer-rails!
113
+ rake
114
+ rspec-mocks
115
+ rspec-rails
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Ben Sedat
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # mandrill-mailer-rails
2
+ =====================
3
+
4
+ Handler for Rails' ActionMailer to send emails through Mandrill.
5
+
6
+ ## Installation
7
+
8
+ In your `Gemfile`:
9
+
10
+ gem 'mandrill-mailer-rails'
11
+
12
+ ## Configuration
13
+
14
+ ### Mandatory
15
+
16
+ Store your API Key in an environment variable or other safe place. It needs access to at least the `send` method.
17
+
18
+ In your `config/application.rb`:
19
+
20
+ config.action_mailer.delivery_method = :mandrill
21
+ config.mandrill_action_mailer.api_key = ENV['MANDRILL_API_KEY']
22
+
23
+ ### Optional
24
+
25
+ #### Track Opens
26
+
27
+ Whether Mandrill should automatically insert a tracking image. Default: `false`.
28
+
29
+ config.mandrill_action_mailer.track_opens = true
30
+
31
+ #### Track Clicks
32
+
33
+ Whether Mandrill should override your URLs and track clicks. Default `false`.
34
+
35
+ config.mandrill_action_mailer.track_clicks = true
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,122 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ mandrill-mailer-rails (0.0.1)
5
+ mandrill-api
6
+ rails (> 3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (3.2.19)
12
+ actionpack (= 3.2.19)
13
+ mail (~> 2.5.4)
14
+ actionpack (3.2.19)
15
+ activemodel (= 3.2.19)
16
+ activesupport (= 3.2.19)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ journey (~> 1.0.4)
20
+ rack (~> 1.4.5)
21
+ rack-cache (~> 1.2)
22
+ rack-test (~> 0.6.1)
23
+ sprockets (~> 2.2.1)
24
+ activemodel (3.2.19)
25
+ activesupport (= 3.2.19)
26
+ builder (~> 3.0.0)
27
+ activerecord (3.2.19)
28
+ activemodel (= 3.2.19)
29
+ activesupport (= 3.2.19)
30
+ arel (~> 3.0.2)
31
+ tzinfo (~> 0.3.29)
32
+ activeresource (3.2.19)
33
+ activemodel (= 3.2.19)
34
+ activesupport (= 3.2.19)
35
+ activesupport (3.2.19)
36
+ i18n (~> 0.6, >= 0.6.4)
37
+ multi_json (~> 1.0)
38
+ appraisal (1.0.2)
39
+ bundler
40
+ rake
41
+ thor (>= 0.14.0)
42
+ arel (3.0.3)
43
+ builder (3.0.4)
44
+ diff-lcs (1.2.5)
45
+ erubis (2.7.0)
46
+ excon (0.40.0)
47
+ hike (1.2.3)
48
+ i18n (0.6.11)
49
+ journey (1.0.4)
50
+ json (1.8.1)
51
+ mail (2.5.4)
52
+ mime-types (~> 1.16)
53
+ treetop (~> 1.4.8)
54
+ mandrill-api (1.0.52)
55
+ excon (>= 0.16.0, < 1.0)
56
+ json (>= 1.7.7, < 2.0)
57
+ mime-types (1.25.1)
58
+ multi_json (1.10.1)
59
+ polyglot (0.3.5)
60
+ rack (1.4.5)
61
+ rack-cache (1.2)
62
+ rack (>= 0.4)
63
+ rack-ssl (1.3.4)
64
+ rack
65
+ rack-test (0.6.2)
66
+ rack (>= 1.0)
67
+ rails (3.2.19)
68
+ actionmailer (= 3.2.19)
69
+ actionpack (= 3.2.19)
70
+ activerecord (= 3.2.19)
71
+ activeresource (= 3.2.19)
72
+ activesupport (= 3.2.19)
73
+ bundler (~> 1.0)
74
+ railties (= 3.2.19)
75
+ railties (3.2.19)
76
+ actionpack (= 3.2.19)
77
+ activesupport (= 3.2.19)
78
+ rack-ssl (~> 1.3.2)
79
+ rake (>= 0.8.7)
80
+ rdoc (~> 3.4)
81
+ thor (>= 0.14.6, < 2.0)
82
+ rake (10.3.2)
83
+ rdoc (3.12.2)
84
+ json (~> 1.4)
85
+ rspec-core (3.1.6)
86
+ rspec-support (~> 3.1.0)
87
+ rspec-expectations (3.1.2)
88
+ diff-lcs (>= 1.2.0, < 2.0)
89
+ rspec-support (~> 3.1.0)
90
+ rspec-mocks (3.1.3)
91
+ rspec-support (~> 3.1.0)
92
+ rspec-rails (3.1.0)
93
+ actionpack (>= 3.0)
94
+ activesupport (>= 3.0)
95
+ railties (>= 3.0)
96
+ rspec-core (~> 3.1.0)
97
+ rspec-expectations (~> 3.1.0)
98
+ rspec-mocks (~> 3.1.0)
99
+ rspec-support (~> 3.1.0)
100
+ rspec-support (3.1.2)
101
+ sprockets (2.2.2)
102
+ hike (~> 1.2)
103
+ multi_json (~> 1.0)
104
+ rack (~> 1.0)
105
+ tilt (~> 1.1, != 1.3.0)
106
+ thor (0.19.1)
107
+ tilt (1.4.1)
108
+ treetop (1.4.15)
109
+ polyglot
110
+ polyglot (>= 0.3.1)
111
+ tzinfo (0.3.41)
112
+
113
+ PLATFORMS
114
+ ruby
115
+
116
+ DEPENDENCIES
117
+ appraisal
118
+ mandrill-mailer-rails!
119
+ rails (~> 3.0)
120
+ rake
121
+ rspec-mocks
122
+ rspec-rails
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,122 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ mandrill-mailer-rails (0.0.1)
5
+ mandrill-api
6
+ rails (> 3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (3.2.19)
12
+ actionpack (= 3.2.19)
13
+ mail (~> 2.5.4)
14
+ actionpack (3.2.19)
15
+ activemodel (= 3.2.19)
16
+ activesupport (= 3.2.19)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ journey (~> 1.0.4)
20
+ rack (~> 1.4.5)
21
+ rack-cache (~> 1.2)
22
+ rack-test (~> 0.6.1)
23
+ sprockets (~> 2.2.1)
24
+ activemodel (3.2.19)
25
+ activesupport (= 3.2.19)
26
+ builder (~> 3.0.0)
27
+ activerecord (3.2.19)
28
+ activemodel (= 3.2.19)
29
+ activesupport (= 3.2.19)
30
+ arel (~> 3.0.2)
31
+ tzinfo (~> 0.3.29)
32
+ activeresource (3.2.19)
33
+ activemodel (= 3.2.19)
34
+ activesupport (= 3.2.19)
35
+ activesupport (3.2.19)
36
+ i18n (~> 0.6, >= 0.6.4)
37
+ multi_json (~> 1.0)
38
+ appraisal (1.0.2)
39
+ bundler
40
+ rake
41
+ thor (>= 0.14.0)
42
+ arel (3.0.3)
43
+ builder (3.0.4)
44
+ diff-lcs (1.2.5)
45
+ erubis (2.7.0)
46
+ excon (0.40.0)
47
+ hike (1.2.3)
48
+ i18n (0.6.11)
49
+ journey (1.0.4)
50
+ json (1.8.1)
51
+ mail (2.5.4)
52
+ mime-types (~> 1.16)
53
+ treetop (~> 1.4.8)
54
+ mandrill-api (1.0.52)
55
+ excon (>= 0.16.0, < 1.0)
56
+ json (>= 1.7.7, < 2.0)
57
+ mime-types (1.25.1)
58
+ multi_json (1.10.1)
59
+ polyglot (0.3.5)
60
+ rack (1.4.5)
61
+ rack-cache (1.2)
62
+ rack (>= 0.4)
63
+ rack-ssl (1.3.4)
64
+ rack
65
+ rack-test (0.6.2)
66
+ rack (>= 1.0)
67
+ rails (3.2.19)
68
+ actionmailer (= 3.2.19)
69
+ actionpack (= 3.2.19)
70
+ activerecord (= 3.2.19)
71
+ activeresource (= 3.2.19)
72
+ activesupport (= 3.2.19)
73
+ bundler (~> 1.0)
74
+ railties (= 3.2.19)
75
+ railties (3.2.19)
76
+ actionpack (= 3.2.19)
77
+ activesupport (= 3.2.19)
78
+ rack-ssl (~> 1.3.2)
79
+ rake (>= 0.8.7)
80
+ rdoc (~> 3.4)
81
+ thor (>= 0.14.6, < 2.0)
82
+ rake (10.3.2)
83
+ rdoc (3.12.2)
84
+ json (~> 1.4)
85
+ rspec-core (3.1.6)
86
+ rspec-support (~> 3.1.0)
87
+ rspec-expectations (3.1.2)
88
+ diff-lcs (>= 1.2.0, < 2.0)
89
+ rspec-support (~> 3.1.0)
90
+ rspec-mocks (3.1.3)
91
+ rspec-support (~> 3.1.0)
92
+ rspec-rails (3.1.0)
93
+ actionpack (>= 3.0)
94
+ activesupport (>= 3.0)
95
+ railties (>= 3.0)
96
+ rspec-core (~> 3.1.0)
97
+ rspec-expectations (~> 3.1.0)
98
+ rspec-mocks (~> 3.1.0)
99
+ rspec-support (~> 3.1.0)
100
+ rspec-support (3.1.2)
101
+ sprockets (2.2.2)
102
+ hike (~> 1.2)
103
+ multi_json (~> 1.0)
104
+ rack (~> 1.0)
105
+ tilt (~> 1.1, != 1.3.0)
106
+ thor (0.19.1)
107
+ tilt (1.4.1)
108
+ treetop (1.4.15)
109
+ polyglot
110
+ polyglot (>= 0.3.1)
111
+ tzinfo (0.3.41)
112
+
113
+ PLATFORMS
114
+ ruby
115
+
116
+ DEPENDENCIES
117
+ appraisal
118
+ mandrill-mailer-rails!
119
+ rails (~> 3.1)
120
+ rake
121
+ rspec-mocks
122
+ rspec-rails