rails_app_generator 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/after_templates/addons/acts_as_list/app/views/home/index.html.erb +0 -12
- data/after_templates/addons/chartkick/_.rb +58 -0
- data/after_templates/addons/chartkick/app/controllers/home_controller.rb +4 -0
- data/after_templates/addons/chartkick/app/views/home/index.html.erb +38 -0
- data/after_templates/addons/chartkick/app/views/layouts/_alerts.html.erb +2 -0
- data/after_templates/addons/chartkick/app/views/layouts/_footer.html.erb +3 -0
- data/after_templates/addons/chartkick/app/views/layouts/_navbar.html.erb +7 -0
- data/after_templates/addons/chartkick/app/views/layouts/application.html.erb +28 -0
- data/after_templates/addons/chartkick/app/views/people/_person.html.erb +6 -0
- data/after_templates/addons/chartkick/config/initializers/chartkick.rb +1 -0
- data/after_templates/addons/chartkick/db/seeds.rb +17 -0
- data/lib/rails_app_generator/add_on.rb +16 -5
- data/lib/rails_app_generator/addons/chartkick.rb +40 -0
- data/lib/rails_app_generator/addons/groupdate.rb +31 -0
- data/lib/rails_app_generator/app_generator.rb +39 -2
- data/lib/rails_app_generator/options/rails_options.rb +2 -0
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/chartkick.json +14 -0
- data/templates/thor_task/addon/addon.tt +9 -1
- data/templates/thor_task/profile/app/views/home/index.html.erb.tt +0 -12
- data/templates/thor_task/profile/app/views/layouts/_navbar.html.erb +4 -4
- metadata +15 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fcac12a1550dd43ed855c200f83f4fcec96ec986735fbbde0f4524d304960a2
|
4
|
+
data.tar.gz: adc321839e7b83b5544f64657ddc9b33a9cf0206e1fa13a030cf9e5aa72b4bcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8967d4f2630dc7a6165c465ac8b85f5f3118630e6da671c210853184221a8062904643c1fe3bcf8d8dbfc77d3dba6cb05d209b96b9fafe18a9a13e616075db0b
|
7
|
+
data.tar.gz: 4c7d0230ea47a7274f6223fb0f8d0d3034cd546cd21741162ab4d301da08dc9365ff80c06251f6130a103a7b691dd95b227409210f59d4fdda1ac4bf8b79abfb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.1.17](https://github.com/klueless-io/rails_app_generator/compare/v0.1.16...v0.1.17) (2022-08-05)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* addon browser ([a1fae1d](https://github.com/klueless-io/rails_app_generator/commit/a1fae1d3ee5e5ecabe53fb5ac60d8067477f39b1))
|
7
|
+
|
1
8
|
## [0.1.16](https://github.com/klueless-io/rails_app_generator/compare/v0.1.15...v0.1.16) (2022-08-05)
|
2
9
|
|
3
10
|
|
@@ -9,15 +9,3 @@
|
|
9
9
|
<h1>Acts as list</h1>
|
10
10
|
|
11
11
|
<h2>This "acts_as" extension provides the capabilities for sorting and reordering a number of objects in a list. The class that has this specified needs to have a "position" column defined as an integer on the mapped database table.</h2>
|
12
|
-
|
13
|
-
<!--
|
14
|
-
Add/Remove as needed
|
15
|
-
-->
|
16
|
-
|
17
|
-
<!--
|
18
|
-
<= link_to 'Some Action', home_some_action_path %>
|
19
|
-
|
20
|
-
<= link_to 'Products', products_path %> |
|
21
|
-
<= link_to 'Posts', posts_path %> |
|
22
|
-
<= link_to 'People', people_path %>
|
23
|
-
-->
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# require 'pry'
|
4
|
+
|
5
|
+
# Create beautiful JavaScript charts with one line of Ruby
|
6
|
+
#
|
7
|
+
# exe/rag addons/chartkick
|
8
|
+
|
9
|
+
self.local_template_path = File.dirname(__FILE__)
|
10
|
+
|
11
|
+
gac 'base rails 7 image created'
|
12
|
+
|
13
|
+
add_controller('home', 'index')
|
14
|
+
route("root 'home#index'")
|
15
|
+
|
16
|
+
force_copy
|
17
|
+
|
18
|
+
copy_file 'app/controllers/home_controller.rb' , 'app/controllers/home_controller.rb'
|
19
|
+
copy_file 'app/views/home/index.html.erb' , 'app/views/home/index.html.erb'
|
20
|
+
|
21
|
+
copy_file 'app/views/layouts/_alerts.html.erb' , 'app/views/layouts/_alerts.html.erb'
|
22
|
+
copy_file 'app/views/layouts/_navbar.html.erb' , 'app/views/layouts/_navbar.html.erb'
|
23
|
+
copy_file 'app/views/layouts/_footer.html.erb' , 'app/views/layouts/_footer.html.erb'
|
24
|
+
template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
|
25
|
+
|
26
|
+
template 'db/seeds.rb' , 'db/seeds.rb'
|
27
|
+
|
28
|
+
copy_file 'config/initializers/chartkick.rb' , 'config/initializers/chartkick.rb'
|
29
|
+
|
30
|
+
after_bundle do
|
31
|
+
setup_db
|
32
|
+
db_seed
|
33
|
+
end
|
34
|
+
|
35
|
+
def setup_db
|
36
|
+
add_scaffold('yogurt', 'flavour')
|
37
|
+
# add_scaffold('post', 'title', 'body:text')
|
38
|
+
add_scaffold('people', 'name')
|
39
|
+
copy_file 'app/views/people/_person.html.erb' , 'app/views/people/_person.html.erb'
|
40
|
+
|
41
|
+
# add_scaffold('product', 'name', 'price:integer')
|
42
|
+
|
43
|
+
db_migrate
|
44
|
+
end
|
45
|
+
|
46
|
+
# Other template command examples
|
47
|
+
# css_install('tailwind')
|
48
|
+
# rails_command('db:migrate')
|
49
|
+
# bundle_add('hotwire-rails')
|
50
|
+
# rails_command('hotwire:install')
|
51
|
+
# run('bin/importmap pin sortablejs')
|
52
|
+
# run('npm install daisyui')
|
53
|
+
# create_file 'app/assets/stylesheets/custom-bootstrap-import.scss' , read_template('custom-bootstrap-import.scss')
|
54
|
+
# append_to_file 'app/assets/config/manifest.js' , read_template('manifest.js')
|
55
|
+
# insert_into_file 'app/views/layouts/application.html.erb', read_template('application.html.erb'),
|
56
|
+
# before: %( <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>)
|
57
|
+
# gsub_file 'app/views/layouts/application.html.erb', %(container mx-auto mt-28 px-5 flex), 'container mx-auto px-5'
|
58
|
+
# template 'home.css', 'app/assets/stylesheets/home.css'
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<style>
|
2
|
+
.alert { color: red; }
|
3
|
+
.notice { color: green; }
|
4
|
+
</style>
|
5
|
+
|
6
|
+
<% flash.each do |type, msg| %><div class="<%= type %>"><%= msg %></div><% end %>
|
7
|
+
<% if flash.any? %><hr /><% end %>
|
8
|
+
|
9
|
+
<h1>Chartkick</h1>
|
10
|
+
|
11
|
+
<h2>Create beautiful JavaScript charts with one line of Ruby</h2>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<a href="https://chartkick.com/">Chartkick</a> is a simple, yet powerful library for creating beautiful charts with one line of Ruby.
|
15
|
+
It is built on top of the <a href="http://www.chartjs.org/">Chart.js</a> library.</p>
|
16
|
+
|
17
|
+
<h3>Line Chart</h3><br /><br />
|
18
|
+
<%= line_chart Person.group_by_day(:updated_at).count %>
|
19
|
+
|
20
|
+
<br /><br />
|
21
|
+
<h3>Pie Chart via Query</h3><br /><br />
|
22
|
+
<%= pie_chart Yogurt.group(:flavour).count %>
|
23
|
+
|
24
|
+
<h3>Pie Chart (Manual)</h3><br /><br />
|
25
|
+
|
26
|
+
<%= pie_chart [
|
27
|
+
['Task', 'Hours per Day'],
|
28
|
+
['Work',11],
|
29
|
+
['Eat',2],
|
30
|
+
['Commute',2],
|
31
|
+
['Watch TV', 2],
|
32
|
+
['Sleep',7]
|
33
|
+
]
|
34
|
+
%>
|
35
|
+
|
36
|
+
<h3>Column Chart</h3><br /><br />
|
37
|
+
|
38
|
+
<%= column_chart Person.group_by_hour_of_day(:updated_at, format: "%l %P").count %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= camelized %></title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<%%= csrf_meta_tags %>
|
7
|
+
<%%= csp_meta_tag %>
|
8
|
+
|
9
|
+
<%- if options[:skip_hotwire] || options[:skip_javascript] -%>
|
10
|
+
<%%= stylesheet_link_tag "application" %>
|
11
|
+
<%- else -%>
|
12
|
+
<%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
13
|
+
<%- end -%>
|
14
|
+
<style>
|
15
|
+
.alert { color: red; }
|
16
|
+
.notice { color: green; }
|
17
|
+
</style>
|
18
|
+
</head>
|
19
|
+
|
20
|
+
<body>
|
21
|
+
<%%= render 'layouts/navbar' %>
|
22
|
+
<main>
|
23
|
+
<%%= render 'layouts/alerts' %>
|
24
|
+
<%%= yield %>
|
25
|
+
</main>
|
26
|
+
<%%= render 'layouts/footer' %>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
# Custom initializer for rails application
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
|
3
|
+
#
|
4
|
+
# User.find_or_create_by(email: "admin@admin.com") do |user|
|
5
|
+
# user.name = 'Admin'
|
6
|
+
# user.password = 'password'
|
7
|
+
# user.admin = true
|
8
|
+
# end
|
9
|
+
|
10
|
+
flavours = %w[Blueberry Strawberry Banana Raspberry Apple Grape]
|
11
|
+
50.times do
|
12
|
+
Yogurt.create(flavour: flavours.sample)
|
13
|
+
end
|
14
|
+
50.times do
|
15
|
+
person = Person.create(name: Faker::Name.name)
|
16
|
+
person.update!(updated_at: Faker::Time.between_dates(from: 20.days.ago, to: Date.today, period: :day) + 10.hours)
|
17
|
+
end
|
@@ -82,12 +82,23 @@ module RailsAppGenerator
|
|
82
82
|
# rubocop:enable Metrics/BlockLength
|
83
83
|
|
84
84
|
class << self
|
85
|
-
|
86
|
-
|
87
|
-
return unless instance.uses?
|
85
|
+
# attr_reader :before_bundle_callback
|
86
|
+
# attr_reader :after_bundle_callback
|
88
87
|
|
89
|
-
|
90
|
-
|
88
|
+
# def before_bundle(&block)
|
89
|
+
# @before_bundle_callback = block
|
90
|
+
# end
|
91
|
+
|
92
|
+
# def after_bundle(&block)
|
93
|
+
# @after_bundle_callback = block
|
94
|
+
# end
|
95
|
+
|
96
|
+
# def apply(context = Context.new({}))
|
97
|
+
# instance = new(context)
|
98
|
+
# return unless instance.uses?
|
99
|
+
|
100
|
+
# instance.apply
|
101
|
+
# end
|
91
102
|
|
92
103
|
def get(addon)
|
93
104
|
addon = addon.to_s.capitalize.camelize
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsAppGenerator
|
4
|
+
# Custom add-ons for RailsAppGenerator
|
5
|
+
module AddOns
|
6
|
+
# Add Chartkick to rails application
|
7
|
+
class Chartkick < AddOn
|
8
|
+
required_gem gem.version('chartkick', '4.2.1', 'Create beautiful JavaScript charts with one line of Ruby')
|
9
|
+
|
10
|
+
def apply
|
11
|
+
puts 'Applying Chartkick'
|
12
|
+
# say 'Setting up Chartkick'
|
13
|
+
# template('chartkick_template.rb', 'target/chartkick.rb', force: true)
|
14
|
+
# template('app/javascript/stylesheets/components.scss')
|
15
|
+
# create_file('target/chartkick.rb', 'put your content here')
|
16
|
+
# directory 'app/template', 'app/target', force: true
|
17
|
+
# empty_directory 'app/target'
|
18
|
+
# inject_into_file('app/application.js', "some content")
|
19
|
+
# rails_command('tailwindcss:install')
|
20
|
+
end
|
21
|
+
|
22
|
+
def before_bundle
|
23
|
+
puts 'Setting up Chartkick (before bundle)'
|
24
|
+
end
|
25
|
+
|
26
|
+
def after_bundle
|
27
|
+
puts 'Setting up Chartkick (after bundle)'
|
28
|
+
append_to_file('config/importmap.rb', <<~RUBY)
|
29
|
+
pin "chartkick", to: "chartkick.js"
|
30
|
+
pin "Chart.bundle", to: "Chart.bundle.js"
|
31
|
+
RUBY
|
32
|
+
|
33
|
+
append_to_file('app/javascript/application.js', <<~RUBY)
|
34
|
+
import "chartkick"
|
35
|
+
import "Chart.bundle"
|
36
|
+
RUBY
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsAppGenerator
|
4
|
+
# Custom add-ons for RailsAppGenerator
|
5
|
+
module AddOns
|
6
|
+
# Add Groupdate to rails application
|
7
|
+
class Groupdate < AddOn
|
8
|
+
required_gem gem.version('groupdate', '6.1.0', 'The simplest way to group temporal data')
|
9
|
+
|
10
|
+
# NOTE: in the examples, the Groupdate gem is used in conjunction with Chartkick.
|
11
|
+
def apply
|
12
|
+
say 'Setting up Groupdate'
|
13
|
+
# template('groupdate_template.rb', 'target/groupdate.rb', force: true)
|
14
|
+
# template('app/javascript/stylesheets/components.scss')
|
15
|
+
# create_file('target/groupdate.rb', 'put your content here')
|
16
|
+
# directory 'app/template', 'app/target', force: true
|
17
|
+
# empty_directory 'app/target'
|
18
|
+
# inject_into_file('app/application.js', "some content")
|
19
|
+
# rails_command('tailwindcss:install')
|
20
|
+
end
|
21
|
+
|
22
|
+
def before_bundle
|
23
|
+
say 'Setting up Groupdate - before bundle install'
|
24
|
+
end
|
25
|
+
|
26
|
+
def after_bundle
|
27
|
+
say 'Setting up Groupdate - after bundle install'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -14,7 +14,6 @@ module RailsAppGenerator
|
|
14
14
|
# aws-sdk-personalize 1.42.0 1.43.0
|
15
15
|
# aws-sdk-resources 3.136.0 3.137.0
|
16
16
|
# aws-sdk-wafv2 1.40.0 1.41.0
|
17
|
-
# browser 2.7.1 5.3.1 ~> 2.3 default
|
18
17
|
# capistrano-bundler 1.6.0 2.1.0 ~> 1.2 development, test
|
19
18
|
# capybara 3.33.0 3.37.1 = 3.33.0 development, test
|
20
19
|
# chartkick 2.3.5 4.2.1 ~> 2.3 default
|
@@ -160,6 +159,8 @@ module RailsAppGenerator
|
|
160
159
|
# NEW GEM ADDONS
|
161
160
|
class_option :add_acts_as_list , type: :boolean, default: false
|
162
161
|
class_option :add_browser , type: :boolean, default: false
|
162
|
+
class_option :add_chartkick , type: :boolean, default: false
|
163
|
+
class_option :add_groupdate , type: :boolean, default: false
|
163
164
|
class_option :add_faker , type: :boolean, default: false
|
164
165
|
class_option :add_honeybadger , type: :boolean, default: false
|
165
166
|
class_option :add_rails_html_sanitizer , type: :boolean, default: false
|
@@ -208,10 +209,18 @@ module RailsAppGenerator
|
|
208
209
|
end
|
209
210
|
end
|
210
211
|
|
212
|
+
attr_reader :addon_instances
|
213
|
+
|
214
|
+
# attr_reader :before_bundle_addon_callbacks
|
215
|
+
# attr_reader :after_bundle_addon_callbacks
|
216
|
+
|
211
217
|
def initialize(*args)
|
212
218
|
super
|
213
219
|
|
214
220
|
@force_copy = false
|
221
|
+
@addon_instances = []
|
222
|
+
# @before_bundle_addon_callbacks = []
|
223
|
+
# @after_bundle_addon_callbacks = []
|
215
224
|
|
216
225
|
# puts '----------------------------------------------------'
|
217
226
|
# puts options
|
@@ -298,8 +307,10 @@ module RailsAppGenerator
|
|
298
307
|
add_if(:acts_as_list)
|
299
308
|
add_if(:annotate)
|
300
309
|
add_if(:browser)
|
310
|
+
add_if(:chartkick)
|
301
311
|
add_if(:continuous_integration)
|
302
312
|
add_if(:devise)
|
313
|
+
add_if(:groupdate)
|
303
314
|
add_if(:factory_bot)
|
304
315
|
add_if(:faker)
|
305
316
|
add_if(:generators)
|
@@ -319,6 +330,12 @@ module RailsAppGenerator
|
|
319
330
|
end
|
320
331
|
# rubocop:enable Metrics/AbcSize
|
321
332
|
|
333
|
+
def run_after_bundle_callbacks
|
334
|
+
addon_instances.select { |addon| addon.respond_to?(:before_bundle) }.each(&:before_bundle)
|
335
|
+
super
|
336
|
+
addon_instances.select { |addon| addon.respond_to?(:after_bundle) }.each(&:after_bundle)
|
337
|
+
end
|
338
|
+
|
322
339
|
no_commands do
|
323
340
|
# https://codingpackets.com/blog/rails-generators-cheat-sheet/
|
324
341
|
|
@@ -472,10 +489,22 @@ module RailsAppGenerator
|
|
472
489
|
addon = addon.to_s.capitalize.camelize
|
473
490
|
addon = "RailsAppGenerator::AddOns::#{addon}"
|
474
491
|
|
475
|
-
addon.constantize.
|
492
|
+
addon_instance = addon.constantize.new(context)
|
493
|
+
|
494
|
+
if addon_instance.uses?
|
495
|
+
addon_instance.apply
|
496
|
+
@addon_instances << addon_instance
|
497
|
+
end
|
476
498
|
end
|
477
499
|
end
|
478
500
|
|
501
|
+
# def apply(context = Context.new({}))
|
502
|
+
# instance = new(context)
|
503
|
+
# return unless instance.uses?
|
504
|
+
|
505
|
+
# instance.apply
|
506
|
+
# end
|
507
|
+
|
479
508
|
def add_if(addon)
|
480
509
|
add(addon) if active?(addon)
|
481
510
|
end
|
@@ -528,6 +557,14 @@ module RailsAppGenerator
|
|
528
557
|
def addon_gemfile_entries
|
529
558
|
active_addon_classes.flat_map(&:gem_entries)
|
530
559
|
end
|
560
|
+
|
561
|
+
# def addon_before_bundle_callbacks
|
562
|
+
# active_addon_classes.flat_map(&:before_bundle_callback).compact
|
563
|
+
# end
|
564
|
+
|
565
|
+
# def addon_after_bundle_callbacks
|
566
|
+
# active_addon_classes.flat_map(&:after_bundle_callback).compact
|
567
|
+
# end
|
531
568
|
end
|
532
569
|
|
533
570
|
protected
|
@@ -61,7 +61,9 @@ module RailsAppGenerator
|
|
61
61
|
# NEW GEM ADDONS
|
62
62
|
register_option :add_acts_as_list , type: :boolean, default: false
|
63
63
|
register_option :add_browser , type: :boolean, default: false
|
64
|
+
register_option :add_chartkick , type: :boolean, default: false
|
64
65
|
register_option :add_faker , type: :boolean, default: false
|
66
|
+
register_option :add_groupdate , type: :boolean, default: false
|
65
67
|
register_option :add_honeybadger , type: :boolean, default: false
|
66
68
|
register_option :add_rails_html_sanitizer , type: :boolean, default: false
|
67
69
|
register_option :add_twilio_ruby , type: :boolean, default: false
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "rails_app_generator",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.18",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "rails_app_generator",
|
9
|
-
"version": "0.1.
|
9
|
+
"version": "0.1.18",
|
10
10
|
"dependencies": {
|
11
11
|
"daisyui": "^2.20.0"
|
12
12
|
},
|
data/package.json
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"args": {
|
3
|
+
"app_path": "chartkick",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
|
5
|
+
},
|
6
|
+
"opts": {
|
7
|
+
"skip_git": true,
|
8
|
+
"skip_test": true,
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/chartkick/_.rb",
|
10
|
+
"add_chartkick": true,
|
11
|
+
"add_groupdate": true,
|
12
|
+
"add_faker": true
|
13
|
+
}
|
14
|
+
}
|
@@ -14,7 +14,7 @@ module RailsAppGenerator
|
|
14
14
|
class <%= data.name_camel %> < AddOn
|
15
15
|
<%= data.addon_config_code %>
|
16
16
|
def apply
|
17
|
-
|
17
|
+
say 'Setting up <%= data.name_camel %>'
|
18
18
|
# template('<%= data.name_snake%>_template.rb', 'target/<%= data.name_snake%>.rb', force: true)
|
19
19
|
# template('app/javascript/stylesheets/components.scss')
|
20
20
|
# create_file('target/<%= data.name_snake%>.rb', 'put your content here')
|
@@ -23,6 +23,14 @@ module RailsAppGenerator
|
|
23
23
|
# inject_into_file('app/application.js', "some content")
|
24
24
|
# rails_command('tailwindcss:install')
|
25
25
|
end
|
26
|
+
|
27
|
+
def before_bundle
|
28
|
+
say 'Setting up <%= data.name_camel %> - before bundle install'
|
29
|
+
end
|
30
|
+
|
31
|
+
def after_bundle
|
32
|
+
say 'Setting up <%= data.name_camel %> - after bundle install'
|
33
|
+
end
|
26
34
|
end
|
27
35
|
end
|
28
36
|
end
|
@@ -9,15 +9,3 @@
|
|
9
9
|
<h1><%= data.name_human %></h1>
|
10
10
|
|
11
11
|
<h2><%= data.description %></h2>
|
12
|
-
|
13
|
-
<!--
|
14
|
-
Add/Remove as needed
|
15
|
-
-->
|
16
|
-
|
17
|
-
<!--
|
18
|
-
<= link_to 'Some Action', home_some_action_path %>
|
19
|
-
|
20
|
-
<= link_to 'Products', products_path %> |
|
21
|
-
<= link_to 'Posts', posts_path %> |
|
22
|
-
<= link_to 'People', people_path %>
|
23
|
-
-->
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<header>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
<%= link_to 'Home', root_path %> |
|
3
|
+
<%# link_to 'Products', products_path %> |
|
4
|
+
<%# link_to 'Posts', posts_path %> |
|
5
|
+
<%# link_to 'People', people_path %>
|
6
6
|
<hr />
|
7
7
|
</header>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_app_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootsnap
|
@@ -177,6 +177,16 @@ files:
|
|
177
177
|
- after_templates/addons/browser/_.rb
|
178
178
|
- after_templates/addons/browser/app/controllers/home_controller.rb
|
179
179
|
- after_templates/addons/browser/app/views/home/index.html.erb
|
180
|
+
- after_templates/addons/chartkick/_.rb
|
181
|
+
- after_templates/addons/chartkick/app/controllers/home_controller.rb
|
182
|
+
- after_templates/addons/chartkick/app/views/home/index.html.erb
|
183
|
+
- after_templates/addons/chartkick/app/views/layouts/_alerts.html.erb
|
184
|
+
- after_templates/addons/chartkick/app/views/layouts/_footer.html.erb
|
185
|
+
- after_templates/addons/chartkick/app/views/layouts/_navbar.html.erb
|
186
|
+
- after_templates/addons/chartkick/app/views/layouts/application.html.erb
|
187
|
+
- after_templates/addons/chartkick/app/views/people/_person.html.erb
|
188
|
+
- after_templates/addons/chartkick/config/initializers/chartkick.rb
|
189
|
+
- after_templates/addons/chartkick/db/seeds.rb
|
180
190
|
- after_templates/addons/faker/_.rb
|
181
191
|
- after_templates/addons/faker/app/controllers/home_controller.rb
|
182
192
|
- after_templates/addons/faker/app/views/home/index.html.erb
|
@@ -331,6 +341,7 @@ files:
|
|
331
341
|
- lib/rails_app_generator/addons/acts_as_list.rb
|
332
342
|
- lib/rails_app_generator/addons/annotate.rb
|
333
343
|
- lib/rails_app_generator/addons/browser.rb
|
344
|
+
- lib/rails_app_generator/addons/chartkick.rb
|
334
345
|
- lib/rails_app_generator/addons/continuous_integration.rb
|
335
346
|
- lib/rails_app_generator/addons/devise.rb
|
336
347
|
- lib/rails_app_generator/addons/docker.rb
|
@@ -340,6 +351,7 @@ files:
|
|
340
351
|
- lib/rails_app_generator/addons/faker.rb
|
341
352
|
- lib/rails_app_generator/addons/foreman.rb
|
342
353
|
- lib/rails_app_generator/addons/generators.rb
|
354
|
+
- lib/rails_app_generator/addons/groupdate.rb
|
343
355
|
- lib/rails_app_generator/addons/high_voltage.rb
|
344
356
|
- lib/rails_app_generator/addons/honeybadger.rb
|
345
357
|
- lib/rails_app_generator/addons/inline_svg.rb
|
@@ -393,6 +405,7 @@ files:
|
|
393
405
|
- package.json
|
394
406
|
- profiles/addons/acts_as_list.json
|
395
407
|
- profiles/addons/browser.json
|
408
|
+
- profiles/addons/chartkick.json
|
396
409
|
- profiles/addons/faker.json
|
397
410
|
- profiles/addons/honeybadger.json
|
398
411
|
- profiles/addons/rails-html-sanitizer.json
|