1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
# frozen_string_literal: true
require 'bundler/setup'
require 'bump/tasks'
require 'bundler/gem_tasks'
# update all versions so bundling does not fail on CI
Bump.replace_in_default = Dir["spec/fixtures/rails*/Gemfile.lock"]
task default: [:spec, :rubocop]
task :spec do
sh "rspec spec/"
end
desc "Run rubocop"
task :rubocop do
sh "rubocop --parallel"
end
desc "bundle all gemfiles [EXTRA=]"
task :bundle_all do
extra = ENV["EXTRA"] || "install"
gemfiles = (["Gemfile"] + Dir["spec/fixtures/rails*/Gemfile"])
raise if gemfiles.size < 3
gemfiles.each do |gemfile|
Bundler.with_unbundled_env do
sh "GEMFILE=#{gemfile} bundle #{extra}"
end
end
end
|