rails_app_generator 0.2.12 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.builders/generators/project-plan.rb +3 -1
- data/CHANGELOG.md +21 -0
- data/Rakefile +0 -2
- data/after_templates/addons/acts_as_list/_.rb +3 -4
- data/after_templates/addons/administrate/_.rb +2 -2
- data/after_templates/addons/administrate/app/views/layouts/_navbar.html.erb +1 -1
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/_.rb +2 -2
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/controllers/home_controller.rb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/models/user.rb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/views/home/index.html.erb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/views/layouts/_footer.html.erb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/views/layouts/_navbar.html.erb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/views/layouts/application.html.erb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/views/users/_form.html.erb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/app/views/users/_user.html.erb +0 -0
- data/after_templates/addons/{bcrypt_ruby → bcrypt}/db/seeds.rb +0 -0
- data/after_templates/addons/browser/_.rb +0 -2
- data/after_templates/addons/chartkick/_.rb +0 -2
- data/after_templates/addons/faker/_.rb +0 -2
- data/after_templates/addons/hexapdf/_.rb +0 -2
- data/after_templates/addons/honeybadger/_.rb +0 -2
- data/after_templates/addons/httparty/_.rb +0 -2
- data/after_templates/addons/mini_magick/_.rb +0 -2
- data/after_templates/addons/motor_admin/_.rb +46 -0
- data/after_templates/addons/motor_admin/app/controllers/home_controller.rb +4 -0
- data/after_templates/addons/motor_admin/app/views/home/index.html.erb +3 -0
- data/after_templates/addons/motor_admin/app/views/layouts/_footer.html.erb +3 -0
- data/after_templates/addons/motor_admin/app/views/layouts/_navbar.html.erb +8 -0
- data/after_templates/addons/motor_admin/app/views/layouts/application.html.erb +23 -0
- data/after_templates/addons/motor_admin/db/seeds.rb +116 -0
- data/after_templates/addons/rails_html_sanitizer/_.rb +0 -2
- data/after_templates/addons/twilio_ruby/_.rb +0 -2
- data/after_templates/printspeak_bak/_.rb +0 -2
- data/after_templates/rag/bootstrap/_.rb +0 -2
- data/after_templates/rag/devise/_.rb +0 -2
- data/after_templates/rag/import_map/_.rb +0 -2
- data/after_templates/rag/simple/_.rb +0 -2
- data/after_templates/rag/tailwind/_.rb +0 -2
- data/after_templates/rag/tailwind_daisyui/_.rb +0 -2
- data/after_templates/rag/tailwind_emulating_bootstrap/_.rb +0 -2
- data/after_templates/rag/tailwind_hotwire/_.rb +0 -2
- data/after_templates/rag/tailwind_hotwire_flash/_.rb +0 -1
- data/after_templates/rag/tailwind_hotwire_form/_.rb +0 -1
- data/after_templates/rag/tailwind_hotwire_form_search/_.rb +0 -1
- data/docs/last_run/app_generator_class.json +12 -4
- data/docs/last_run/app_generator_data.json +8 -7
- data/docs/last_run/rails_options_class.json +11 -3
- data/docs/last_run/rails_options_data.json +8 -7
- data/docs/project-plan/project.drawio +53 -47
- data/docs/project-plan/project_done.svg +1 -1
- data/exe/rag +0 -1
- data/lib/rails_app_generator/addons/administrate.rb +0 -7
- data/lib/rails_app_generator/addons/{bcrypt_ruby.rb → bcrypt.rb} +3 -3
- data/lib/rails_app_generator/addons/motor_admin.rb +6 -3
- data/lib/rails_app_generator/app_generator.rb +31 -7
- data/lib/rails_app_generator/cli/profile.rb +1 -1
- data/lib/rails_app_generator/options/options_builder.rb +2 -2
- data/lib/rails_app_generator/rag_initializer.rb +2 -1
- data/lib/rails_app_generator/starter.rb +1 -12
- data/lib/rails_app_generator/util.rb +11 -0
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/{bcrypt_ruby.json → bcrypt.json} +3 -3
- data/profiles/addons/motor_admin.json +15 -0
- data/tasks/profile.thor +0 -1
- data/templates/thor_task/addon/addon.tt +1 -0
- data/templates/thor_task/profile/app/views/home/index.html.erb.tt +1 -1
- metadata +21 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56c97362b3f0bbd3b48e5092642f2e169b837a5817b309fab06846fee354d17b
|
4
|
+
data.tar.gz: 568567cf2fb8a42f66abf2733100f53b058c1d995062f5b44655a5ad11f66500
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcdb2bf5a90b1fe66a8343be43ae64f1695deda8e4d27b7d3bbd4028eec1bf6328642e1dc030d2b4e1de3521cb3c55cdc3b5a03a0711caceacb85b70f2c493b7
|
7
|
+
data.tar.gz: 102179805d385f431ff0487c7d0f181af6db40559a40a6ec447f959e726c6ee08a5720ca91b114d122a207f33ac1607fdf8945c6f5256b592c7ed2245e3b3137
|
@@ -39,11 +39,13 @@ KManager.action :project_plan do
|
|
39
39
|
|
40
40
|
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
41
41
|
|
42
|
+
todo(title: 'add addon - administrate')
|
43
|
+
todo(title: 'add addon - acts_as_list')
|
44
|
+
todo(title: 'add addon - bcrypt')
|
42
45
|
todo(title: 'add addon - groupdate')
|
43
46
|
todo(title: 'add addon - chartkick')
|
44
47
|
todo(title: 'add addon - browser')
|
45
48
|
todo(title: 'add addon - faker')
|
46
|
-
todo(title: 'add addon - acts_as_list')
|
47
49
|
todo(title: 'add addon - twilio')
|
48
50
|
todo(title: 'add addon - honeybadger')
|
49
51
|
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
## [0.2.14](https://github.com/klueless-io/rails_app_generator/compare/v0.2.13...v0.2.14) (2022-08-12)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* refactor for ruby 3.0, refactor bcrypt-ruby to bcrypt, cleanup warning messages ([a4eea32](https://github.com/klueless-io/rails_app_generator/commit/a4eea3235a7d838a359ce48396aa048f52a00c91))
|
7
|
+
|
8
|
+
## [0.2.13](https://github.com/klueless-io/rails_app_generator/compare/v0.2.12...v0.2.13) (2022-08-12)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* add motor-admin profile ([f74dc4b](https://github.com/klueless-io/rails_app_generator/commit/f74dc4bf2671ae460a27bbc67df0701499526afa))
|
14
|
+
|
15
|
+
## [0.2.12](https://github.com/klueless-io/rails_app_generator/compare/v0.2.11...v0.2.12) (2022-08-12)
|
16
|
+
|
17
|
+
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
* add motor-admin profile ([0e41a1e](https://github.com/klueless-io/rails_app_generator/commit/0e41a1ece000a1b818d5756aabbd14d52788b462))
|
21
|
+
|
1
22
|
## [0.2.11](https://github.com/klueless-io/rails_app_generator/compare/v0.2.10...v0.2.11) (2022-08-12)
|
2
23
|
|
3
24
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# require 'pry'
|
4
|
-
|
5
3
|
# 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.
|
6
4
|
#
|
7
5
|
# exe/rag addons/acts_as_list
|
@@ -10,6 +8,8 @@ self.local_template_path = File.dirname(__FILE__)
|
|
10
8
|
|
11
9
|
gac 'base rails 7 image created'
|
12
10
|
|
11
|
+
prepare_environment
|
12
|
+
|
13
13
|
add_controller('home', 'index')
|
14
14
|
route("root 'home#index'")
|
15
15
|
|
@@ -42,7 +42,6 @@ after_bundle do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def setup_db
|
45
|
-
|
46
45
|
db_migrate
|
47
|
-
|
46
|
+
db_seed
|
48
47
|
end
|
@@ -8,7 +8,7 @@ self.local_template_path = File.dirname(__FILE__)
|
|
8
8
|
|
9
9
|
gac 'base rails 7 image created'
|
10
10
|
|
11
|
-
|
11
|
+
prepare_environment
|
12
12
|
|
13
13
|
add_controller('home', 'index')
|
14
14
|
|
@@ -30,7 +30,7 @@ after_bundle do
|
|
30
30
|
|
31
31
|
directory "app/dashboards"
|
32
32
|
|
33
|
-
|
33
|
+
rubocop_minimal
|
34
34
|
end
|
35
35
|
|
36
36
|
def setup_db
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
# bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords.
|
4
4
|
#
|
5
|
-
# exe/rag addons/
|
5
|
+
# exe/rag addons/bcrypt
|
6
6
|
|
7
7
|
self.local_template_path = File.dirname(__FILE__)
|
8
8
|
|
9
9
|
gac 'base rails 7 image created'
|
10
10
|
|
11
|
-
|
11
|
+
prepare_environment
|
12
12
|
|
13
13
|
add_controller('home', 'index')
|
14
14
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Motor Admin allows to create a flexible admin panel while writing less code.
|
4
|
+
#
|
5
|
+
# exe/rag addons/motor_admin
|
6
|
+
|
7
|
+
self.local_template_path = File.dirname(__FILE__)
|
8
|
+
|
9
|
+
gac 'base rails 7 image created'
|
10
|
+
|
11
|
+
bundle_install
|
12
|
+
|
13
|
+
add_controller('home', 'index')
|
14
|
+
|
15
|
+
route("root 'home#index'")
|
16
|
+
|
17
|
+
force_copy
|
18
|
+
|
19
|
+
directory "app/controllers"
|
20
|
+
directory "app/views/home"
|
21
|
+
directory "app/views/layouts"
|
22
|
+
template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
|
23
|
+
|
24
|
+
template 'db/seeds.rb' , 'db/seeds.rb'
|
25
|
+
|
26
|
+
after_bundle do
|
27
|
+
setup_db
|
28
|
+
|
29
|
+
# generate('motor:install')
|
30
|
+
# db_migrate
|
31
|
+
|
32
|
+
# directory "app/dashboards"
|
33
|
+
|
34
|
+
rubocop
|
35
|
+
end
|
36
|
+
|
37
|
+
def setup_db
|
38
|
+
add_scaffold('author', 'name:string email:string bio:text')
|
39
|
+
add_scaffold('post', 'title:string content:text published:boolean author:references')
|
40
|
+
add_scaffold('product', 'name', 'quantity:integer', 'price:decimal')
|
41
|
+
|
42
|
+
directory "app/models"
|
43
|
+
|
44
|
+
db_migrate
|
45
|
+
db_seed
|
46
|
+
end
|
@@ -0,0 +1,23 @@
|
|
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
|
+
<%%= render 'layouts/navbar' %>
|
18
|
+
<main>
|
19
|
+
<%%= yield %>
|
20
|
+
</main>
|
21
|
+
<%%= render 'layouts/footer' %>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,116 @@
|
|
1
|
+
def fake_title
|
2
|
+
[
|
3
|
+
'Fundamentals of Wavelets',
|
4
|
+
'Data Smart',
|
5
|
+
'God Created the Integers',
|
6
|
+
'Superfreakonomics',
|
7
|
+
'Orientalism',
|
8
|
+
'Nature of Statistical Learning Theory',
|
9
|
+
'Integration of the Indian States',
|
10
|
+
'Image Processing & Mathematical Morphology',
|
11
|
+
'How to Think Like Sherlock Holmes',
|
12
|
+
'Data Scientists at Work',
|
13
|
+
'Slaughterhouse Five',
|
14
|
+
'Birth of a Theorem',
|
15
|
+
'Structure & Interpretation of Computer Programs',
|
16
|
+
'Age of Wrath',
|
17
|
+
'Trial',
|
18
|
+
'Data Mining Handbook',
|
19
|
+
'New Machiavelli',
|
20
|
+
'Physics & Philosophy',
|
21
|
+
'Making Software',
|
22
|
+
'Analysis',
|
23
|
+
'Machine Learning for Hackers',
|
24
|
+
'Signal and the Noise',
|
25
|
+
'Python for Data Analysis',
|
26
|
+
'Introduction to Algorithms',
|
27
|
+
'Beautiful and the Damned',
|
28
|
+
'Outsider',
|
29
|
+
'Complete Sherlock Holmes',
|
30
|
+
'Complete Sherlock Holmes',
|
31
|
+
'Wealth of Nations',
|
32
|
+
'Pillars of the Earth',
|
33
|
+
'Mein Kampf',
|
34
|
+
'Tao of Physics',
|
35
|
+
'Farewell to Arms',
|
36
|
+
'Veteran',
|
37
|
+
'False Impressions',
|
38
|
+
'Last Lecture',
|
39
|
+
'Return of the Primitive',
|
40
|
+
'Jurassic Park',
|
41
|
+
'Russian Journal',
|
42
|
+
'Tales of Mystery and Imagination',
|
43
|
+
'Freakonomics',
|
44
|
+
'Hidden Connections',
|
45
|
+
'Story of Philosophy',
|
46
|
+
'Asami Asami',
|
47
|
+
'Journal of a Novel',
|
48
|
+
'Once There Was a War',
|
49
|
+
'Moon is Down',
|
50
|
+
'Brethren',
|
51
|
+
'In a Free State',
|
52
|
+
'Catch 22',
|
53
|
+
'Complete Mastermind',
|
54
|
+
'Dylan on Dylan',
|
55
|
+
'Soft Computing & Intelligent Systems',
|
56
|
+
'Textbook of Economic Theory',
|
57
|
+
'Econometric Analysis',
|
58
|
+
'Learning OpenCV',
|
59
|
+
'Data Structures Using C & C++',
|
60
|
+
'Computer Vision',
|
61
|
+
'Principles of Communication Systems',
|
62
|
+
'Let Us C',
|
63
|
+
'Amulet of Samarkand',
|
64
|
+
'Crime and Punishment',
|
65
|
+
'Angels & Demons',
|
66
|
+
'Argumentative Indian',
|
67
|
+
'Sea of Poppies',
|
68
|
+
'Idea of Justice',
|
69
|
+
'Raisin in the Sun',
|
70
|
+
'Prisoner of Birth',
|
71
|
+
'Scoop!',
|
72
|
+
'Ahe Manohar Tari',
|
73
|
+
'Last Mughal',
|
74
|
+
'Social Choice & Welfare',
|
75
|
+
'Radiowaril Bhashane & Shrutika',
|
76
|
+
'Gun Gayin Awadi',
|
77
|
+
'Aghal Paghal',
|
78
|
+
'Beyond Degrees',
|
79
|
+
'Manasa',
|
80
|
+
'India from Midnight to Milennium',
|
81
|
+
'Great Indian Novel',
|
82
|
+
'O Jerusalem!',
|
83
|
+
'City of Joy',
|
84
|
+
'Freedom at Midnight',
|
85
|
+
'Winter of Our Discontent',
|
86
|
+
'On Education',
|
87
|
+
'Free Will',
|
88
|
+
'Bookless in Baghdad',
|
89
|
+
'Case of the Lame Canary',
|
90
|
+
'Theory of Everything',
|
91
|
+
'New Markets & Other Essays',
|
92
|
+
'Electric Universe',
|
93
|
+
'Hunchback of Notre Dame',
|
94
|
+
'Burning Bright',
|
95
|
+
'Age of Discontuinity'
|
96
|
+
].sample
|
97
|
+
end
|
98
|
+
|
99
|
+
60.times do
|
100
|
+
Author.create!(name: Faker::Name.name, bio: Faker::Lorem.words(number: 5).join(' '), email: Faker::Internet.email)
|
101
|
+
end
|
102
|
+
|
103
|
+
100.times do |i|
|
104
|
+
Post.create!(title: fake_title,
|
105
|
+
content: "This is the body of post #{i}",
|
106
|
+
published: Faker::Boolean.boolean(true_ratio: 0.6),
|
107
|
+
author: Author.all.sample)
|
108
|
+
end
|
109
|
+
|
110
|
+
200.times do
|
111
|
+
Product.create!(
|
112
|
+
name: Faker::Name.name,
|
113
|
+
quantity: Faker::Number.number(digits: 2),
|
114
|
+
price: Faker::Number.decimal(l_digits: 4)
|
115
|
+
)
|
116
|
+
end
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"add_acts_as_list",
|
49
49
|
"add_administrate",
|
50
50
|
"add_browser",
|
51
|
-
"
|
51
|
+
"add_bcrypt",
|
52
52
|
"add_chartkick",
|
53
53
|
"add_faker",
|
54
54
|
"add_groupdate",
|
@@ -56,6 +56,7 @@
|
|
56
56
|
"add_httparty",
|
57
57
|
"add_honeybadger",
|
58
58
|
"add_mini_magick",
|
59
|
+
"add_motor_admin",
|
59
60
|
"add_phony_rails",
|
60
61
|
"add_public_suffix",
|
61
62
|
"add_rails_html_sanitizer",
|
@@ -109,7 +110,7 @@
|
|
109
110
|
"name": "ruby",
|
110
111
|
"description": "Path to the Ruby binary of your choice",
|
111
112
|
"type": "string",
|
112
|
-
"default": "/Users/davidcruwys/.asdf/installs/ruby/
|
113
|
+
"default": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
|
113
114
|
"required": false
|
114
115
|
},
|
115
116
|
{
|
@@ -400,8 +401,8 @@
|
|
400
401
|
"required": false
|
401
402
|
},
|
402
403
|
{
|
403
|
-
"name": "
|
404
|
-
"description": "Indicates when to generate add bcrypt
|
404
|
+
"name": "add_bcrypt",
|
405
|
+
"description": "Indicates when to generate add bcrypt",
|
405
406
|
"type": "boolean",
|
406
407
|
"default": false,
|
407
408
|
"required": false
|
@@ -455,6 +456,13 @@
|
|
455
456
|
"default": false,
|
456
457
|
"required": false
|
457
458
|
},
|
459
|
+
{
|
460
|
+
"name": "add_motor_admin",
|
461
|
+
"description": "Indicates when to generate add motor admin",
|
462
|
+
"type": "boolean",
|
463
|
+
"default": false,
|
464
|
+
"required": false
|
465
|
+
},
|
458
466
|
{
|
459
467
|
"name": "add_phony_rails",
|
460
468
|
"description": "Indicates when to generate add phony rails",
|