locale_mailer 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9241ec86d8ecf16c4f56a884e6af76c1f91bed6
4
- data.tar.gz: ad26f70772b64f5954e70bf4badb19b3263fffa9
3
+ metadata.gz: 26b6b91858f7a2e8c5e7ff0958d62ac522edf7b6
4
+ data.tar.gz: 30f6e223d04fa5b0d0cc545d7f8b624675ee3465
5
5
  SHA512:
6
- metadata.gz: 7dfcaf1479f150a0ef12b12f3658208af615e810514da3089fc30633c0374691b276cf67b45d82847807355236781cde26318c63ec19474a0d12454d7d99e0d8
7
- data.tar.gz: 3e9dbb5913876f5fefe6bd22226ac29346c4957d3e9567f60d7aa815ebe3c72ed49520174c2979856a8a4866292d38960a4e0382b88c4fc0123952e0864f126c
6
+ metadata.gz: ca62cf839282f01fe71bd47b441f7776cdd9f69b0a2e28d286012ecad11a421f249688d670768f551ca024ea726ee28c2139276a573cc3cb9a842c4d0e1419bb
7
+ data.tar.gz: 206c0c95ed7d9031ee62b11a08d1576455d624de5883ce7e019c24b622b03a4624a946328b8c86cdba1e4089e891535b5df567e81596ae537a2db70336c979d5
@@ -30,17 +30,18 @@ module LocaleMailer
30
30
  rescue ActionView::MissingTemplate => e
31
31
  options.symbolize_keys!
32
32
 
33
- i18n_path = [
34
- Rails.configuration.locale_mailer_path_prefix,
35
- options[:template_path] || mailer_name.gsub('/','.').underscore,
36
- options[:template_name] || action_name
37
- ].compact.join('.')
33
+ # i18n_path = [
34
+ # Rails.configuration.locale_mailer_path_prefix,
35
+ # options[:template_path] || mailer_name.gsub('/','.').underscore,
36
+ # options[:template_name] || action_name
37
+ # ].compact.join('.')
38
38
 
39
- if I18n.exists? i18n_path, I18n.locale
39
+
40
+ if I18n.exists? i18n_path(options), I18n.locale
40
41
  locale_options = instance_public_variables_to_hash
41
- options[:subject] = subject_from_locale(i18n_path, locale_options) unless options.key?(:subject)
42
+ options[:subject] = subject_from_locale(i18n_path(options), locale_options) unless options.key?(:subject)
42
43
  mail_without_localized_templates options do |format|
43
- html_body = body_from_locale i18n_path, locale_options, options
44
+ html_body = body_from_locale i18n_path(options), locale_options, options
44
45
  format.html {
45
46
  html_body
46
47
  }
@@ -54,7 +55,13 @@ module LocaleMailer
54
55
  end
55
56
  end
56
57
 
57
-
58
+ def i18n_path options
59
+ [
60
+ Rails.configuration.locale_mailer_path_prefix,
61
+ options[:template_path] || mailer_name.gsub('/','.').underscore,
62
+ options[:template_name] || action_name
63
+ ].compact.join('.')
64
+ end
58
65
 
59
66
  def instance_public_variables_to_hash
60
67
  instance_variables.inject({}) do |memo, name|
@@ -1,3 +1,3 @@
1
1
  module LocaleMailer
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,125 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locale_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - itkin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '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
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: loofah
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: combustion
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.10'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.10'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '10.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '10.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pry
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  description:
@@ -129,9 +129,9 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
- - .gitignore
133
- - .rspec
134
- - .travis.yml
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - ".travis.yml"
135
135
  - CODE_OF_CONDUCT.md
136
136
  - Gemfile
137
137
  - LICENSE.txt
@@ -155,17 +155,17 @@ require_paths:
155
155
  - lib
156
156
  required_ruby_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: '0'
161
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - '>='
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.2.2
168
+ rubygems_version: 2.4.5.1
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Ruby on Rails gem to allow email template views generation straight from