Class: GeoblacklightAdmin::Install

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/geoblacklight_admin/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#bundle_installObject



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_assetsObject



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_configObject



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_helpersObject



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_jobsObject



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_modelsObject



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_viewsObject



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_storageObject



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_yarnObject



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