locale_mailer 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b347bdafcb4cde67c76e2f3ea84743fc122a5226
4
- data.tar.gz: 3024cee1cfc11b9e52a8a1f1fe8c0613003596fe
3
+ metadata.gz: 153efe0a638ab1d6176816efe0f8c9e564771eda
4
+ data.tar.gz: 9584eeeb24b843c6085d1906d48f8eadcfd79499
5
5
  SHA512:
6
- metadata.gz: 3f16260c415e8008ee81fdd1aa2a426b1f8fad2177ed7946e0e173e54f382295e68fc12377bdc6ea0602b683af3aa54f35a031ca2defd46cb329dcf06b0621dd
7
- data.tar.gz: edb27c26e13763639bb9f0f440c2708deefe601474797706d5c7c8569dae88fd5419329e1472ddb05f96785637b41a98c8f3afbe13e8cc4a5f80a126284ac9a2
6
+ metadata.gz: 71e5ba7f56f1aff40da8060923d9287a066cfe0f1f7dd5ee3d061a2cda3a558f78df7b33751934f6f4de4081a0ddd5be30bac3ccd92b96d260317be11ea1861f
7
+ data.tar.gz: 3393d27f75b0df3a746dcdecb3b5e0055bd72cf9710ae7212e34191a24ead67989b90b42f10a9fd1c267690d03a323585d222a5db6b712d2496cd77e3f95a7ea
data/.gitignore CHANGED
@@ -8,4 +8,6 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .idea/
11
- spec/internal/
11
+ spec/internal/
12
+ .ruby-gemset
13
+ .ruby-version
@@ -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] || _layout
90
+ render inline: view_context.text('body', action_i18n_options(options)), layout: options[:layout]
89
91
  end
90
92
 
91
93
  end
@@ -1,3 +1,4 @@
1
1
  module LocaleMailer
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.0"
3
3
  end
4
+
@@ -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.2.9
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: 2018-07-02 00:00:00.000000000 Z
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: '0'
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: '0'
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