Sha256: 683766499908a2de4119850b3f7bc9e16fb07c6b7f7b20b9bbcbf660db368ad6

Contents?: true

Size: 1.17 KB

Versions: 5

Compression:

Stored size: 1.17 KB

Contents

require "bundler/gem_tasks"
require 'engine_cart/rake_task'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

task :ci => ['generate_test_gem', 'spec'] do

end

task :generate_test_gem => ['engine_cart:setup'] do
  system("rm -rf spec/internal")
  system("rails plugin new spec/internal_gem")
  system("mv spec/internal_gem spec/internal")
  Rake::Task['engine_cart:inject_gemfile_extras'].invoke
  EngineCart.within_test_app do
    system "git init"
    FileUtils.touch('.gitignore')
    Dir.mkdir('spec')
    File.open('spec/spec_helper.rb', 'w') do |f|
      f.puts <<-EOF
        require 'engine_cart'
        EngineCart.load_application!

        require 'rspec/rails'
        require 'rspec/autorun'

        require 'internal_gem'
        RSpec.configure do |config|

        end
      EOF
    end

    system "echo '\ngem \"rspec-rails\"\n' >> Gemfile"
    system %Q{echo '\ngem "sass", "~> 3.2.15"\n' >> Gemfile}
    system %Q{echo '\ngem "sprockets", "~> 2.11.0"\n' >> Gemfile}
    system "bundle update"
    system "echo 'require \"engine_cart/rake_task\"\n' >> Rakefile"

    system("rake engine_cart:prepare")
    system "bundle install"
  end
end

task :default => :ci

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
engine_cart-0.6.0 Rakefile
engine_cart-0.5.1 Rakefile
engine_cart-0.5.0 Rakefile
engine_cart-0.4.1 Rakefile
engine_cart-0.4.0 Rakefile