effective_email_templates 0.5.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +22 -36
  4. data/app/controllers/admin/email_templates_controller.rb +25 -16
  5. data/app/datatables/effective_email_templates_datatable.rb +18 -16
  6. data/app/mailers/effective/email_templates_mailer.rb +22 -0
  7. data/app/models/effective/email_template.rb +66 -34
  8. data/app/views/admin/email_templates/_actions.html.haml +5 -2
  9. data/app/views/admin/email_templates/_form.html.haml +16 -9
  10. data/app/views/admin/email_templates/index.html.haml +1 -1
  11. data/app/views/layouts/effective_email_templates_mailer_layout.html.haml +7 -0
  12. data/config/effective_email_templates.rb +16 -25
  13. data/config/routes.rb +6 -8
  14. data/db/migrate/01_create_effective_email_templates.rb.erb +14 -8
  15. data/lib/effective_email_templates.rb +18 -14
  16. data/lib/effective_email_templates/engine.rb +1 -1
  17. data/lib/effective_email_templates/importer.rb +55 -0
  18. data/lib/effective_email_templates/version.rb +1 -1
  19. data/lib/generators/effective_email_templates/install_generator.rb +1 -1
  20. data/lib/tasks/effective_email_templates_tasks.rake +19 -0
  21. metadata +30 -142
  22. data/Rakefile +0 -23
  23. data/app/assets/javascripts/effective_email_templates.js +0 -1
  24. data/app/assets/stylesheets/effective_email_templates.css.scss +0 -1
  25. data/app/helpers/effective_email_templates_helper.rb +0 -19
  26. data/app/mailers/effective/email_template_mailer.rb +0 -14
  27. data/app/models/effective/datatables/email_templates.rb +0 -24
  28. data/app/views/effective/email_template_mailer/templated_email.html.haml +0 -1
  29. data/lib/effective/liquid_mailer.rb +0 -15
  30. data/lib/effective_email_templates/email_view_template.rb +0 -39
  31. data/lib/effective_email_templates/liquid_resolver.rb +0 -46
  32. data/lib/effective_email_templates/template_importer.rb +0 -51
  33. data/lib/tasks/effective_email_templates/import_default_views.rake +0 -19
  34. data/spec/controllers/admin/email_templates_controller_spec.rb +0 -60
  35. data/spec/dummy/README.rdoc +0 -28
  36. data/spec/dummy/Rakefile +0 -6
  37. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  38. data/spec/dummy/app/assets/stylesheets/application.css +0 -15
  39. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  40. data/spec/dummy/app/controllers/welcome_controller.rb +0 -4
  41. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  42. data/spec/dummy/app/mailers/liquid_resolved_mailer.rb +0 -9
  43. data/spec/dummy/app/mailers/user_liquid_mailer.rb +0 -10
  44. data/spec/dummy/app/models/user.rb +0 -15
  45. data/spec/dummy/app/views/layouts/application.html.erb +0 -17
  46. data/spec/dummy/app/views/user_liquid/after_create_user.liquid +0 -7
  47. data/spec/dummy/app/views/welcome/index.html.haml +0 -1
  48. data/spec/dummy/bin/bundle +0 -3
  49. data/spec/dummy/bin/rails +0 -4
  50. data/spec/dummy/bin/rake +0 -4
  51. data/spec/dummy/config.ru +0 -4
  52. data/spec/dummy/config/application.rb +0 -26
  53. data/spec/dummy/config/boot.rb +0 -5
  54. data/spec/dummy/config/database.yml +0 -25
  55. data/spec/dummy/config/environment.rb +0 -5
  56. data/spec/dummy/config/environments/development.rb +0 -37
  57. data/spec/dummy/config/environments/production.rb +0 -78
  58. data/spec/dummy/config/environments/test.rb +0 -40
  59. data/spec/dummy/config/initializers/assets.rb +0 -8
  60. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  61. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
  62. data/spec/dummy/config/initializers/devise.rb +0 -259
  63. data/spec/dummy/config/initializers/effective_email_templates.rb +0 -51
  64. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  65. data/spec/dummy/config/initializers/inflections.rb +0 -16
  66. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  67. data/spec/dummy/config/initializers/session_store.rb +0 -3
  68. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  69. data/spec/dummy/config/locales/devise.en.yml +0 -60
  70. data/spec/dummy/config/locales/en.yml +0 -23
  71. data/spec/dummy/config/routes.rb +0 -57
  72. data/spec/dummy/config/secrets.yml +0 -22
  73. data/spec/dummy/db/migrate/20141126222940_devise_create_users.rb +0 -42
  74. data/spec/dummy/db/migrate/20141126222941_create_effective_email_templates.rb +0 -20
  75. data/spec/dummy/db/schema.rb +0 -46
  76. data/spec/dummy/public/404.html +0 -67
  77. data/spec/dummy/public/422.html +0 -67
  78. data/spec/dummy/public/500.html +0 -66
  79. data/spec/dummy/public/favicon.ico +0 -0
  80. data/spec/effective_email_templates_spec.rb +0 -35
  81. data/spec/factories/email_template.rb +0 -12
  82. data/spec/factories/user.rb +0 -16
  83. data/spec/factory_spec.rb +0 -10
  84. data/spec/lib/effective_email_templates/template_importer_spec.rb +0 -73
  85. data/spec/mailers/liquid_resolved_mailer_spec.rb +0 -38
  86. data/spec/models/email_template_spec.rb +0 -61
  87. data/spec/models/user_spec.rb +0 -10
  88. data/spec/sanity_spec.rb +0 -7
  89. data/spec/spec_helper.rb +0 -26
@@ -1,11 +1,9 @@
1
- Rails.application.routes.draw do
2
- mount EffectiveEmailTemplates::Engine => '/', :as => 'effective_email_templates'
3
- end
4
-
5
1
  EffectiveEmailTemplates::Engine.routes.draw do
6
- if defined?(EffectiveDatatables)
7
- namespace :admin do
8
- resources :email_templates, only: [:index, :edit, :update]
9
- end
2
+ namespace :admin do
3
+ resources :email_templates
10
4
  end
11
5
  end
6
+
7
+ Rails.application.routes.draw do
8
+ mount EffectiveEmailTemplates::Engine => '/', as: 'effective_email_templates'
9
+ end
@@ -1,16 +1,22 @@
1
1
  class CreateEffectiveEmailTemplates < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  create_table <%= @email_templates_table_name %> do |t|
4
- t.string :subject
5
- t.string :from
6
- t.string :bcc
7
- t.string :cc
8
- t.string :slug, :null => false
9
- t.text :body, :null => false
10
- t.text :template, :null => false
4
+ t.string :subject
5
+ t.string :from
6
+ t.string :bcc
7
+ t.string :cc
8
+
9
+ t.string :content_type
10
+ t.text :body
11
+
12
+ t.string :template_name
13
+ t.text :template_body
14
+ t.text :template_subject
15
+ t.text :template_variables
16
+
17
+ t.timestamps
11
18
  end
12
19
 
13
- add_index <%= @email_templates_table_name %>, :slug
14
20
  end
15
21
 
16
22
  def self.down
@@ -1,33 +1,37 @@
1
- require "effective_email_templates/liquid_resolver"
2
- require "effective_email_templates/email_view_template"
3
- require "effective_email_templates/template_importer"
4
- require "effective_email_templates/version"
1
+ require "liquid"
5
2
  require "effective_email_templates/engine"
6
-
7
- require "effective/liquid_mailer"
8
- Effective::LiquidMailer.send(:append_view_path, EffectiveEmailTemplates::LiquidResolver.new)
3
+ require "effective_email_templates/version"
9
4
 
10
5
  module EffectiveEmailTemplates
11
6
 
12
7
  mattr_accessor :email_templates_table_name
13
8
  mattr_accessor :authorization_method
14
- mattr_accessor :simple_form_options
15
9
  mattr_accessor :layout
10
+ mattr_accessor :mailer
16
11
 
17
12
  def self.setup
18
13
  yield self
19
14
  end
20
15
 
21
16
  def self.authorized?(controller, action, resource)
22
- if authorization_method.respond_to?(:call) || authorization_method.kind_of?(Symbol)
23
- raise Effective::AccessDenied.new() unless (controller || self).instance_exec(controller, action, resource, &authorization_method)
17
+ @_exceptions ||= [Effective::AccessDenied, (CanCan::AccessDenied if defined?(CanCan)), (Pundit::NotAuthorizedError if defined?(Pundit))].compact
18
+
19
+ return !!authorization_method unless authorization_method.respond_to?(:call)
20
+ controller = controller.controller if controller.respond_to?(:controller)
21
+
22
+ begin
23
+ !!(controller || self).instance_exec((controller || self), action, resource, &authorization_method)
24
+ rescue *@_exceptions
25
+ false
24
26
  end
25
- true
26
27
  end
27
28
 
28
- def self.get(slug)
29
- Effective::EmailTemplate.find_by_slug(slug) || Effective::EmailTemplate.new(slug: slug)
29
+ def self.authorize!(controller, action, resource)
30
+ raise Effective::AccessDenied.new('Access Denied', action, resource) unless authorized?(controller, action, resource)
30
31
  end
31
32
 
32
- end
33
+ def self.permitted_params
34
+ [:from, :bcc, :cc, :subject, :body, :content_type]
35
+ end
33
36
 
37
+ end
@@ -3,7 +3,7 @@ module EffectiveEmailTemplates
3
3
  engine_name 'effective_email_templates'
4
4
 
5
5
  # Set up our default configuration options.
6
- initializer "effective_email_templates.defaults", :before => :load_config_initializers do |app|
6
+ initializer 'effective_email_templates.defaults', before: :load_config_initializers do |app|
7
7
  eval File.read("#{config.root}/config/effective_email_templates.rb")
8
8
  end
9
9
 
@@ -0,0 +1,55 @@
1
+ module EffectiveEmailTemplates
2
+ class Importer
3
+ def self.import
4
+ new().execute(overwrite: false)
5
+ end
6
+
7
+ def self.overwrite
8
+ new().execute(overwrite: true)
9
+ end
10
+
11
+ def execute(overwrite:)
12
+ Dir[Rails.root.join('app', 'views', '**', '*.liquid')].each do |filepath|
13
+ name = File.basename(filepath, '.liquid')
14
+ email_template = Effective::EmailTemplate.find_or_initialize_by(template_name: name)
15
+
16
+ if email_template.persisted? && !overwrite
17
+ puts "SKIPPED #{filename(filepath)}"; next
18
+ end
19
+
20
+ save(email_template, filepath)
21
+ end
22
+ end
23
+
24
+ private
25
+
26
+ def save(email_template, filepath)
27
+ file = File.new(filepath, 'r')
28
+
29
+ attributes = begin
30
+ content = YAML.load(file)
31
+ content.kind_of?(Hash) ? content : {}
32
+ end
33
+
34
+ body = File.open(file) do |f|
35
+ content = f.read
36
+ match = content.match(/(---+(.|\n)+---+)/)
37
+ content.gsub(match[1], '').strip if match
38
+ end
39
+
40
+ email_template.assign_attributes(attributes)
41
+ email_template.assign_attributes(body: body)
42
+
43
+ if email_template.save
44
+ puts "SUCCESS #{filename(filepath)}"
45
+ else
46
+ puts "ERROR #{filename(filepath)}: #{email_template.errors.full_messages.to_sentence}"
47
+ end
48
+ end
49
+
50
+ def filename(filepath)
51
+ filepath.sub(Rails.root.to_s + '/app/', '')
52
+ end
53
+
54
+ end
55
+ end
@@ -1,3 +1,3 @@
1
1
  module EffectiveEmailTemplates
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '1.0.0'.freeze
3
3
  end
@@ -8,7 +8,7 @@ module EffectiveEmailTemplates
8
8
  source_root File.expand_path('../../templates', __FILE__)
9
9
 
10
10
  def self.next_migration_number(dirname)
11
- if not ActiveRecord::Base.timestamped_migrations
11
+ unless ActiveRecord::Base.timestamped_migrations
12
12
  Time.new.utc.strftime("%Y%m%d%H%M%S")
13
13
  else
14
14
  "%.3d" % (current_migration_number(dirname) + 1)
@@ -0,0 +1,19 @@
1
+ # rake effective_email_templates:import
2
+ # rake effective_email_templates:overwrite
3
+
4
+ namespace :effective_email_templates do
5
+ desc 'Import email templates from the filesystem to the database. Skips existing.'
6
+ task import: :environment do
7
+ require 'effective_email_templates/importer'
8
+ EffectiveEmailTemplates::Importer.import()
9
+ end
10
+
11
+ desc 'Overwrite email templates from the filesystem to the database. Overwrites existing.'
12
+ task overwrite: :environment do
13
+ puts 'WARNING: this task will overwrite existing email templates. Proceed? (y/n)'
14
+ (puts 'Aborted'; exit) unless STDIN.gets.chomp.downcase == 'y'
15
+
16
+ require 'effective_email_templates/importer'
17
+ EffectiveEmailTemplates::Importer.overwrite()
18
+ end
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_email_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.2.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: coffee-rails
28
+ name: liquid
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,27 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: liquid
42
+ name: coffee-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- - - "<"
45
+ - - ">="
49
46
  - !ruby/object:Gem::Version
50
- version: '4'
47
+ version: '0'
51
48
  type: :runtime
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
54
51
  requirements:
55
- - - "~>"
56
- - !ruby/object:Gem::Version
57
- version: '3.0'
58
- - - "<"
52
+ - - ">="
59
53
  - !ruby/object:Gem::Version
60
- version: '4'
54
+ version: '0'
61
55
  - !ruby/object:Gem::Dependency
62
- name: simple_form
56
+ name: effective_bootstrap
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
59
  - - ">="
@@ -78,15 +72,29 @@ dependencies:
78
72
  requirements:
79
73
  - - ">="
80
74
  - !ruby/object:Gem::Version
81
- version: 2.0.0
75
+ version: 4.0.0
82
76
  type: :runtime
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
80
  - - ">="
87
81
  - !ruby/object:Gem::Version
88
- version: 2.0.0
89
- description: Uses liquid templates
82
+ version: 4.0.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: effective_resources
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Effective Email Templates provides an admin access to modify email templates
90
98
  email:
91
99
  - info@codeandeffect.com
92
100
  executables: []
@@ -95,89 +103,25 @@ extra_rdoc_files: []
95
103
  files:
96
104
  - MIT-LICENSE
97
105
  - README.md
98
- - Rakefile
99
- - app/assets/javascripts/effective_email_templates.js
100
- - app/assets/stylesheets/effective_email_templates.css.scss
101
106
  - app/controllers/admin/email_templates_controller.rb
102
107
  - app/datatables/effective_email_templates_datatable.rb
103
- - app/helpers/effective_email_templates_helper.rb
104
- - app/mailers/effective/email_template_mailer.rb
108
+ - app/mailers/effective/email_templates_mailer.rb
105
109
  - app/models/effective/access_denied.rb
106
- - app/models/effective/datatables/email_templates.rb
107
110
  - app/models/effective/email_template.rb
108
111
  - app/views/admin/email_templates/_actions.html.haml
109
112
  - app/views/admin/email_templates/_form.html.haml
110
113
  - app/views/admin/email_templates/edit.html.haml
111
114
  - app/views/admin/email_templates/index.html.haml
112
- - app/views/effective/email_template_mailer/templated_email.html.haml
115
+ - app/views/layouts/effective_email_templates_mailer_layout.html.haml
113
116
  - config/effective_email_templates.rb
114
117
  - config/routes.rb
115
118
  - db/migrate/01_create_effective_email_templates.rb.erb
116
- - lib/effective/liquid_mailer.rb
117
119
  - lib/effective_email_templates.rb
118
- - lib/effective_email_templates/email_view_template.rb
119
120
  - lib/effective_email_templates/engine.rb
120
- - lib/effective_email_templates/liquid_resolver.rb
121
- - lib/effective_email_templates/template_importer.rb
121
+ - lib/effective_email_templates/importer.rb
122
122
  - lib/effective_email_templates/version.rb
123
123
  - lib/generators/effective_email_templates/install_generator.rb
124
- - lib/tasks/effective_email_templates/import_default_views.rake
125
- - spec/controllers/admin/email_templates_controller_spec.rb
126
- - spec/dummy/README.rdoc
127
- - spec/dummy/Rakefile
128
- - spec/dummy/app/assets/javascripts/application.js
129
- - spec/dummy/app/assets/stylesheets/application.css
130
- - spec/dummy/app/controllers/application_controller.rb
131
- - spec/dummy/app/controllers/welcome_controller.rb
132
- - spec/dummy/app/helpers/application_helper.rb
133
- - spec/dummy/app/mailers/liquid_resolved_mailer.rb
134
- - spec/dummy/app/mailers/user_liquid_mailer.rb
135
- - spec/dummy/app/models/user.rb
136
- - spec/dummy/app/views/layouts/application.html.erb
137
- - spec/dummy/app/views/user_liquid/after_create_user.liquid
138
- - spec/dummy/app/views/welcome/index.html.haml
139
- - spec/dummy/bin/bundle
140
- - spec/dummy/bin/rails
141
- - spec/dummy/bin/rake
142
- - spec/dummy/config.ru
143
- - spec/dummy/config/application.rb
144
- - spec/dummy/config/boot.rb
145
- - spec/dummy/config/database.yml
146
- - spec/dummy/config/environment.rb
147
- - spec/dummy/config/environments/development.rb
148
- - spec/dummy/config/environments/production.rb
149
- - spec/dummy/config/environments/test.rb
150
- - spec/dummy/config/initializers/assets.rb
151
- - spec/dummy/config/initializers/backtrace_silencers.rb
152
- - spec/dummy/config/initializers/cookies_serializer.rb
153
- - spec/dummy/config/initializers/devise.rb
154
- - spec/dummy/config/initializers/effective_email_templates.rb
155
- - spec/dummy/config/initializers/filter_parameter_logging.rb
156
- - spec/dummy/config/initializers/inflections.rb
157
- - spec/dummy/config/initializers/mime_types.rb
158
- - spec/dummy/config/initializers/session_store.rb
159
- - spec/dummy/config/initializers/wrap_parameters.rb
160
- - spec/dummy/config/locales/devise.en.yml
161
- - spec/dummy/config/locales/en.yml
162
- - spec/dummy/config/routes.rb
163
- - spec/dummy/config/secrets.yml
164
- - spec/dummy/db/migrate/20141126222940_devise_create_users.rb
165
- - spec/dummy/db/migrate/20141126222941_create_effective_email_templates.rb
166
- - spec/dummy/db/schema.rb
167
- - spec/dummy/public/404.html
168
- - spec/dummy/public/422.html
169
- - spec/dummy/public/500.html
170
- - spec/dummy/public/favicon.ico
171
- - spec/effective_email_templates_spec.rb
172
- - spec/factories/email_template.rb
173
- - spec/factories/user.rb
174
- - spec/factory_spec.rb
175
- - spec/lib/effective_email_templates/template_importer_spec.rb
176
- - spec/mailers/liquid_resolved_mailer_spec.rb
177
- - spec/models/email_template_spec.rb
178
- - spec/models/user_spec.rb
179
- - spec/sanity_spec.rb
180
- - spec/spec_helper.rb
124
+ - lib/tasks/effective_email_templates_tasks.rake
181
125
  homepage: https://github.com/code-and-effect/effective_email_templates
182
126
  licenses:
183
127
  - MIT
@@ -201,60 +145,4 @@ rubygems_version: 3.0.3
201
145
  signing_key:
202
146
  specification_version: 4
203
147
  summary: Effective Email Templates provides an admin access to modify email templates
204
- test_files:
205
- - spec/spec_helper.rb
206
- - spec/sanity_spec.rb
207
- - spec/dummy/app/mailers/user_liquid_mailer.rb
208
- - spec/dummy/app/mailers/liquid_resolved_mailer.rb
209
- - spec/dummy/app/models/user.rb
210
- - spec/dummy/app/controllers/application_controller.rb
211
- - spec/dummy/app/controllers/welcome_controller.rb
212
- - spec/dummy/app/views/welcome/index.html.haml
213
- - spec/dummy/app/views/layouts/application.html.erb
214
- - spec/dummy/app/views/user_liquid/after_create_user.liquid
215
- - spec/dummy/app/assets/javascripts/application.js
216
- - spec/dummy/app/assets/stylesheets/application.css
217
- - spec/dummy/app/helpers/application_helper.rb
218
- - spec/dummy/bin/rake
219
- - spec/dummy/bin/bundle
220
- - spec/dummy/bin/rails
221
- - spec/dummy/config/secrets.yml
222
- - spec/dummy/config/routes.rb
223
- - spec/dummy/config/locales/en.yml
224
- - spec/dummy/config/locales/devise.en.yml
225
- - spec/dummy/config/environments/production.rb
226
- - spec/dummy/config/environments/development.rb
227
- - spec/dummy/config/environments/test.rb
228
- - spec/dummy/config/environment.rb
229
- - spec/dummy/config/application.rb
230
- - spec/dummy/config/database.yml
231
- - spec/dummy/config/boot.rb
232
- - spec/dummy/config/initializers/backtrace_silencers.rb
233
- - spec/dummy/config/initializers/mime_types.rb
234
- - spec/dummy/config/initializers/filter_parameter_logging.rb
235
- - spec/dummy/config/initializers/session_store.rb
236
- - spec/dummy/config/initializers/wrap_parameters.rb
237
- - spec/dummy/config/initializers/assets.rb
238
- - spec/dummy/config/initializers/cookies_serializer.rb
239
- - spec/dummy/config/initializers/devise.rb
240
- - spec/dummy/config/initializers/inflections.rb
241
- - spec/dummy/config/initializers/effective_email_templates.rb
242
- - spec/dummy/config.ru
243
- - spec/dummy/Rakefile
244
- - spec/dummy/public/favicon.ico
245
- - spec/dummy/public/422.html
246
- - spec/dummy/public/500.html
247
- - spec/dummy/public/404.html
248
- - spec/dummy/db/schema.rb
249
- - spec/dummy/db/migrate/20141126222940_devise_create_users.rb
250
- - spec/dummy/db/migrate/20141126222941_create_effective_email_templates.rb
251
- - spec/dummy/README.rdoc
252
- - spec/factory_spec.rb
253
- - spec/mailers/liquid_resolved_mailer_spec.rb
254
- - spec/models/email_template_spec.rb
255
- - spec/models/user_spec.rb
256
- - spec/factories/email_template.rb
257
- - spec/factories/user.rb
258
- - spec/lib/effective_email_templates/template_importer_spec.rb
259
- - spec/effective_email_templates_spec.rb
260
- - spec/controllers/admin/email_templates_controller_spec.rb
148
+ test_files: []
data/Rakefile DELETED
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env rake
2
- begin
3
- require 'bundler/setup'
4
- rescue LoadError
5
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
- end
7
-
8
- # Our tasks
9
- load 'lib/tasks/effective_email_templates/import_default_views.rake'
10
-
11
- # Testing tasks
12
- APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
13
- load 'rails/tasks/engine.rake'
14
-
15
- Bundler::GemHelper.install_tasks
16
-
17
- require 'rspec/core'
18
- require 'rspec/core/rake_task'
19
-
20
- desc "Run all specs in spec directory (excluding plugin specs)"
21
- RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
22
-
23
- task :default => :spec