mr_common 1.0.5 → 1.1.0

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: 7e1538111cda9e8ccd06735902be3b7c9ae49f62b60bdc0255d0d03bae774a18
4
- data.tar.gz: a3ad001848e52d06f356908af852e0bd38bf2736840757bbaf89eee3872abd4f
3
+ metadata.gz: cc4a4a712e4796b70a13f856f55a3d840119ade02c2c2b94f8e3f5c11758a65d
4
+ data.tar.gz: 4b260c79d0dc81f9efbde8c4ff168802db0ca042680bedeaed2e7c96558d656f
5
5
  SHA512:
6
- metadata.gz: 5f0a2a1385dfa1be6567296dbe45bf59d51b39429cad207876efcd2045052826f7afcb4325b9dcf4223bae098473dc9466a44f48612516ad0487260024fa3e86
7
- data.tar.gz: a0d5eb0fa49a08bb4932e45ea397d28daf4eb354e0e9e04bda8c576cb8b0bb2f4eca3433bbdae7cd17a451e5beb073d881eaa38f55b25f47797751b33feb422c
6
+ metadata.gz: 5cb3d5d4e13c135c87c9534dcc3f9592f5ab87215a42950b42b0dca67fac9d324e159ce4a96135910ff9ddb9998a12a89206cd76cc481210b433c2f3155eaec5
7
+ data.tar.gz: 6d6c5275d16e58342b4be91603628c61f8b385a7d1642a67096196863727ae0e789f67451b2f9f5ded12658a005bb80f35d00465968d79ba13869934b3726d9e
@@ -0,0 +1,12 @@
1
+ Description:
2
+ Copy bare-bones view templates for overriding the ugly
3
+ defaults that come with the engine.
4
+
5
+ Example:
6
+ rails generate mr_common:views
7
+
8
+ This will create view overrides for customization at:
9
+ app/views/mr_common/registrations/public/new.html.erb
10
+ app/views/mr_common/registrations/success/index.html.erb
11
+ app/views/mr_common/registration_mailer/confirmation.html.erb
12
+ app/views/mr_common/registration_mailer/confirmation.text.erb
@@ -0,0 +1,4 @@
1
+ <h1>Thanks for registering</h1>
2
+ <p>Don't forget to download the reminder and add it to your calendar.</p>
3
+
4
+ <%= render 'mr_common/registration_mailer/html_reminders' %>
@@ -0,0 +1,6 @@
1
+ Thanks for registering
2
+ ---
3
+
4
+ Don't forget to download the reminder and add it to your calendar.
5
+
6
+ <%= render 'mr_common/registration_mailer/text_reminders' %>
@@ -0,0 +1,6 @@
1
+ <div class="row">
2
+ <div class="col">
3
+ <h1>New Registration</h1>
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
@@ -0,0 +1,2 @@
1
+ <h1>Thank you</h1>
2
+ <p>We've sent you a confirmation email with a link to a calendar reminder for the event.</p>
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MrCommon
4
+ class ViewsGenerator < Rails::Generators::Base
5
+ desc "Copy bare-bones view templates for overriding the ugly
6
+ defaults that come with the engine."
7
+
8
+ source_root File.expand_path("templates", __dir__)
9
+
10
+ def copy_skeleton_views
11
+ template_paths.each do |file|
12
+ copy_file file, "app/views/#{file}"
13
+ end
14
+ end
15
+
16
+ private
17
+
18
+ def template_paths
19
+ %w( mr_common/registrations/public/new.html.erb
20
+ mr_common/registrations/success/index.html.erb
21
+ mr_common/registration_mailer/confirmation.html.erb
22
+ mr_common/registration_mailer/confirmation.text.erb )
23
+ end
24
+ end
25
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MrCommon
4
- VERSION = "1.0.5"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mr_common
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Smedstad
@@ -234,6 +234,12 @@ files:
234
234
  - db/migrate/20190110202347_create_reminders.rb
235
235
  - db/migrate/20190122185500_create_registrations.rb
236
236
  - db/migrate/20190124160301_add_include_to_reminders.rb
237
+ - lib/generators/mr_common/views/USAGE
238
+ - lib/generators/mr_common/views/templates/mr_common/registration_mailer/confirmation.html.erb
239
+ - lib/generators/mr_common/views/templates/mr_common/registration_mailer/confirmation.text.erb
240
+ - lib/generators/mr_common/views/templates/mr_common/registrations/public/new.html.erb
241
+ - lib/generators/mr_common/views/templates/mr_common/registrations/success/index.html.erb
242
+ - lib/generators/mr_common/views/views_generator.rb
237
243
  - lib/mr_common.rb
238
244
  - lib/mr_common/engine.rb
239
245
  - lib/mr_common/version.rb