locale_mailer 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/changeslog.txt +1 -0
- data/lib/locale_mailer/concern.rb +4 -2
- data/lib/locale_mailer/version.rb +2 -1
- data/locale_mailer.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 153efe0a638ab1d6176816efe0f8c9e564771eda
|
4
|
+
data.tar.gz: 9584eeeb24b843c6085d1906d48f8eadcfd79499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71e5ba7f56f1aff40da8060923d9287a066cfe0f1f7dd5ee3d061a2cda3a558f78df7b33751934f6f4de4081a0ddd5be30bac3ccd92b96d260317be11ea1861f
|
7
|
+
data.tar.gz: 3393d27f75b0df3a746dcdecb3b5e0055bd72cf9710ae7212e34191a24ead67989b90b42f10a9fd1c267690d03a323585d222a5db6b712d2496cd77e3f95a7ea
|
data/.gitignore
CHANGED
data/changeslog.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.3.0 : Bump to action mailer 5.2.0 and use locale file to display a subject per default
|
@@ -28,10 +28,12 @@ module LocaleMailer
|
|
28
28
|
|
29
29
|
def mail_with_localized_templates(options = {}, &block)
|
30
30
|
options.symbolize_keys!
|
31
|
+
|
32
|
+
options[:subject] ||= subject_from_locale(options)
|
33
|
+
|
31
34
|
if template_exists? options[:template_name] || action_name, options[:template_path] || mailer_name
|
32
35
|
mail_without_localized_templates(options, &block)
|
33
36
|
elsif I18n.exists? action_i18n_path(options), I18n.locale
|
34
|
-
options[:subject] = subject_from_locale(options) unless options.key?(:subject)
|
35
37
|
mail_without_localized_templates options do |format|
|
36
38
|
format.html {
|
37
39
|
body_from_locale options.reverse_merge(layout: _layout(:html))
|
@@ -85,7 +87,7 @@ module LocaleMailer
|
|
85
87
|
end
|
86
88
|
|
87
89
|
def body_from_locale options = {}
|
88
|
-
render inline: view_context.text('body', action_i18n_options(options)), layout: options[:layout]
|
90
|
+
render inline: view_context.text('body', action_i18n_options(options)), layout: options[:layout]
|
89
91
|
end
|
90
92
|
|
91
93
|
end
|
data/locale_mailer.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency "actionmailer"
|
30
|
+
spec.add_dependency "actionmailer", ">= 5.2.0"
|
31
31
|
spec.add_dependency "activesupport"
|
32
32
|
spec.add_dependency 'loofah'
|
33
33
|
spec.add_development_dependency 'combustion'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locale_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- itkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 5.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- Rakefile
|
140
140
|
- bin/console
|
141
141
|
- bin/setup
|
142
|
+
- changeslog.txt
|
142
143
|
- lib/locale_mailer.rb
|
143
144
|
- lib/locale_mailer/actionview_helpers.rb
|
144
145
|
- lib/locale_mailer/concern.rb
|