mass_mandrill 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown ADDED
@@ -0,0 +1,67 @@
1
+ mass_mandrill
2
+ =============
3
+
4
+ mass_mandrill is thin wrapper around mandrill-api gem that makes sending emails with Mandrill easier and more pleasent to use. Goal is to reasemble Rails' ActiveMailer API.
5
+
6
+ mass_mandrill supports bulk email sending and Mandrill templates. To learn more about these topics, visit [Mandrill Support](http://help.mandrill.com/home).
7
+
8
+ Example
9
+ -------
10
+
11
+ ```ruby
12
+ class ExampleMailer < MassMandrill::MandrillMailer
13
+
14
+ def example_notice(recipients)
15
+ addresses = recipients.map { |recipient| recipient.email }
16
+ global_merge_vars = [{ name: 'headline', content: 'This is first example notice' }]
17
+ merge_vars = recepients.map do |recipient|
18
+ {
19
+ :rcpt => recipient.email,
20
+ :vars => [{ :name => 'first_name', :content => recipient.first_name }]
21
+ }
22
+ end
23
+
24
+ mail(to: addresses,
25
+ from: 'John Doe <john.doe@example.com>',
26
+ subject: 'This is example notice!',
27
+ global_merge_vars: global_merge_vars,
28
+ merge_vars: merge_vars)
29
+ end
30
+
31
+ end
32
+ ```
33
+
34
+ And to send the email:
35
+
36
+ ```ruby
37
+ users = User.all
38
+ ExampleMailer.example_notice(users).deliver
39
+ ```
40
+
41
+ Name of the Mandrill template that's going to be used for sending is same as name of the method - in example above `example_notice`. To override template name, use `template` parameter:
42
+
43
+ ```ruby
44
+ mail(to: addresses,
45
+ from: 'John Doe <john.doe@example.com>',
46
+ subject: 'This is example notice!',
47
+ template: 'some_other_template',
48
+ global_merge_vars: global_merge_vars,
49
+ merge_vars: merge_vars)
50
+ ```
51
+
52
+ Contributing to mandrill_template
53
+ ---------------------------------
54
+
55
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
56
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
57
+ * Fork the project.
58
+ * Start a feature/bugfix branch.
59
+ * Commit and push until you are happy with your contribution.
60
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
61
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
62
+
63
+ Copyright
64
+ ---------
65
+
66
+ Copyright (c) 2013 Trisignia, Nebojša Stričević. See LICENSE.txt for
67
+ further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -1,5 +1,3 @@
1
- require File.expand_path('lib/mass_mandrill/mandrill_mail')
2
-
3
1
  module MassMandrill
4
2
  class MandrillMailer
5
3
  attr_reader :message
@@ -0,0 +1,69 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "mass_mandrill"
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Trisignia", "Neboj\u{161}a Stri\u{10d}evi\u{107}"]
12
+ s.date = "2013-03-16"
13
+ s.description = "Send Mandrill template emails"
14
+ s.email = "nebojsa.stricevic@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.markdown"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.markdown",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "lib/mass_mandrill.rb",
28
+ "lib/mass_mandrill/config.rb",
29
+ "lib/mass_mandrill/mandrill_mail.rb",
30
+ "lib/mass_mandrill/mandrill_mailer.rb",
31
+ "mass_mandrill.gemspec",
32
+ "spec/mass_mandrill/config_spec.rb",
33
+ "spec/mass_mandrill/mandrill_mailer_spec.rb",
34
+ "spec/spec_helper.rb"
35
+ ]
36
+ s.homepage = "https://github.com/trisignia/mass_mandrill"
37
+ s.licenses = ["MIT"]
38
+ s.require_paths = ["lib"]
39
+ s.rubygems_version = "1.8.11"
40
+ s.summary = "Send Mandrill emails"
41
+
42
+ if s.respond_to? :specification_version then
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_runtime_dependency(%q<mandrill-api>, ["~> 1.0.16"])
47
+ s.add_development_dependency(%q<rspec>, ["~> 2.13.0"])
48
+ s.add_development_dependency(%q<debugger>, ["~> 1.5.0"])
49
+ s.add_development_dependency(%q<rdoc>, ["~> 4.0.0"])
50
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
51
+ s.add_development_dependency(%q<bundler>, ["~> 1.3.3"])
52
+ else
53
+ s.add_dependency(%q<mandrill-api>, ["~> 1.0.16"])
54
+ s.add_dependency(%q<rspec>, ["~> 2.13.0"])
55
+ s.add_dependency(%q<debugger>, ["~> 1.5.0"])
56
+ s.add_dependency(%q<rdoc>, ["~> 4.0.0"])
57
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
58
+ s.add_dependency(%q<bundler>, ["~> 1.3.3"])
59
+ end
60
+ else
61
+ s.add_dependency(%q<mandrill-api>, ["~> 1.0.16"])
62
+ s.add_dependency(%q<rspec>, ["~> 2.13.0"])
63
+ s.add_dependency(%q<debugger>, ["~> 1.5.0"])
64
+ s.add_dependency(%q<rdoc>, ["~> 4.0.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
66
+ s.add_dependency(%q<bundler>, ["~> 1.3.3"])
67
+ end
68
+ end
69
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mass_mandrill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2013-03-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mandrill-api
17
- requirement: &19551200 !ruby/object:Gem::Requirement
17
+ requirement: &19146320 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.16
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *19551200
25
+ version_requirements: *19146320
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
- requirement: &19549780 !ruby/object:Gem::Requirement
28
+ requirement: &19145240 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 2.13.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *19549780
36
+ version_requirements: *19145240
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: debugger
39
- requirement: &19548720 !ruby/object:Gem::Requirement
39
+ requirement: &19144100 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 1.5.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *19548720
47
+ version_requirements: *19144100
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rdoc
50
- requirement: &19547540 !ruby/object:Gem::Requirement
50
+ requirement: &19143040 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 4.0.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *19547540
58
+ version_requirements: *19143040
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: jeweler
61
- requirement: &19546540 !ruby/object:Gem::Requirement
61
+ requirement: &19142120 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.8.4
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *19546540
69
+ version_requirements: *19142120
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: bundler
72
- requirement: &19545500 !ruby/object:Gem::Requirement
72
+ requirement: &19141080 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,26 +77,27 @@ dependencies:
77
77
  version: 1.3.3
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *19545500
80
+ version_requirements: *19141080
81
81
  description: Send Mandrill template emails
82
82
  email: nebojsa.stricevic@gmail.com
83
83
  executables: []
84
84
  extensions: []
85
85
  extra_rdoc_files:
86
86
  - LICENSE.txt
87
- - README.rdoc
87
+ - README.markdown
88
88
  files:
89
89
  - .document
90
90
  - Gemfile
91
91
  - Gemfile.lock
92
92
  - LICENSE.txt
93
- - README.rdoc
93
+ - README.markdown
94
94
  - Rakefile
95
95
  - VERSION
96
96
  - lib/mass_mandrill.rb
97
97
  - lib/mass_mandrill/config.rb
98
98
  - lib/mass_mandrill/mandrill_mail.rb
99
99
  - lib/mass_mandrill/mandrill_mailer.rb
100
+ - mass_mandrill.gemspec
100
101
  - spec/mass_mandrill/config_spec.rb
101
102
  - spec/mass_mandrill/mandrill_mailer_spec.rb
102
103
  - spec/spec_helper.rb
@@ -115,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
116
  version: '0'
116
117
  segments:
117
118
  - 0
118
- hash: 3296246128007628353
119
+ hash: 2158431976326342039
119
120
  required_rubygems_version: !ruby/object:Gem::Requirement
120
121
  none: false
121
122
  requirements:
data/README.rdoc DELETED
@@ -1,19 +0,0 @@
1
- = mandrill_template
2
-
3
- Description goes here.
4
-
5
- == Contributing to mandrill_template
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
- * Fork the project.
10
- * Start a feature/bugfix branch.
11
- * Commit and push until you are happy with your contribution.
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2013 Nebojša Stričević. See LICENSE.txt for
18
- further details.
19
-