Sha256: 1d638e8a52764b804cbd7a9f333c52da06d006a5329d8cca797435dea9d5fb58

Contents?: true

Size: 780 Bytes

Versions: 17

Compression:

Stored size: 780 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_solr_gems
        comment_lines('Gemfile', /gem 'solr_wrapper'/)
        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

17 entries across 17 versions & 1 rubygems

Version Path
europeana-blacklight-1.2.2 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-1.2.1 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-1.2.0 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-1.1.0 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-1.0.0 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.5.2 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.5.1 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.5.0 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.9 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.8 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.7 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.6 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.5 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.4 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.3 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.2 lib/generators/europeana/blacklight/install_generator.rb
europeana-blacklight-0.4.1 lib/generators/europeana/blacklight/install_generator.rb