effective_email_templates 1.2.0 → 1.2.1

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
  SHA256:
3
- metadata.gz: 5a825ba548fb85d4457abfdbfb0275fbb2c587e48ab30e0e397b41ea9d2f42c3
4
- data.tar.gz: 7626c2168d86a547aa3a13e45f52c236eeb5e65c619b8a2c51bfb39f65d2fd3f
3
+ metadata.gz: 9b1b5ced42deba88bc8a04fa40e1c5468ce63afcc1973b739e56567a42117e80
4
+ data.tar.gz: e9c50773c03d2786dd13ef629f39e2780b8637004f746132e21e16232d86e604
5
5
  SHA512:
6
- metadata.gz: 29b61247525c81716517797802fb7a21f0bfd7176c76ba7f9302f6988fd3741c031aac688ba5104b5b7a41a45454ba067fc119e16f0a42166bac41310e88726d
7
- data.tar.gz: 671760817de5c14bb20712ef01925bf637301f3ff8dee6d5c93ef77b8e5fa85b245541c8e871af1216d182eba3c77d38bc85e39f29d9177aa9928a1767e2abe4
6
+ metadata.gz: ecbb4090d883a34dac59d42e7e2ff48f3206c71f4db3dba146d7a6e6a999ca563961735fb6e8e05357e65eceaa6257e6ea57a2a017585bcec8d2d6e2c73a93c9
7
+ data.tar.gz: 9f34ecd94ffadbf2850fc23db24b353aa03fafab12745b6dd854d25b7d0a362e3305aa2adaf5a2e02cefe0ac8b4c33168250f74b0294d5c57645770a6f0eaa10
@@ -11,7 +11,12 @@ module EffectiveEmailTemplates
11
11
  def execute(overwrite:, paths: nil, quiet: false)
12
12
  return false unless ActiveRecord::Base.connection.table_exists?(EffectiveEmailTemplates.email_templates_table_name)
13
13
 
14
- paths ||= ActionController::Base.view_paths.map(&:path)
14
+ paths ||= if defined?(Tenant)
15
+ raise('expected a tenant') unless Tenant.current.present?
16
+ ActionController::Base.view_paths.reject { |view| view.path.include?('/apps/') }.map(&:path) + Tenant.view_paths.map(&:to_s)
17
+ else
18
+ ActionController::Base.view_paths.map(&:path)
19
+ end
15
20
 
16
21
  paths.each do |path|
17
22
  Dir[Rails.root.join(path, '**', '*_mailer/', '*.liquid')].each do |filepath|
@@ -1,3 +1,3 @@
1
1
  module EffectiveEmailTemplates
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_email_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2023-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails