effective_email_templates 0.4.4 → 0.6.0
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 +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/engine.rb +0 -15
- data/lib/effective_email_templates/version.rb +1 -1
- metadata +52 -48
- 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: 17dd64ddb43dcb20daa443b2488ce74486da11b12ff72b5e28d3738a0661181f
|
4
|
+
data.tar.gz: 93ae90c7f48035307247965ce3416d3af0e2e68cb6fb29e08cbe6cef77b66d94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9fdd275aadf55698de9ff1fce5343d7c4e46e15f5a99c014e0d9e9db3c43500354c6269f80e2ebc45311b1547410c736c3f50d9ee3d625b203f93b6e8edab5
|
7
|
+
data.tar.gz: 4ebe2e9c655a827a65f0bc1859f6f7b01298638af32f0dceb2abf06408c8d769262672b239a83a88a6b5277e735cdf8a1077dfffe26382fb45edde582022f6c4
|
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.0
|
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
|
@@ -42,16 +42,22 @@ dependencies:
|
|
42
42
|
name: liquid
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
- - "<"
|
46
49
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
50
|
+
version: '4'
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - "~>"
|
53
56
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.0
|
57
|
+
version: '3.0'
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '4'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: simple_form
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,7 +103,6 @@ files:
|
|
97
103
|
- app/helpers/effective_email_templates_helper.rb
|
98
104
|
- app/mailers/effective/email_template_mailer.rb
|
99
105
|
- app/models/effective/access_denied.rb
|
100
|
-
- app/models/effective/datatables/email_templates.rb
|
101
106
|
- app/models/effective/email_template.rb
|
102
107
|
- app/views/admin/email_templates/_actions.html.haml
|
103
108
|
- app/views/admin/email_templates/_form.html.haml
|
@@ -176,7 +181,7 @@ homepage: https://github.com/code-and-effect/effective_email_templates
|
|
176
181
|
licenses:
|
177
182
|
- MIT
|
178
183
|
metadata: {}
|
179
|
-
post_install_message:
|
184
|
+
post_install_message:
|
180
185
|
rdoc_options: []
|
181
186
|
require_paths:
|
182
187
|
- lib
|
@@ -191,65 +196,64 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
196
|
- !ruby/object:Gem::Version
|
192
197
|
version: '0'
|
193
198
|
requirements: []
|
194
|
-
|
195
|
-
|
196
|
-
signing_key:
|
199
|
+
rubygems_version: 3.1.2
|
200
|
+
signing_key:
|
197
201
|
specification_version: 4
|
198
202
|
summary: Effective Email Templates provides an admin access to modify email templates
|
199
203
|
test_files:
|
200
|
-
- spec/
|
201
|
-
- spec/
|
202
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
203
|
-
- spec/dummy/app/controllers/application_controller.rb
|
204
|
-
- spec/dummy/app/controllers/welcome_controller.rb
|
205
|
-
- spec/dummy/app/helpers/application_helper.rb
|
206
|
-
- spec/dummy/app/mailers/liquid_resolved_mailer.rb
|
204
|
+
- spec/spec_helper.rb
|
205
|
+
- spec/sanity_spec.rb
|
207
206
|
- spec/dummy/app/mailers/user_liquid_mailer.rb
|
207
|
+
- spec/dummy/app/mailers/liquid_resolved_mailer.rb
|
208
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
|
209
212
|
- spec/dummy/app/views/layouts/application.html.erb
|
210
213
|
- spec/dummy/app/views/user_liquid/after_create_user.liquid
|
211
|
-
- 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
|
212
218
|
- spec/dummy/bin/bundle
|
213
219
|
- spec/dummy/bin/rails
|
214
|
-
- spec/dummy/
|
215
|
-
- spec/dummy/config/
|
216
|
-
- spec/dummy/config/
|
217
|
-
- spec/dummy/config/
|
218
|
-
- spec/dummy/config/environment.rb
|
219
|
-
- 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
|
220
224
|
- spec/dummy/config/environments/production.rb
|
225
|
+
- spec/dummy/config/environments/development.rb
|
221
226
|
- spec/dummy/config/environments/test.rb
|
222
|
-
- 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
|
223
231
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
224
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
225
|
-
- spec/dummy/config/initializers/devise.rb
|
226
|
-
- spec/dummy/config/initializers/effective_email_templates.rb
|
227
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
228
|
-
- spec/dummy/config/initializers/inflections.rb
|
229
232
|
- spec/dummy/config/initializers/mime_types.rb
|
233
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
230
234
|
- spec/dummy/config/initializers/session_store.rb
|
231
235
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
232
|
-
- spec/dummy/config/
|
233
|
-
- spec/dummy/config/
|
234
|
-
- spec/dummy/config/
|
235
|
-
- 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
|
236
241
|
- spec/dummy/config.ru
|
237
|
-
- spec/dummy/
|
238
|
-
- spec/dummy/
|
239
|
-
- spec/dummy/db/schema.rb
|
240
|
-
- spec/dummy/public/404.html
|
242
|
+
- spec/dummy/Rakefile
|
243
|
+
- spec/dummy/public/favicon.ico
|
241
244
|
- spec/dummy/public/422.html
|
242
245
|
- spec/dummy/public/500.html
|
243
|
-
- spec/dummy/public/
|
244
|
-
- 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
|
245
250
|
- spec/dummy/README.rdoc
|
246
|
-
- spec/effective_email_templates_spec.rb
|
247
|
-
- spec/factories/email_template.rb
|
248
|
-
- spec/factories/user.rb
|
249
251
|
- spec/factory_spec.rb
|
250
|
-
- spec/lib/effective_email_templates/template_importer_spec.rb
|
251
252
|
- spec/mailers/liquid_resolved_mailer_spec.rb
|
252
253
|
- spec/models/email_template_spec.rb
|
253
254
|
- spec/models/user_spec.rb
|
254
|
-
- spec/
|
255
|
-
- 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
|