Sha256: 6e7a1cf046a2130eef6ec25d2d71406a1b8329c6a53162e0db08ab55d491b337
Contents?: true
Size: 706 Bytes
Versions: 3
Compression:
Stored size: 706 Bytes
Contents
require 'dry-monads-sorbet' DRY_MONADS_SORBET_RAKE_DIR = File.dirname(__FILE__) namespace :dry_monads_sorbet do task :update_rbi, :environment do |t, args| FileUtils.rm_rf(dry_monads_sorbet_rbi_path) copy_bundled_rbi('dry-monads.rbi') end def dry_monads_sorbet_rbi_path Rake.original_dir.join('sorbet', 'dry-monads-sorbet') end def copy_bundled_rbi(filename) puts "Copy bundled file #{filename}" bundled_rbi_file_path = File.join(DRY_MONADS_SORBET_RAKE_DIR, '..', '..', 'bundled_rbi', filename) copy_to_path = dry_monads_sorbet_rbi_path.join(filename) FileUtils.mkdir_p(File.dirname(copy_to_path)) FileUtils.cp(bundled_rbi_file_path, copy_to_path) end end
Version data entries
3 entries across 3 versions & 1 rubygems