File: Rakefile

package info (click to toggle)
ruby-browser 5.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 872 kB
  • sloc: ruby: 4,752; makefile: 13
file content (40 lines) | stat: -rw-r--r-- 785 bytes parent folder | download | duplicates (2)
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
33
34
35
36
37
38
39
40
# frozen_string_literal: true

require "bundler"
require "bundler/setup"
Bundler::GemHelper.install_tasks

require "rake/testtask"
Rake::TestTask.new(:test) do |t|
  t.libs << "lib"
  t.libs << "test"
  t.test_files = FileList["test/**/*_test.rb"]
  t.verbose = true
  t.warning = false
end

require "rubocop/rake_task"
desc "Run rubocop"
task :rubocop do
  RuboCop::RakeTask.new do |t|
    t.options += %w[
      --display-style-guide
      --display-cop-names
      --extra-details
      --auto-correct
    ]
  end
end

desc "Run specs against all gemfiles"
task "test:all" do
  %w[
    Gemfile
    gemfiles/rails4.gemfile
  ].each do |gemfile|
    puts "=> Running with Gemfile: #{gemfile}"
    system "BUNDLE_GEMFILE=#{gemfile} rake test"
  end
end

task default: %i[test rubocop]