File: Rakefile

package info (click to toggle)
ruby-rouge 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,836 kB
  • sloc: ruby: 38,168; sed: 2,071; perl: 152; makefile: 8
file content (43 lines) | stat: -rw-r--r-- 1,125 bytes parent folder | download | duplicates (4)
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
42
43
# frozen_string_literal: true

require "bundler/setup"
require "bundler/gem_tasks" # Adds the :build, :install and :release tasks
require "rake/clean" # Adds the :clean and :clobber tasks
require "rake/testtask"
require "rubocop/rake_task"
require "yard"

# Add tasks
task :check => ["check:specs", "check:style"]
task :default => [:check]
task :test => [:check]

# Add pre-requisites
task :build => [:clean, :check, "generate:docs"]

# Add utility tasks
task :newline do
  puts
end

# Load tasks
Dir.glob(Pathname.new(__FILE__).dirname.join('tasks/**/*.rake')).each do |f|
  load f
end

# Legacy task names (for preserving backwards compatibility)
def alias_task(aliases)
  aliases.each do |alias_name,task_name|
    t = Rake::Task[task_name]
    task alias_name, *t.arg_names do |_, args|
      args = t.arg_names.map { |a| args[a] }
      t.invoke(args)
    end
  end
end

alias_task "changelog:insert" => "update:changelog"
alias_task :lex               => "generate:lexer"
alias_task :profile_memory    => "check:memory"
alias_task :similarity        => "check:similarity"
alias_task :spec              => "check:specs"