Sha256: f9b2ccb7ec5c7865f1a6d46d67a90c981f50ae4717d4f15a7fe4a118be4a29fb

Contents?: true

Size: 948 Bytes

Versions: 3

Compression:

Stored size: 948 Bytes

Contents

require 'rails/generators'

class TestAppGenerator < Rails::Generators::Base
  source_root File.expand_path("../../../../test_app_templates", __FILE__)

  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 copy_rspec_rake_task
    copy_file "lib/tasks/rspec.rake"
  end

  def remove_index 
    remove_file "public/index.html"
    remove_file 'app/assets/images/rails.png'
  end

  def run_blacklight_generator
    say_status("warning", "GENERATING BL", :yellow)       

    generate 'blacklight', '--devise'
  end

  def run_cucumber_generator
    say_status("warning", "GENERATING cucumber", :yellow)       

    generate 'cucumber:install'
  end

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

    generate 'blacklight:test_support'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-4.2.2 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-4.2.1 spec/test_app_templates/lib/generators/test_app_generator.rb
blacklight-4.2.0 spec/test_app_templates/lib/generators/test_app_generator.rb