api_mailer 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +2 -0
- data/.travis.yml +2 -2
- data/gemfiles/Gemfile.rails-5.1.x +8 -0
- data/lib/api_mailer/base.rb +1 -1
- data/lib/api_mailer/configuration.rb +11 -1
- data/lib/api_mailer/version.rb +1 -1
- data/spec/spec_helper.rb +4 -1
- metadata +19 -20
- data/Gemfile.lock +0 -54
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZGEyMmQ4YWNlMTQ4YTgyMzllNzgyMDc4NDE0NzNiOWZjNDU1OThmMg==
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 842b07be691d8a2666e20f09f7f8d72102b120e32ad9c4e87eac77d360218c2a
|
4
|
+
data.tar.gz: 0f039c9fe16a19b47a93d1f6c9f1d839e74413d87f1ca24407dde9310dba59de
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
YTJjYzNjMjE2NDhkOWFmYzUzNzJkZmIxZDU1NGIzNzAzMTg4NjJkNDZhYzM4
|
11
|
-
NGRhZjM1YzA0ZGMzMmY3MzIyNWQ4MzlhYzdhMWU1MWZkMzViZDU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MTkyYjQ1NzhmZWQ2NWFjOWMxM2UwZGZjMGIwYjQyMTQ4YTI3YTdmMzllYTY4
|
14
|
-
YzBmZjRiNmU3OTU1MWIzZjY0ZTYyYjMyNzRkM2E2ZWE5MDJkNTZkYmRkZTE0
|
15
|
-
ZmQzODg3OGQ2YmM2YTcyYTIwNGM3ZmZjYmE1ZjAwMGE0ZGY3MjA=
|
6
|
+
metadata.gz: d09565c653e6919c66ce7fc9173f60db4d0aed02f99d58313fb0ada2e5a3bbc2399c5c5e6438a3e87251c2edba2ea7097780efdf9ad230cc5be6f303acd96e0d
|
7
|
+
data.tar.gz: f374a4c52f9dd6760c485070d4904a859fcbe2473b224736656ab39dff9a054122749b7ad5cd127a5c44fe05354e5edb2625a14d9806060653b2f64175112edb
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/lib/api_mailer/base.rb
CHANGED
@@ -117,7 +117,7 @@ module ApiMailer
|
|
117
117
|
}
|
118
118
|
|
119
119
|
ActiveSupport::Notifications.instrument("process.api_mailer", payload) do
|
120
|
-
lookup_context.skip_default_locale!
|
120
|
+
lookup_context.skip_default_locale! if lookup_context.respond_to?(:skip_default_locale!)
|
121
121
|
|
122
122
|
super
|
123
123
|
end
|
@@ -11,12 +11,22 @@ ApiMailer::Configuration.instance_eval do
|
|
11
11
|
|
12
12
|
def load_config
|
13
13
|
if File.exists?(filepath)
|
14
|
-
ActiveSupport::HashWithIndifferentAccess.new(
|
14
|
+
ActiveSupport::HashWithIndifferentAccess.new(load_yaml(ERB.new(File.read(filepath)).result)[Rails.env.to_s])
|
15
15
|
else
|
16
16
|
raise Exception.new("File not found: config/api_mailer.yml")
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def load_yaml(source)
|
21
|
+
# https://bugs.ruby-lang.org/issues/17866
|
22
|
+
# https://github.com/rails/rails/commit/179d0a1f474ada02e0030ac3bd062fc653765dbe
|
23
|
+
begin
|
24
|
+
YAML.load(source, aliases: true)
|
25
|
+
rescue ArgumentError
|
26
|
+
YAML.load(source)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
20
30
|
def get(name)
|
21
31
|
configurations[name.to_s]
|
22
32
|
end
|
data/lib/api_mailer/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,10 @@
|
|
7
7
|
|
8
8
|
require 'active_support/hash_with_indifferent_access'
|
9
9
|
require "api_mailer"
|
10
|
+
|
11
|
+
module Rails
|
12
|
+
end
|
13
|
+
|
10
14
|
RSpec.configure do |config|
|
11
15
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
12
16
|
config.run_all_when_everything_filtered = true
|
@@ -19,7 +23,6 @@ RSpec.configure do |config|
|
|
19
23
|
config.order = 'random'
|
20
24
|
|
21
25
|
config.before(:each) do
|
22
|
-
Rails = double(:rails) unless defined?(Rails)
|
23
26
|
Rails.stub(:root).and_return(Pathname.new(__FILE__).dirname)
|
24
27
|
Rails.stub(:env).and_return(double(to_s: "test", test?: true))
|
25
28
|
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Allen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
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: :development
|
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: actionpack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.2'
|
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: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.2'
|
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: '3.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: hashie
|
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: :runtime
|
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
|
description: A simple replication of ActionMailer for API based mailing that doesn't
|
@@ -74,10 +74,9 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
78
|
-
- .travis.yml
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
79
|
- Gemfile
|
80
|
-
- Gemfile.lock
|
81
80
|
- MIT-LICENSE
|
82
81
|
- README.md
|
83
82
|
- Rakefile
|
@@ -85,6 +84,7 @@ files:
|
|
85
84
|
- gemfiles/Gemfile.rails-3.2.x
|
86
85
|
- gemfiles/Gemfile.rails-4.0.x
|
87
86
|
- gemfiles/Gemfile.rails-4.1.x
|
87
|
+
- gemfiles/Gemfile.rails-5.1.x
|
88
88
|
- lib/api_mailer.rb
|
89
89
|
- lib/api_mailer/base.rb
|
90
90
|
- lib/api_mailer/configuration.rb
|
@@ -97,24 +97,23 @@ homepage: http://github.com/sportngin/api_mailer
|
|
97
97
|
licenses:
|
98
98
|
- MIT
|
99
99
|
metadata: {}
|
100
|
-
post_install_message:
|
100
|
+
post_install_message:
|
101
101
|
rdoc_options: []
|
102
102
|
require_paths:
|
103
103
|
- lib
|
104
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- -
|
106
|
+
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- -
|
111
|
+
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
|
-
|
116
|
-
|
117
|
-
signing_key:
|
115
|
+
rubygems_version: 3.2.33
|
116
|
+
signing_key:
|
118
117
|
specification_version: 4
|
119
118
|
summary: A simple replication of ActionMailer for API based mailing that doesn't require
|
120
119
|
the mail gem
|
data/Gemfile.lock
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
api_mailer (0.0.4)
|
5
|
-
actionpack (>= 3.2)
|
6
|
-
activesupport (>= 3.2)
|
7
|
-
hashie
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actionpack (4.1.4)
|
13
|
-
actionview (= 4.1.4)
|
14
|
-
activesupport (= 4.1.4)
|
15
|
-
rack (~> 1.5.2)
|
16
|
-
rack-test (~> 0.6.2)
|
17
|
-
actionview (4.1.4)
|
18
|
-
activesupport (= 4.1.4)
|
19
|
-
builder (~> 3.1)
|
20
|
-
erubis (~> 2.7.0)
|
21
|
-
activesupport (4.1.4)
|
22
|
-
i18n (~> 0.6, >= 0.6.9)
|
23
|
-
json (~> 1.7, >= 1.7.7)
|
24
|
-
minitest (~> 5.1)
|
25
|
-
thread_safe (~> 0.1)
|
26
|
-
tzinfo (~> 1.1)
|
27
|
-
builder (3.2.2)
|
28
|
-
diff-lcs (1.2.4)
|
29
|
-
erubis (2.7.0)
|
30
|
-
hashie (3.2.0)
|
31
|
-
i18n (0.6.11)
|
32
|
-
json (1.8.1)
|
33
|
-
minitest (5.4.0)
|
34
|
-
rack (1.5.2)
|
35
|
-
rack-test (0.6.2)
|
36
|
-
rack (>= 1.0)
|
37
|
-
rspec (2.14.1)
|
38
|
-
rspec-core (~> 2.14.0)
|
39
|
-
rspec-expectations (~> 2.14.0)
|
40
|
-
rspec-mocks (~> 2.14.0)
|
41
|
-
rspec-core (2.14.6)
|
42
|
-
rspec-expectations (2.14.3)
|
43
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
44
|
-
rspec-mocks (2.14.4)
|
45
|
-
thread_safe (0.3.4)
|
46
|
-
tzinfo (1.2.1)
|
47
|
-
thread_safe (~> 0.1)
|
48
|
-
|
49
|
-
PLATFORMS
|
50
|
-
ruby
|
51
|
-
|
52
|
-
DEPENDENCIES
|
53
|
-
api_mailer!
|
54
|
-
rspec
|