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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ac2287e1ec548713c501e38e81ed0b8fc66af895
4
- data.tar.gz: 566120346fa51372eba86699776cd2127aae5bb8
2
+ SHA256:
3
+ metadata.gz: c60f871f30ff1ce2c6f2adbccc31e906b8d19fba696bbd456f1e8f9b17064215
4
+ data.tar.gz: d41c1d401f35199b7ec8b80046cade8a364611cd1771bf1e62976fc2a4c27ac7
5
5
  SHA512:
6
- metadata.gz: 7c99e05a76946141c79c4152f4cfb19454cdca327df63ff30ff612dfae5908a7ef7d43657354dea08148843a841a45392bb38ca7eb7c72f04a1ce2992df3f526
7
- data.tar.gz: acb684eee2d2421c28747797f8c66be8e2078cca451aa0956ced2623520ea1283930f7b6a2f911cc7e02af23787b77f473fafb1549f8226d4e16885a7c9acf8e
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
- unless Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
2
- class EffectiveEmailTemplatesDatatable < Effective::Datatable
3
- datatable do
4
- order :subject, :asc
1
+ class EffectiveEmailTemplatesDatatable < Effective::Datatable
2
+ datatable do
3
+ order :subject, :asc
5
4
 
6
- col :id, visible: false
7
- col :slug
8
- col :subject
9
- col :from
10
- col :cc, visible: false, label: 'CC'
11
- col :bcc, visible: false, label: 'BCC'
12
- col :body, visible: false
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
- actions_col partial: '/admin/email_templates/actions', partial_as: 'email_template'
15
- end
13
+ actions_col partial: '/admin/email_templates/actions', partial_as: 'email_template'
14
+ end
16
15
 
17
- collection do
18
- Effective::EmailTemplate.all
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
@@ -23,6 +23,10 @@ module EffectiveEmailTemplates
23
23
  effective_email_template.render(view.assigns['to_liquid'])
24
24
  end
25
25
 
26
+ def format
27
+ :html
28
+ end
29
+
26
30
  def formats
27
31
  [:html]
28
32
  end
@@ -36,4 +40,3 @@ module EffectiveEmailTemplates
36
40
  end
37
41
  end
38
42
  end
39
-
@@ -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")
@@ -1,3 +1,3 @@
1
1
  module EffectiveEmailTemplates
2
- VERSION = '0.4.5'.freeze
2
+ VERSION = '0.6.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: 0.4.5
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: 2017-06-19 00:00:00.000000000 Z
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
- rubyforge_project:
201
- rubygems_version: 2.4.6
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/controllers/admin/email_templates_controller_spec.rb
207
- - spec/dummy/app/assets/javascripts/application.js
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/views/welcome/index.html.haml
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/bin/rake
221
- - spec/dummy/config/application.rb
222
- - spec/dummy/config/boot.rb
223
- - spec/dummy/config/database.yml
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/initializers/assets.rb
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/locales/devise.en.yml
239
- - spec/dummy/config/locales/en.yml
240
- - spec/dummy/config/routes.rb
241
- - spec/dummy/config/secrets.yml
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/db/migrate/20141126222940_devise_create_users.rb
244
- - spec/dummy/db/migrate/20141126222941_create_effective_email_templates.rb
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/favicon.ico
250
- - spec/dummy/Rakefile
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/sanity_spec.rb
261
- - spec/spec_helper.rb
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