api_mailer 0.0.6 → 0.0.7

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
- SHA1:
3
- metadata.gz: 41447ae41842474f5c463144446c9a5a8b17d025
4
- data.tar.gz: 2548e6d6e08fb44922166ca0cf25e684ebc8ea84
2
+ SHA256:
3
+ metadata.gz: 842b07be691d8a2666e20f09f7f8d72102b120e32ad9c4e87eac77d360218c2a
4
+ data.tar.gz: 0f039c9fe16a19b47a93d1f6c9f1d839e74413d87f1ca24407dde9310dba59de
5
5
  SHA512:
6
- metadata.gz: 152eeead25f8af991c4b724968b32903feea990850655049e83a530d0f2d843c2690ee383332b13e5388d43f838756199ee611c7a22d2a99aaed856c29a24803
7
- data.tar.gz: 8db56087afc300d02eb60d9a4232bb1f6758843280915540d06f52f93fda83206d29cb39d527667c9e4797a06a3304ad9d249ca8911f2428814ae98292c76884
6
+ metadata.gz: d09565c653e6919c66ce7fc9173f60db4d0aed02f99d58313fb0ada2e5a3bbc2399c5c5e6438a3e87251c2edba2ea7097780efdf9ad230cc5be6f303acd96e0d
7
+ data.tar.gz: f374a4c52f9dd6760c485070d4904a859fcbe2473b224736656ab39dff9a054122749b7ad5cd127a5c44fe05354e5edb2625a14d9806060653b2f64175112edb
@@ -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(YAML.load(ERB.new(File.read(filepath)).result)[Rails.env.to_s])
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
@@ -1,3 +1,3 @@
1
1
  module ApiMailer
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  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.6
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: 2018-05-08 00:00:00.000000000 Z
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,8 +74,8 @@ 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
80
  - MIT-LICENSE
81
81
  - README.md
@@ -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
- rubyforge_project:
116
- rubygems_version: 2.6.14
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