Class: GeoblacklightAdmin::Install
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- GeoblacklightAdmin::Install
- Defined in:
- lib/generators/geoblacklight_admin/install_generator.rb
Instance Method Summary collapse
- #bundle_install ⇒ Object
- #generate_gbl_admin_assets ⇒ Object
- #generate_gbl_admin_config ⇒ Object
- #generate_gbl_admin_helpers ⇒ Object
- #generate_gbl_admin_jobs ⇒ Object
- #generate_gbl_admin_models ⇒ Object
- #generate_gbl_admin_views ⇒ Object
- #install_active_storage ⇒ Object
- #install_yarn ⇒ Object
Instance Method Details
#bundle_install ⇒ Object
11 12 13 14 15 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 11 def bundle_install Bundler.with_unbundled_env do run "bundle install" end end |
#generate_gbl_admin_assets ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 17 def generate_gbl_admin_assets inject_into_file "app/assets/stylesheets/application.scss", after: "@import 'geoblacklight';\n" do "@import 'geoblacklight_admin/core';" end end |
#generate_gbl_admin_config ⇒ Object
39 40 41 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 39 def generate_gbl_admin_config generate "geoblacklight_admin:config" end |
#generate_gbl_admin_helpers ⇒ Object
35 36 37 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 35 def generate_gbl_admin_helpers generate "geoblacklight_admin:helpers" end |
#generate_gbl_admin_jobs ⇒ Object
23 24 25 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 23 def generate_gbl_admin_jobs generate "geoblacklight_admin:jobs" end |
#generate_gbl_admin_models ⇒ Object
27 28 29 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 27 def generate_gbl_admin_models generate "geoblacklight_admin:models" end |
#generate_gbl_admin_views ⇒ Object
31 32 33 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 31 def generate_gbl_admin_views generate "geoblacklight_admin:views" end |
#install_active_storage ⇒ Object
43 44 45 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 43 def install_active_storage run "bin/rails active_storage:install" end |
#install_yarn ⇒ Object
47 48 49 50 |
# File 'lib/generators/geoblacklight_admin/install_generator.rb', line 47 def install_yarn run "yarn add @geoblacklight/frontend@^4.4.6" run "yarn install" end |