Skip to content

Commit 8cf09dd

Browse files
committed
adding sorbet
1 parent 62cafa6 commit 8cf09dd

File tree

11 files changed

+419
-65
lines changed

11 files changed

+419
-65
lines changed

.github/workflows/cd.yml

+24-26
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,41 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1212
steps:
13+
- name: Install rust stable toolchain
14+
uses: actions-rust-lang/setup-rust-toolchain@v1
15+
with:
16+
toolchain: stable
17+
override: true
1318
- uses: actions/checkout@v4
1419
- name: Set up Ruby
1520
uses: ruby/setup-ruby@v1
1621
with:
1722
bundler-cache: true
1823
ruby-version: 3.3
19-
- name: Install rust stable toolchain
20-
uses: actions-rust-lang/setup-rust-toolchain@v1
21-
with:
22-
toolchain: stable
23-
override: true
24-
- name: Compile rust
25-
run: bundle exec rake compile
26-
- name: Tag and Push Gem
27-
id: tag-and-push-gem
28-
uses: discourse/publish-rubygems-action@v3
24+
- name: Push Gem
25+
run: |
26+
gem_version=$(ruby -r rubygems -e "puts Gem::Specification::load('$(ls *.gemspec)').version")
27+
echo "gem_version=$gem_version" >> $GITHUB_OUTPUT
28+
29+
if git fetch origin "refs/tags/v$gem_version" >/dev/null 2>&1
30+
then
31+
echo "Skipping. Tag 'v$gem_version' already exists"
32+
echo "new_version=false" >> $GITHUB_OUTPUT
33+
else
34+
mkdir -p $HOME/.gem
35+
touch $HOME/.gem/credentials
36+
chmod 0600 $HOME/.gem/credentials
37+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
38+
git config --global user.email "${GIT_EMAIL}"
39+
git config --global user.name "${GIT_NAME}"
40+
bundle exec rake release
41+
fi
2942
env:
3043
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3144
GIT_EMAIL: ${{secrets.GUSTO_GIT_EMAIL}}
3245
GIT_NAME: ${{secrets.GUSTO_GIT_EMAIL}}
3346
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
47+
RELEASE_COMMAND: "rake release"
3448
- name: Create GitHub Release
3549
run: gh release create v${{steps.tag-and-push-gem.outputs.gem_version}} --generate-notes
3650
if: ${{ steps.tag-and-push-gem.outputs.new_version == 'true' }}
37-
env:
38-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
notify_on_failure:
40-
runs-on: ubuntu-latest
41-
needs: [deploy]
42-
if: ${{ failure() && github.ref == 'refs/heads/main' }}
43-
env:
44-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
45-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
46-
steps:
47-
- uses: slackapi/[email protected]
48-
with:
49-
payload: |
50-
{
51-
"text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
52-
}

Gemfile.lock

+58-37
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,29 @@ PATH
33
specs:
44
fast_code_owners (0.0.1)
55
code_teams (~> 1.0)
6-
libclang
76
packs-specification
8-
sorbet-runtime (>= 0.5.11249)
7+
sorbet-runtime
98

109
GEM
1110
remote: https://rubygems.org/
1211
specs:
13-
actionpack (8.0.1)
14-
actionview (= 8.0.1)
15-
activesupport (= 8.0.1)
12+
actionpack (8.0.2)
13+
actionview (= 8.0.2)
14+
activesupport (= 8.0.2)
1615
nokogiri (>= 1.8.5)
1716
rack (>= 2.2.4)
1817
rack-session (>= 1.0.1)
1918
rack-test (>= 0.6.3)
2019
rails-dom-testing (~> 2.2)
2120
rails-html-sanitizer (~> 1.6)
2221
useragent (~> 0.16)
23-
actionview (8.0.1)
24-
activesupport (= 8.0.1)
22+
actionview (8.0.2)
23+
activesupport (= 8.0.2)
2524
builder (~> 3.1)
2625
erubi (~> 1.11)
2726
rails-dom-testing (~> 2.2)
2827
rails-html-sanitizer (~> 1.6)
29-
activesupport (8.0.1)
28+
activesupport (8.0.2)
3029
base64
3130
benchmark (>= 0.3)
3231
bigdecimal
@@ -39,21 +38,21 @@ GEM
3938
securerandom (>= 0.3)
4039
tzinfo (~> 2.0, >= 2.0.5)
4140
uri (>= 0.13.1)
42-
ast (2.4.2)
41+
ast (2.4.3)
4342
base64 (0.2.0)
4443
benchmark (0.4.0)
4544
bigdecimal (3.1.9)
4645
builder (3.3.0)
4746
code_teams (1.0.2)
4847
sorbet-runtime
4948
concurrent-ruby (1.3.5)
50-
connection_pool (2.5.0)
49+
connection_pool (2.5.3)
5150
crass (1.0.6)
5251
date (3.4.1)
5352
debug (1.10.0)
5453
irb (~> 1.10)
5554
reline (>= 0.3.8)
56-
diff-lcs (1.6.0)
55+
diff-lcs (1.6.1)
5756
drb (2.2.1)
5857
erubi (1.13.1)
5958
i18n (1.14.7)
@@ -63,22 +62,31 @@ GEM
6362
pp (>= 0.6.0)
6463
rdoc (>= 4.0.0)
6564
reline (>= 0.4.2)
66-
json (2.10.1)
65+
json (2.11.3)
6766
language_server-protocol (3.17.0.4)
68-
libclang (14.0.6-arm64-darwin)
6967
lint_roller (1.1.0)
7068
logger (1.7.0)
7169
loofah (2.24.0)
7270
crass (~> 1.0.2)
7371
nokogiri (>= 1.12.0)
74-
minitest (5.25.4)
72+
minitest (5.25.5)
7573
netrc (0.11.0)
76-
nokogiri (1.18.3-arm64-darwin)
74+
nokogiri (1.18.8-aarch64-linux-gnu)
75+
racc (~> 1.4)
76+
nokogiri (1.18.8-aarch64-linux-musl)
77+
racc (~> 1.4)
78+
nokogiri (1.18.8-arm64-darwin)
79+
racc (~> 1.4)
80+
nokogiri (1.18.8-x86_64-darwin)
81+
racc (~> 1.4)
82+
nokogiri (1.18.8-x86_64-linux-gnu)
83+
racc (~> 1.4)
84+
nokogiri (1.18.8-x86_64-linux-musl)
7785
racc (~> 1.4)
7886
packs-specification (0.0.10)
7987
sorbet-runtime
80-
parallel (1.26.3)
81-
parser (3.3.7.1)
88+
parallel (1.27.0)
89+
parser (3.3.8.0)
8290
ast (~> 2.4.1)
8391
racc
8492
pp (0.6.2)
@@ -89,7 +97,7 @@ GEM
8997
date
9098
stringio
9199
racc (1.8.1)
92-
rack (3.1.11)
100+
rack (3.1.13)
93101
rack-session (2.1.0)
94102
base64 (>= 0.1.0)
95103
rack (>= 3.0.0)
@@ -104,24 +112,27 @@ GEM
104112
rails-html-sanitizer (1.6.2)
105113
loofah (~> 2.21)
106114
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
107-
railties (8.0.1)
108-
actionpack (= 8.0.1)
109-
activesupport (= 8.0.1)
115+
railties (8.0.2)
116+
actionpack (= 8.0.2)
117+
activesupport (= 8.0.2)
110118
irb (~> 1.13)
111119
rackup (>= 1.0.0)
112120
rake (>= 12.2)
113121
thor (~> 1.0, >= 1.2.2)
114122
zeitwerk (~> 2.6)
115123
rainbow (3.1.1)
116124
rake (13.2.1)
117-
rake-compiler (1.2.9)
125+
rake-compiler (1.3.0)
118126
rake
119127
rake-compiler-dock (1.9.1)
120128
rb_sys (0.9.111)
121129
rake-compiler-dock (= 1.9.1)
122-
rbi (0.2.4)
130+
rbi (0.3.2)
123131
prism (~> 1.0)
132+
rbs (>= 3.4.4)
124133
sorbet-runtime (>= 0.5.9204)
134+
rbs (3.9.2)
135+
logger
125136
rdoc (6.13.1)
126137
psych (>= 4.0.0)
127138
regexp_parser (2.10.0)
@@ -140,29 +151,32 @@ GEM
140151
diff-lcs (>= 1.2.0, < 2.0)
141152
rspec-support (~> 3.13.0)
142153
rspec-support (3.13.2)
143-
rubocop (1.73.2)
154+
rubocop (1.75.4)
144155
json (~> 2.3)
145156
language_server-protocol (~> 3.17.0.2)
146157
lint_roller (~> 1.1.0)
147158
parallel (~> 1.10)
148159
parser (>= 3.3.0.2)
149160
rainbow (>= 2.2.2, < 4.0)
150161
regexp_parser (>= 2.9.3, < 3.0)
151-
rubocop-ast (>= 1.38.0, < 2.0)
162+
rubocop-ast (>= 1.44.0, < 2.0)
152163
ruby-progressbar (~> 1.7)
153164
unicode-display_width (>= 2.4.0, < 4.0)
154-
rubocop-ast (1.38.1)
155-
parser (>= 3.3.1.0)
165+
rubocop-ast (1.44.1)
166+
parser (>= 3.3.7.2)
167+
prism (~> 1.4)
156168
ruby-progressbar (1.13.0)
157169
securerandom (0.4.1)
158-
sorbet (0.5.11899)
159-
sorbet-static (= 0.5.11899)
160-
sorbet-runtime (0.5.11899)
161-
sorbet-static (0.5.11899-universal-darwin)
162-
sorbet-static-and-runtime (0.5.11899)
163-
sorbet (= 0.5.11899)
164-
sorbet-runtime (= 0.5.11899)
165-
spoom (1.5.4)
170+
sorbet (0.5.12043)
171+
sorbet-static (= 0.5.12043)
172+
sorbet-runtime (0.5.12043)
173+
sorbet-static (0.5.12043-aarch64-linux)
174+
sorbet-static (0.5.12043-universal-darwin)
175+
sorbet-static (0.5.12043-x86_64-linux)
176+
sorbet-static-and-runtime (0.5.12043)
177+
sorbet (= 0.5.12043)
178+
sorbet-runtime (= 0.5.12043)
179+
spoom (1.6.1)
166180
erubi (>= 1.10.0)
167181
prism (>= 0.28.0)
168182
rbi (>= 0.2.3)
@@ -194,8 +208,15 @@ GEM
194208
zeitwerk (2.7.2)
195209

196210
PLATFORMS
197-
arm64-darwin-24
198-
ruby
211+
aarch64-linux
212+
aarch64-linux-gnu
213+
aarch64-linux-musl
214+
arm64-darwin
215+
universal-darwin
216+
x86_64-darwin
217+
x86_64-linux
218+
x86_64-linux-gnu
219+
x86_64-linux-musl
199220

200221
DEPENDENCIES
201222
debug

fast_code_owners.gemspec

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ Gem::Specification.new do |spec|
3535
spec.extensions = ['ext/fast_code_owners/Cargo.toml']
3636

3737
spec.add_dependency 'code_teams', '~> 1.0'
38-
spec.add_dependency 'libclang'
3938
spec.add_dependency 'packs-specification'
40-
spec.add_dependency 'sorbet-runtime', '>= 0.5.11249'
39+
spec.add_dependency 'sorbet-runtime'
4140
spec.add_development_dependency 'debug'
4241
spec.add_development_dependency 'railties'
4342
spec.add_development_dependency 'rake-compiler'

sorbet/config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--dir
2+
.
3+
--ignore=/spec
4+
--ignore=/tmp
5+
--ignore=/vendor/bundle
6+
--enable-experimental-requires-ancestor

sorbet/rbi/dsl/.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/*.rbi linguist-generated=true

sorbet/rbi/dsl/active_support/callbacks.rbi

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)