api_mailer 0.0.7 → 0.0.9

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
  SHA256:
3
- metadata.gz: 842b07be691d8a2666e20f09f7f8d72102b120e32ad9c4e87eac77d360218c2a
4
- data.tar.gz: 0f039c9fe16a19b47a93d1f6c9f1d839e74413d87f1ca24407dde9310dba59de
3
+ metadata.gz: 9ef3352599d846840f416765307ff7072a9160c45f53986d2f3d5c2bf6e96b35
4
+ data.tar.gz: 8db7c8fb7b1f36f0482c2615e75e0a3d8f16f4c034045130f7a00788230257ed
5
5
  SHA512:
6
- metadata.gz: d09565c653e6919c66ce7fc9173f60db4d0aed02f99d58313fb0ada2e5a3bbc2399c5c5e6438a3e87251c2edba2ea7097780efdf9ad230cc5be6f303acd96e0d
7
- data.tar.gz: f374a4c52f9dd6760c485070d4904a859fcbe2473b224736656ab39dff9a054122749b7ad5cd127a5c44fe05354e5edb2625a14d9806060653b2f64175112edb
6
+ metadata.gz: e891c99cbd5edd670596c572260990e38e4ca6cfa9db25d2f5f990331c4b0fbd0d97553d61ed934dcd6daa64b3fd36327d12f2ff9a638e157bf100f4b7b1ddf9
7
+ data.tar.gz: c4cca5012334f2e9f46b6feea25cf74c620304f7219de55b36465e79e2e7f20cc2083fbffca2d8fdf2d22da7d5f9fb12c11548956837a28b1864f2b06e35912d
data/.travis.yml CHANGED
@@ -1,9 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.7
3
+ - 2.6.1
4
4
  gemfile:
5
5
  - gemfiles/Gemfile.rails-3.2.x
6
6
  - gemfiles/Gemfile.rails-4.0.x
7
7
  - gemfiles/Gemfile.rails-4.1.x
8
8
  - gemfiles/Gemfile.rails-5.1.x
9
+ - gemfiles/Gemfile.rails-6.1.x
9
10
  script: bundle exec rspec spec
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in api_mailer.gemspec
4
+ gemspec :path => '../'
5
+
6
+ gem 'rails', "6.1.4.1"
@@ -79,7 +79,7 @@ module ApiMailer
79
79
  templates_name = headers.delete(:template_name) || action_name
80
80
 
81
81
  each_template(templates_path(headers), templates_name) do |template|
82
- self.formats = template.formats
82
+ self.formats = template.respond_to?(:formats) ? template.formats : [template.format]
83
83
 
84
84
  self.responses << {
85
85
  body: render(template: template),
@@ -98,7 +98,7 @@ module ApiMailer
98
98
  if templates.empty?
99
99
  raise ActionView::MissingTemplate.new(paths, name, paths, false, 'mailer')
100
100
  else
101
- templates.uniq { |t| t.formats }.each(&block)
101
+ templates.uniq { |t| (t.respond_to?(:formats) ? t.formats : [t.format])}.each(&block)
102
102
  end
103
103
  end
104
104
 
@@ -10,7 +10,7 @@ ApiMailer::Configuration.instance_eval do
10
10
  end
11
11
 
12
12
  def load_config
13
- if File.exists?(filepath)
13
+ if File.exist?(filepath)
14
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")
@@ -1,3 +1,3 @@
1
1
  module ApiMailer
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -85,6 +85,7 @@ files:
85
85
  - gemfiles/Gemfile.rails-4.0.x
86
86
  - gemfiles/Gemfile.rails-4.1.x
87
87
  - gemfiles/Gemfile.rails-5.1.x
88
+ - gemfiles/Gemfile.rails-6.1.x
88
89
  - lib/api_mailer.rb
89
90
  - lib/api_mailer/base.rb
90
91
  - lib/api_mailer/configuration.rb