rbs-src 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49e3f5f4a8aee7ee558855e658b47e01e4f17d3a24eaf0c167c26812e7fa4195
4
- data.tar.gz: 062ac2a5b37770592afa3c07c23c32b18259c679c6eae8de8b0f58dff4140928
3
+ metadata.gz: e7ade9d16159cd243f1f3849c3cecf99ff9e9bcb8988380778a19d56ab09f0e1
4
+ data.tar.gz: 85bd20a7118741b61d5e0186893a8f990a8f257c03a19fbc3a3410f056cb1257
5
5
  SHA512:
6
- metadata.gz: cc36bedb368b369bc005a879486d1c70f684fb7bba77bcd6825324240a4b343441aacf6649cd1832cd50868b369dc6c9421c2080534bb4d9cbcd2dffd8a0b0c1
7
- data.tar.gz: 1bf8e0cd1e0c87a5b595e478fe18a7e99f9bc3a3336bfb62baa6bdf0347b2f29cf2718d8c36ffbd581e0e6a4e4d57bcd19a4220d681f42ceb3bbd00603704496
6
+ metadata.gz: 0c238d9c2c9a514bd62259176db2790507dc9543e9b0bd93d5530956d722158dc0f1bfd6f63ee5db037e0f3f89e581446f7935349d4336b4934c8aed774514cd
7
+ data.tar.gz: 177efc73a82a9de0bb01ed8155db0f843acaeedfb37bffb82e3de05db9140f21893e8ef1f0d47694e183d1eda9f0184d9b887e443ad9ba31f2eaf23274e7800f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbs-src (0.5.0)
4
+ rbs-src (0.6.0)
5
5
  rainbow (~> 3.1.1)
6
6
 
7
7
  GEM
data/lib/rbs/src/gem.rb CHANGED
@@ -19,8 +19,8 @@ module Rbs
19
19
  repository_root.join(repository_dir, name, version)
20
20
  end
21
21
 
22
- def rbs_path
23
- rbs_prefix + "#{name}-#{version}"
22
+ def rbs_path(suffix = version)
23
+ rbs_prefix + "#{name}-#{suffix}"
24
24
  end
25
25
 
26
26
  def status(runner, commit:)
@@ -50,7 +50,7 @@ module Rbs
50
50
  end
51
51
 
52
52
  runner.puts "💪 Checking out the commit #{commit}..."
53
- runner.execute!("git", "reset", "--hard", commit, chdir: repository_root)
53
+ runner.execute!("git", "checkout", commit, chdir: repository_root)
54
54
  end
55
55
 
56
56
  def clone(runner, repository_url:, commit:)
@@ -66,6 +66,9 @@ module Rbs
66
66
  end
67
67
 
68
68
  def link
69
+ Pathname.glob(rbs_path("*").to_s).each do |path|
70
+ File.unlink(path.to_s)
71
+ end
69
72
  File.symlink(repository_path.relative_path_from(rbs_path.parent), rbs_path)
70
73
  end
71
74
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rbs
4
4
  module Src
5
- VERSION = "0.5.0"
5
+ VERSION = "0.6.0"
6
6
  end
7
7
  end
data/sig/rbs/gem.rbs CHANGED
@@ -19,7 +19,7 @@ module Rbs
19
19
  def repository_path: () -> Pathname
20
20
 
21
21
  # The path of the directory in the `#rbs_prefix` that contains the RBS files of the gem
22
- def rbs_path: () -> Pathname
22
+ def rbs_path: (?String suffix) -> Pathname
23
23
 
24
24
  def clone: (CommandRunner, repository_url: String, commit: String?) -> void
25
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs-src
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-29 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow