effective_email_templates 0.4.5 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +10 -0
- data/app/datatables/effective_email_templates_datatable.rb +14 -17
- data/lib/effective/liquid_mailer.rb +1 -1
- data/lib/effective_email_templates/email_view_template.rb +4 -1
- data/lib/effective_email_templates/engine.rb +0 -15
- data/lib/effective_email_templates/version.rb +1 -1
- metadata +42 -44
- data/app/models/effective/datatables/email_templates.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c60f871f30ff1ce2c6f2adbccc31e906b8d19fba696bbd456f1e8f9b17064215
|
4
|
+
data.tar.gz: d41c1d401f35199b7ec8b80046cade8a364611cd1771bf1e62976fc2a4c27ac7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7466896b837db170f1305d889542b2faa441b39cbe7f511d1845f2a3cff8a0520469f542a13dd76baaf98fcfe85efb927d571e65f851bfa86fca07e5409d23cf
|
7
|
+
data.tar.gz: b536c744a107741e773831552e9beb548cc064bb4fe7e07193deef4e16c3d897743ac7d79b4fc143ea78ebc41483b8f4adb5d9ee5d1943b1fb3ea0ff038bfb3b
|
data/README.md
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
|
2
2
|
# Effective Email Templates
|
3
3
|
|
4
|
+
**This gem is no longer actively maintained**
|
5
|
+
|
4
6
|
Create email templates that an admin or any user can safely edit (you're protected from SQL injection and other nastiness).
|
5
7
|
Effective Email Templates relies on [Liquid templates](http://liquidmarkup.org/) built by Shopify to profide this safety.
|
6
8
|
|
7
9
|
Rails 3.2.x and Rails 4 Support
|
8
10
|
|
11
|
+
## Bootstrap3
|
12
|
+
|
13
|
+
This is the `bootstrap3` branch of effective_email_templates which supports Twitter Bootstrap 3.
|
14
|
+
|
15
|
+
All published effective_email_templates 0.x gems will support Twitter Bootstrap 3 and SimpleForm.
|
16
|
+
|
17
|
+
For Bootstrap 4 please see the master branch and/or effective_email_templates 1.x gems.
|
18
|
+
|
9
19
|
|
10
20
|
## Getting Started
|
11
21
|
|
@@ -1,22 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
order :subject, :asc
|
1
|
+
class EffectiveEmailTemplatesDatatable < Effective::Datatable
|
2
|
+
datatable do
|
3
|
+
order :subject, :asc
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
col :id, visible: false
|
6
|
+
col :slug
|
7
|
+
col :subject
|
8
|
+
col :from
|
9
|
+
col :cc, visible: false, label: 'CC'
|
10
|
+
col :bcc, visible: false, label: 'BCC'
|
11
|
+
col :body, visible: false
|
13
12
|
|
14
|
-
|
15
|
-
|
13
|
+
actions_col partial: '/admin/email_templates/actions', partial_as: 'email_template'
|
14
|
+
end
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
end
|
16
|
+
collection do
|
17
|
+
Effective::EmailTemplate.all
|
20
18
|
end
|
21
19
|
end
|
22
|
-
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Effective
|
2
|
-
class LiquidMailer < ::ActionMailer::Base
|
2
|
+
class LiquidMailer < (defined?(::ApplicationMailer) ? ::ApplicationMailer : ::ActionMailer::Base)
|
3
3
|
def mail(headers = {}, &block)
|
4
4
|
# this be dangerous and requires ruby 2.0+
|
5
5
|
mail_method = caller_locations(1, 1)[0].label
|
@@ -2,21 +2,6 @@ module EffectiveEmailTemplates
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
engine_name 'effective_email_templates'
|
4
4
|
|
5
|
-
# Include Helpers to base application
|
6
|
-
initializer 'effective_email_templates.action_controller' do |app|
|
7
|
-
ActiveSupport.on_load :action_controller do
|
8
|
-
helper EffectiveEmailTemplatesHelper
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
# Include acts_as_email_templatable concern and allow any ActiveRecord object to call it
|
13
|
-
initializer 'effective_email_templates.active_record' do |app|
|
14
|
-
ActiveSupport.on_load :active_record do
|
15
|
-
# If you write a concern at all, it should be registered here
|
16
|
-
#ActiveRecord::Base.extend(ActsAsAddressable::ActiveRecord)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
5
|
# Set up our default configuration options.
|
21
6
|
initializer "effective_email_templates.defaults", :before => :load_config_initializers do |app|
|
22
7
|
eval File.read("#{config.root}/config/effective_email_templates.rb")
|
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: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -103,7 +103,6 @@ files:
|
|
103
103
|
- app/helpers/effective_email_templates_helper.rb
|
104
104
|
- app/mailers/effective/email_template_mailer.rb
|
105
105
|
- app/models/effective/access_denied.rb
|
106
|
-
- app/models/effective/datatables/email_templates.rb
|
107
106
|
- app/models/effective/email_template.rb
|
108
107
|
- app/views/admin/email_templates/_actions.html.haml
|
109
108
|
- app/views/admin/email_templates/_form.html.haml
|
@@ -182,7 +181,7 @@ homepage: https://github.com/code-and-effect/effective_email_templates
|
|
182
181
|
licenses:
|
183
182
|
- MIT
|
184
183
|
metadata: {}
|
185
|
-
post_install_message:
|
184
|
+
post_install_message:
|
186
185
|
rdoc_options: []
|
187
186
|
require_paths:
|
188
187
|
- lib
|
@@ -197,65 +196,64 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
196
|
- !ruby/object:Gem::Version
|
198
197
|
version: '0'
|
199
198
|
requirements: []
|
200
|
-
|
201
|
-
|
202
|
-
signing_key:
|
199
|
+
rubygems_version: 3.1.2
|
200
|
+
signing_key:
|
203
201
|
specification_version: 4
|
204
202
|
summary: Effective Email Templates provides an admin access to modify email templates
|
205
203
|
test_files:
|
206
|
-
- spec/
|
207
|
-
- spec/
|
208
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
209
|
-
- spec/dummy/app/controllers/application_controller.rb
|
210
|
-
- spec/dummy/app/controllers/welcome_controller.rb
|
211
|
-
- spec/dummy/app/helpers/application_helper.rb
|
212
|
-
- spec/dummy/app/mailers/liquid_resolved_mailer.rb
|
204
|
+
- spec/spec_helper.rb
|
205
|
+
- spec/sanity_spec.rb
|
213
206
|
- spec/dummy/app/mailers/user_liquid_mailer.rb
|
207
|
+
- spec/dummy/app/mailers/liquid_resolved_mailer.rb
|
214
208
|
- spec/dummy/app/models/user.rb
|
209
|
+
- spec/dummy/app/controllers/application_controller.rb
|
210
|
+
- spec/dummy/app/controllers/welcome_controller.rb
|
211
|
+
- spec/dummy/app/views/welcome/index.html.haml
|
215
212
|
- spec/dummy/app/views/layouts/application.html.erb
|
216
213
|
- spec/dummy/app/views/user_liquid/after_create_user.liquid
|
217
|
-
- spec/dummy/app/
|
214
|
+
- spec/dummy/app/assets/javascripts/application.js
|
215
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
216
|
+
- spec/dummy/app/helpers/application_helper.rb
|
217
|
+
- spec/dummy/bin/rake
|
218
218
|
- spec/dummy/bin/bundle
|
219
219
|
- spec/dummy/bin/rails
|
220
|
-
- spec/dummy/
|
221
|
-
- spec/dummy/config/
|
222
|
-
- spec/dummy/config/
|
223
|
-
- spec/dummy/config/
|
224
|
-
- spec/dummy/config/environment.rb
|
225
|
-
- spec/dummy/config/environments/development.rb
|
220
|
+
- spec/dummy/config/secrets.yml
|
221
|
+
- spec/dummy/config/routes.rb
|
222
|
+
- spec/dummy/config/locales/en.yml
|
223
|
+
- spec/dummy/config/locales/devise.en.yml
|
226
224
|
- spec/dummy/config/environments/production.rb
|
225
|
+
- spec/dummy/config/environments/development.rb
|
227
226
|
- spec/dummy/config/environments/test.rb
|
228
|
-
- spec/dummy/config/
|
227
|
+
- spec/dummy/config/environment.rb
|
228
|
+
- spec/dummy/config/application.rb
|
229
|
+
- spec/dummy/config/database.yml
|
230
|
+
- spec/dummy/config/boot.rb
|
229
231
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
230
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
231
|
-
- spec/dummy/config/initializers/devise.rb
|
232
|
-
- spec/dummy/config/initializers/effective_email_templates.rb
|
233
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
234
|
-
- spec/dummy/config/initializers/inflections.rb
|
235
232
|
- spec/dummy/config/initializers/mime_types.rb
|
233
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
236
234
|
- spec/dummy/config/initializers/session_store.rb
|
237
235
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
238
|
-
- spec/dummy/config/
|
239
|
-
- spec/dummy/config/
|
240
|
-
- spec/dummy/config/
|
241
|
-
- spec/dummy/config/
|
236
|
+
- spec/dummy/config/initializers/assets.rb
|
237
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
238
|
+
- spec/dummy/config/initializers/devise.rb
|
239
|
+
- spec/dummy/config/initializers/inflections.rb
|
240
|
+
- spec/dummy/config/initializers/effective_email_templates.rb
|
242
241
|
- spec/dummy/config.ru
|
243
|
-
- spec/dummy/
|
244
|
-
- spec/dummy/
|
245
|
-
- spec/dummy/db/schema.rb
|
246
|
-
- spec/dummy/public/404.html
|
242
|
+
- spec/dummy/Rakefile
|
243
|
+
- spec/dummy/public/favicon.ico
|
247
244
|
- spec/dummy/public/422.html
|
248
245
|
- spec/dummy/public/500.html
|
249
|
-
- spec/dummy/public/
|
250
|
-
- spec/dummy/
|
246
|
+
- spec/dummy/public/404.html
|
247
|
+
- spec/dummy/db/schema.rb
|
248
|
+
- spec/dummy/db/migrate/20141126222940_devise_create_users.rb
|
249
|
+
- spec/dummy/db/migrate/20141126222941_create_effective_email_templates.rb
|
251
250
|
- spec/dummy/README.rdoc
|
252
|
-
- spec/effective_email_templates_spec.rb
|
253
|
-
- spec/factories/email_template.rb
|
254
|
-
- spec/factories/user.rb
|
255
251
|
- spec/factory_spec.rb
|
256
|
-
- spec/lib/effective_email_templates/template_importer_spec.rb
|
257
252
|
- spec/mailers/liquid_resolved_mailer_spec.rb
|
258
253
|
- spec/models/email_template_spec.rb
|
259
254
|
- spec/models/user_spec.rb
|
260
|
-
- spec/
|
261
|
-
- spec/
|
255
|
+
- spec/factories/email_template.rb
|
256
|
+
- spec/factories/user.rb
|
257
|
+
- spec/lib/effective_email_templates/template_importer_spec.rb
|
258
|
+
- spec/effective_email_templates_spec.rb
|
259
|
+
- spec/controllers/admin/email_templates_controller_spec.rb
|
@@ -1,24 +0,0 @@
|
|
1
|
-
if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
|
2
|
-
module Effective
|
3
|
-
module Datatables
|
4
|
-
class EmailTemplates < Effective::Datatable
|
5
|
-
datatable do
|
6
|
-
default_order :subject, :asc
|
7
|
-
|
8
|
-
table_column :id, visible: false
|
9
|
-
table_column :slug
|
10
|
-
table_column :subject
|
11
|
-
table_column :from
|
12
|
-
table_column :cc, sortable: false, visible: false, label: 'CC'
|
13
|
-
table_column :bcc, sortable: false, visible: false, label: 'BCC'
|
14
|
-
table_column :body, sortable: false, visible: false
|
15
|
-
table_column :actions, sortable: false, partial: '/admin/email_templates/actions'
|
16
|
-
end
|
17
|
-
|
18
|
-
def collection
|
19
|
-
Effective::EmailTemplate.all
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|