rails_app_generator 0.2.40 → 0.2.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/after_templates/addons/scenic/_.rb +64 -0
- data/after_templates/addons/scenic/app/controllers/home_controller.rb +24 -0
- data/after_templates/addons/scenic/app/services/seed_service.rb +104 -0
- data/after_templates/addons/scenic/app/views/home/index.html.erb +3 -0
- data/after_templates/addons/scenic/app/views/home/individual_visitors_by_monument.html.erb +24 -0
- data/after_templates/addons/scenic/app/views/home/reseed.html.erb +3 -0
- data/after_templates/addons/scenic/app/views/home/visitors_by_monument.html.erb +22 -0
- data/after_templates/addons/scenic/app/views/layouts/_footer.html.erb +0 -0
- data/after_templates/addons/scenic/app/views/layouts/_navbar.html.erb +10 -0
- data/after_templates/addons/scenic/app/views/layouts/application.html.erb +29 -0
- data/after_templates/addons/scenic/db/seeds.rb +1 -0
- data/after_templates/addons/scenic/db/views/individual_visitors_by_monuments_v01.sql +9 -0
- data/after_templates/addons/scenic/db/views/visitors_by_monuments_v01.sql +8 -0
- data/after_templates/application/klueless/_.rb +99 -0
- data/after_templates/application/klueless/app/avo/dashboards/dashboard.rb +13 -0
- data/after_templates/application/klueless/app/avo/resources/db_schema_resource.rb +12 -0
- data/after_templates/application/klueless/app/avo/resources/rails_app_resource.rb +15 -0
- data/after_templates/application/klueless/app/avo/resources/rubocop_resource.rb +12 -0
- data/after_templates/application/klueless/app/avo/resources/table_count_resource.rb +12 -0
- data/after_templates/application/klueless/app/avo/resources/user_resource.rb +24 -0
- data/after_templates/application/klueless/app/controllers/home_controller.rb +12 -0
- data/after_templates/application/klueless/app/models/db_schema.rb +11 -0
- data/after_templates/application/klueless/app/models/rails_app.rb +3 -0
- data/after_templates/application/klueless/app/models/rubocop.rb +11 -0
- data/after_templates/application/klueless/app/models/table_count.rb +11 -0
- data/after_templates/application/klueless/app/queries/rubocop_log.psql +23 -0
- data/after_templates/application/klueless/app/queries/rubocop_log_query.rb +10 -0
- data/after_templates/application/klueless/app/queries/sql_query.rb +40 -0
- data/after_templates/application/klueless/app/services/seed_service.rb +7 -0
- data/after_templates/application/klueless/app/views/home/index.html.erb +6 -0
- data/after_templates/application/klueless/app/views/home/quick_signin.html.erb +3 -0
- data/after_templates/application/klueless/app/views/layouts/_footer.html.erb +0 -0
- data/after_templates/application/klueless/app/views/layouts/_navbar.html.erb +4 -0
- data/after_templates/application/klueless/app/views/layouts/application.html.erb +29 -0
- data/after_templates/application/klueless/config/initializers/avo.rb +101 -0
- data/after_templates/application/klueless/config/locales/en.yml +4 -0
- data/after_templates/application/klueless/db/seeds.rb +18 -0
- data/after_templates/application/printspeak/_.rb +65 -23
- data/after_templates/application/printspeak/db/seeds.rb +3 -3
- data/docs/last_run/app_generator_class.json +8 -0
- data/docs/last_run/app_generator_data.json +5 -4
- data/docs/last_run/rails_options_class.json +8 -0
- data/docs/last_run/rails_options_data.json +5 -4
- data/lib/rails_app_generator/addons/avo.rb +2 -0
- data/lib/rails_app_generator/addons/scenic.rb +15 -0
- data/lib/rails_app_generator/app_generator.rb +10 -0
- data/lib/rails_app_generator/gem_query.rb +3 -1
- data/lib/rails_app_generator/rag_initializer.rb +2 -1
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/scenic.json +14 -0
- data/profiles/application/klueless.json +23 -0
- data/profiles/application/printspeak.json +7 -1
- data/tasks/profile.thor +1 -0
- data/templates/Gemfile.erb +0 -1
- data/templates/thor_task/profile/after_template.rb +19 -30
- data/templates/thor_task/profile/app/controllers/home_controller.rb +4 -0
- data/templates/thor_task/profile/app/services/seed_service.rb +27 -0
- data/templates/thor_task/profile/db/seeds.rb +1 -0
- metadata +43 -2
@@ -11,9 +11,10 @@ gac 'base rails 7 image created'
|
|
11
11
|
prepare_environment
|
12
12
|
|
13
13
|
after_bundle do
|
14
|
+
create_db
|
14
15
|
scaffolds
|
15
16
|
setup_customizations
|
16
|
-
|
17
|
+
migrate_db
|
17
18
|
end
|
18
19
|
|
19
20
|
def scaffolds
|
@@ -33,38 +34,26 @@ def setup_customizations
|
|
33
34
|
directory "app/models"
|
34
35
|
directory "app/views"
|
35
36
|
template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
|
37
|
+
directory "app/services"
|
36
38
|
end
|
37
39
|
|
38
|
-
def
|
40
|
+
def create_db
|
41
|
+
# uncomment this if you need custom configuration in database.yml
|
42
|
+
# gsub_file('config/database.yml', ' encoding: unicode', db_development_settings)
|
43
|
+
db(drop: true, create: true)
|
44
|
+
end
|
45
|
+
|
46
|
+
def migrate_db
|
39
47
|
template 'db/seeds.rb' , 'db/seeds.rb'
|
40
48
|
|
41
|
-
|
42
|
-
db_seed
|
49
|
+
db(migrate: true, seed: true)
|
43
50
|
end
|
44
51
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
# run('bin/importmap pin sortablejs')
|
54
|
-
# run('npm install daisyui')
|
55
|
-
# rubocop
|
56
|
-
#
|
57
|
-
# directory 'app/assets/images'
|
58
|
-
# create_file 'app/assets/stylesheets/custom-bootstrap-import.scss' , read_template('custom-bootstrap-import.scss')
|
59
|
-
# append_to_file 'app/assets/config/manifest.js' , read_template('manifest.js')
|
60
|
-
# insert_into_file 'app/views/layouts/application.html.erb', read_template('application.html.erb'),
|
61
|
-
# before: %( <%%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>)
|
62
|
-
# gsub_file 'app/views/layouts/application.html.erb', %(container mx-auto mt-28 px-5 flex), 'container mx-auto px-5'
|
63
|
-
# template 'home.css', 'app/assets/stylesheets/home.css'
|
64
|
-
#
|
65
|
-
# add_controller('page', 'benefits', 'faq', 'terms', 'privacy', '--skip-routes')
|
66
|
-
# route(<<-'RUBY')
|
67
|
-
# PageController.action_methods.each do |action|
|
68
|
-
# get "/#{action}", to: "page##{action}", as: "page_#{action}"
|
69
|
-
# end
|
70
|
-
# RUBY
|
52
|
+
def db_development_settings
|
53
|
+
<<-'RUBY'
|
54
|
+
encoding: unicode
|
55
|
+
host: <%= ENV['DATABASE_HOST'] %>
|
56
|
+
username: <%= ENV['DATABASE_USERNAME'] %>
|
57
|
+
password: <%= ENV['DATABASE_PASSWORD'] %>
|
58
|
+
RUBY
|
59
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class SeedService
|
2
|
+
class << self
|
3
|
+
def seed
|
4
|
+
service = SeedService.new
|
5
|
+
service.call
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def call
|
10
|
+
reset
|
11
|
+
create
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def reset
|
17
|
+
# Person.delete_all
|
18
|
+
# Post.delete_all
|
19
|
+
# Project.delete_all
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
# FactoryBot.create_list(:post, rand(10..20))
|
24
|
+
# FactoryBot.create_list(:person, rand(10..20))
|
25
|
+
# FactoryBot.create_list(:project, rand(10..20))
|
26
|
+
end
|
27
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# SeedService.seed
|
1
2
|
# david = User.create(email: 'david@site.com', name: 'david', password: 'password')
|
2
3
|
# james = User.create(email: 'james@site.com', name: 'james', password: 'password')
|
3
4
|
# sally = User.create(email: 'sally@site.com', name: 'sally', password: 'password')
|
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.2.
|
4
|
+
version: 0.2.43
|
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-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootsnap
|
@@ -440,10 +440,47 @@ files:
|
|
440
440
|
- after_templates/addons/rubocop/app/controllers/home_controller.rb
|
441
441
|
- after_templates/addons/rubocop/app/views/home/index.html.erb
|
442
442
|
- after_templates/addons/rubocop/app/views/layouts/application.html.erb
|
443
|
+
- after_templates/addons/scenic/_.rb
|
444
|
+
- after_templates/addons/scenic/app/controllers/home_controller.rb
|
445
|
+
- after_templates/addons/scenic/app/services/seed_service.rb
|
446
|
+
- after_templates/addons/scenic/app/views/home/index.html.erb
|
447
|
+
- after_templates/addons/scenic/app/views/home/individual_visitors_by_monument.html.erb
|
448
|
+
- after_templates/addons/scenic/app/views/home/reseed.html.erb
|
449
|
+
- after_templates/addons/scenic/app/views/home/visitors_by_monument.html.erb
|
450
|
+
- after_templates/addons/scenic/app/views/layouts/_footer.html.erb
|
451
|
+
- after_templates/addons/scenic/app/views/layouts/_navbar.html.erb
|
452
|
+
- after_templates/addons/scenic/app/views/layouts/application.html.erb
|
453
|
+
- after_templates/addons/scenic/db/seeds.rb
|
454
|
+
- after_templates/addons/scenic/db/views/individual_visitors_by_monuments_v01.sql
|
455
|
+
- after_templates/addons/scenic/db/views/visitors_by_monuments_v01.sql
|
443
456
|
- after_templates/addons/twilio_ruby/_.rb
|
444
457
|
- after_templates/addons/twilio_ruby/app/controllers/home_controller.rb
|
445
458
|
- after_templates/addons/twilio_ruby/app/views/home/index.html.erb
|
446
459
|
- after_templates/addons/twilio_ruby/config/initializers/twilio.rb
|
460
|
+
- after_templates/application/klueless/_.rb
|
461
|
+
- after_templates/application/klueless/app/avo/dashboards/dashboard.rb
|
462
|
+
- after_templates/application/klueless/app/avo/resources/db_schema_resource.rb
|
463
|
+
- after_templates/application/klueless/app/avo/resources/rails_app_resource.rb
|
464
|
+
- after_templates/application/klueless/app/avo/resources/rubocop_resource.rb
|
465
|
+
- after_templates/application/klueless/app/avo/resources/table_count_resource.rb
|
466
|
+
- after_templates/application/klueless/app/avo/resources/user_resource.rb
|
467
|
+
- after_templates/application/klueless/app/controllers/home_controller.rb
|
468
|
+
- after_templates/application/klueless/app/models/db_schema.rb
|
469
|
+
- after_templates/application/klueless/app/models/rails_app.rb
|
470
|
+
- after_templates/application/klueless/app/models/rubocop.rb
|
471
|
+
- after_templates/application/klueless/app/models/table_count.rb
|
472
|
+
- after_templates/application/klueless/app/queries/rubocop_log.psql
|
473
|
+
- after_templates/application/klueless/app/queries/rubocop_log_query.rb
|
474
|
+
- after_templates/application/klueless/app/queries/sql_query.rb
|
475
|
+
- after_templates/application/klueless/app/services/seed_service.rb
|
476
|
+
- after_templates/application/klueless/app/views/home/index.html.erb
|
477
|
+
- after_templates/application/klueless/app/views/home/quick_signin.html.erb
|
478
|
+
- after_templates/application/klueless/app/views/layouts/_footer.html.erb
|
479
|
+
- after_templates/application/klueless/app/views/layouts/_navbar.html.erb
|
480
|
+
- after_templates/application/klueless/app/views/layouts/application.html.erb
|
481
|
+
- after_templates/application/klueless/config/initializers/avo.rb
|
482
|
+
- after_templates/application/klueless/config/locales/en.yml
|
483
|
+
- after_templates/application/klueless/db/seeds.rb
|
447
484
|
- after_templates/application/printspeak/_.rb
|
448
485
|
- after_templates/application/printspeak/app/assets/images/.keep
|
449
486
|
- after_templates/application/printspeak/app/assets/images/about/1.jpg
|
@@ -703,6 +740,7 @@ files:
|
|
703
740
|
- lib/rails_app_generator/addons/rspec.rb
|
704
741
|
- lib/rails_app_generator/addons/rubocop.rb
|
705
742
|
- lib/rails_app_generator/addons/scaffold.rb
|
743
|
+
- lib/rails_app_generator/addons/scenic.rb
|
706
744
|
- lib/rails_app_generator/addons/services.rb
|
707
745
|
- lib/rails_app_generator/addons/sidekiq.rb
|
708
746
|
- lib/rails_app_generator/addons/stimulus.rb
|
@@ -775,7 +813,9 @@ files:
|
|
775
813
|
- profiles/addons/redcarpet.json
|
776
814
|
- profiles/addons/rolify.json
|
777
815
|
- profiles/addons/rubocop.json
|
816
|
+
- profiles/addons/scenic.json
|
778
817
|
- profiles/addons/twilio_ruby.json
|
818
|
+
- profiles/application/klueless.json
|
779
819
|
- profiles/application/printspeak.json
|
780
820
|
- profiles/rag/bootstrap.json
|
781
821
|
- profiles/rag/devise.json
|
@@ -835,6 +875,7 @@ files:
|
|
835
875
|
- templates/thor_task/addon/addon.tt
|
836
876
|
- templates/thor_task/profile/after_template.rb
|
837
877
|
- templates/thor_task/profile/app/controllers/home_controller.rb
|
878
|
+
- templates/thor_task/profile/app/services/seed_service.rb
|
838
879
|
- templates/thor_task/profile/app/views/home/index.html.erb.tt
|
839
880
|
- templates/thor_task/profile/app/views/layouts/_footer.html.erb.tt
|
840
881
|
- templates/thor_task/profile/app/views/layouts/_navbar.html.erb
|