File: Rakefile

package info (click to toggle)
ruby-memoizable 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 296 kB
  • sloc: ruby: 1,052; makefile: 4
file content (60 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# frozen_string_literal: true

require "bundler/gem_tasks"
# Override release task to skip gem push (handled by GitHub Actions with attestations)
Rake::Task["release"].clear
desc "Build gem and create tag (gem push handled by CI)"
task release: %w[build release:guard_clean release:source_control_push]

require "rspec/core/rake_task"
require "rubocop/rake_task"
require "standard/rake"
require "yard"
require "yardstick/rake/measurement"
require "yardstick/rake/verify"
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new(:rubocop)

YARD::Rake::YardocTask.new(:yard)

Yardstick::Rake::Measurement.new(:yardstick)

Yardstick::Rake::Verify.new(:verify_measurements) do |verify|
  verify.threshold = 100
end

desc "Run RuboCop and Standard Ruby"
task lint: %i[rubocop standard]

desc "Run RSpec"
task test: :spec

desc "Run Mutant"
task :mutant do
  if Process.respond_to?(:fork)
    sh "bundle exec mutant run"
  else
    warn "Mutant is disabled (requires fork)"
  end
end

STEEP_AVAILABLE = begin
  require "steep"
  true
rescue LoadError
  false
end

desc "Run Steep type checker"
task :steep do
  if STEEP_AVAILABLE
    sh "bundle exec steep check"
  else
    warn "Steep is disabled"
  end
end

desc "Generate and verify documentation"
task docs: %i[yard verify_measurements]

task default: %i[test lint mutant docs steep]