File: Rakefile

package info (click to toggle)
ruby-train 3.13.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,208 kB
  • sloc: ruby: 10,002; sh: 17; makefile: 8
file content (41 lines) | stat: -rw-r--r-- 1,462 bytes parent folder | download | duplicates (3)
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
41
# A Rakefile defines tasks to help maintain your project.
# Rake provides several task templates that are useful.

#------------------------------------------------------------------#
#                    Test Runner Tasks
#------------------------------------------------------------------#

# This task template will make a task named 'test', and run
# the tests that it finds.
require "rake/testtask"

Rake::TestTask.new do |t|
  t.libs.push "lib"
  t.test_files = FileList[
    "test/unit/*_test.rb",
    "test/integration/*_test.rb",
    "test/functional/*_test.rb",
  ]
  t.verbose = true
  # Ideally, we'd run tests with warnings enabled,
  # but the dependent gems have many warnings. As this
  # is an example, let's disable them so the testing
  # experience is cleaner.
  t.warning = false
end

#------------------------------------------------------------------#
#                    Code Style Tasks
#------------------------------------------------------------------#
require "rubocop/rake_task"

RuboCop::RakeTask.new(:lint) do |t|
  # Choices of rubocop rules to enforce are deeply personal.
  # Here, we set things up so that your plugin will use the Bundler-installed
  # train gem's copy of the Train project's rubocop.yml file (which
  # is indeed packaged with the train gem).
  require "train/globals"
  train_rubocop_yml = File.join(Train.src_root, ".rubocop.yml")

  t.options = ["--display-cop-names", "--config", train_rubocop_yml]
end