rails_app_generator 0.2.12 → 0.2.13
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/administrate/app/views/layouts/_navbar.html.erb +1 -1
- data/after_templates/addons/motor_admin/_.rb +47 -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/docs/last_run/app_generator_class.json +8 -0
- data/docs/last_run/app_generator_data.json +3 -2
- data/docs/last_run/rails_options_class.json +8 -0
- data/docs/last_run/rails_options_data.json +3 -2
- data/lib/rails_app_generator/addons/motor_admin.rb +0 -3
- data/lib/rails_app_generator/rag_initializer.rb +1 -0
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/motor_admin.json +15 -0
- data/templates/thor_task/profile/app/views/home/index.html.erb.tt +1 -1
- metadata +9 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9347a3a750b1d75294e58ee69b709776cc21ca6108a5b80409a7586f505f5cfe
|
4
|
+
data.tar.gz: fadce854770396d97819b5bcb589ad3e5ac154532889b177e1a0155661592ed1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca788fcd71b5085efa9e49dcfacecc27e2d9a9e5bbdbb78d2cc0aa2b607bfbca3b28f92fd41b8c12d1e01c1c34ea38f777e888383ebdd9d746cc3f2e9b472626
|
7
|
+
data.tar.gz: e9ab3c2054c677c2e0977134e4105571d202677377dc579a480829989f47719f6ee170fe365fa8376c4aba5a67d87837b54da68ce8a26d413ba92e0b20e57c21
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.2.12](https://github.com/klueless-io/rails_app_generator/compare/v0.2.11...v0.2.12) (2022-08-12)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add motor-admin profile ([0e41a1e](https://github.com/klueless-io/rails_app_generator/commit/0e41a1ece000a1b818d5756aabbd14d52788b462))
|
7
|
+
|
1
8
|
## [0.2.11](https://github.com/klueless-io/rails_app_generator/compare/v0.2.10...v0.2.11) (2022-08-12)
|
2
9
|
|
3
10
|
|
@@ -0,0 +1,47 @@
|
|
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
|
+
# generate('administrate:install')
|
32
|
+
|
33
|
+
# directory "app/dashboards"
|
34
|
+
|
35
|
+
rubocop
|
36
|
+
end
|
37
|
+
|
38
|
+
def setup_db
|
39
|
+
add_scaffold('author', 'name:string email:string bio:text')
|
40
|
+
add_scaffold('post', 'title:string content:text published:boolean author:references')
|
41
|
+
add_scaffold('product', 'name', 'quantity:integer', 'price:decimal')
|
42
|
+
|
43
|
+
directory "app/models"
|
44
|
+
|
45
|
+
db_migrate
|
46
|
+
db_seed
|
47
|
+
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
|
@@ -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",
|
@@ -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",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"add_annotate": true,
|
37
37
|
"add_lograge": false,
|
38
38
|
"add_acts_as_list": false,
|
39
|
-
"add_administrate":
|
39
|
+
"add_administrate": false,
|
40
40
|
"add_browser": false,
|
41
41
|
"add_bcrypt_ruby": false,
|
42
42
|
"add_chartkick": false,
|
@@ -46,11 +46,12 @@
|
|
46
46
|
"add_httparty": false,
|
47
47
|
"add_honeybadger": false,
|
48
48
|
"add_mini_magick": false,
|
49
|
+
"add_motor_admin": true,
|
49
50
|
"add_phony_rails": false,
|
50
51
|
"add_public_suffix": false,
|
51
52
|
"add_rails_html_sanitizer": false,
|
52
53
|
"add_redcarpet": false,
|
53
54
|
"add_twilio_ruby": false,
|
54
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/
|
55
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/motor_admin/_.rb"
|
55
56
|
}
|
56
57
|
}
|
@@ -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",
|
@@ -455,6 +456,13 @@
|
|
455
456
|
"default": false,
|
456
457
|
"required": false
|
457
458
|
},
|
459
|
+
{
|
460
|
+
"name": "add_motor_admin",
|
461
|
+
"description": "",
|
462
|
+
"type": "boolean",
|
463
|
+
"default": false,
|
464
|
+
"required": false
|
465
|
+
},
|
458
466
|
{
|
459
467
|
"name": "add_phony_rails",
|
460
468
|
"description": "",
|
@@ -7,7 +7,7 @@
|
|
7
7
|
"quiet": false,
|
8
8
|
"skip": false,
|
9
9
|
"ruby": "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby",
|
10
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/
|
10
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/motor_admin/_.rb",
|
11
11
|
"database": "sqlite3",
|
12
12
|
"skip_git": true,
|
13
13
|
"skip_keeps": false,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"add_annotate": true,
|
47
47
|
"add_lograge": false,
|
48
48
|
"add_acts_as_list": false,
|
49
|
-
"add_administrate":
|
49
|
+
"add_administrate": false,
|
50
50
|
"add_browser": false,
|
51
51
|
"add_bcrypt_ruby": false,
|
52
52
|
"add_chartkick": false,
|
@@ -56,6 +56,7 @@
|
|
56
56
|
"add_httparty": false,
|
57
57
|
"add_honeybadger": false,
|
58
58
|
"add_mini_magick": false,
|
59
|
+
"add_motor_admin": true,
|
59
60
|
"add_phony_rails": false,
|
60
61
|
"add_public_suffix": false,
|
61
62
|
"add_rails_html_sanitizer": false,
|
@@ -117,6 +117,7 @@ KConfig.configure do |config|
|
|
117
117
|
rag.add_option :add_httparty , type: :boolean, default: false
|
118
118
|
rag.add_option :add_honeybadger , type: :boolean, default: false
|
119
119
|
rag.add_option :add_mini_magick , type: :boolean, default: false
|
120
|
+
rag.add_option :add_motor_admin , type: :boolean, default: false
|
120
121
|
rag.add_option :add_phony_rails , type: :boolean, default: false
|
121
122
|
rag.add_option :add_public_suffix , type: :boolean, default: false
|
122
123
|
rag.add_option :add_rails_html_sanitizer , type: :boolean, default: false
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "rails_app_generator",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.13",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "rails_app_generator",
|
9
|
-
"version": "0.2.
|
9
|
+
"version": "0.2.13",
|
10
10
|
"dependencies": {
|
11
11
|
"daisyui": "^2.20.0"
|
12
12
|
},
|
data/package.json
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"args": {
|
3
|
+
"app_path": "motor_admin",
|
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/motor_admin/_.rb",
|
10
|
+
"add_annotate": true,
|
11
|
+
"add_faker": true,
|
12
|
+
"add_motor_admin": true,
|
13
|
+
"add_rubocop": true
|
14
|
+
}
|
15
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
@@ -272,6 +272,13 @@ files:
|
|
272
272
|
- after_templates/addons/mini_magick/app/views/layouts/_footer.html.erb
|
273
273
|
- after_templates/addons/mini_magick/app/views/layouts/_navbar.html.erb
|
274
274
|
- after_templates/addons/mini_magick/app/views/layouts/application.html.erb
|
275
|
+
- after_templates/addons/motor_admin/_.rb
|
276
|
+
- after_templates/addons/motor_admin/app/controllers/home_controller.rb
|
277
|
+
- after_templates/addons/motor_admin/app/views/home/index.html.erb
|
278
|
+
- after_templates/addons/motor_admin/app/views/layouts/_footer.html.erb
|
279
|
+
- after_templates/addons/motor_admin/app/views/layouts/_navbar.html.erb
|
280
|
+
- after_templates/addons/motor_admin/app/views/layouts/application.html.erb
|
281
|
+
- after_templates/addons/motor_admin/db/seeds.rb
|
275
282
|
- after_templates/addons/phony_rails/_.rb
|
276
283
|
- after_templates/addons/phony_rails/app/controllers/home_controller.rb
|
277
284
|
- after_templates/addons/phony_rails/app/views/home/index.html.erb
|
@@ -583,6 +590,7 @@ files:
|
|
583
590
|
- profiles/addons/httparty.json
|
584
591
|
- profiles/addons/lograge.json
|
585
592
|
- profiles/addons/mini_magick.json
|
593
|
+
- profiles/addons/motor_admin.json
|
586
594
|
- profiles/addons/phony_rails.json
|
587
595
|
- profiles/addons/public_suffix.json
|
588
596
|
- profiles/addons/rails-html-sanitizer.json
|