Sha256: 3321a466fbd5d6a5f01572a74e1e7b17a8484a356e071e6a369cb1ed18121eed

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

require "rubocop/rake_task"

RuboCop::RakeTask.new do |task|
  task.requires << 'rubocop-sorbet'
end

namespace :sorbet do
  desc 'Type-checking with sorbet'
  task :check do
    system("bundle exec srb tc -v")
  end

  desc 'Type-checking and auto-fix correctable errors with sorbet'
  task :autocorrect do
    system("bundle exec srb tc --autocorrect -v")
  end
end

namespace :tapioca do
  desc 'Generate RBI from gems with tapioca'
  task :gen do
    system("bundle exec tapioca gem --all")
  end

  desc 'Check duplicated definitions exists in shim RBIs with tapioca'
  task :check_shims do
    system("bundle exec tapioca check-shims")
  end
end

task :default do
   %i[spec rubocop:autocorrect_all sorbet:autocorrect tapioca:check_shims].each do
     puts ".。*゚+.*.。  #{?\s * _1.size}  ゚+..。*゚+"
     puts ".。*゚+.*.。  #{_1}  ゚+..。*゚+"
     puts ".。*゚+.*.。  #{?\s * _1.size}  ゚+..。*゚+"
     Rake::Task[_1].execute
   end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tsumanne-0.0.1 Rakefile
tsumanne-0.0.0 Rakefile