dry-monads-sorbet 1.1.0.pre.11 → 1.1.0.pre.12
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 014ca5f2317b61646f66bd7289b7d0b6440135a4b4925bb2f21416bace62cbb2
|
4
|
+
data.tar.gz: c0005de85fe0d62249657f370d0bc256b4ef6385921832ccb49abb3f141f9bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 586a024a6e38d79ff1ee41cc281ecb02d75c7a280f3d791caf29f65b8484d9fd04b767add2f68a3bfdd35b8fc92b78f0c2ddbc75e03b7ddcfdab1e28030cf2aa
|
7
|
+
data.tar.gz: 70070852d0c577a59c78e51ddfb581fa413df1ae4643491d17c2e84b3065509863b6cb3a090f860daa19e9fcaa1d7598f9c736c75e34718da225aa96ce4ca564
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# typed: strong
|
2
2
|
#
|
3
|
+
# This rbi file is bundled in the dry-monads-sorbet gem and is copied down
|
4
|
+
# into projects using the dry_monads_sorbet:update_rbi rake task.
|
5
|
+
#
|
3
6
|
# Any changes to the type annotations for Dry::Monads should be made
|
4
7
|
# in the dry-monads-sorbet gem itself in its bundled_rbi directory.
|
5
8
|
|
@@ -1,23 +1,25 @@
|
|
1
1
|
require 'dry-monads-sorbet'
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
DRY_MONADS_SORBET_RAKE_DIR = File.dirname(__FILE__)
|
4
5
|
|
5
6
|
namespace :dry_monads_sorbet do
|
6
|
-
|
7
|
+
desc "Generate rbis for dry/monads"
|
8
|
+
task :update_rbi do
|
7
9
|
FileUtils.rm_rf(dry_monads_sorbet_rbi_path)
|
8
10
|
|
9
11
|
copy_bundled_rbi('dry-monads.rbi')
|
10
12
|
end
|
11
13
|
|
12
14
|
def dry_monads_sorbet_rbi_path
|
13
|
-
Rake.original_dir.join('sorbet', 'dry-monads-sorbet')
|
15
|
+
Pathname.new(Rake.original_dir).join('sorbet', 'dry-monads-sorbet')
|
14
16
|
end
|
15
17
|
|
16
18
|
def copy_bundled_rbi(filename)
|
17
|
-
puts "Copy bundled file #{filename}"
|
18
19
|
bundled_rbi_file_path = File.join(DRY_MONADS_SORBET_RAKE_DIR, '..', '..', 'bundled_rbi', filename)
|
19
20
|
copy_to_path = dry_monads_sorbet_rbi_path.join(filename)
|
20
21
|
FileUtils.mkdir_p(File.dirname(copy_to_path))
|
21
22
|
FileUtils.cp(bundled_rbi_file_path, copy_to_path)
|
23
|
+
puts "Copied bundled rbi file: #{filename}"
|
22
24
|
end
|
23
25
|
end
|