rbi 0.3.8 → 0.3.9

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: e8a26f05eff609245be847ff291cfd456b86e0a11aa85c496bcdcbaf8c202b5b
4
- data.tar.gz: f1eb34ff26a99f6b1b20edfaec281db99559cce730e3c0cdbf0d8c75a8e6ee91
3
+ metadata.gz: 77b85115608a47d4b914f860694efc7d177a0b59547ba1cd5cfa41b6493b04a0
4
+ data.tar.gz: 53d88137d9d3913ba70ef73130a32e8be5b16d79deaacd7df7153d018cf87b70
5
5
  SHA512:
6
- metadata.gz: 9cbe3f72073f2813cef4744b57849d8725eab8ed19df9b14d7d7571f795dd90ca925645eed50f62ff86d8a387a5e845a516a7dfc097593788e9b27c6d6489edd
7
- data.tar.gz: 72e11ed844915a8965f3a0db4f76b7cb3b6e22e6eb7848bcf2f5484a415bdf79fd7c552c811b279cb006121179c8ebc1cfa58bcbe3d95e2089fec02f1f8ab8a0
6
+ metadata.gz: 14f59a1f6ae13807f786ae7b927f3b8444f429f4aa777ea835bdb47c4387ac39374fb57e0194c56a346d4f3f63ce6ca2a4eac40bb0f602a8e404a36dabf03ce8
7
+ data.tar.gz: b5bbac789aff1fdc6c7b97326e4a76d5e2bd412919895571a3cf324ca2f6751d8b7f1286c6618853e5b327e0adc756b619c76b7aaf5db8c4c8c8deb3de12ed9b
data/README.md CHANGED
@@ -54,10 +54,26 @@ end
54
54
 
55
55
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
56
56
 
57
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
58
-
59
57
  This repo uses itself (`rbi`) to retrieve and generate gem RBIs. You can run `dev rbi` to update local gem RBIs with RBIs from the central repo.
60
58
 
59
+ ## Releasing
60
+
61
+ ### Bump the gem version
62
+
63
+ - [ ] Locally, update the version number in [`version.rb`](https://github.com/Shopify/spoom/blob/main/lib/rbi/version.rb)
64
+ - [ ] Run `bundle install` to update the version number in `Gemfile.lock`
65
+ - [ ] Commit this change with the message `Bump version to vx.y.z`
66
+ - [ ] Push this change directly to main or open a PR
67
+
68
+ ### Create a new tag
69
+
70
+ - [ ] Locally, create a new tag with the new version number: `git tag vx.y.z`
71
+ - [ ] Push this tag up to the remote `git push origin vx.y.z`
72
+
73
+ ### Release workflow will run automatically
74
+
75
+ We have a [release workflow](https://github.com/Shopify/rbi/actions/workflows/release.yml) that will publish your new gem version to rubygems.org via [Trusted Publishing](https://guides.rubygems.org/trusted-publishing/). This workflow must be approved by a member of the Ruby and Rails Infrastructure team at Shopify before it will run. Once it is approved, it will automatically publish a new gem version to rubygems.org and create a new GitHub release.
76
+
61
77
  ## Contributing
62
78
 
63
79
  Bug reports and pull requests are welcome on GitHub at https://github.com/Shopify/rbi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Shopify/rbi/blob/master/CODE_OF_CONDUCT.md).
@@ -136,6 +136,17 @@ module RBI
136
136
  make_conflict_scope(prev, node)
137
137
  end
138
138
  @scope_stack << prev
139
+ elsif prev
140
+ # prev exists but is not a Scope (e.g., a Const)
141
+ # This is a conflict between different node types
142
+ if @keep == Keep::LEFT
143
+ # do nothing, keep the existing non-scope
144
+ elsif @keep == Keep::RIGHT
145
+ prev.replace(node.dup)
146
+ else
147
+ make_conflict_tree(prev, node)
148
+ end
149
+ return # Don't visit children, the whole scope is in conflict
139
150
  else
140
151
  copy = node.dup_empty
141
152
  current_scope << copy
@@ -265,6 +276,8 @@ module RBI
265
276
  else
266
277
  last_conflict_tree = node
267
278
  end
279
+ else
280
+ last_conflict_tree = nil
268
281
  end
269
282
 
270
283
  visit(node)
data/lib/rbi/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module RBI
5
- VERSION = "0.3.8"
5
+ VERSION = "0.3.9"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Terrasa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-02 00:00:00.000000000 Z
11
+ date: 2026-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism