Sha256: 906ee22a5195e86448b4a7b7c07db254fb6e16cc4df37ff9ab1a51b93fc3d784

Contents?: true

Size: 837 Bytes

Versions: 2

Compression:

Stored size: 837 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 remove_index 
    remove_file "public/index.html"
  end
  
  def run_blacklight_generator
    say_status("warning", "GENERATING BL", :yellow) 
    gem 'blacklight'
    gem "traject", '~>2.0'
    Bundler.with_clean_env do
      run "bundle install"
    end

    generate 'blacklight:install', '--devise --jettywrapper'
  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

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-marc-6.1.0 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-marc-6.0.0 spec/test_app_templates/lib/generators/test_app_generator.rb