Sha256: 74e373c4144d68dbfdd208edd39e00e9649fe17c43b40513903db191f8060c77

Contents?: true

Size: 808 Bytes

Versions: 12

Compression:

Stored size: 808 Bytes

Contents

require 'rails/generators'

class TestAppGenerator < Rails::Generators::Base
  def fix_travis_rails_4
    if ENV['TRAVIS']
      insert_into_file 'app/assets/stylesheets/application.css', :before =>'/*' do
        "@charset \"UTF-8\";\n"
      end
    end
  end

  def add_gems
    gem 'rsolr', '>= 1.0', '< 3'
    Bundler.with_clean_env do
      run 'bundle install'
    end
  end

  def remove_index
    remove_file "public/index.html"
  end

  def run_blacklight_generator
    say_status("warning", "GENERATING BL", :yellow)
    generate 'blacklight:install', '--devise'
  end

  def run_test_support_generator
    say_status("warning", "GENERATING test_support", :yellow)

    generate 'blacklight:test_support'
  end

  def run_blacklight_marc_generator
    generate 'blacklight:marc:install'
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
blacklight-marc-8.1.4 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-8.1.3 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-8.1.2 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-8.1.1 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-8.1.0 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-8.0.0 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-7.2.0 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-7.1.1 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-7.1.0 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-7.0.1 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-7.0.0 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-7.0.0.rc1 spec/test_app_templates/lib/generators/test_app_generator.rb