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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/after_templates/addons/scenic/_.rb +64 -0
  4. data/after_templates/addons/scenic/app/controllers/home_controller.rb +24 -0
  5. data/after_templates/addons/scenic/app/services/seed_service.rb +104 -0
  6. data/after_templates/addons/scenic/app/views/home/index.html.erb +3 -0
  7. data/after_templates/addons/scenic/app/views/home/individual_visitors_by_monument.html.erb +24 -0
  8. data/after_templates/addons/scenic/app/views/home/reseed.html.erb +3 -0
  9. data/after_templates/addons/scenic/app/views/home/visitors_by_monument.html.erb +22 -0
  10. data/after_templates/addons/scenic/app/views/layouts/_footer.html.erb +0 -0
  11. data/after_templates/addons/scenic/app/views/layouts/_navbar.html.erb +10 -0
  12. data/after_templates/addons/scenic/app/views/layouts/application.html.erb +29 -0
  13. data/after_templates/addons/scenic/db/seeds.rb +1 -0
  14. data/after_templates/addons/scenic/db/views/individual_visitors_by_monuments_v01.sql +9 -0
  15. data/after_templates/addons/scenic/db/views/visitors_by_monuments_v01.sql +8 -0
  16. data/after_templates/application/klueless/_.rb +99 -0
  17. data/after_templates/application/klueless/app/avo/dashboards/dashboard.rb +13 -0
  18. data/after_templates/application/klueless/app/avo/resources/db_schema_resource.rb +12 -0
  19. data/after_templates/application/klueless/app/avo/resources/rails_app_resource.rb +15 -0
  20. data/after_templates/application/klueless/app/avo/resources/rubocop_resource.rb +12 -0
  21. data/after_templates/application/klueless/app/avo/resources/table_count_resource.rb +12 -0
  22. data/after_templates/application/klueless/app/avo/resources/user_resource.rb +24 -0
  23. data/after_templates/application/klueless/app/controllers/home_controller.rb +12 -0
  24. data/after_templates/application/klueless/app/models/db_schema.rb +11 -0
  25. data/after_templates/application/klueless/app/models/rails_app.rb +3 -0
  26. data/after_templates/application/klueless/app/models/rubocop.rb +11 -0
  27. data/after_templates/application/klueless/app/models/table_count.rb +11 -0
  28. data/after_templates/application/klueless/app/queries/rubocop_log.psql +23 -0
  29. data/after_templates/application/klueless/app/queries/rubocop_log_query.rb +10 -0
  30. data/after_templates/application/klueless/app/queries/sql_query.rb +40 -0
  31. data/after_templates/application/klueless/app/services/seed_service.rb +7 -0
  32. data/after_templates/application/klueless/app/views/home/index.html.erb +6 -0
  33. data/after_templates/application/klueless/app/views/home/quick_signin.html.erb +3 -0
  34. data/after_templates/application/klueless/app/views/layouts/_footer.html.erb +0 -0
  35. data/after_templates/application/klueless/app/views/layouts/_navbar.html.erb +4 -0
  36. data/after_templates/application/klueless/app/views/layouts/application.html.erb +29 -0
  37. data/after_templates/application/klueless/config/initializers/avo.rb +101 -0
  38. data/after_templates/application/klueless/config/locales/en.yml +4 -0
  39. data/after_templates/application/klueless/db/seeds.rb +18 -0
  40. data/after_templates/application/printspeak/_.rb +65 -23
  41. data/after_templates/application/printspeak/db/seeds.rb +3 -3
  42. data/docs/last_run/app_generator_class.json +8 -0
  43. data/docs/last_run/app_generator_data.json +5 -4
  44. data/docs/last_run/rails_options_class.json +8 -0
  45. data/docs/last_run/rails_options_data.json +5 -4
  46. data/lib/rails_app_generator/addons/avo.rb +2 -0
  47. data/lib/rails_app_generator/addons/scenic.rb +15 -0
  48. data/lib/rails_app_generator/app_generator.rb +10 -0
  49. data/lib/rails_app_generator/gem_query.rb +3 -1
  50. data/lib/rails_app_generator/rag_initializer.rb +2 -1
  51. data/lib/rails_app_generator/version.rb +1 -1
  52. data/package-lock.json +2 -2
  53. data/package.json +1 -1
  54. data/profiles/addons/scenic.json +14 -0
  55. data/profiles/application/klueless.json +23 -0
  56. data/profiles/application/printspeak.json +7 -1
  57. data/tasks/profile.thor +1 -0
  58. data/templates/Gemfile.erb +0 -1
  59. data/templates/thor_task/profile/after_template.rb +19 -30
  60. data/templates/thor_task/profile/app/controllers/home_controller.rb +4 -0
  61. data/templates/thor_task/profile/app/services/seed_service.rb +27 -0
  62. data/templates/thor_task/profile/db/seeds.rb +1 -0
  63. metadata +43 -2
@@ -0,0 +1,40 @@
1
+ class SqlQuery
2
+ attr_reader :opts
3
+ attr_reader :sql
4
+ attr_reader :record
5
+
6
+ def initialize(**opts)
7
+ @opts = opts
8
+ @sql = self.class.sql
9
+ @record = self.class.record
10
+ end
11
+
12
+ def query(sql_query)
13
+ result = connection.execute(sql_query)
14
+ result.map { |row| record.new(**row) }
15
+ end
16
+
17
+ class << self
18
+ attr_reader :sql
19
+ attr_reader :record
20
+
21
+ def query(**opts)
22
+ new(**opts).call
23
+ end
24
+
25
+ def sql_resource(filename)
26
+ sql_file = File.expand_path(filename, File.dirname(__FILE__))
27
+ @sql = File.read(sql_file)
28
+ end
29
+
30
+ def fields(fields)
31
+ @record = Struct.new(*fields, keyword_init: true)
32
+ end
33
+ end
34
+
35
+ protected
36
+
37
+ def connection
38
+ ActiveRecord::Base.connection
39
+ end
40
+ end
@@ -0,0 +1,7 @@
1
+ class SeedService
2
+ class << self
3
+ def seed
4
+ puts 'sssssssssssssssssssssss'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ <h1><%= I18n.t('application_name') %></h1>
2
+
3
+ <p>The Klue is to do Less</p>
4
+
5
+ <p>No Code as a Service - Rails Application Builder</p>
6
+
@@ -0,0 +1,3 @@
1
+ <h1>Quick SignIn</h1>
2
+
3
+ <p>You are signed in as: <b><%= current_user.email %></b></p>
@@ -0,0 +1,4 @@
1
+ <%= link_to 'Home', root_path %>
2
+ <%= link_to 'Quick Sign In', home_quick_signin_path %> |
3
+ <%= link_to 'Admin', avo_path %>
4
+ <hr />
@@ -0,0 +1,29 @@
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
+ </head>
15
+
16
+ <body>
17
+ <header>
18
+ <%%= render 'layouts/navbar' %>
19
+ <hr />
20
+ </header>
21
+ <main>
22
+ <%%= yield %>
23
+ </main>
24
+ <footer>
25
+ <%%= render 'layouts/footer' %>
26
+ </footer>
27
+ </body>
28
+ </html>
29
+
@@ -0,0 +1,101 @@
1
+ # frozen_string_literal: true
2
+
3
+ # For more information regaring these settings check out our docs https://docs.avohq.io
4
+ Avo.configure do |config|
5
+ ## == Routing ==
6
+ config.root_path = '/admin'
7
+
8
+ # https://docs.avohq.io/2.0/customization.html
9
+ config.app_name = 'Klueless NoCaaS'
10
+ config.id_links_to_resource = true
11
+ # config.resource_controls_placement = :left
12
+
13
+ # Where should the user be redirected when visting the `/avo` url
14
+ # config.home_path = nil
15
+
16
+ ## == Licensing ==
17
+ config.license = 'pro' # change this to 'pro' when you add the license key
18
+ config.license_key = ENV['AVO_LICENSE_KEY']
19
+
20
+ ## == Set the context ==
21
+ config.set_context do
22
+ # Return a context object that gets evaluated in Avo::ApplicationController
23
+ end
24
+
25
+ ## == Authentication ==
26
+ config.current_user_method = :current_user
27
+ # config.authenticate_with = {}
28
+
29
+ ## == Authorization ==
30
+ # config.authorization_methods = {
31
+ # index: 'index?',
32
+ # show: 'show?',
33
+ # edit: 'edit?',
34
+ # new: 'new?',
35
+ # update: 'update?',
36
+ # create: 'create?',
37
+ # destroy: 'destroy?',
38
+ # }
39
+ # config.raise_error_on_missing_policy = false
40
+
41
+ ## == Localization ==
42
+ # config.locale = 'en-US'
43
+
44
+ ## == Customization ==
45
+ # config.app_name = 'Avocadelicious'
46
+ # config.timezone = 'UTC'
47
+ # config.currency = 'USD'
48
+ # config.per_page = 24
49
+ # config.per_page_steps = [12, 24, 48, 72]
50
+ # config.via_per_page = 8
51
+ # config.default_view_type = :table
52
+ # config.hide_layout_when_printing = false
53
+ # config.id_links_to_resource = false
54
+ # config.full_width_container = false
55
+ # config.full_width_index_view = false
56
+ # config.cache_resources_on_index_view = true
57
+ # config.search_debounce = 300
58
+ # config.view_component_path = "app/components"
59
+ # config.display_license_request_timeout_error = true
60
+ # config.disabled_features = []
61
+
62
+ ## == Breadcrumbs ==
63
+ # config.display_breadcrumbs = true
64
+ config.set_initial_breadcrumbs do
65
+ add_breadcrumb "Home", '/admin'
66
+ end
67
+
68
+ ## == Menus ==
69
+ config.main_menu = -> {
70
+ section "Dashboards", icon: "dashboards" do
71
+ all_dashboards
72
+ end
73
+
74
+ section "Resources", icon: "resources" do
75
+ group "App Meta Data" do
76
+ resource :db_schema, label: 'DB Schema'
77
+ resource :rubocop, label: 'RuboCop'
78
+ resource :table_count, label: 'Table Count'
79
+ end
80
+
81
+ # group "Xxx" do # , collapsable: true, collapsed: true
82
+ # end
83
+
84
+ group "Admin" do
85
+ resource :user
86
+ end
87
+ end
88
+
89
+ section "Tools", icon: "tools" do
90
+ all_tools
91
+ end
92
+
93
+ section I18n.t('admin.external_links'), icon: "heroicons/outline/link", collapsable: true, collapsed: true do
94
+ link 'Appy Dave', path: 'https://appydave.com', target: :_blank
95
+ link 'Klueless', path: 'https://klueless.io/', target: :_blank
96
+ end
97
+ }
98
+ config.profile_menu = -> {
99
+ link "Profile", path: "/admin/profile", icon: "user-circle"
100
+ }
101
+ end
@@ -0,0 +1,4 @@
1
+ en:
2
+ application_name: "KlueLess"
3
+ admin:
4
+ external_links: 'External Links'
@@ -0,0 +1,18 @@
1
+ @data_path = "/Users/davidcruwys/dev/printspeak/printspeak-generator/.builders/.data/"
2
+
3
+ david = User.create_with(name: 'david', password: 'password').find_or_create_by(email: 'david@site.com')
4
+
5
+ def get_data(filename)
6
+ json = File.read(File.join(@data_path, filename))
7
+ JSON.parse(json)
8
+ end
9
+
10
+ rails_app = RailsApp.create(name: 'Printspeak', user: david)
11
+
12
+ puts 'Create Rubocop Data'
13
+ Rubocop.create(rails_app: rails_app, data: get_data('rubocop.json'))
14
+
15
+ puts 'Create Table Count Data'
16
+ TableCount.create(rails_app: rails_app, data: get_data('sql_count.json'))
17
+
18
+
@@ -8,42 +8,84 @@ self.local_template_path = File.dirname(__FILE__)
8
8
 
9
9
  gac 'base rails 7 image created'
10
10
 
11
- add_controller('home', 'index')
12
- add_controller('page', 'benefits', 'faq', 'terms', 'privacy', '--skip-routes')
13
-
14
- route("root 'home#index'")
15
- route(<<-'RUBY')
16
- PageController.action_methods.each do |action|
17
- get "/#{action}", to: "page##{action}", as: "page_#{action}"
18
- end
19
- RUBY
11
+ prepare_environment
20
12
 
21
13
  after_bundle do
22
- customizations
14
+ force_copy
15
+ prepare_postgresql
16
+ scaffolds
17
+ setup_controllers
18
+ setup_customizations
23
19
  setup_db
24
- rubocop
20
+ setup_avo
25
21
  end
26
22
 
27
- def customizations
28
- force_copy
23
+ def scaffolds
24
+ add_scaffold('post', 'title', 'body:text')
25
+ add_scaffold('people', 'first_name', 'last_name', 'age:integer', 'address:text')
26
+ end
29
27
 
30
- directory "app/assets/images"
31
- directory "app/assets/stylesheets"
28
+ def setup_controllers
29
+ route("root 'home#index'")
32
30
 
33
- directory "app/controllers"
31
+ add_controller('home', 'index')
32
+ add_controller('page', 'benefits', 'faq', 'terms', 'privacy', '--skip-routes')
34
33
 
35
- directory "app/views/home"
36
- directory "app/views/page"
34
+ route("root 'home#index'")
35
+ route(<<-'RUBY')
36
+ PageController.action_methods.each do |action|
37
+ get "/#{action}", to: "page##{action}", as: "page_#{action}"
38
+ end
39
+ RUBY
40
+ end
37
41
 
38
- directory "app/views/layouts"
42
+ def setup_customizations
43
+ directory "app/assets/images"
44
+ directory "app/assets/stylesheets"
45
+ directory "app/controllers"
46
+ directory "app/models"
47
+ directory "app/views"
48
+ # directory "app/services"
39
49
  template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
50
+ end
40
51
 
52
+ def setup_db
41
53
  template 'db/seeds.rb' , 'db/seeds.rb'
54
+
55
+ gsub_file('config/database.yml', ' encoding: unicode', db_development_settings)
56
+
57
+ db(drop: true, create: true, migrate: true, seed: true)
42
58
  end
43
59
 
44
- def setup_db
45
- add_scaffold('post', 'title', 'body:text')
46
- add_scaffold('people', 'first_name', 'last_name', 'age:integer', 'address:text')
60
+ def setup_avo
61
+ # generate('avo:install')
62
+
63
+ # generate('avo:resource Category')
64
+ # generate('avo:resource Post')
65
+ # generate('avo:resource Comment')
66
+ # generate('avo:resource Location')
67
+ # generate('avo:resource Room')
68
+ # generate('avo:resource Booking')
69
+ # generate('avo:resource User')
70
+ # generate('avo:dashboard Dashboard')
71
+
72
+ # directory "app/avo"
73
+ # directory "config/initializers"
74
+ # directory "config/locales"
75
+
76
+ # add devise support
77
+ # gsub_file 'config/initializers/avo.rb', %(# config.current_user_method = {}), 'config.current_user_method = :current_user'
78
+ end
79
+
80
+ def prepare_postgresql
81
+ gsub_file('config/database.yml', ' encoding: unicode', db_development_settings)
82
+ end
47
83
 
48
- db_migrate
84
+ def db_development_settings
85
+ <<-'RUBY'
86
+ encoding: unicode
87
+ host: <%= ENV['DATABASE_HOST'] %>
88
+ username: <%= ENV['DATABASE_USERNAME'] %>
89
+ password: <%= ENV['DATABASE_PASSWORD'] %>
90
+ RUBY
49
91
  end
@@ -11,6 +11,6 @@
11
11
  # bob = User.create(email: 'bob@site.com', name: 'bob', password: 'password')
12
12
  # lisa = User.create(email: 'lisa@site.com', name: 'lisa', password: 'password')
13
13
 
14
- # 10.times do |i|
15
- # Post.create(title: "Post #{i}", body: "This is the body of post #{i}", user: User.all.sample)
16
- # end
14
+ 10.times do |i|
15
+ Post.create(title: "Post #{i}", body: "This is the body of post #{i}")
16
+ end
@@ -70,6 +70,7 @@
70
70
  "add_pretender",
71
71
  "add_public_suffix",
72
72
  "add_rails_html_sanitizer",
73
+ "add_scenic",
73
74
  "add_ransack",
74
75
  "add_redcarpet",
75
76
  "add_rolify",
@@ -567,6 +568,13 @@
567
568
  "default": false,
568
569
  "required": false
569
570
  },
571
+ {
572
+ "name": "add_scenic",
573
+ "description": "Indicates when to generate add scenic",
574
+ "type": "boolean",
575
+ "default": false,
576
+ "required": false
577
+ },
570
578
  {
571
579
  "name": "add_ransack",
572
580
  "description": "Indicates when to generate add ransack",
@@ -3,7 +3,7 @@
3
3
  "skip_namespace": false,
4
4
  "skip_collision_check": false,
5
5
  "ruby": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
6
- "database": "sqlite3",
6
+ "database": "postgresql",
7
7
  "skip_git": true,
8
8
  "skip_keeps": false,
9
9
  "skip_action_mailer": false,
@@ -42,8 +42,8 @@
42
42
  "add_devise": false,
43
43
  "add_devise_masquerade": false,
44
44
  "add_dotenv": false,
45
- "add_factory_bot_rails": true,
46
- "add_faker": true,
45
+ "add_factory_bot_rails": false,
46
+ "add_faker": false,
47
47
  "add_friendly_id": false,
48
48
  "add_groupdate": false,
49
49
  "add_hexapdf": false,
@@ -60,11 +60,12 @@
60
60
  "add_pretender": false,
61
61
  "add_public_suffix": false,
62
62
  "add_rails_html_sanitizer": false,
63
+ "add_scenic": true,
63
64
  "add_ransack": false,
64
65
  "add_redcarpet": false,
65
66
  "add_rolify": false,
66
67
  "add_rubocop": false,
67
68
  "add_twilio_ruby": false,
68
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/factory_bot_rails/_.rb"
69
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/scenic/_.rb"
69
70
  }
70
71
  }
@@ -70,6 +70,7 @@
70
70
  "add_pretender",
71
71
  "add_public_suffix",
72
72
  "add_rails_html_sanitizer",
73
+ "add_scenic",
73
74
  "add_ransack",
74
75
  "add_redcarpet",
75
76
  "add_rolify",
@@ -567,6 +568,13 @@
567
568
  "default": false,
568
569
  "required": false
569
570
  },
571
+ {
572
+ "name": "add_scenic",
573
+ "description": "",
574
+ "type": "boolean",
575
+ "default": false,
576
+ "required": false
577
+ },
570
578
  {
571
579
  "name": "add_ransack",
572
580
  "description": "",
@@ -7,8 +7,8 @@
7
7
  "quiet": false,
8
8
  "skip": false,
9
9
  "ruby": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
10
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/factory_bot_rails/_.rb",
11
- "database": "sqlite3",
10
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/scenic/_.rb",
11
+ "database": "postgresql",
12
12
  "skip_git": true,
13
13
  "skip_keeps": false,
14
14
  "skip_action_mailer": false,
@@ -52,8 +52,8 @@
52
52
  "add_devise": false,
53
53
  "add_devise_masquerade": false,
54
54
  "add_dotenv": false,
55
- "add_factory_bot_rails": true,
56
- "add_faker": true,
55
+ "add_factory_bot_rails": false,
56
+ "add_faker": false,
57
57
  "add_friendly_id": false,
58
58
  "add_groupdate": false,
59
59
  "add_hexapdf": false,
@@ -70,6 +70,7 @@
70
70
  "add_pretender": false,
71
71
  "add_public_suffix": false,
72
72
  "add_rails_html_sanitizer": false,
73
+ "add_scenic": true,
73
74
  "add_ransack": false,
74
75
  "add_redcarpet": false,
75
76
  "add_rolify": false,
@@ -10,6 +10,8 @@ module RailsAppGenerator
10
10
  def apply
11
11
  # copy_file 'config/initializers/avo.rb'
12
12
 
13
+ bundle_install
14
+
13
15
  generate('avo:install')
14
16
 
15
17
  gsub_file 'config/routes.rb', %(mount Avo::Engine, at: Avo.configuration.root_path), <<-RUBY
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ # Custom add-ons for RailsAppGenerator
5
+ module AddOns
6
+ # Add Scenic to rails application
7
+ class Scenic < RailsAppGenerator::Addon
8
+ required_gem gem.version('scenic', '1.6.0', 'Ads methods to ActiveRecord:Migration to create and manage database views in Rails')
9
+
10
+ def apply
11
+ bundle_install
12
+ end
13
+ end
14
+ end
15
+ end
@@ -208,6 +208,7 @@ module RailsAppGenerator
208
208
  add_if(:rails_app_generator) # TODO: needs testing
209
209
  add_if(:redcarpet) # tested
210
210
  add_if(:rolify) # tested
211
+ add_if(:scenic)
211
212
  add_if(:services) # TODO: needs testing
212
213
  add_if(:shoulda) # TODO: needs testing
213
214
  add_if(:sidekiq) # TODO: needs testing
@@ -291,6 +292,15 @@ module RailsAppGenerator
291
292
  rails_command('db:migrate')
292
293
  end
293
294
 
295
+ def db(drop: false, create: false, migrate: false, seed: false)
296
+ commands = []
297
+ commands << 'db:drop' if drop
298
+ commands << 'db:create' if create
299
+ commands << 'db:migrate' if migrate
300
+ commands << 'db:seed' if seed
301
+ rails_command(commands.join(' '))
302
+ end
303
+
294
304
  def db_seed
295
305
  rails_command('db:seed')
296
306
  end
@@ -23,7 +23,9 @@ module RailsAppGenerator
23
23
  info = Net::HTTP.get(URI.parse(link))
24
24
  json = JSON.parse(info)
25
25
 
26
- Rails::Generators::AppBase::GemfileEntry.new(json['name'], json['version'], json['description'])
26
+ comment = (json['description'] || json['info'] || '').gsub(/(\r?\n|\r)/, ' ').squeeze.strip
27
+
28
+ Rails::Generators::AppBase::GemfileEntry.new(json['name'], json['version'], comment)
27
29
  rescue SocketError
28
30
  abort 'Internet connection cannot be established to RubyGems.org'
29
31
  rescue JSON::ParserError
@@ -131,7 +131,7 @@ KConfig.configure do |config|
131
131
  rag.add_option :add_kaminari , type: :boolean, default: false
132
132
  rag.add_option :add_lograge , type: :boolean, default: false
133
133
  rag.add_option :add_minimal_css , type: :boolean, default: false
134
- rag.add_option :minimal_css_library , type: :string, default: 'water.css', description: "Minimal CSS library to get you started. [options: water.css (default)]"
134
+ rag.add_option :minimal_css_library , type: :string , default: 'water.css', description: "Minimal CSS library to get you started. [options: water.css (default)]"
135
135
  rag.add_option :add_mini_magick , type: :boolean, default: false
136
136
  rag.add_option :add_motor_admin , type: :boolean, default: false
137
137
  rag.add_option :add_phony_rails , type: :boolean, default: false
@@ -139,6 +139,7 @@ KConfig.configure do |config|
139
139
  rag.add_option :add_public_suffix , type: :boolean, default: false
140
140
  # pundit
141
141
  rag.add_option :add_rails_html_sanitizer , type: :boolean, default: false
142
+ rag.add_option :add_scenic , type: :boolean, default: false
142
143
  # rails_app_generator
143
144
  rag.add_option :add_ransack , type: :boolean, default: false
144
145
  rag.add_option :add_redcarpet , type: :boolean, default: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.2.40'
4
+ VERSION = '0.2.43'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.2.40",
3
+ "version": "0.2.43",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.2.40",
9
+ "version": "0.2.43",
10
10
  "dependencies": {
11
11
  "daisyui": "^2.20.0"
12
12
  },
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.2.40",
3
+ "version": "0.2.43",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
@@ -0,0 +1,14 @@
1
+ {
2
+ "args": {
3
+ "app_path": "r7_scenic",
4
+ "destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
5
+ },
6
+ "opts": {
7
+ "skip_git": true,
8
+ "skip_test": true,
9
+ "database": "postgresql",
10
+ "add_minimal_css": true,
11
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/scenic/_.rb",
12
+ "add_scenic": true
13
+ }
14
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "args": {
3
+ "app_path": "klueless",
4
+ "destination_root": "/Users/davidcruwys/dev/kweb",
5
+ "note": "add sidekiq to handle the data import tasks, add impersonate"
6
+ },
7
+ "opts": {
8
+ "skip_test": true,
9
+ "database": "postgresql",
10
+ "css": "tailwind",
11
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/application/klueless/_.rb",
12
+ "add_avo": true,
13
+ "add_annotate": true,
14
+ "add_brakeman": true,
15
+ "add_bundler_audit": true,
16
+ "add_devise": true,
17
+ "add_dotenv": true,
18
+ "add_factory_bot_rails": true,
19
+ "add_faker": true,
20
+ "add_ransack": false,
21
+ "add_rubocop": true
22
+ }
23
+ }
@@ -5,10 +5,16 @@
5
5
  },
6
6
  "opts": {
7
7
  "skip_test": true,
8
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/application/printspeak/_.rb",
9
8
  "css": "bootstrap",
9
+ "database": "postgresql",
10
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/application/printspeak/_.rb",
11
+ "add_avo": true,
10
12
  "add_annotate": true,
13
+ "add_devise": true,
11
14
  "add_dotenv": true,
15
+ "add_factory_bot_rails": true,
16
+ "add_faker": true,
17
+ "add_ransack": false,
12
18
  "add_rubocop": true
13
19
  }
14
20
  }
data/tasks/profile.thor CHANGED
@@ -42,6 +42,7 @@ class Profile < Thor
42
42
  template('profile/after_template.rb' , after_template_path('_.rb') , force: options[:force])
43
43
  template('profile/app/controllers/home_controller.rb' , after_template_path('app/controllers/home_controller.rb') , force: options[:force])
44
44
  template('profile/app/views/home/index.html.erb' , after_template_path('app/views/home/index.html.erb') , force: options[:force])
45
+ template('profile/app/services/seed_service.rb' , after_template_path('app/services/seed_service.rb') , force: options[:force])
45
46
 
46
47
  copy_file('profile/app/views/layouts/_navbar.html.erb' , after_template_path('app/views/layouts/_navbar.html.erb') , force: options[:force])
47
48
  copy_file('profile/app/views/layouts/_footer.html.erb' , after_template_path('app/views/layouts/_footer.html.erb') , force: options[:force])
@@ -1,7 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
3
 
4
- # xmen
5
4
  ruby <%= "'#{RUBY_VERSION}'" -%>
6
5
 
7
6
  <% gems.each do |gem| %><%= gem %>