File: Rakefile

package info (click to toggle)
ruby-base64 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 184 kB
  • sloc: ruby: 172; sh: 4; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 676 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
require "bundler/gem_tasks"
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList["test/**/test_*.rb"]
end

namespace :rbs do
  task :test do
    sh "ruby -I lib test_sig/test_base64.rb"
  end

  task :annotate do
    require "tmpdir"
    require "pathname"

    Dir.mktmpdir do |tmpdir|
      system("rdoc --ri --output #{tmpdir}/doc --root=. lib")
      system("rbs annotate --no-system --no-gems --no-site --no-home -d #{tmpdir}/doc sig")
    end
  end

  task :confirm do
    puts "Testing if RBS docs are updated with respect to RDoc"
    sh "git diff --exit-code sig/"
  end
end

task :default => :test