Sha256: c9e44303d36cfab04dc24774a38c79ed9ecd8e217f9d01dc49c670552025fb50

Contents?: true

Size: 1.32 KB

Versions: 8

Compression:

Stored size: 1.32 KB

Contents

require 'rails/generators'

module GeoblacklightSidecarImages
  class Install < Rails::Generators::Base
    source_root File.expand_path('templates', __dir__)

    desc 'Install GeoblacklightSidecarImages'

    def add_settings_vars
      inject_into_file 'config/settings.yml', after: "INSTITUTION: 'Stanford'\n" do
"INSTITUTION_LOCAL_NAME: 'Princeton'
INSTITUTION_GEOSERVER_URL: 'https://geoserver.princeton.edu'
PROXY_GEOSERVER_URL: 'http://localhost:3000'
PROXY_GEOSERVER_AUTH: 'Basic base64encodedusername:password'
GBLSI_THUMBNAIL_FIELD: 'thumbnail_path_ss'"
      end
    end

    def generate_gblsci_assets
      copy_file 'gblsci.scss', 'app/assets/stylesheets/gblsci.scss'
    end

    def generate_gblsci_example_docs
      generate 'geoblacklight_sidecar_images:example_docs'
    end

    def generate_gblsci_jobs
      generate 'geoblacklight_sidecar_images:jobs'
    end

    def generate_gblsci_models
      generate 'geoblacklight_sidecar_images:models'
    end

    def generate_gblsci_views
      generate 'geoblacklight_sidecar_images:views'
    end

    def generate_action_storage
      rake 'active_storage:install'
    end

    def generate_gblsci_config
      generate 'geoblacklight_sidecar_images:config'
    end

    def bundle_install
      Bundler.with_clean_env do
        run 'bundle install'
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.8.1 lib/generators/geoblacklight_sidecar_images/install_generator.rb
geoblacklight_sidecar_images-0.8.0 lib/generators/geoblacklight_sidecar_images/install_generator.rb
geoblacklight_sidecar_images-0.7.0 lib/generators/geoblacklight_sidecar_images/install_generator.rb
geoblacklight_sidecar_images-0.6.5 lib/generators/geoblacklight_sidecar_images/install_generator.rb
geoblacklight_sidecar_images-0.6.4 lib/generators/geoblacklight_sidecar_images/install_generator.rb
geoblacklight_sidecar_images-0.6.2 lib/generators/geoblacklight_sidecar_images/install_generator.rb
geoblacklight_sidecar_images-0.6.1 lib/generators/geoblacklight_sidecar_images/install_generator.rb
geoblacklight_sidecar_images-0.6.0 lib/generators/geoblacklight_sidecar_images/install_generator.rb