rails_app_generator 0.2.4 → 0.2.7
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 +4 -4
- data/CHANGELOG.md +23 -0
- data/after_templates/addons/phony_rails/_.rb +62 -0
- data/after_templates/addons/phony_rails/app/controllers/home_controller.rb +7 -0
- data/after_templates/addons/phony_rails/app/views/home/index.html.erb +46 -0
- data/after_templates/addons/phony_rails/app/views/layouts/application.html.erb +19 -0
- data/after_templates/addons/phony_rails/db/seeds.rb +16 -0
- data/after_templates/addons/public_suffix/_.rb +23 -0
- data/after_templates/addons/public_suffix/app/controllers/home_controller.rb +7 -0
- data/after_templates/addons/public_suffix/app/views/home/index.html.erb +29 -0
- data/after_templates/addons/public_suffix/app/views/layouts/application.html.erb +23 -0
- data/docs/last_run/app_generator_class.json +24 -0
- data/docs/last_run/app_generator_data.json +4 -2
- data/docs/last_run/rails_options_class.json +25 -1
- data/docs/last_run/rails_options_data.json +4 -2
- data/lib/rails_app_generator/addons/bcrypt_ruby.rb +13 -0
- data/lib/rails_app_generator/addons/phony_rails.rb +13 -0
- data/lib/rails_app_generator/addons/public_suffix.rb +13 -0
- data/lib/rails_app_generator/rag_initializer.rb +14 -127
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/phony_rails.json +12 -0
- data/profiles/addons/public_suffix.json +12 -0
- data/templates/thor_task/profile/after_template.rb +2 -4
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 445a95cd20f4f77c1ac1e1cc587d7c613718f0a78e0e1b3fd4b7bb9fbb4c7b0a
|
|
4
|
+
data.tar.gz: 28fa7c5091cccb5b7610a11748dcd197bde5cd2319cb696fbb961066ff6831ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12e593aa71b493ff0e9aa96b3a180c86b19230a2aa247e309467fcffcd30c5e2869c43c97b2e3c0b3e68b72dcc7b3097d7dbc69e49af08911a2ab899c40f39d8
|
|
7
|
+
data.tar.gz: '0783313d06b010a6c7ba215b61e2f2bad5d7c32c42b016d3844a886fd2f435fd76f2756ae2af6645ebdc73a08dd645c836b22f764b3153c5823f2ca77619fb4a'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## [0.2.6](https://github.com/klueless-io/rails_app_generator/compare/v0.2.5...v0.2.6) (2022-08-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add phony_rails addon ([77aec0e](https://github.com/klueless-io/rails_app_generator/commit/77aec0e7ed2fe9093cb988ab408db1f1e50e78d3))
|
|
7
|
+
* add phony_rails addon ([7a45829](https://github.com/klueless-io/rails_app_generator/commit/7a45829688dfb371a4257a5e1c6bb10ebc0a56ad))
|
|
8
|
+
|
|
9
|
+
## [0.2.5](https://github.com/klueless-io/rails_app_generator/compare/v0.2.4...v0.2.5) (2022-08-10)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* add public_suffix addon ([dce30f3](https://github.com/klueless-io/rails_app_generator/commit/dce30f3d3a479ca41ab7c60deef59f9d19d2ce13))
|
|
15
|
+
|
|
16
|
+
## [0.2.4](https://github.com/klueless-io/rails_app_generator/compare/v0.2.3...v0.2.4) (2022-08-10)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* add lograge addon ([e980bb2](https://github.com/klueless-io/rails_app_generator/commit/e980bb2ccf46a33aba755c0370a9ae263e820256))
|
|
22
|
+
* cops ([cce097d](https://github.com/klueless-io/rails_app_generator/commit/cce097d61da2a5d8a3d1c335a08820cacb1936f4))
|
|
23
|
+
|
|
1
24
|
## [0.2.3](https://github.com/klueless-io/rails_app_generator/compare/v0.2.2...v0.2.3) (2022-08-09)
|
|
2
25
|
|
|
3
26
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This Gem adds useful methods to your Rails app to validate, display and save phone numbers.
|
|
4
|
+
#
|
|
5
|
+
# exe/rag addons/phony_rails
|
|
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
|
+
end
|
|
29
|
+
|
|
30
|
+
def setup_db
|
|
31
|
+
# add_scaffold('post', 'title', 'body:text')
|
|
32
|
+
# add_scaffold('people', 'first_name', 'last_name', 'age:integer', 'address:text')
|
|
33
|
+
# add_scaffold('product', 'name', 'price:integer')
|
|
34
|
+
|
|
35
|
+
# db_migrate
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Other template command examples
|
|
39
|
+
# bundle_install
|
|
40
|
+
# css_install('tailwind')
|
|
41
|
+
# rails_command('db:migrate')
|
|
42
|
+
# rails_command('db:migrate')
|
|
43
|
+
# bundle_add('hotwire-rails')
|
|
44
|
+
# rails_command('hotwire:install')
|
|
45
|
+
# run('bin/importmap pin sortablejs')
|
|
46
|
+
# run('npm install daisyui')
|
|
47
|
+
# rubocop
|
|
48
|
+
#
|
|
49
|
+
# directory 'app/assets/images'
|
|
50
|
+
# create_file 'app/assets/stylesheets/custom-bootstrap-import.scss' , read_template('custom-bootstrap-import.scss')
|
|
51
|
+
# append_to_file 'app/assets/config/manifest.js' , read_template('manifest.js')
|
|
52
|
+
# insert_into_file 'app/views/layouts/application.html.erb', read_template('application.html.erb'),
|
|
53
|
+
# before: %( <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>)
|
|
54
|
+
# gsub_file 'app/views/layouts/application.html.erb', %(container mx-auto mt-28 px-5 flex), 'container mx-auto px-5'
|
|
55
|
+
# template 'home.css', 'app/assets/stylesheets/home.css'
|
|
56
|
+
#
|
|
57
|
+
# add_controller('page', 'benefits', 'faq', 'terms', 'privacy', '--skip-routes')
|
|
58
|
+
# route(<<-'RUBY')
|
|
59
|
+
# PageController.action_methods.each do |action|
|
|
60
|
+
# get "/#{action}", to: "page##{action}", as: "page_#{action}"
|
|
61
|
+
# end
|
|
62
|
+
# RUBY
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.alert { color: red; }
|
|
3
|
+
.notice { color: green; }
|
|
4
|
+
</style>
|
|
5
|
+
|
|
6
|
+
<% flash.each do |type, msg| %><div class="<%= type %>"><%= msg %></div><% end %>
|
|
7
|
+
<% if flash.any? %><hr /><% end %>
|
|
8
|
+
|
|
9
|
+
<h1>Phony rails</h1>
|
|
10
|
+
|
|
11
|
+
<h2>This Gem adds useful methods to your Rails app to validate, display and save phone numbers.</h2>
|
|
12
|
+
|
|
13
|
+
<hr />
|
|
14
|
+
|
|
15
|
+
<pre>
|
|
16
|
+
<code>
|
|
17
|
+
PhonyRails.normalize_number('0211112222', country_code: 'AU')
|
|
18
|
+
PhonyRails.normalize_number('0424001122', country_code: 'AU')
|
|
19
|
+
PhonyRails.normalize_number('+4790909090', default_country_code: 'SE')
|
|
20
|
+
</code>
|
|
21
|
+
</pre>
|
|
22
|
+
|
|
23
|
+
<pre>
|
|
24
|
+
<code>
|
|
25
|
+
<%= PhonyRails.normalize_number('0211112222', country_code: 'AU') %>
|
|
26
|
+
<%= PhonyRails.normalize_number('0424001122', country_code: 'AU') %>
|
|
27
|
+
<%= PhonyRails.normalize_number('+61424001122', default_country_code: 'AU') %>
|
|
28
|
+
</code>
|
|
29
|
+
</pre>
|
|
30
|
+
|
|
31
|
+
<hr />
|
|
32
|
+
|
|
33
|
+
<pre>
|
|
34
|
+
<code>
|
|
35
|
+
"311012341234".phony_formatted(format: :international, spaces: '-')
|
|
36
|
+
"+31-10-12341234".phony_formatted(format: :international, spaces: '-')
|
|
37
|
+
"+31(0)012341234".phony_formatted(format: :international, spaces: '-')
|
|
38
|
+
</code>
|
|
39
|
+
</pre>
|
|
40
|
+
|
|
41
|
+
<pre>
|
|
42
|
+
<code>
|
|
43
|
+
<%= "311012341234".phony_formatted(format: :international, spaces: '-') %>
|
|
44
|
+
<%= "+31-10-12341234".phony_formatted(format: :international, spaces: '-') %>
|
|
45
|
+
<%= "+31(0)012341234".phony_formatted(format: :international, spaces: '-') %></code>
|
|
46
|
+
</pre>
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
<%%= yield %>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
|
2
|
+
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
|
|
3
|
+
#
|
|
4
|
+
# User.find_or_create_by(email: "admin@admin.com") do |user|
|
|
5
|
+
# user.name = 'Admin'
|
|
6
|
+
# user.password = 'password'
|
|
7
|
+
# user.admin = true
|
|
8
|
+
# end
|
|
9
|
+
|
|
10
|
+
# david = User.create(email: 'david@site.com', name: 'david', password: 'password')
|
|
11
|
+
# bob = User.create(email: 'bob@site.com', name: 'bob', password: 'password')
|
|
12
|
+
# lisa = User.create(email: 'lisa@site.com', name: 'lisa', password: 'password')
|
|
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
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains.
|
|
4
|
+
#
|
|
5
|
+
# exe/rag addons/public_suffix
|
|
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
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<h1>Public suffix</h1>
|
|
2
|
+
|
|
3
|
+
<h2>PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains.</h2>
|
|
4
|
+
|
|
5
|
+
<hr />
|
|
6
|
+
|
|
7
|
+
<p>PublicSuffix.domain("<b>KlueLess.io</b>")</p>
|
|
8
|
+
<code><%= PublicSuffix.domain("KlueLess.io") %></code>
|
|
9
|
+
<br><br>
|
|
10
|
+
<p>PublicSuffix.domain("<b>AppyDave.com</b>")</p>
|
|
11
|
+
<code><%= PublicSuffix.domain("AppyDave.com") %></code>
|
|
12
|
+
<br><br>
|
|
13
|
+
<p>PublicSuffix.domain("<b>www.google.com</b>")</p>
|
|
14
|
+
<code><%= PublicSuffix.domain("www.google.com") %></code>
|
|
15
|
+
<br><br>
|
|
16
|
+
<p>PublicSuffix.domain("<b>www.google.co.uk</b>")</p>
|
|
17
|
+
<code><%= PublicSuffix.domain("www.google.co.uk") %></code>
|
|
18
|
+
<br><br>
|
|
19
|
+
|
|
20
|
+
<hr />
|
|
21
|
+
|
|
22
|
+
<p>domain = PublicSuffix.parse("<b>www.google.com</b>")</p>
|
|
23
|
+
<% domain = PublicSuffix.parse("www.google.com") %>
|
|
24
|
+
|
|
25
|
+
<p>tld: <code><b><%= domain.tld %></b></code>
|
|
26
|
+
<p>sld: <code><b><%= domain.sld %></b></code>
|
|
27
|
+
<p>trd: <code><b><%= domain.trd %></b></code>
|
|
28
|
+
<p>domain: <code><b><%= domain.domain %></b></code>
|
|
29
|
+
<p>subdomain: <code><b><%= domain.subdomain %></b></code>
|
|
@@ -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
|
+
<style>
|
|
15
|
+
.alert { color: red; }
|
|
16
|
+
.notice { color: green; }
|
|
17
|
+
</style>
|
|
18
|
+
</head>
|
|
19
|
+
|
|
20
|
+
<body>
|
|
21
|
+
<%%= yield %>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"add_lograge",
|
|
48
48
|
"add_acts_as_list",
|
|
49
49
|
"add_browser",
|
|
50
|
+
"add_bcrypt_ruby",
|
|
50
51
|
"add_chartkick",
|
|
51
52
|
"add_faker",
|
|
52
53
|
"add_groupdate",
|
|
@@ -54,6 +55,8 @@
|
|
|
54
55
|
"add_httparty",
|
|
55
56
|
"add_honeybadger",
|
|
56
57
|
"add_mini_magick",
|
|
58
|
+
"add_phony_rails",
|
|
59
|
+
"add_public_suffix",
|
|
57
60
|
"add_rails_html_sanitizer",
|
|
58
61
|
"add_twilio_ruby"
|
|
59
62
|
],
|
|
@@ -387,6 +390,13 @@
|
|
|
387
390
|
"default": false,
|
|
388
391
|
"required": false
|
|
389
392
|
},
|
|
393
|
+
{
|
|
394
|
+
"name": "add_bcrypt_ruby",
|
|
395
|
+
"description": "Indicates when to generate add bcrypt ruby",
|
|
396
|
+
"type": "boolean",
|
|
397
|
+
"default": false,
|
|
398
|
+
"required": false
|
|
399
|
+
},
|
|
390
400
|
{
|
|
391
401
|
"name": "add_chartkick",
|
|
392
402
|
"description": "Indicates when to generate add chartkick",
|
|
@@ -436,6 +446,20 @@
|
|
|
436
446
|
"default": false,
|
|
437
447
|
"required": false
|
|
438
448
|
},
|
|
449
|
+
{
|
|
450
|
+
"name": "add_phony_rails",
|
|
451
|
+
"description": "Indicates when to generate add phony rails",
|
|
452
|
+
"type": "boolean",
|
|
453
|
+
"default": false,
|
|
454
|
+
"required": false
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "add_public_suffix",
|
|
458
|
+
"description": "Indicates when to generate add public suffix",
|
|
459
|
+
"type": "boolean",
|
|
460
|
+
"default": false,
|
|
461
|
+
"required": false
|
|
462
|
+
},
|
|
439
463
|
{
|
|
440
464
|
"name": "add_rails_html_sanitizer",
|
|
441
465
|
"description": "Indicates when to generate add rails html sanitizer",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"add_dotenv": false,
|
|
35
35
|
"add_rubocop": false,
|
|
36
36
|
"add_annotate": false,
|
|
37
|
-
"add_lograge":
|
|
37
|
+
"add_lograge": false,
|
|
38
38
|
"add_acts_as_list": false,
|
|
39
39
|
"add_browser": false,
|
|
40
40
|
"add_chartkick": false,
|
|
@@ -44,8 +44,10 @@
|
|
|
44
44
|
"add_httparty": false,
|
|
45
45
|
"add_honeybadger": false,
|
|
46
46
|
"add_mini_magick": false,
|
|
47
|
+
"add_phony_rails": true,
|
|
48
|
+
"add_public_suffix": false,
|
|
47
49
|
"add_rails_html_sanitizer": false,
|
|
48
50
|
"add_twilio_ruby": false,
|
|
49
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/
|
|
51
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/phony_rails/_.rb"
|
|
50
52
|
}
|
|
51
53
|
}
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"add_lograge",
|
|
48
48
|
"add_acts_as_list",
|
|
49
49
|
"add_browser",
|
|
50
|
+
"add_bcrypt_ruby",
|
|
50
51
|
"add_chartkick",
|
|
51
52
|
"add_faker",
|
|
52
53
|
"add_groupdate",
|
|
@@ -54,6 +55,8 @@
|
|
|
54
55
|
"add_httparty",
|
|
55
56
|
"add_honeybadger",
|
|
56
57
|
"add_mini_magick",
|
|
58
|
+
"add_phony_rails",
|
|
59
|
+
"add_public_suffix",
|
|
57
60
|
"add_rails_html_sanitizer",
|
|
58
61
|
"add_twilio_ruby"
|
|
59
62
|
],
|
|
@@ -387,6 +390,13 @@
|
|
|
387
390
|
"default": false,
|
|
388
391
|
"required": false
|
|
389
392
|
},
|
|
393
|
+
{
|
|
394
|
+
"name": "add_bcrypt_ruby",
|
|
395
|
+
"description": "",
|
|
396
|
+
"type": "boolean",
|
|
397
|
+
"default": false,
|
|
398
|
+
"required": false
|
|
399
|
+
},
|
|
390
400
|
{
|
|
391
401
|
"name": "add_chartkick",
|
|
392
402
|
"description": "",
|
|
@@ -431,7 +441,21 @@
|
|
|
431
441
|
},
|
|
432
442
|
{
|
|
433
443
|
"name": "add_mini_magick",
|
|
434
|
-
"description": "
|
|
444
|
+
"description": "",
|
|
445
|
+
"type": "boolean",
|
|
446
|
+
"default": false,
|
|
447
|
+
"required": false
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "add_phony_rails",
|
|
451
|
+
"description": "",
|
|
452
|
+
"type": "boolean",
|
|
453
|
+
"default": false,
|
|
454
|
+
"required": false
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "add_public_suffix",
|
|
458
|
+
"description": "",
|
|
435
459
|
"type": "boolean",
|
|
436
460
|
"default": false,
|
|
437
461
|
"required": false
|
|
@@ -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/phony_rails/_.rb",
|
|
11
11
|
"database": "sqlite3",
|
|
12
12
|
"skip_git": true,
|
|
13
13
|
"skip_keeps": false,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"add_dotenv": false,
|
|
45
45
|
"add_rubocop": false,
|
|
46
46
|
"add_annotate": false,
|
|
47
|
-
"add_lograge":
|
|
47
|
+
"add_lograge": false,
|
|
48
48
|
"add_acts_as_list": false,
|
|
49
49
|
"add_browser": false,
|
|
50
50
|
"add_chartkick": false,
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"add_httparty": false,
|
|
55
55
|
"add_honeybadger": false,
|
|
56
56
|
"add_mini_magick": false,
|
|
57
|
+
"add_phony_rails": true,
|
|
58
|
+
"add_public_suffix": false,
|
|
57
59
|
"add_rails_html_sanitizer": false,
|
|
58
60
|
"add_twilio_ruby": false
|
|
59
61
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RailsAppGenerator
|
|
4
|
+
# Custom add-ons for RailsAppGenerator
|
|
5
|
+
module AddOns
|
|
6
|
+
# Add BcryptRuby to rails application
|
|
7
|
+
class BcryptRuby < RailsAppGenerator::Addon
|
|
8
|
+
required_gem gem.version('bcrypt-ruby', '3.1.5', 'bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords.')
|
|
9
|
+
|
|
10
|
+
def apply; end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RailsAppGenerator
|
|
4
|
+
# Custom add-ons for RailsAppGenerator
|
|
5
|
+
module AddOns
|
|
6
|
+
# Add PhonyRails to rails application
|
|
7
|
+
class PhonyRails < RailsAppGenerator::Addon
|
|
8
|
+
required_gem gem.version('phony_rails', '0.15.0', 'This Gem adds useful methods to your Rails app to validate, display and save phone numbers.')
|
|
9
|
+
|
|
10
|
+
def apply; end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RailsAppGenerator
|
|
4
|
+
# Custom add-ons for RailsAppGenerator
|
|
5
|
+
module AddOns
|
|
6
|
+
# Add PublicSuffix to rails application
|
|
7
|
+
class PublicSuffix < RailsAppGenerator::Addon
|
|
8
|
+
required_gem gem.version('public_suffix', '5.0.0', 'PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains.')
|
|
9
|
+
|
|
10
|
+
def apply; end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -12,122 +12,6 @@ KConfig.configure do |config|
|
|
|
12
12
|
|
|
13
13
|
# rag.add_option :test , type: :string , default: 'rspec'
|
|
14
14
|
|
|
15
|
-
# # Gem Current Latest Requested Groups
|
|
16
|
-
# # aws-sdk
|
|
17
|
-
# # capistrano-bundler 1.6.0 2.1.0 ~> 1.2 development, test
|
|
18
|
-
# # capybara 3.33.0 3.37.1 = 3.33.0 development, test
|
|
19
|
-
# # clamby 1.6.6 1.6.8 = 1.6.6 default
|
|
20
|
-
# # createsend 5.1.1 6.0.0 ~> 5.1 default
|
|
21
|
-
# # database_cleaner 1.7.0 2.0.1 = 1.7.0 development, test
|
|
22
|
-
# # erubi 1.10.0 1.11.0
|
|
23
|
-
# # factory_bot 5.2.0 6.2.1
|
|
24
|
-
# # factory_bot_rails 5.2.0 6.2.0 = 5.2.0 development, test
|
|
25
|
-
# # guard-bundler 2.2.1 3.0.0 = 2.2.1 development, test
|
|
26
|
-
# # guard-rubocop 1.4.0 1.5.0 = 1.4.0 development, test
|
|
27
|
-
# # http-accept 1.7.0 2.2.0
|
|
28
|
-
# # net-ssh 6.1.0 7.0.1
|
|
29
|
-
# # oauth2 1.4.10 2.0.6
|
|
30
|
-
# # omniauth-oauth2 1.7.3 1.8.0
|
|
31
|
-
# # paper_trail 10.3.1 12.3.0 ~> 10.3 default
|
|
32
|
-
# # pg 0.21.0 1.4.2 ~> 0.20 default
|
|
33
|
-
# # pg_search 2.3.0 2.3.6 ~> 2.0 default
|
|
34
|
-
# # pry 0.13.1 0.14.1
|
|
35
|
-
# # public_suffix 2.0.5 5.0.0 ~> 2.0 default
|
|
36
|
-
# # pusher 1.4.3 2.0.2 ~> 1.3 default
|
|
37
|
-
# # rack-mini-profiler 0.10.7 3.0.0 ~> 0.10 default
|
|
38
|
-
# # rack-test 0.6.3 2.0.2
|
|
39
|
-
# # rails 5.0.7.2 7.0.3.1 = 5.0.7.2 default
|
|
40
|
-
# # railties 5.0.7.2 7.0.3.1
|
|
41
|
-
# # ransack 1.8.10 3.2.1 ~> 1.8 default
|
|
42
|
-
# # redis 3.3.5 4.7.1 ~> 3.3 default
|
|
43
|
-
# # redis-store 1.6.0 1.9.1
|
|
44
|
-
# # regexp_parser 1.8.2 2.5.0
|
|
45
|
-
# # rspec 3.10.0 3.11.0
|
|
46
|
-
# # rspec-core 3.10.1 3.11.0 = 3.10.1 development, test
|
|
47
|
-
# # rspec-expectations 3.10.1 3.11.0 = 3.10.1 development, test
|
|
48
|
-
# # rspec-mocks 3.10.2 3.11.1 = 3.10.2 development, test
|
|
49
|
-
# # rspec-rails 4.1.2 5.1.2 = 4.1.2 development, test
|
|
50
|
-
# # rspec-support 3.10.2 3.11.0 = 3.10.2 development, test
|
|
51
|
-
# # rubyzip 1.3.0 2.3.2 ~> 1.3 default
|
|
52
|
-
# # scenic 1.5.4 1.6.0 = 1.5.4 default
|
|
53
|
-
# # scout_apm 4.1.2 5.2.0 ~> 4.1 default
|
|
54
|
-
# # selenium-webdriver 3.142.7 4.3.0 = 3.142.7 development, test
|
|
55
|
-
# # shoulda-matchers 4.0.1 5.1.0 = 4.0.1 development, test
|
|
56
|
-
# # sidekiq 4.2.10 6.5.1 ~> 4.2 default
|
|
57
|
-
# # sidekiq-pool 1.9.3 2.0.1 ~> 1.8 default
|
|
58
|
-
# # sidekiq-unique-jobs 6.0.25 7.1.27 ~> 6.0 default
|
|
59
|
-
# # spring 2.1.1 4.0.0 ~> 2.0 development, test
|
|
60
|
-
# # sprockets 3.7.2 4.1.1 ~> 3.7 default
|
|
61
|
-
# # sprockets-rails 3.2.2 3.4.2
|
|
62
|
-
# # timecop 0.8.1 0.9.5 = 0.8.1 development, test
|
|
63
|
-
# # tzinfo 1.2.10 2.0.5
|
|
64
|
-
# # uglifier 3.2.0 4.2.0 ~> 3.2 default
|
|
65
|
-
# # unicorn 5.8.0 6.1.0 ~> 5.3 default
|
|
66
|
-
# # webmock 3.13.0 3.16.0 = 3.13.0 development, test
|
|
67
|
-
# # websocket-driver 0.6.5 0.7.5
|
|
68
|
-
|
|
69
|
-
# # acts_as_list 0.9.19 1.0.4 ~> 0.9 default
|
|
70
|
-
# # arel 7.1.4 9.0.0
|
|
71
|
-
# # bigdecimal 1.4.4 3.1.2 ~> 1.4 development, test
|
|
72
|
-
# # binding_of_caller 0.8.0 1.0.0 ~> 0.8 default
|
|
73
|
-
# # browser 2.7.1 5.3.1 ~> 2.3 default
|
|
74
|
-
# # capistrano-bundler 1.6.0 2.1.0 ~> 1.2 development, test
|
|
75
|
-
# # capybara 3.33.0 3.37.1 = 3.33.0 development, test
|
|
76
|
-
# # chartkick 2.3.5 4.2.0 ~> 2.3 default
|
|
77
|
-
# # childprocess 3.0.0 4.1.0
|
|
78
|
-
# # clamby 1.6.6 1.6.8 = 1.6.6 default
|
|
79
|
-
# # createsend 5.1.1 6.0.0 ~> 5.1 default
|
|
80
|
-
# # database_cleaner 1.7.0 2.0.1 = 1.7.0 development, test
|
|
81
|
-
# # factory_bot 5.2.0 6.2.1
|
|
82
|
-
# # factory_bot_rails 5.2.0 6.2.0 = 5.2.0 development, test
|
|
83
|
-
# # faker 1.9.6 2.22.0 ~> 1.7 default
|
|
84
|
-
# # groupdate 4.3.0 6.1.0 ~> 4.1 default
|
|
85
|
-
# # guard-bundler 2.2.1 3.0.0 = 2.2.1 development, test
|
|
86
|
-
# # guard-rubocop 1.4.0 1.5.0 = 1.4.0 development, test
|
|
87
|
-
# # hashie 3.6.0 5.0.0
|
|
88
|
-
# # http-accept 1.7.0 2.1.1
|
|
89
|
-
# # k_log 0.0.18 0.0.33 = 0.0.18 development, test
|
|
90
|
-
# # net-ssh 6.1.0 7.0.1
|
|
91
|
-
# # oauth2 1.4.10 2.0.6
|
|
92
|
-
# # omniauth-oauth2 1.7.3 1.8.0
|
|
93
|
-
# # paper_trail 10.3.1 12.3.0 ~> 10.3 default
|
|
94
|
-
# # pg 0.21.0 1.4.2 ~> 0.20 default
|
|
95
|
-
# # pg_search 2.3.0 2.3.6 ~> 2.0 default
|
|
96
|
-
# # pry 0.13.1 0.14.1
|
|
97
|
-
# # public_suffix 2.0.5 5.0.0 ~> 2.0 default
|
|
98
|
-
# # pusher 1.4.3 2.0.2 ~> 1.3 default
|
|
99
|
-
# # rack-mini-profiler 0.10.7 3.0.0 ~> 0.10 default
|
|
100
|
-
# # rack-test 0.6.3 2.0.2
|
|
101
|
-
# # rails 5.0.7.2 7.0.3.1 = 5.0.7.2 default
|
|
102
|
-
# # railties 5.0.7.2 7.0.3.1
|
|
103
|
-
# # ransack 1.8.10 3.2.1 ~> 1.8 default
|
|
104
|
-
# # redis 3.3.5 4.7.1 ~> 3.3 default
|
|
105
|
-
# # redis-store 1.6.0 1.9.1
|
|
106
|
-
# # regexp_parser 1.8.2 2.5.0
|
|
107
|
-
# # rspec 3.10.0 3.11.0
|
|
108
|
-
# # rspec-core 3.10.1 3.11.0 = 3.10.1 development, test
|
|
109
|
-
# # rspec-expectations 3.10.1 3.11.0 = 3.10.1 development, test
|
|
110
|
-
# # rspec-mocks 3.10.2 3.11.1 = 3.10.2 development, test
|
|
111
|
-
# # rspec-rails 4.1.2 5.1.2 = 4.1.2 development, test
|
|
112
|
-
# # rspec-support 3.10.2 3.11.0 = 3.10.2 development, test
|
|
113
|
-
# # rubyzip 1.3.0 2.3.2 ~> 1.3 default
|
|
114
|
-
# # scenic 1.5.4 1.6.0 = 1.5.4 default
|
|
115
|
-
# # scout_apm 4.1.2 5.2.0 ~> 4.1 default
|
|
116
|
-
# # selenium-webdriver 3.142.7 4.3.0 = 3.142.7 development, test
|
|
117
|
-
# # shoulda-matchers 4.0.1 5.1.0 = 4.0.1 development, test
|
|
118
|
-
# # sidekiq 4.2.10 6.5.1 ~> 4.2 default
|
|
119
|
-
# # sidekiq-pool 1.9.3 2.0.1 ~> 1.8 default
|
|
120
|
-
# # sidekiq-unique-jobs 6.0.25 7.1.27 ~> 6.0 default
|
|
121
|
-
# # spring 2.1.1 4.0.0 ~> 2.0 development, test
|
|
122
|
-
# # sprockets 3.7.2 4.1.1 ~> 3.7 default
|
|
123
|
-
# # sprockets-rails 3.2.2 3.4.2
|
|
124
|
-
# # timecop 0.8.1 0.9.5 = 0.8.1 development, test
|
|
125
|
-
# # tzinfo 1.2.10 2.0.5
|
|
126
|
-
# # uglifier 3.2.0 4.2.0 ~> 3.2 default
|
|
127
|
-
# # unicorn 5.8.0 6.1.0 ~> 5.3 default
|
|
128
|
-
# # webmock 3.13.0 3.14.0 = 3.13.0 development, test
|
|
129
|
-
# # websocket-driver 0.6.5 0.7.5
|
|
130
|
-
|
|
131
15
|
# rag.add_option :skip_namespace , type: :boolean , default: false , description: "Skip namespace (affects only isolated engines)"
|
|
132
16
|
# rag.add_option :skip_collision_check , type: :boolean , default: false , description: "Skip collision check"
|
|
133
17
|
rag.add_option :force , type: :boolean , default: nil , description: 'Overwrite files that already exist'
|
|
@@ -222,17 +106,20 @@ KConfig.configure do |config|
|
|
|
222
106
|
# rag.add_option :add_shoulda , type: :boolean, default: false
|
|
223
107
|
|
|
224
108
|
# NEW GEM ADDONS
|
|
225
|
-
rag.add_option :add_acts_as_list
|
|
226
|
-
rag.add_option :add_browser
|
|
227
|
-
rag.add_option :
|
|
228
|
-
rag.add_option :
|
|
229
|
-
rag.add_option :
|
|
230
|
-
rag.add_option :
|
|
231
|
-
rag.add_option :
|
|
232
|
-
rag.add_option :
|
|
233
|
-
rag.add_option :
|
|
234
|
-
rag.add_option :
|
|
235
|
-
rag.add_option :
|
|
109
|
+
rag.add_option :add_acts_as_list , type: :boolean, default: false
|
|
110
|
+
rag.add_option :add_browser , type: :boolean, default: false
|
|
111
|
+
rag.add_option :add_bcrypt_ruby , type: :boolean, default: false
|
|
112
|
+
rag.add_option :add_chartkick , type: :boolean, default: false
|
|
113
|
+
rag.add_option :add_faker , type: :boolean, default: false
|
|
114
|
+
rag.add_option :add_groupdate , type: :boolean, default: false
|
|
115
|
+
rag.add_option :add_hexapdf , type: :boolean, default: false
|
|
116
|
+
rag.add_option :add_httparty , type: :boolean, default: false
|
|
117
|
+
rag.add_option :add_honeybadger , type: :boolean, default: false
|
|
118
|
+
rag.add_option :add_mini_magick , type: :boolean, default: false
|
|
119
|
+
rag.add_option :add_phony_rails , type: :boolean, default: false
|
|
120
|
+
rag.add_option :add_public_suffix , type: :boolean, default: false
|
|
121
|
+
rag.add_option :add_rails_html_sanitizer , type: :boolean, default: false
|
|
122
|
+
rag.add_option :add_twilio_ruby , type: :boolean, default: false
|
|
236
123
|
end
|
|
237
124
|
|
|
238
125
|
# Make sure that RailsOptions reflect the options available from Railties
|
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.7",
|
|
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.7",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"daisyui": "^2.20.0"
|
|
12
12
|
},
|
data/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"args": {
|
|
3
|
+
"app_path": "phony_rails",
|
|
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/phony_rails/_.rb",
|
|
10
|
+
"add_phony_rails": true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"args": {
|
|
3
|
+
"app_path": "public_suffix",
|
|
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/public_suffix/_.rb",
|
|
10
|
+
"add_public_suffix": true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# require 'pry'
|
|
4
|
-
|
|
5
3
|
# <%= data.description %>
|
|
6
4
|
#
|
|
7
5
|
# exe/rag addons/<%= data.name_snake %>
|
|
@@ -10,6 +8,8 @@ self.local_template_path = File.dirname(__FILE__)
|
|
|
10
8
|
|
|
11
9
|
gac 'base rails 7 image created'
|
|
12
10
|
|
|
11
|
+
bundle_install
|
|
12
|
+
|
|
13
13
|
add_controller('home', 'index')
|
|
14
14
|
|
|
15
15
|
route("root 'home#index'")
|
|
@@ -17,9 +17,7 @@ route("root 'home#index'")
|
|
|
17
17
|
force_copy
|
|
18
18
|
|
|
19
19
|
directory "app/controllers"
|
|
20
|
-
|
|
21
20
|
directory "app/views/home"
|
|
22
|
-
|
|
23
21
|
directory "app/views/layouts"
|
|
24
22
|
template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
|
|
25
23
|
|
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.7
|
|
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-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bootsnap
|
|
@@ -250,6 +250,15 @@ files:
|
|
|
250
250
|
- after_templates/addons/mini_magick/app/views/layouts/_footer.html.erb
|
|
251
251
|
- after_templates/addons/mini_magick/app/views/layouts/_navbar.html.erb
|
|
252
252
|
- after_templates/addons/mini_magick/app/views/layouts/application.html.erb
|
|
253
|
+
- after_templates/addons/phony_rails/_.rb
|
|
254
|
+
- after_templates/addons/phony_rails/app/controllers/home_controller.rb
|
|
255
|
+
- after_templates/addons/phony_rails/app/views/home/index.html.erb
|
|
256
|
+
- after_templates/addons/phony_rails/app/views/layouts/application.html.erb
|
|
257
|
+
- after_templates/addons/phony_rails/db/seeds.rb
|
|
258
|
+
- after_templates/addons/public_suffix/_.rb
|
|
259
|
+
- after_templates/addons/public_suffix/app/controllers/home_controller.rb
|
|
260
|
+
- after_templates/addons/public_suffix/app/views/home/index.html.erb
|
|
261
|
+
- after_templates/addons/public_suffix/app/views/layouts/application.html.erb
|
|
253
262
|
- after_templates/addons/rails_html_sanitizer/_.rb
|
|
254
263
|
- after_templates/addons/rails_html_sanitizer/home/index.html.erb
|
|
255
264
|
- after_templates/addons/rubocop/_.rb
|
|
@@ -462,6 +471,7 @@ files:
|
|
|
462
471
|
- lib/rails_app_generator/addon_util.rb
|
|
463
472
|
- lib/rails_app_generator/addons/acts_as_list.rb
|
|
464
473
|
- lib/rails_app_generator/addons/annotate.rb
|
|
474
|
+
- lib/rails_app_generator/addons/bcrypt_ruby.rb
|
|
465
475
|
- lib/rails_app_generator/addons/browser.rb
|
|
466
476
|
- lib/rails_app_generator/addons/chartkick.rb
|
|
467
477
|
- lib/rails_app_generator/addons/continuous_integration.rb
|
|
@@ -482,6 +492,8 @@ files:
|
|
|
482
492
|
- lib/rails_app_generator/addons/irbrc.rb
|
|
483
493
|
- lib/rails_app_generator/addons/lograge.rb
|
|
484
494
|
- lib/rails_app_generator/addons/mini_magick.rb
|
|
495
|
+
- lib/rails_app_generator/addons/phony_rails.rb
|
|
496
|
+
- lib/rails_app_generator/addons/public_suffix.rb
|
|
485
497
|
- lib/rails_app_generator/addons/pundit.rb
|
|
486
498
|
- lib/rails_app_generator/addons/rails_html_sanitizer.rb
|
|
487
499
|
- lib/rails_app_generator/addons/rspec.rb
|
|
@@ -538,6 +550,8 @@ files:
|
|
|
538
550
|
- profiles/addons/httparty.json
|
|
539
551
|
- profiles/addons/lograge.json
|
|
540
552
|
- profiles/addons/mini_magick.json
|
|
553
|
+
- profiles/addons/phony_rails.json
|
|
554
|
+
- profiles/addons/public_suffix.json
|
|
541
555
|
- profiles/addons/rails-html-sanitizer.json
|
|
542
556
|
- profiles/addons/rubocop.json
|
|
543
557
|
- profiles/addons/twilio_ruby.json
|