Sha256: 9caf1ccb6b023095fc6ccf544bcf4a03d88b89334dd0a9f734e4d1a704434984

Contents?: true

Size: 1.12 KB

Versions: 10

Compression:

Stored size: 1.12 KB

Contents

require "nenv"
require "bundler/gem_tasks"
require "yaml"

default_tasks = []

require "rspec/core/rake_task"
default_tasks << RSpec::Core::RakeTask.new(:spec) do |t|
  t.verbose = Nenv.ci?
end

unless Nenv.ci?
  require "rubocop/rake_task"
  default_tasks << RuboCop::RakeTask.new(:rubocop)
end

task default: default_tasks.map(&:name)

namespace :test do
  desc "Locally run tests like Travis and HoundCI would"
  task :all_versions do
    system(*%w(bundle install --quiet)) || abort
    system(*%w(bundle update --quiet)) || abort
    system(*%w(bundle exec rubocop -c .rubocop.yml)) || abort

    travis = YAML.load(IO.read(".travis.yml"))
    travis["gemfile"].each do |gemfile|
      STDOUT.puts
      STDOUT.puts "----------------------------------------------------- "
      STDOUT.puts " >> Running tests using Gemfile: #{gemfile} <<"
      STDOUT.puts "----------------------------------------------------- "
      env = { "BUNDLE_GEMFILE" => gemfile }
      system(env, *%w(bundle install --quiet)) || abort
      system(env, *%w(bundle update --quiet)) || abort
      system(env, *%w(bundle exec rspec)) || abort
    end
  end
end

Version data entries

10 entries across 10 versions & 5 rubygems

Version Path
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/Rakefile
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/Rakefile
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/Rakefile
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/Rakefile
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/Rakefile
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/Rakefile
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/Rakefile
guard-rspec-4.7.3 Rakefile
guard-rspec-4.7.2 Rakefile
guard-rspec-4.7.1 Rakefile