Class: BlacklightLando::RunSolrAndPostgresql
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- BlacklightLando::RunSolrAndPostgresql
- Defined in:
- lib/generators/run_solr_and_postgresql.rb
Overview
Generator for adding lando to a blacklight application
Instance Method Summary collapse
-
#add_pg_gem ⇒ Object
Add postgres gem to Gemfile.
- #bundle_install ⇒ Object
- #create_lando_config ⇒ Object
Instance Method Details
#add_pg_gem ⇒ Object
Add postgres gem to Gemfile
20 21 22 |
# File 'lib/generators/run_solr_and_postgresql.rb', line 20 def add_pg_gem gem "pg" end |
#bundle_install ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/generators/run_solr_and_postgresql.rb', line 24 def bundle_install return if Rails.env.test? inside destination_root do Bundler.with_unbundled_env do run "bundle install" end end end |
#create_lando_config ⇒ Object
34 35 36 37 38 39 |
# File 'lib/generators/run_solr_and_postgresql.rb', line 34 def create_lando_config copy_file ".lando_solr_and_postgresql.yml", ".lando.yml" copy_file "lando_env.rb", "config/initializers/lando_env.rb" copy_file "blacklight.yml", "config/blacklight.yml" copy_file "database.yml", "config/database.yml" end |