rails_app_generator 0.2.23 → 0.2.24
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 +9 -0
- data/after_templates/addons/minimal_css/_.rb +62 -0
- data/after_templates/addons/minimal_css/app/controllers/home_controller.rb +4 -0
- data/after_templates/addons/minimal_css/app/views/home/index.html.erb +140 -0
- data/after_templates/addons/minimal_css/app/views/layouts/_footer.html.erb +1 -0
- data/after_templates/addons/minimal_css/app/views/layouts/_navbar.html.erb +3 -0
- data/after_templates/addons/minimal_css/app/views/layouts/application.html.erb +29 -0
- data/after_templates/addons/minimal_css/db/seeds.rb +5 -0
- data/docs/last_run/app_generator_class.json +16 -0
- data/docs/last_run/app_generator_data.json +7 -5
- data/docs/last_run/rails_options_class.json +16 -0
- data/docs/last_run/rails_options_data.json +7 -5
- data/lib/rails_app_generator/addons/minimal_css.rb +70 -0
- data/lib/rails_app_generator/app_generator.rb +1 -0
- data/lib/rails_app_generator/rag_initializer.rb +2 -0
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/minimal_css.json +15 -0
- metadata +10 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f3b2288ae71fcb62d6d27a0c112af620c7ccebf29dad7f7a3ccf0b6b763960bd
         | 
| 4 | 
            +
              data.tar.gz: 66acd6ef9f7663d0f71605564fa793e88e2f7c4c10427da39b21259cf9cb8ee4
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f58098fef783d509ff3005a5687c5d576c02b827ecb252b90e15f0150a73301d268dc4bd37412618b53bf4d82f21e60b02b9c46ae84ee0351ae9ddc85cc335bc
         | 
| 7 | 
            +
              data.tar.gz: 02e741081aeec1eca92b1ae4260831cd0b556a243c98b3147c76b446b793d9fa1bee52949819bf02255dc00c0d9257192224fe8516834354f9d02fdf71a1017b
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,3 +1,12 @@ | |
| 1 | 
            +
            ## [0.2.23](https://github.com/klueless-io/rails_app_generator/compare/v0.2.22...v0.2.23) (2022-08-16)
         | 
| 2 | 
            +
             | 
| 3 | 
            +
             | 
| 4 | 
            +
            ### Bug Fixes
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            * add devise profile ([a665767](https://github.com/klueless-io/rails_app_generator/commit/a6657670b1fce4eb802a56ace36368505ede3c2e))
         | 
| 7 | 
            +
            * fix invalid gem ([377e547](https://github.com/klueless-io/rails_app_generator/commit/377e5479c4debbd0df9e1362694d1847cf7d58e0))
         | 
| 8 | 
            +
            * update addon to work with non gems ([f9b0b14](https://github.com/klueless-io/rails_app_generator/commit/f9b0b147859760abbb921a236cd1e7f6a97eb3f0))
         | 
| 9 | 
            +
             | 
| 1 10 | 
             
            ## [0.2.22](https://github.com/klueless-io/rails_app_generator/compare/v0.2.21...v0.2.22) (2022-08-14)
         | 
| 2 11 |  | 
| 3 12 |  | 
| @@ -0,0 +1,62 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # Description goes here
         | 
| 4 | 
            +
            #
         | 
| 5 | 
            +
            # exe/rag addons/minimal_css
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            self.local_template_path = File.dirname(__FILE__)
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            gac 'base rails 7 image created'
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            prepare_environment
         | 
| 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('person', 'first_name', 'last_name', 'age:integer', 'address:text')
         | 
| 32 | 
            +
             | 
| 33 | 
            +
              db_migrate
         | 
| 34 | 
            +
              db_seed
         | 
| 35 | 
            +
            end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            # Other template command examples
         | 
| 38 | 
            +
            # prepare_environment
         | 
| 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,140 @@ | |
| 1 | 
            +
            <h1>Minimal css</h1>
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            <p>The HTML below comes from the demo on Water.css</p>
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            <h2>Element demos</h2>
         | 
| 6 | 
            +
            <p>This is supposed to be a demo page so we need more elements!</p>
         | 
| 7 | 
            +
            <h3>Form elements</h3>
         | 
| 8 | 
            +
            <form>
         | 
| 9 | 
            +
              <label for="email">Email</label> <input type="email" name="email" id="email" placeholder="john.doe@gmail.com" />
         | 
| 10 | 
            +
              <label for="id">User id (read only)</label> <input readonly="" name="id" id="id" value="04D6H89Z" />
         | 
| 11 | 
            +
              <label for="disabled">Random disabled input</label>
         | 
| 12 | 
            +
              <input disabled="" name="disabled" id="disabled" placeholder="Because why not?" />
         | 
| 13 | 
            +
              <label for="about">About me</label> <textarea name="about" id="about" placeholder="I am a textarea..."></textarea>
         | 
| 14 | 
            +
              <label>Choose a Doe:</label>
         | 
| 15 | 
            +
              <div>
         | 
| 16 | 
            +
                <input type="radio" id="john" name="drone" value="john" checked="" />
         | 
| 17 | 
            +
                <label for="john">John Doe</label>
         | 
| 18 | 
            +
              </div>
         | 
| 19 | 
            +
              <div>
         | 
| 20 | 
            +
                <input type="radio" id="jane" name="drone" value="jane" checked="" />
         | 
| 21 | 
            +
                <label for="jane">Jane Doe</label>
         | 
| 22 | 
            +
              </div>
         | 
| 23 | 
            +
              <div>
         | 
| 24 | 
            +
                <input type="radio" id="johnny" name="drone" value="johnny" checked="" />
         | 
| 25 | 
            +
                <label for="johnny">Johnny Doe</label>
         | 
| 26 | 
            +
              </div>
         | 
| 27 | 
            +
              <br />
         | 
| 28 | 
            +
              <input type="checkbox" name="remember" id="remember" checked="" />
         | 
| 29 | 
            +
              <label for="remember">Remember me</label>
         | 
| 30 | 
            +
              
         | 
| 31 | 
            +
              <input type="submit" value="Submit" />
         | 
| 32 | 
            +
              <input type="reset" value="Reset" />
         | 
| 33 | 
            +
            </form>
         | 
| 34 | 
            +
            <h3 id="code">Code</h3>
         | 
| 35 | 
            +
            <p>
         | 
| 36 | 
            +
              Below is some code, you can copy it with <kbd>Ctrl-C</kbd>. Did you know, <code>alert(1)</code> can show an alert in
         | 
| 37 | 
            +
              JavaScript!
         | 
| 38 | 
            +
            </p>
         | 
| 39 | 
            +
            <pre style="position: relative">
         | 
| 40 | 
            +
              <code>// This logs a message to the console and check out the scrollbar.<br>console.log('Hello, world!')</code>
         | 
| 41 | 
            +
              <div class="open_grepper_editor" title="Edit & Save To Grepper"></div>
         | 
| 42 | 
            +
            </pre>
         | 
| 43 | 
            +
            <h3>Other</h3>
         | 
| 44 | 
            +
            <p>Here's a horizontal rule and image because I don't know where else to put them.</p>
         | 
| 45 | 
            +
            <img src="https://placekitten.com/408/287" alt="Example kitten" />
         | 
| 46 | 
            +
            <hr />
         | 
| 47 | 
            +
            <p>And here's a nicely marked up table!</p>
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            <table>
         | 
| 50 | 
            +
              <thead>
         | 
| 51 | 
            +
                <tr>
         | 
| 52 | 
            +
                  <th>Name</th>
         | 
| 53 | 
            +
                  <th>Quantity</th>
         | 
| 54 | 
            +
                  <th>Price</th>
         | 
| 55 | 
            +
                </tr>
         | 
| 56 | 
            +
              </thead>
         | 
| 57 | 
            +
              <tbody>
         | 
| 58 | 
            +
                <tr>
         | 
| 59 | 
            +
                  <td>Godzilla</td>
         | 
| 60 | 
            +
                  <td>2</td>
         | 
| 61 | 
            +
                  <td>$299.99</td>
         | 
| 62 | 
            +
                </tr>
         | 
| 63 | 
            +
                <tr>
         | 
| 64 | 
            +
                  <td>Mozilla</td>
         | 
| 65 | 
            +
                  <td>10</td>
         | 
| 66 | 
            +
                  <td>$100,000.00</td>
         | 
| 67 | 
            +
                </tr>
         | 
| 68 | 
            +
                <tr>
         | 
| 69 | 
            +
                  <td>Quesadilla</td>
         | 
| 70 | 
            +
                  <td>1</td>
         | 
| 71 | 
            +
                  <td>$2.22</td>
         | 
| 72 | 
            +
                </tr>
         | 
| 73 | 
            +
              </tbody>
         | 
| 74 | 
            +
            </table>
         | 
| 75 | 
            +
             | 
| 76 | 
            +
            <details>
         | 
| 77 | 
            +
              <summary>Some summary/details can't hurt!</summary>
         | 
| 78 | 
            +
              <p>Lorem ipsum dolor sit blah blah.</p>
         | 
| 79 | 
            +
            </details>
         | 
| 80 | 
            +
             | 
| 81 | 
            +
            <p>The dialog (form, and menu) tag</p>
         | 
| 82 | 
            +
            <div><button type="button" id="dialog-trigger">Show me the dialog!</button> <span id="dialog-result"></span></div>
         | 
| 83 | 
            +
            <dialog id="dialog">
         | 
| 84 | 
            +
              <header>This is a sample dialog</header>
         | 
| 85 | 
            +
              <form method="dialog">
         | 
| 86 | 
            +
                <p>What is your favorite pet animal?</p>
         | 
| 87 | 
            +
                <menu>
         | 
| 88 | 
            +
                  <button value="feline">Cats</button> <button value="canine">Dogs</button> <button value="other">Others</button>
         | 
| 89 | 
            +
                </menu>
         | 
| 90 | 
            +
              </form>
         | 
| 91 | 
            +
            </dialog>
         | 
| 92 | 
            +
            <h3 id="typography">Typography</h3>
         | 
| 93 | 
            +
            <p>
         | 
| 94 | 
            +
              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dictum hendrerit velit, quis ullamcorper sem congue
         | 
| 95 | 
            +
              ac. Quisque id magna rhoncus, sodales massa vel, vestibulum elit. Duis ornare accumsan egestas. Proin maximus lacus
         | 
| 96 | 
            +
              interdum leo molestie convallis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus
         | 
| 97 | 
            +
              mus. Ut iaculis risus eu felis feugiat, eu mollis neque elementum. Donec interdum, nisl id dignissim iaculis, felis
         | 
| 98 | 
            +
              dui aliquet dui, non fermentum velit lectus ac quam. Class aptent taciti sociosqu ad litora torquent per conubia
         | 
| 99 | 
            +
              nostra, per inceptos himenaeos. <strong>This is strong,</strong> this is normal, <b>this is just bold,</b>
         | 
| 100 | 
            +
              <em>and this is emphasized!</em> And heck, <a href="/">here</a>'s a link.
         | 
| 101 | 
            +
            </p>
         | 
| 102 | 
            +
            <blockquote cite="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote">
         | 
| 103 | 
            +
              "The HTML blockquote Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended
         | 
| 104 | 
            +
              quotation. Usually, this is rendered visually by indentation (see
         | 
| 105 | 
            +
              <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote#Usage_notes">Notes</a> for how to change
         | 
| 106 | 
            +
              it). A URL for the source of the quotation may be given using the <code>cite</code> attribute, while a text
         | 
| 107 | 
            +
              representation of the source can be given using the <code><cite></code> cite element."
         | 
| 108 | 
            +
              <footer><cite>MDN, "The Block Quotation element"</cite></footer>
         | 
| 109 | 
            +
            </blockquote>
         | 
| 110 | 
            +
            <ul>
         | 
| 111 | 
            +
              <li>Unordered list item 1</li>
         | 
| 112 | 
            +
              <li>Unordered list item 2</li>
         | 
| 113 | 
            +
              <li>Unordered list item 3</li>
         | 
| 114 | 
            +
            </ul>
         | 
| 115 | 
            +
            <ol>
         | 
| 116 | 
            +
              <li>Ordered list item 1</li>
         | 
| 117 | 
            +
              <li>Ordered list item 2</li>
         | 
| 118 | 
            +
              <li>Ordered list item 3</li>
         | 
| 119 | 
            +
            </ol>
         | 
| 120 | 
            +
            <p>Addresses are also styled to be <strong>awesome</strong>!</p>
         | 
| 121 | 
            +
            <address>
         | 
| 122 | 
            +
              <a href="mailto:john.doe@example.com">john.doe@example.com</a><br />
         | 
| 123 | 
            +
              <a href="tel:778-330-2389">778-330-2389</a><br />
         | 
| 124 | 
            +
              <a href="sms:666-666-6666">666-666-6666</a><br />
         | 
| 125 | 
            +
            </address>
         | 
| 126 | 
            +
            <br />
         | 
| 127 | 
            +
            <h1>Heading 1</h1>
         | 
| 128 | 
            +
            <h2>Heading 2</h2>
         | 
| 129 | 
            +
            <h3>Heading 3</h3>
         | 
| 130 | 
            +
            <h4>Heading 4</h4>
         | 
| 131 | 
            +
            <h5>Heading 5</h5>
         | 
| 132 | 
            +
            <h6>Heading 6</h6>
         | 
| 133 | 
            +
            <footer><a href="#">Back to top ⬆</a></footer>
         | 
| 134 | 
            +
            <script src="script.js" defer=""></script>
         | 
| 135 | 
            +
            <div style="position: static !important">
         | 
| 136 | 
            +
              <div
         | 
| 137 | 
            +
                data-lastpass-infield="true"
         | 
| 138 | 
            +
                style="position: absolute !important; top: 0px !important; left: 0px !important"
         | 
| 139 | 
            +
              ></div>
         | 
| 140 | 
            +
            </div>
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            <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 | 
            +
             | 
| @@ -55,6 +55,8 @@ | |
| 55 55 | 
             
                "add_httparty",
         | 
| 56 56 | 
             
                "add_honeybadger",
         | 
| 57 57 | 
             
                "add_lograge",
         | 
| 58 | 
            +
                "add_minimal_css",
         | 
| 59 | 
            +
                "minimal_css_library",
         | 
| 58 60 | 
             
                "add_mini_magick",
         | 
| 59 61 | 
             
                "add_motor_admin",
         | 
| 60 62 | 
             
                "add_public_suffix",
         | 
| @@ -450,6 +452,20 @@ | |
| 450 452 | 
             
                  "default": false,
         | 
| 451 453 | 
             
                  "required": false
         | 
| 452 454 | 
             
                },
         | 
| 455 | 
            +
                {
         | 
| 456 | 
            +
                  "name": "add_minimal_css",
         | 
| 457 | 
            +
                  "description": "Indicates when to generate add minimal css",
         | 
| 458 | 
            +
                  "type": "boolean",
         | 
| 459 | 
            +
                  "default": false,
         | 
| 460 | 
            +
                  "required": false
         | 
| 461 | 
            +
                },
         | 
| 462 | 
            +
                {
         | 
| 463 | 
            +
                  "name": "minimal_css_library",
         | 
| 464 | 
            +
                  "description": "Indicates when to generate minimal css library",
         | 
| 465 | 
            +
                  "type": "string",
         | 
| 466 | 
            +
                  "default": "water.css",
         | 
| 467 | 
            +
                  "required": false
         | 
| 468 | 
            +
                },
         | 
| 453 469 | 
             
                {
         | 
| 454 470 | 
             
                  "name": "add_mini_magick",
         | 
| 455 471 | 
             
                  "description": "Indicates when to generate add mini magick",
         | 
| @@ -28,11 +28,11 @@ | |
| 28 28 | 
             
                "api": false,
         | 
| 29 29 | 
             
                "javascript": "importmap",
         | 
| 30 30 | 
             
                "skip_bundle": false,
         | 
| 31 | 
            -
                "note": "",
         | 
| 31 | 
            +
                "note": "\"minimal_css_library is optional and will default to water if not specified.\"",
         | 
| 32 32 | 
             
                "test": "rspec",
         | 
| 33 33 | 
             
                "add_acts_as_list": false,
         | 
| 34 | 
            -
                "add_administrate":  | 
| 35 | 
            -
                "add_annotate":  | 
| 34 | 
            +
                "add_administrate": false,
         | 
| 35 | 
            +
                "add_annotate": false,
         | 
| 36 36 | 
             
                "add_avo": false,
         | 
| 37 37 | 
             
                "add_bcrypt": false,
         | 
| 38 38 | 
             
                "add_browser": false,
         | 
| @@ -45,14 +45,16 @@ | |
| 45 45 | 
             
                "add_httparty": false,
         | 
| 46 46 | 
             
                "add_honeybadger": false,
         | 
| 47 47 | 
             
                "add_lograge": false,
         | 
| 48 | 
            +
                "add_minimal_css": true,
         | 
| 49 | 
            +
                "minimal_css_library": "water",
         | 
| 48 50 | 
             
                "add_mini_magick": false,
         | 
| 49 51 | 
             
                "add_motor_admin": false,
         | 
| 50 52 | 
             
                "add_public_suffix": false,
         | 
| 51 53 | 
             
                "add_phony_rails": false,
         | 
| 52 54 | 
             
                "add_rails_html_sanitizer": false,
         | 
| 53 55 | 
             
                "add_redcarpet": false,
         | 
| 54 | 
            -
                "add_rubocop":  | 
| 56 | 
            +
                "add_rubocop": false,
         | 
| 55 57 | 
             
                "add_twilio_ruby": false,
         | 
| 56 | 
            -
                "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/ | 
| 58 | 
            +
                "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/minimal_css/_.rb"
         | 
| 57 59 | 
             
              }
         | 
| 58 60 | 
             
            }
         | 
| @@ -55,6 +55,8 @@ | |
| 55 55 | 
             
                "add_httparty",
         | 
| 56 56 | 
             
                "add_honeybadger",
         | 
| 57 57 | 
             
                "add_lograge",
         | 
| 58 | 
            +
                "add_minimal_css",
         | 
| 59 | 
            +
                "minimal_css_library",
         | 
| 58 60 | 
             
                "add_mini_magick",
         | 
| 59 61 | 
             
                "add_motor_admin",
         | 
| 60 62 | 
             
                "add_public_suffix",
         | 
| @@ -450,6 +452,20 @@ | |
| 450 452 | 
             
                  "default": false,
         | 
| 451 453 | 
             
                  "required": false
         | 
| 452 454 | 
             
                },
         | 
| 455 | 
            +
                {
         | 
| 456 | 
            +
                  "name": "add_minimal_css",
         | 
| 457 | 
            +
                  "description": "",
         | 
| 458 | 
            +
                  "type": "boolean",
         | 
| 459 | 
            +
                  "default": false,
         | 
| 460 | 
            +
                  "required": false
         | 
| 461 | 
            +
                },
         | 
| 462 | 
            +
                {
         | 
| 463 | 
            +
                  "name": "minimal_css_library",
         | 
| 464 | 
            +
                  "description": "Minimal CSS library to get you started. [options: water.css (default)]",
         | 
| 465 | 
            +
                  "type": "string",
         | 
| 466 | 
            +
                  "default": "water.css",
         | 
| 467 | 
            +
                  "required": false
         | 
| 468 | 
            +
                },
         | 
| 453 469 | 
             
                {
         | 
| 454 470 | 
             
                  "name": "add_mini_magick",
         | 
| 455 471 | 
             
                  "description": "",
         | 
| @@ -7,7 +7,7 @@ | |
| 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/ | 
| 10 | 
            +
                "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/minimal_css/_.rb",
         | 
| 11 11 | 
             
                "database": "sqlite3",
         | 
| 12 12 | 
             
                "skip_git": true,
         | 
| 13 13 | 
             
                "skip_keeps": false,
         | 
| @@ -38,11 +38,11 @@ | |
| 38 38 | 
             
                "javascript": "importmap",
         | 
| 39 39 | 
             
                "css": "",
         | 
| 40 40 | 
             
                "skip_bundle": false,
         | 
| 41 | 
            -
                "note": "",
         | 
| 41 | 
            +
                "note": "minimal_css_library is optional and will default to water if not specified.",
         | 
| 42 42 | 
             
                "test": "rspec",
         | 
| 43 43 | 
             
                "add_acts_as_list": false,
         | 
| 44 | 
            -
                "add_administrate":  | 
| 45 | 
            -
                "add_annotate":  | 
| 44 | 
            +
                "add_administrate": false,
         | 
| 45 | 
            +
                "add_annotate": false,
         | 
| 46 46 | 
             
                "add_avo": false,
         | 
| 47 47 | 
             
                "add_bcrypt": false,
         | 
| 48 48 | 
             
                "add_browser": false,
         | 
| @@ -55,13 +55,15 @@ | |
| 55 55 | 
             
                "add_httparty": false,
         | 
| 56 56 | 
             
                "add_honeybadger": false,
         | 
| 57 57 | 
             
                "add_lograge": false,
         | 
| 58 | 
            +
                "add_minimal_css": true,
         | 
| 59 | 
            +
                "minimal_css_library": "water",
         | 
| 58 60 | 
             
                "add_mini_magick": false,
         | 
| 59 61 | 
             
                "add_motor_admin": false,
         | 
| 60 62 | 
             
                "add_public_suffix": false,
         | 
| 61 63 | 
             
                "add_phony_rails": false,
         | 
| 62 64 | 
             
                "add_rails_html_sanitizer": false,
         | 
| 63 65 | 
             
                "add_redcarpet": false,
         | 
| 64 | 
            -
                "add_rubocop":  | 
| 66 | 
            +
                "add_rubocop": false,
         | 
| 65 67 | 
             
                "add_twilio_ruby": false
         | 
| 66 68 | 
             
              }
         | 
| 67 69 | 
             
            }
         | 
| @@ -0,0 +1,70 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module RailsAppGenerator
         | 
| 4 | 
            +
              # Custom add-ons for RailsAppGenerator
         | 
| 5 | 
            +
              module AddOns
         | 
| 6 | 
            +
                # Add MinimalCss to rails application
         | 
| 7 | 
            +
                class MinimalCss < RailsAppGenerator::Addon
         | 
| 8 | 
            +
                  LIBRARIES = {
         | 
| 9 | 
            +
                    water: {
         | 
| 10 | 
            +
                      source: 'https://watercss.kognise.dev',
         | 
| 11 | 
            +
                      content: '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">'
         | 
| 12 | 
            +
                    },
         | 
| 13 | 
            +
                    picnic: {
         | 
| 14 | 
            +
                      source: 'https://picnicss.com',
         | 
| 15 | 
            +
                      content: '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/picnic">'
         | 
| 16 | 
            +
                    },
         | 
| 17 | 
            +
                    chota: {
         | 
| 18 | 
            +
                      source: 'https://jenil.github.io/chota/',
         | 
| 19 | 
            +
                      content: '<link rel="stylesheet" href="https://unpkg.com/chota@latest">'
         | 
| 20 | 
            +
                    }
         | 
| 21 | 
            +
                  }.freeze
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                  # https://purecss.io/
         | 
| 24 | 
            +
                  # https://bulma.io/
         | 
| 25 | 
            +
                  # https://get.foundation/
         | 
| 26 | 
            +
                  # https://www.blazeui.com/
         | 
| 27 | 
            +
                  # https://getbase.org/
         | 
| 28 | 
            +
                  # https://cirrus-ui.netlify.app/
         | 
| 29 | 
            +
                  # https://vanillaframework.io/
         | 
| 30 | 
            +
                  # https://www.patternfly.org/v4/
         | 
| 31 | 
            +
                  # https://tachyons.io/
         | 
| 32 | 
            +
                  # https://nostalgic-css.github.io/NES.css/
         | 
| 33 | 
            +
                  # https://selekkt.dk/skelet/v3/
         | 
| 34 | 
            +
                  # https://picturepan2.github.io/spectre/
         | 
| 35 | 
            +
                  # https://kylelogue.github.io/mustard-ui/
         | 
| 36 | 
            +
                  # https://www.bonsaicss.com/
         | 
| 37 | 
            +
                  # https://ajusa.github.io/lit/
         | 
| 38 | 
            +
                  # https://www.cutestrap.com/
         | 
| 39 | 
            +
                  # https://kbrsh.github.io/wing/
         | 
| 40 | 
            +
                  # https://devinhunt.github.io/typebase.css/
         | 
| 41 | 
            +
                  # http://getskeleton.com/
         | 
| 42 | 
            +
                  # https://semantic-ui.com/
         | 
| 43 | 
            +
                  # https://getuikit.com/
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                  # ANIMATION
         | 
| 46 | 
            +
                  # https://animate.style/
         | 
| 47 | 
            +
                  # https://www.csswand.dev/
         | 
| 48 | 
            +
                  # http://animation.kaustubhmenon.com/
         | 
| 49 | 
            +
                  # https://www.minimamente.com/project/magic/
         | 
| 50 | 
            +
             | 
| 51 | 
            +
                  def apply; end
         | 
| 52 | 
            +
             | 
| 53 | 
            +
                  def after_bundle
         | 
| 54 | 
            +
                    library_key = (options[:minimal_css_library] || 'water').to_sym
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                    insert_into_file 'app/views/layouts/application.html.erb', head(library_key), before: %r{^\s+</head>}, force: true
         | 
| 57 | 
            +
                  end
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                  private
         | 
| 60 | 
            +
             | 
| 61 | 
            +
                  def head(library_key)
         | 
| 62 | 
            +
                    library = LIBRARIES[library_key] || LIBRARIES[:water]
         | 
| 63 | 
            +
             | 
| 64 | 
            +
                    content = library[:content]
         | 
| 65 | 
            +
             | 
| 66 | 
            +
                    "    #{content}\n"
         | 
| 67 | 
            +
                  end
         | 
| 68 | 
            +
                end
         | 
| 69 | 
            +
              end
         | 
| 70 | 
            +
            end
         | 
| @@ -188,6 +188,7 @@ module RailsAppGenerator | |
| 188 188 | 
             
                  add_if(:high_voltage) # TODO: needs testing
         | 
| 189 189 | 
             
                  add_if(:honeybadger) # tested
         | 
| 190 190 | 
             
                  add_if(:lograge) # tested
         | 
| 191 | 
            +
                  add_if(:minimal_css) # tested (this is NOT a GEM)
         | 
| 191 192 | 
             
                  add_if(:mini_magick) # tested
         | 
| 192 193 | 
             
                  add_if(:motor_magick) # tested
         | 
| 193 194 | 
             
                  add_if(:public_suffix) # tested
         | 
| @@ -123,6 +123,8 @@ KConfig.configure do |config| | |
| 123 123 | 
             
              # high_voltage
         | 
| 124 124 | 
             
              rag.add_option :add_honeybadger             , type: :boolean, default: false
         | 
| 125 125 | 
             
              rag.add_option :add_lograge                 , type: :boolean, default: false
         | 
| 126 | 
            +
              rag.add_option :add_minimal_css             , type: :boolean, default: false
         | 
| 127 | 
            +
              rag.add_option :minimal_css_library         , type: :string, default: 'water.css', description: "Minimal CSS library to get you started. [options: water.css (default)]"
         | 
| 126 128 | 
             
              rag.add_option :add_mini_magick             , type: :boolean, default: false
         | 
| 127 129 | 
             
              rag.add_option :add_motor_admin             , type: :boolean, default: false
         | 
| 128 130 | 
             
              rag.add_option :add_public_suffix           , 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.24",
         | 
| 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.24",
         | 
| 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": "minimal_css",
         | 
| 4 | 
            +
                "destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
         | 
| 5 | 
            +
              },
         | 
| 6 | 
            +
              "opts": {
         | 
| 7 | 
            +
                "skip_git": true,
         | 
| 8 | 
            +
                "skip_test": true,
         | 
| 9 | 
            +
                "note": "minimal_css_library is optional and will default to water if not specified.",
         | 
| 10 | 
            +
                "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/minimal_css/_.rb",
         | 
| 11 | 
            +
                "add_faker": true,
         | 
| 12 | 
            +
                "add_minimal_css": true,
         | 
| 13 | 
            +
                "minimal_css_library": "water"
         | 
| 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.24
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - David Cruwys
         | 
| @@ -299,6 +299,13 @@ files: | |
| 299 299 | 
             
            - after_templates/addons/mini_magick/app/views/layouts/_footer.html.erb
         | 
| 300 300 | 
             
            - after_templates/addons/mini_magick/app/views/layouts/_navbar.html.erb
         | 
| 301 301 | 
             
            - after_templates/addons/mini_magick/app/views/layouts/application.html.erb
         | 
| 302 | 
            +
            - after_templates/addons/minimal_css/_.rb
         | 
| 303 | 
            +
            - after_templates/addons/minimal_css/app/controllers/home_controller.rb
         | 
| 304 | 
            +
            - after_templates/addons/minimal_css/app/views/home/index.html.erb
         | 
| 305 | 
            +
            - after_templates/addons/minimal_css/app/views/layouts/_footer.html.erb
         | 
| 306 | 
            +
            - after_templates/addons/minimal_css/app/views/layouts/_navbar.html.erb
         | 
| 307 | 
            +
            - after_templates/addons/minimal_css/app/views/layouts/application.html.erb
         | 
| 308 | 
            +
            - after_templates/addons/minimal_css/db/seeds.rb
         | 
| 302 309 | 
             
            - after_templates/addons/motor_admin/_.rb
         | 
| 303 310 | 
             
            - after_templates/addons/motor_admin/app/controllers/home_controller.rb
         | 
| 304 311 | 
             
            - after_templates/addons/motor_admin/app/views/home/index.html.erb
         | 
| @@ -572,6 +579,7 @@ files: | |
| 572 579 | 
             
            - lib/rails_app_generator/addons/irbrc.rb
         | 
| 573 580 | 
             
            - lib/rails_app_generator/addons/lograge.rb
         | 
| 574 581 | 
             
            - lib/rails_app_generator/addons/mini_magick.rb
         | 
| 582 | 
            +
            - lib/rails_app_generator/addons/minimal_css.rb
         | 
| 575 583 | 
             
            - lib/rails_app_generator/addons/motor_admin.rb
         | 
| 576 584 | 
             
            - lib/rails_app_generator/addons/phony_rails.rb
         | 
| 577 585 | 
             
            - lib/rails_app_generator/addons/public_suffix.rb
         | 
| @@ -638,6 +646,7 @@ files: | |
| 638 646 | 
             
            - profiles/addons/httparty.json
         | 
| 639 647 | 
             
            - profiles/addons/lograge.json
         | 
| 640 648 | 
             
            - profiles/addons/mini_magick.json
         | 
| 649 | 
            +
            - profiles/addons/minimal_css.json
         | 
| 641 650 | 
             
            - profiles/addons/motor_admin.json
         | 
| 642 651 | 
             
            - profiles/addons/phony_rails.json
         | 
| 643 652 | 
             
            - profiles/addons/public_suffix.json
         |