api_mailer 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/api_mailer.gemspec +1 -0
- data/lib/api_mailer.rb +1 -0
- data/lib/api_mailer/base.rb +7 -2
- data/lib/api_mailer/version.rb +1 -1
- metadata +18 -2
data/api_mailer.gemspec
CHANGED
data/lib/api_mailer.rb
CHANGED
data/lib/api_mailer/base.rb
CHANGED
@@ -4,6 +4,11 @@ module ApiMailer
|
|
4
4
|
abstract!
|
5
5
|
|
6
6
|
include AbstractController::Rendering
|
7
|
+
include AbstractController::Logger
|
8
|
+
include AbstractController::Helpers
|
9
|
+
include AbstractController::Translation
|
10
|
+
include AbstractController::AssetPaths
|
11
|
+
include AbstractController::Callbacks
|
7
12
|
|
8
13
|
attr_accessor :action_name
|
9
14
|
attr_accessor :responses
|
@@ -50,7 +55,7 @@ module ApiMailer
|
|
50
55
|
end
|
51
56
|
|
52
57
|
# Handle defaults
|
53
|
-
self.headers = ActiveSupport::HashWithIndifferentAccess.new(headers.reverse_merge(default_values))
|
58
|
+
self.headers = ActiveSupport::HashWithIndifferentAccess.new(headers.reverse_merge(default_values)) || {}
|
54
59
|
|
55
60
|
collect_responses(headers)
|
56
61
|
end
|
@@ -71,7 +76,7 @@ module ApiMailer
|
|
71
76
|
|
72
77
|
self.responses << {
|
73
78
|
body: render(template: template),
|
74
|
-
content_type: template.type.to_s
|
79
|
+
content_type: (template.respond_to?(:type) ? template.type : template.mime_type).to_s
|
75
80
|
}
|
76
81
|
end
|
77
82
|
end
|
data/lib/api_mailer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -75,6 +75,22 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '3.0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: hashie
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
78
94
|
description: A simple replication of ActionMailer for API based mailing that doesn't
|
79
95
|
require the mail gem
|
80
96
|
email:
|