Sha256: b5c33a293131bd65926a03e89a6714fe9f6b1adf7cdcf8e66c0bb2d10ec186db

Contents?: true

Size: 1.08 KB

Versions: 25

Compression:

Stored size: 1.08 KB

Contents

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

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

task :default => :spec

namespace :test do
  desc "Creates a dummy Rails app for testing"
  task :dummy_rails do
    require 'rails'

    dummy_path = File.expand_path("spec/dummy", __dir__)
    system("rm -rf #{dummy_path}") if File.directory?(dummy_path)

    rails_version = Rails::VERSION::STRING
    rails_new_command = "rails _#{rails_version}_ new #{dummy_path} --skip-bundle --skip-git --skip-keeps --skip-action-mailbox --skip-action-mailer --skip-action-text --skip-active-record --skip-active-storage --skip-action-cable --skip-puma --skip-bootsnap --skip-spring --skip-listen --skip-javascript --skip-turbolinks --skip-test --skip-system-test --quiet"
    system(rails_new_command)

    # remove the asset pipeline initializer file
    puts 'Removing assets initializer...'
    assets_file_path = File.expand_path("spec/dummy/config/initializers/assets.rb")
    File.delete(assets_file_path) if File.exist?(assets_file_path)
    puts 'Done.'

    puts "\nCreated dummy Rails app in spec/dummy"
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
builder_apm-0.5.14 Rakefile
builder_apm-0.5.13 Rakefile
builder_apm-0.5.12 Rakefile
builder_apm-0.5.11 Rakefile
builder_apm-0.5.10 Rakefile
builder_apm-0.5.9 Rakefile
builder_apm-0.5.8 Rakefile
builder_apm-0.5.7 Rakefile
builder_apm-0.5.6 Rakefile
builder_apm-0.5.4 Rakefile
builder_apm-0.5.3 Rakefile
builder_apm-0.5.2 Rakefile
builder_apm-0.5.1 Rakefile
builder_apm-0.4.2 Rakefile
builder_apm-0.4.1 Rakefile
builder_apm-0.4.0 Rakefile
builder_apm-0.3.2 Rakefile
builder_apm-0.3.1 Rakefile
builder_apm-0.3.0 Rakefile
builder_apm-0.2.5 Rakefile