Skip to content

Commit 8867ee6

Browse files
authored
rubocop and sorbet passing build (#21)
1 parent 5038a89 commit 8867ee6

File tree

11 files changed

+209
-63
lines changed

11 files changed

+209
-63
lines changed

.rubocop.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,21 @@
88
# where the inspected file is and continue its way up to the root directory.
99
#
1010
# See https://docs.rubocop.org/rubocop/configuration
11+
12+
plugins:
13+
- rubocop-rake
14+
- rubocop-rspec
15+
1116
AllCops:
1217
NewCops: enable
1318
Exclude:
1419
- vendor/bundle/**/**
15-
TargetRubyVersion: 2.6
20+
- bin/**
21+
TargetRubyVersion: 3.2
22+
23+
Gemspec/DevelopmentDependencies:
24+
Enabled: true
25+
EnforcedStyle: Gemfile
1626

1727
Metrics/ParameterLists:
1828
Enabled: false
@@ -118,6 +128,11 @@ Style/AccessorGrouping:
118128
Style/HashSyntax:
119129
Enabled: false
120130

121-
Gemspec/DevelopmentDependencies:
122-
Enabled: true
123-
EnforcedStyle: gemspec
131+
RSpec/MultipleExpectations:
132+
Enabled: false
133+
134+
RSpec/ExampleLength:
135+
Enabled: false
136+
137+
RSpec/ContextWording:
138+
Enabled: false

Gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@ source 'https://rubygems.org'
22

33
# Specify your gem's dependencies in code_teams.gemspec
44
gemspec
5+
6+
gem 'pry'
7+
gem 'rake'
8+
gem 'rspec', '~> 3.0'
9+
gem 'rubocop'
10+
gem 'rubocop-rake'
11+
gem 'rubocop-rspec'
12+
gem 'sorbet'
13+
gem 'tapioca'

Gemfile.lock

Lines changed: 86 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,102 @@ PATH
77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
ast (2.4.2)
10+
ast (2.4.3)
11+
benchmark (0.4.0)
1112
coderay (1.1.3)
12-
diff-lcs (1.4.4)
13-
json (2.6.3)
14-
language_server-protocol (3.17.0.3)
15-
method_source (1.0.0)
16-
parallel (1.23.0)
17-
parser (3.2.2.4)
13+
diff-lcs (1.6.2)
14+
erubi (1.13.1)
15+
json (2.12.2)
16+
language_server-protocol (3.17.0.5)
17+
lint_roller (1.1.0)
18+
logger (1.7.0)
19+
method_source (1.1.0)
20+
netrc (0.11.0)
21+
parallel (1.27.0)
22+
parser (3.3.8.0)
1823
ast (~> 2.4.1)
1924
racc
20-
pry (0.14.1)
25+
prism (1.4.0)
26+
pry (0.15.2)
2127
coderay (~> 1.1)
2228
method_source (~> 1.0)
23-
racc (1.7.3)
29+
racc (1.8.1)
2430
rainbow (3.1.1)
25-
rake (13.0.6)
26-
regexp_parser (2.8.2)
27-
rexml (3.2.6)
28-
rspec (3.10.0)
29-
rspec-core (~> 3.10.0)
30-
rspec-expectations (~> 3.10.0)
31-
rspec-mocks (~> 3.10.0)
32-
rspec-core (3.10.1)
33-
rspec-support (~> 3.10.0)
34-
rspec-expectations (3.10.1)
31+
rake (13.3.0)
32+
rbi (0.3.3)
33+
prism (~> 1.0)
34+
rbs (>= 3.4.4)
35+
sorbet-runtime (>= 0.5.9204)
36+
rbs (3.9.4)
37+
logger
38+
regexp_parser (2.10.0)
39+
rexml (3.4.1)
40+
rspec (3.13.1)
41+
rspec-core (~> 3.13.0)
42+
rspec-expectations (~> 3.13.0)
43+
rspec-mocks (~> 3.13.0)
44+
rspec-core (3.13.4)
45+
rspec-support (~> 3.13.0)
46+
rspec-expectations (3.13.5)
3547
diff-lcs (>= 1.2.0, < 2.0)
36-
rspec-support (~> 3.10.0)
37-
rspec-mocks (3.10.2)
48+
rspec-support (~> 3.13.0)
49+
rspec-mocks (3.13.5)
3850
diff-lcs (>= 1.2.0, < 2.0)
39-
rspec-support (~> 3.10.0)
40-
rspec-support (3.10.2)
41-
rubocop (1.57.2)
51+
rspec-support (~> 3.13.0)
52+
rspec-support (3.13.4)
53+
rubocop (1.75.8)
4254
json (~> 2.3)
43-
language_server-protocol (>= 3.17.0)
55+
language_server-protocol (~> 3.17.0.2)
56+
lint_roller (~> 1.1.0)
4457
parallel (~> 1.10)
45-
parser (>= 3.2.2.4)
58+
parser (>= 3.3.0.2)
4659
rainbow (>= 2.2.2, < 4.0)
47-
regexp_parser (>= 1.8, < 3.0)
48-
rexml (>= 3.2.5, < 4.0)
49-
rubocop-ast (>= 1.28.1, < 2.0)
60+
regexp_parser (>= 2.9.3, < 3.0)
61+
rubocop-ast (>= 1.44.0, < 2.0)
5062
ruby-progressbar (~> 1.7)
51-
unicode-display_width (>= 2.4.0, < 3.0)
52-
rubocop-ast (1.30.0)
53-
parser (>= 3.2.1.0)
63+
unicode-display_width (>= 2.4.0, < 4.0)
64+
rubocop-ast (1.44.1)
65+
parser (>= 3.3.7.2)
66+
prism (~> 1.4)
67+
rubocop-rake (0.7.1)
68+
lint_roller (~> 1.1)
69+
rubocop (>= 1.72.1)
70+
rubocop-rspec (3.6.0)
71+
lint_roller (~> 1.1)
72+
rubocop (~> 1.72, >= 1.72.1)
5473
ruby-progressbar (1.13.0)
55-
sorbet (0.5.11122)
56-
sorbet-static (= 0.5.11122)
57-
sorbet-runtime (0.5.9976)
58-
sorbet-static (0.5.11122-universal-darwin)
59-
sorbet-static (0.5.11122-x86_64-linux)
60-
unicode-display_width (2.5.0)
74+
sorbet (0.5.12134)
75+
sorbet-static (= 0.5.12134)
76+
sorbet-runtime (0.5.12134)
77+
sorbet-static (0.5.12134-universal-darwin)
78+
sorbet-static-and-runtime (0.5.12134)
79+
sorbet (= 0.5.12134)
80+
sorbet-runtime (= 0.5.12134)
81+
spoom (1.6.3)
82+
erubi (>= 1.10.0)
83+
prism (>= 0.28.0)
84+
rbi (>= 0.3.3)
85+
rexml (>= 3.2.6)
86+
sorbet-static-and-runtime (>= 0.5.10187)
87+
thor (>= 0.19.2)
88+
tapioca (0.16.11)
89+
benchmark
90+
bundler (>= 2.2.25)
91+
netrc (>= 0.11.0)
92+
parallel (>= 1.21.0)
93+
rbi (~> 0.2)
94+
sorbet-static-and-runtime (>= 0.5.11087)
95+
spoom (>= 1.2.0)
96+
thor (>= 1.2.0)
97+
yard-sorbet
98+
thor (1.3.2)
99+
unicode-display_width (3.1.4)
100+
unicode-emoji (~> 4.0, >= 4.0.4)
101+
unicode-emoji (4.0.4)
102+
yard (0.9.37)
103+
yard-sorbet (0.9.0)
104+
sorbet-runtime
105+
yard
61106

62107
PLATFORMS
63108
universal-darwin
@@ -69,7 +114,10 @@ DEPENDENCIES
69114
rake
70115
rspec (~> 3.0)
71116
rubocop
117+
rubocop-rake
118+
rubocop-rspec
72119
sorbet
120+
tapioca
73121

74122
BUNDLED WITH
75123
2.4.7

bin/rubocop

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'rubocop' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("rubocop", "rubocop")

bin/srb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'srb' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("sorbet", "srb")

bin/srb-rbi

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'srb-rbi' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("sorbet", "srb-rbi")

code_teams.gemspec

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ Gem::Specification.new do |spec|
2020

2121
spec.files = Dir['README.md', 'lib/**/*']
2222
spec.require_paths = ['lib']
23-
spec.required_ruby_version = '>= 2.6'
23+
spec.required_ruby_version = '>= 3.2'
2424

2525
spec.add_dependency 'sorbet-runtime'
26-
27-
spec.add_development_dependency 'pry'
28-
spec.add_development_dependency 'rake'
29-
spec.add_development_dependency 'rspec', '~> 3.0'
30-
spec.add_development_dependency 'rubocop'
31-
spec.add_development_dependency 'sorbet'
3226
end

lib/code_teams.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# typed: strict
44

55
require 'yaml'
6-
require 'set'
76
require 'pathname'
87
require 'sorbet-runtime'
98
require 'code_teams/plugin'

sorbet/config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
--dir
22
.
33
--ignore=/vendor/bundle
4+
--cache-dir=tmp/cache/sorbet
5+
--ignore=tmp/
6+
--ignore=vendor/
7+
--ignore=spec/

0 commit comments

Comments
 (0)