Sha256: fcb4765dc66a2108b07a409f3a38385ca9705b23382133845056a9a83df3356e

Contents?: true

Size: 725 Bytes

Versions: 5

Compression:

Stored size: 725 Bytes

Contents

module Europeana
  module Blacklight
    class Install < Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      argument :europeana_api_key, type: :string
      argument :controller_name, type: :string, default: 'catalog'

      def disable_rsolr_gem
        comment_lines('Gemfile', /gem 'rsolr'/)
      end

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

      def create_configuration_files
        template 'config/blacklight.yml', 'config/blacklight.yml'
      end

      def generate_controller
        template 'catalog_controller.rb', "app/controllers/#{controller_name}_controller.rb"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
europeana-blacklight-0.4.0 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.3.3 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.3.2 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.3.1 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.3.0 lib/generators/europeana/blacklight/install_generator.rb