rails_app_generator 0.2.21 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5040f4476242b440975bacea04755a6f5b2a3734b42bef7ff9af2716f5663477
4
- data.tar.gz: d772aadc218e55633caa058345424bab72f0fc118be94bf175f0ea99523ce8a4
3
+ metadata.gz: 3e643271882d2a6f9c9d1e5e417196dbefb08f94c8e7cefe866a7d8493edfaa1
4
+ data.tar.gz: 07b93158af7720c52a2384473c3af1605fb7c0f47c031726bc6c3d95888a2c99
5
5
  SHA512:
6
- metadata.gz: 572437e5b7c05918ba39071fa9d3328aaf477924f9e738325d9c60b49563a76995245016b9af70824dc3a1c2934025d69419a68e47c274beaed7e570bb3ed27d
7
- data.tar.gz: e56b65373ec558e9b854b8c39101e4f89e878b6d12a498f998b56db31b253c5dd3b99a513081546869d471c44366089ca52ea1cc3af7fd075b6563084e7d663a
6
+ metadata.gz: 37df302b97eb73a61e0dbc69006c4cc442e3f22a1f37b9e5af94f87fcab9791dccd803f1b28d0919da839fd0f78deeb40b58bc5261e82b34d1494b55b2c4d024
7
+ data.tar.gz: 044e8a0f8da4e0915b10fd894c28af8b062d5907bf216fd3afc56f285d32906a2aba767a09baeaece33e41bed0222d39498b337de4669fb2a009695db6902a8f
@@ -41,20 +41,34 @@ KManager.action :project_plan do
41
41
 
42
42
  todo(title: 'add addon - acts_as_list')
43
43
  todo(title: 'add addon - administrate')
44
+ todo(title: 'add addon - annotate')
44
45
  todo(title: 'add addon - bcrypt')
45
46
  todo(title: 'add addon - browser')
46
47
  todo(title: 'add addon - chartkick')
48
+ # continuous_integration
49
+ # devise
50
+ # docker_compose
51
+ # docker
47
52
  todo(title: 'add addon - dotenv')
53
+ # factory_bot
48
54
  todo(title: 'add addon - faker')
55
+ # generators
56
+ todo(title: 'add addon - groupdate')
49
57
  todo(title: 'add addon - hexapdf')
50
- todo(title: 'add addon - honeybadger')
51
58
  todo(title: 'add addon - httparty')
59
+ # high_voltage
60
+ todo(title: 'add addon - honeybadger')
52
61
  todo(title: 'add addon - lograge')
53
62
  todo(title: 'add addon - mini_magick')
54
63
  todo(title: 'add addon - motor_magick')
55
- todo(title: 'add addon - phony_rails')
56
64
  todo(title: 'add addon - public_suffix')
65
+ todo(title: 'add addon - phony_rails')
66
+ # pundit
57
67
  todo(title: 'add addon - rails_html_sanitizer')
68
+ # rails_app_generator
69
+ # services
70
+ # shoulda
71
+ # sidekiq
58
72
  todo(title: 'add addon - redcarpet')
59
73
  todo(title: 'add addon - groupdate')
60
74
  todo(title: 'add addon - rubocop')
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.2.21](https://github.com/klueless-io/rails_app_generator/compare/v0.2.20...v0.2.21) (2022-08-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add annotate profile ([1794612](https://github.com/klueless-io/rails_app_generator/commit/17946124c5600881a4d015c3283fc9e2e3278634))
7
+
1
8
  ## [0.2.20](https://github.com/klueless-io/rails_app_generator/compare/v0.2.19...v0.2.20) (2022-08-12)
2
9
 
3
10
 
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Avo abstracts away the common parts of building apps, letting your engineers work on your app's essential components. The result is a full-featured admin panel that works out of the box, ready to give to your end-users.
4
+ #
5
+ # exe/rag addons/avo
6
+ #
7
+ # based on: https://www.youtube.com/watch?v=WgNK-oINFww
8
+
9
+ self.local_template_path = File.dirname(__FILE__)
10
+
11
+ gac 'base rails 7 image created'
12
+
13
+ prepare_environment
14
+
15
+ add_controller('home', 'index')
16
+
17
+ route("root 'home#index'")
18
+
19
+ force_copy
20
+
21
+ directory "app/controllers"
22
+ directory "app/views/home"
23
+ directory "app/views/layouts"
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
+ after_bundle do
29
+ setup_db
30
+ setup_avo
31
+ end
32
+
33
+ def setup_db
34
+ add_scaffold('author', 'name:string', 'email:string', 'bio:text')
35
+ add_scaffold('category', 'title:string', 'description:text')
36
+ add_scaffold('post', 'title:string content:text', 'published:boolean', 'author:references', 'category:references')
37
+ add_scaffold('product', 'name', 'quantity:integer', 'price:decimal', 'author:references')
38
+
39
+ db_migrate
40
+ db_seed
41
+ end
42
+
43
+ def setup_avo
44
+ generate('avo:install')
45
+ generate('avo:resource Product')
46
+ generate('avo:resource Post')
47
+ generate('avo:resource Author')
48
+ generate('avo:resource Category')
49
+ generate('avo:resource User')
50
+ generate('avo:dashboard Dashboard')
51
+
52
+ # add devise support
53
+ gsub_file 'config/initializers/avo.rb', %(# config.current_user_method = {}), 'config.current_user_method = :current_user'
54
+ end
@@ -0,0 +1,4 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ <h1>Avo</h1>
2
+
3
+ <p>Avo abstracts away the common parts of building apps, letting your engineers work on your app's essential components. The result is a full-featured admin panel that works out of the box, ready to give to your end-users.</p>
@@ -0,0 +1,3 @@
1
+ <footer>
2
+ <hr />
3
+ </footer>
@@ -0,0 +1,8 @@
1
+ <header>
2
+ <%= link_to 'Home', root_path %> |
3
+ <%= link_to 'Authors', authors_path %> |
4
+ <%= link_to 'Posts', posts_path %> |
5
+ <%= link_to 'Products', products_path %> |
6
+ <%= link_to 'ADMIN', avo_path %>
7
+ <hr />
8
+ </header>
@@ -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,132 @@
1
+ def fake_category
2
+ [
3
+ 'Action',
4
+ 'Adventure',
5
+ 'Biography',
6
+ 'Comedy',
7
+ 'Crime',
8
+ 'Drama',
9
+ 'Fantasy',
10
+ ]
11
+ end
12
+
13
+ def fake_title
14
+ [
15
+ 'Fundamentals of Wavelets',
16
+ 'Data Smart',
17
+ 'God Created the Integers',
18
+ 'Superfreakonomics',
19
+ 'Orientalism',
20
+ 'Nature of Statistical Learning Theory',
21
+ 'Integration of the Indian States',
22
+ 'Image Processing & Mathematical Morphology',
23
+ 'How to Think Like Sherlock Holmes',
24
+ 'Data Scientists at Work',
25
+ 'Slaughterhouse Five',
26
+ 'Birth of a Theorem',
27
+ 'Structure & Interpretation of Computer Programs',
28
+ 'Age of Wrath',
29
+ 'Trial',
30
+ 'Data Mining Handbook',
31
+ 'New Machiavelli',
32
+ 'Physics & Philosophy',
33
+ 'Making Software',
34
+ 'Analysis',
35
+ 'Machine Learning for Hackers',
36
+ 'Signal and the Noise',
37
+ 'Python for Data Analysis',
38
+ 'Introduction to Algorithms',
39
+ 'Beautiful and the Damned',
40
+ 'Outsider',
41
+ 'Complete Sherlock Holmes',
42
+ 'Complete Sherlock Holmes',
43
+ 'Wealth of Nations',
44
+ 'Pillars of the Earth',
45
+ 'Mein Kampf',
46
+ 'Tao of Physics',
47
+ 'Farewell to Arms',
48
+ 'Veteran',
49
+ 'False Impressions',
50
+ 'Last Lecture',
51
+ 'Return of the Primitive',
52
+ 'Jurassic Park',
53
+ 'Russian Journal',
54
+ 'Tales of Mystery and Imagination',
55
+ 'Freakonomics',
56
+ 'Hidden Connections',
57
+ 'Story of Philosophy',
58
+ 'Asami Asami',
59
+ 'Journal of a Novel',
60
+ 'Once There Was a War',
61
+ 'Moon is Down',
62
+ 'Brethren',
63
+ 'In a Free State',
64
+ 'Catch 22',
65
+ 'Complete Mastermind',
66
+ 'Dylan on Dylan',
67
+ 'Soft Computing & Intelligent Systems',
68
+ 'Textbook of Economic Theory',
69
+ 'Econometric Analysis',
70
+ 'Learning OpenCV',
71
+ 'Data Structures Using C & C++',
72
+ 'Computer Vision',
73
+ 'Principles of Communication Systems',
74
+ 'Let Us C',
75
+ 'Amulet of Samarkand',
76
+ 'Crime and Punishment',
77
+ 'Angels & Demons',
78
+ 'Argumentative Indian',
79
+ 'Sea of Poppies',
80
+ 'Idea of Justice',
81
+ 'Raisin in the Sun',
82
+ 'Prisoner of Birth',
83
+ 'Scoop!',
84
+ 'Ahe Manohar Tari',
85
+ 'Last Mughal',
86
+ 'Social Choice & Welfare',
87
+ 'Radiowaril Bhashane & Shrutika',
88
+ 'Gun Gayin Awadi',
89
+ 'Aghal Paghal',
90
+ 'Beyond Degrees',
91
+ 'Manasa',
92
+ 'India from Midnight to Milennium',
93
+ 'Great Indian Novel',
94
+ 'O Jerusalem!',
95
+ 'City of Joy',
96
+ 'Freedom at Midnight',
97
+ 'Winter of Our Discontent',
98
+ 'On Education',
99
+ 'Free Will',
100
+ 'Bookless in Baghdad',
101
+ 'Case of the Lame Canary',
102
+ 'Theory of Everything',
103
+ 'New Markets & Other Essays',
104
+ 'Electric Universe',
105
+ 'Hunchback of Notre Dame',
106
+ 'Burning Bright',
107
+ 'Age of Discontuinity'
108
+ ].sample
109
+ end
110
+
111
+ 60.times do
112
+ Author.create!(name: Faker::Name.name, bio: Faker::Lorem.words(number: 5).join(' '), email: Faker::Internet.email)
113
+ end
114
+
115
+ fake_category.each do |category|
116
+ Category.create!(title: category, description: Faker::Lorem.sentence)
117
+ end
118
+
119
+ 100.times do |i|
120
+ Post.create!(title: fake_title,
121
+ content: "This is the body of post #{i}",
122
+ published: Faker::Boolean.boolean(true_ratio: 0.6),
123
+ author: Author.all.sample)
124
+ end
125
+
126
+ 200.times do
127
+ Product.create!(
128
+ name: Faker::Name.name,
129
+ quantity: Faker::Number.number(digits: 2),
130
+ price: Faker::Number.decimal(l_digits: 4)
131
+ )
132
+ end
@@ -40,27 +40,28 @@
40
40
  "skip_bundle",
41
41
  "note",
42
42
  "test",
43
- "add_devise",
44
- "add_dotenv",
45
- "add_rubocop",
46
- "add_annotate",
47
- "add_lograge",
48
43
  "add_acts_as_list",
49
44
  "add_administrate",
50
- "add_browser",
45
+ "add_annotate",
46
+ "add_avo",
51
47
  "add_bcrypt",
48
+ "add_browser",
52
49
  "add_chartkick",
50
+ "add_devise",
51
+ "add_dotenv",
53
52
  "add_faker",
54
53
  "add_groupdate",
55
54
  "add_hexapdf",
56
55
  "add_httparty",
57
56
  "add_honeybadger",
57
+ "add_lograge",
58
58
  "add_mini_magick",
59
59
  "add_motor_admin",
60
- "add_phony_rails",
61
60
  "add_public_suffix",
61
+ "add_phony_rails",
62
62
  "add_rails_html_sanitizer",
63
63
  "add_redcarpet",
64
+ "add_rubocop",
64
65
  "add_twilio_ruby"
65
66
  ],
66
67
  "class_options": [
@@ -345,22 +346,15 @@
345
346
  "required": false
346
347
  },
347
348
  {
348
- "name": "add_devise",
349
- "description": "Indicates when to generate add devise",
350
- "type": "boolean",
351
- "default": false,
352
- "required": false
353
- },
354
- {
355
- "name": "add_dotenv",
356
- "description": "Indicates when to generate add dotenv",
349
+ "name": "add_acts_as_list",
350
+ "description": "Indicates when to generate add acts as list",
357
351
  "type": "boolean",
358
352
  "default": false,
359
353
  "required": false
360
354
  },
361
355
  {
362
- "name": "add_rubocop",
363
- "description": "Indicates when to generate add rubocop",
356
+ "name": "add_administrate",
357
+ "description": "Indicates when to generate add administrate",
364
358
  "type": "boolean",
365
359
  "default": false,
366
360
  "required": false
@@ -373,43 +367,43 @@
373
367
  "required": false
374
368
  },
375
369
  {
376
- "name": "add_lograge",
377
- "description": "Indicates when to generate add lograge",
370
+ "name": "add_avo",
371
+ "description": "Indicates when to generate add avo",
378
372
  "type": "boolean",
379
373
  "default": false,
380
374
  "required": false
381
375
  },
382
376
  {
383
- "name": "add_acts_as_list",
384
- "description": "Indicates when to generate add acts as list",
377
+ "name": "add_bcrypt",
378
+ "description": "Indicates when to generate add bcrypt",
385
379
  "type": "boolean",
386
380
  "default": false,
387
381
  "required": false
388
382
  },
389
383
  {
390
- "name": "add_administrate",
391
- "description": "Indicates when to generate add administrate",
384
+ "name": "add_browser",
385
+ "description": "Indicates when to generate add browser",
392
386
  "type": "boolean",
393
387
  "default": false,
394
388
  "required": false
395
389
  },
396
390
  {
397
- "name": "add_browser",
398
- "description": "Indicates when to generate add browser",
391
+ "name": "add_chartkick",
392
+ "description": "Indicates when to generate add chartkick",
399
393
  "type": "boolean",
400
394
  "default": false,
401
395
  "required": false
402
396
  },
403
397
  {
404
- "name": "add_bcrypt",
405
- "description": "Indicates when to generate add bcrypt",
398
+ "name": "add_devise",
399
+ "description": "Indicates when to generate add devise",
406
400
  "type": "boolean",
407
401
  "default": false,
408
402
  "required": false
409
403
  },
410
404
  {
411
- "name": "add_chartkick",
412
- "description": "Indicates when to generate add chartkick",
405
+ "name": "add_dotenv",
406
+ "description": "Indicates when to generate add dotenv",
413
407
  "type": "boolean",
414
408
  "default": false,
415
409
  "required": false
@@ -449,6 +443,13 @@
449
443
  "default": false,
450
444
  "required": false
451
445
  },
446
+ {
447
+ "name": "add_lograge",
448
+ "description": "Indicates when to generate add lograge",
449
+ "type": "boolean",
450
+ "default": false,
451
+ "required": false
452
+ },
452
453
  {
453
454
  "name": "add_mini_magick",
454
455
  "description": "Indicates when to generate add mini magick",
@@ -464,15 +465,15 @@
464
465
  "required": false
465
466
  },
466
467
  {
467
- "name": "add_phony_rails",
468
- "description": "Indicates when to generate add phony rails",
468
+ "name": "add_public_suffix",
469
+ "description": "Indicates when to generate add public suffix",
469
470
  "type": "boolean",
470
471
  "default": false,
471
472
  "required": false
472
473
  },
473
474
  {
474
- "name": "add_public_suffix",
475
- "description": "Indicates when to generate add public suffix",
475
+ "name": "add_phony_rails",
476
+ "description": "Indicates when to generate add phony rails",
476
477
  "type": "boolean",
477
478
  "default": false,
478
479
  "required": false
@@ -491,6 +492,13 @@
491
492
  "default": false,
492
493
  "required": false
493
494
  },
495
+ {
496
+ "name": "add_rubocop",
497
+ "description": "Indicates when to generate add rubocop",
498
+ "type": "boolean",
499
+ "default": false,
500
+ "required": false
501
+ },
494
502
  {
495
503
  "name": "add_twilio_ruby",
496
504
  "description": "Indicates when to generate add twilio ruby",
@@ -30,28 +30,29 @@
30
30
  "skip_bundle": false,
31
31
  "note": "",
32
32
  "test": "rspec",
33
- "add_devise": false,
34
- "add_dotenv": false,
35
- "add_rubocop": false,
36
- "add_annotate": true,
37
- "add_lograge": false,
38
33
  "add_acts_as_list": false,
39
- "add_administrate": false,
40
- "add_browser": false,
34
+ "add_administrate": true,
35
+ "add_annotate": true,
36
+ "add_avo": false,
41
37
  "add_bcrypt": false,
38
+ "add_browser": false,
42
39
  "add_chartkick": false,
43
- "add_faker": false,
40
+ "add_devise": false,
41
+ "add_dotenv": false,
42
+ "add_faker": true,
44
43
  "add_groupdate": false,
45
44
  "add_hexapdf": false,
46
45
  "add_httparty": false,
47
46
  "add_honeybadger": false,
47
+ "add_lograge": false,
48
48
  "add_mini_magick": false,
49
49
  "add_motor_admin": false,
50
- "add_phony_rails": false,
51
50
  "add_public_suffix": false,
51
+ "add_phony_rails": false,
52
52
  "add_rails_html_sanitizer": false,
53
53
  "add_redcarpet": false,
54
+ "add_rubocop": true,
54
55
  "add_twilio_ruby": false,
55
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/annotate/_.rb"
56
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/administrate/_.rb"
56
57
  }
57
58
  }
@@ -40,27 +40,28 @@
40
40
  "skip_bundle",
41
41
  "note",
42
42
  "test",
43
- "add_devise",
44
- "add_dotenv",
45
- "add_rubocop",
46
- "add_annotate",
47
- "add_lograge",
48
43
  "add_acts_as_list",
49
44
  "add_administrate",
50
- "add_browser",
45
+ "add_annotate",
46
+ "add_avo",
51
47
  "add_bcrypt",
48
+ "add_browser",
52
49
  "add_chartkick",
50
+ "add_devise",
51
+ "add_dotenv",
53
52
  "add_faker",
54
53
  "add_groupdate",
55
54
  "add_hexapdf",
56
55
  "add_httparty",
57
56
  "add_honeybadger",
57
+ "add_lograge",
58
58
  "add_mini_magick",
59
59
  "add_motor_admin",
60
- "add_phony_rails",
61
60
  "add_public_suffix",
61
+ "add_phony_rails",
62
62
  "add_rails_html_sanitizer",
63
63
  "add_redcarpet",
64
+ "add_rubocop",
64
65
  "add_twilio_ruby"
65
66
  ],
66
67
  "class_options": [
@@ -345,21 +346,14 @@
345
346
  "required": false
346
347
  },
347
348
  {
348
- "name": "add_devise",
349
- "description": "",
350
- "type": "boolean",
351
- "default": false,
352
- "required": false
353
- },
354
- {
355
- "name": "add_dotenv",
349
+ "name": "add_acts_as_list",
356
350
  "description": "",
357
351
  "type": "boolean",
358
352
  "default": false,
359
353
  "required": false
360
354
  },
361
355
  {
362
- "name": "add_rubocop",
356
+ "name": "add_administrate",
363
357
  "description": "",
364
358
  "type": "boolean",
365
359
  "default": false,
@@ -373,42 +367,42 @@
373
367
  "required": false
374
368
  },
375
369
  {
376
- "name": "add_lograge",
370
+ "name": "add_avo",
377
371
  "description": "",
378
372
  "type": "boolean",
379
373
  "default": false,
380
374
  "required": false
381
375
  },
382
376
  {
383
- "name": "add_acts_as_list",
377
+ "name": "add_bcrypt",
384
378
  "description": "",
385
379
  "type": "boolean",
386
380
  "default": false,
387
381
  "required": false
388
382
  },
389
383
  {
390
- "name": "add_administrate",
384
+ "name": "add_browser",
391
385
  "description": "",
392
386
  "type": "boolean",
393
387
  "default": false,
394
388
  "required": false
395
389
  },
396
390
  {
397
- "name": "add_browser",
391
+ "name": "add_chartkick",
398
392
  "description": "",
399
393
  "type": "boolean",
400
394
  "default": false,
401
395
  "required": false
402
396
  },
403
397
  {
404
- "name": "add_bcrypt",
398
+ "name": "add_devise",
405
399
  "description": "",
406
400
  "type": "boolean",
407
401
  "default": false,
408
402
  "required": false
409
403
  },
410
404
  {
411
- "name": "add_chartkick",
405
+ "name": "add_dotenv",
412
406
  "description": "",
413
407
  "type": "boolean",
414
408
  "default": false,
@@ -449,6 +443,13 @@
449
443
  "default": false,
450
444
  "required": false
451
445
  },
446
+ {
447
+ "name": "add_lograge",
448
+ "description": "",
449
+ "type": "boolean",
450
+ "default": false,
451
+ "required": false
452
+ },
452
453
  {
453
454
  "name": "add_mini_magick",
454
455
  "description": "",
@@ -464,14 +465,14 @@
464
465
  "required": false
465
466
  },
466
467
  {
467
- "name": "add_phony_rails",
468
+ "name": "add_public_suffix",
468
469
  "description": "",
469
470
  "type": "boolean",
470
471
  "default": false,
471
472
  "required": false
472
473
  },
473
474
  {
474
- "name": "add_public_suffix",
475
+ "name": "add_phony_rails",
475
476
  "description": "",
476
477
  "type": "boolean",
477
478
  "default": false,
@@ -491,6 +492,13 @@
491
492
  "default": false,
492
493
  "required": false
493
494
  },
495
+ {
496
+ "name": "add_rubocop",
497
+ "description": "",
498
+ "type": "boolean",
499
+ "default": false,
500
+ "required": false
501
+ },
494
502
  {
495
503
  "name": "add_twilio_ruby",
496
504
  "description": "",