Skip to content

Commit 7c907d3

Browse files
committed
Initial setup
1 parent a928249 commit 7c907d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+211487
-68
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ jobs:
1414
strategy:
1515
matrix:
1616
ruby:
17-
- '3.2.2'
17+
- "3.2"
18+
- "3.1"
19+
- "3.0"
1820

1921
steps:
20-
- uses: actions/checkout@v3
21-
- name: Set up Ruby
22-
uses: ruby/setup-ruby@v1
23-
with:
24-
ruby-version: ${{ matrix.ruby }}
25-
bundler-cache: true
26-
- name: Run the default task
27-
run: bundle exec rake
22+
- uses: actions/checkout@v3
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{ matrix.ruby }}
27+
bundler-cache: true
28+
- name: Typecheck
29+
run: bundle exec srb tc
30+
- name: Run the default task
31+
run: bundle exec rake

.rubocop.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,40 @@
1+
inherit_gem:
2+
rubocop-shopify: rubocop.yml
3+
4+
require:
5+
- rubocop-sorbet
6+
- rubocop-rake
7+
18
AllCops:
2-
TargetRubyVersion: 2.6
9+
NewCops: disable
10+
SuggestExtensions: false
11+
TargetRubyVersion: 3.0
12+
13+
Naming/FileName:
14+
Exclude:
15+
- "lib/ruby-lsp-rspec.rb"
16+
17+
Sorbet/FalseSigil:
18+
Enabled: false
19+
20+
Sorbet/TrueSigil:
21+
Enabled: true
22+
Include:
23+
- "test/**/*.rb"
24+
Exclude:
25+
- "**/*.rake"
26+
- "lib/**/*.rb"
327

4-
Style/StringLiterals:
28+
Sorbet/StrictSigil:
529
Enabled: true
6-
EnforcedStyle: double_quotes
30+
Include:
31+
- "lib/**/*.rb"
32+
Exclude:
33+
- "**/*.rake"
34+
- "test/**/*.rb"
735

8-
Style/StringLiteralsInInterpolation:
36+
Style/StderrPuts:
937
Enabled: true
10-
EnforcedStyle: double_quotes
1138

12-
Layout/LineLength:
13-
Max: 120
39+
Style/MethodCallWithArgsParentheses:
40+
Enabled: false

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@ gem "rake", "~> 13.0"
1010
gem "rspec", "~> 3.0"
1111

1212
gem "rubocop", "~> 1.21"
13+
gem "rubocop-shopify", "~> 2.14", require: false
14+
15+
gem "rubocop-rake", "~> 0.6.0", require: false
16+
gem "rubocop-sorbet", "~> 0.7", require: false
17+
18+
gem "sorbet-static-and-runtime", platforms: :ruby
19+
gem "tapioca", "~> 0.11", require: false, platforms: :ruby
20+
21+
gem "debug"
22+
gem "irb"

Gemfile.lock

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
PATH
2+
remote: .
3+
specs:
4+
ruby-lsp-rspec (0.1.0)
5+
ruby-lsp (~> 0.10.1)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
ast (2.4.2)
11+
base64 (0.1.1)
12+
debug (1.8.0)
13+
irb (>= 1.5.0)
14+
reline (>= 0.3.1)
15+
diff-lcs (1.5.0)
16+
erubi (1.12.0)
17+
io-console (0.6.0)
18+
irb (1.8.1)
19+
rdoc
20+
reline (>= 0.3.8)
21+
json (2.6.3)
22+
language_server-protocol (3.17.0.3)
23+
netrc (0.11.0)
24+
parallel (1.23.0)
25+
parser (3.2.2.3)
26+
ast (~> 2.4.1)
27+
racc
28+
prettier_print (1.2.1)
29+
psych (5.1.0)
30+
stringio
31+
racc (1.7.1)
32+
rainbow (3.1.1)
33+
rake (13.0.6)
34+
rbi (0.0.17)
35+
ast
36+
parser (>= 3.0.0)
37+
sorbet-runtime (>= 0.5.9204)
38+
unparser (>= 0.5.6)
39+
rdoc (6.5.0)
40+
psych (>= 4.0.0)
41+
regexp_parser (2.8.1)
42+
reline (0.3.8)
43+
io-console (~> 0.5)
44+
rexml (3.2.6)
45+
rspec (3.12.0)
46+
rspec-core (~> 3.12.0)
47+
rspec-expectations (~> 3.12.0)
48+
rspec-mocks (~> 3.12.0)
49+
rspec-core (3.12.2)
50+
rspec-support (~> 3.12.0)
51+
rspec-expectations (3.12.3)
52+
diff-lcs (>= 1.2.0, < 2.0)
53+
rspec-support (~> 3.12.0)
54+
rspec-mocks (3.12.5)
55+
diff-lcs (>= 1.2.0, < 2.0)
56+
rspec-support (~> 3.12.0)
57+
rspec-support (3.12.0)
58+
rubocop (1.56.2)
59+
base64 (~> 0.1.1)
60+
json (~> 2.3)
61+
language_server-protocol (>= 3.17.0)
62+
parallel (~> 1.10)
63+
parser (>= 3.2.2.3)
64+
rainbow (>= 2.2.2, < 4.0)
65+
regexp_parser (>= 1.8, < 3.0)
66+
rexml (>= 3.2.5, < 4.0)
67+
rubocop-ast (>= 1.28.1, < 2.0)
68+
ruby-progressbar (~> 1.7)
69+
unicode-display_width (>= 2.4.0, < 3.0)
70+
rubocop-ast (1.29.0)
71+
parser (>= 3.2.1.0)
72+
rubocop-capybara (2.18.0)
73+
rubocop (~> 1.41)
74+
rubocop-factory_bot (2.22.0)
75+
rubocop (~> 1.33)
76+
rubocop-minitest (0.31.1)
77+
rubocop (>= 1.39, < 2.0)
78+
rubocop-rake (0.6.0)
79+
rubocop (~> 1.0)
80+
rubocop-rspec (2.22.0)
81+
rubocop (~> 1.33)
82+
rubocop-capybara (~> 2.17)
83+
rubocop-factory_bot (~> 2.22)
84+
rubocop-shopify (2.14.0)
85+
rubocop (~> 1.51)
86+
rubocop-sorbet (0.7.3)
87+
rubocop (>= 0.90.0)
88+
ruby-lsp (0.10.1)
89+
language_server-protocol (~> 3.17.0)
90+
sorbet-runtime
91+
syntax_tree (>= 6.1.1, < 7)
92+
yarp (>= 0.11, < 0.12)
93+
ruby-progressbar (1.13.0)
94+
sorbet (0.5.11010)
95+
sorbet-static (= 0.5.11010)
96+
sorbet-runtime (0.5.11010)
97+
sorbet-static (0.5.11010-universal-darwin)
98+
sorbet-static (0.5.11010-x86_64-linux)
99+
sorbet-static-and-runtime (0.5.11010)
100+
sorbet (= 0.5.11010)
101+
sorbet-runtime (= 0.5.11010)
102+
spoom (1.2.3)
103+
erubi (>= 1.10.0)
104+
sorbet-static-and-runtime (>= 0.5.10187)
105+
syntax_tree (>= 6.1.1)
106+
thor (>= 0.19.2)
107+
stringio (3.0.8)
108+
syntax_tree (6.1.1)
109+
prettier_print (>= 1.2.0)
110+
tapioca (0.11.8)
111+
bundler (>= 2.2.25)
112+
netrc (>= 0.11.0)
113+
parallel (>= 1.21.0)
114+
rbi (~> 0.0.0, >= 0.0.16)
115+
sorbet-static-and-runtime (>= 0.5.10187)
116+
spoom (~> 1.2.0, >= 1.2.0)
117+
thor (>= 1.2.0)
118+
yard-sorbet
119+
thor (1.2.2)
120+
unicode-display_width (2.4.2)
121+
unparser (0.6.8)
122+
diff-lcs (~> 1.3)
123+
parser (>= 3.2.0)
124+
yard (0.9.34)
125+
yard-sorbet (0.8.1)
126+
sorbet-runtime (>= 0.5)
127+
yard (>= 0.9)
128+
yarp (0.11.0)
129+
130+
PLATFORMS
131+
arm64-darwin-22
132+
x86_64-linux
133+
134+
DEPENDENCIES
135+
debug
136+
irb
137+
rake (~> 13.0)
138+
rspec (~> 3.0)
139+
rubocop (~> 1.21)
140+
rubocop-minitest (~> 0.31.1)
141+
rubocop-rake (~> 0.6.0)
142+
rubocop-rspec
143+
rubocop-shopify (~> 2.14)
144+
rubocop-sorbet (~> 0.7)
145+
ruby-lsp-rspec!
146+
sorbet-static-and-runtime
147+
tapioca (~> 0.11)
148+
149+
BUNDLED WITH
150+
2.4.18

bin/tapioca

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 'tapioca' 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("tapioca", "tapioca")

lib/ruby-lsp-rspec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# typed: strict
2+
# frozen_string_literal: true
3+
4+
require "sorbet-runtime"
5+
require "ruby_lsp_rspec/version"
6+
7+
module RubyLsp
8+
module RSpec
9+
end
10+
end

lib/ruby/lsp/rspec.rb

Lines changed: 0 additions & 12 deletions
This file was deleted.

lib/ruby/lsp/rspec/version.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/ruby_lsp_rspec/version.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
module RubyLsp
4+
module RSpec
5+
VERSION = "0.1.0"
6+
end
7+
end

ruby-lsp-rspec.gemspec

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
# frozen_string_literal: true
22

3-
require_relative "lib/ruby/lsp/rspec/version"
3+
require_relative "lib/ruby_lsp_rspec/version"
44

55
Gem::Specification.new do |spec|
66
spec.name = "ruby-lsp-rspec"
7-
spec.version = Ruby::Lsp::Rspec::VERSION
7+
spec.version = RubyLsp::RSpec::VERSION
88
spec.authors = ["Stan Lo"]
9-
spec.email = ["stan.lo@shopify.com"]
9+
spec.email = ["stan001212@gmail.com"]
1010

11-
spec.summary = "TODO: Write a short summary, because RubyGems requires one."
12-
spec.description = "TODO: Write a longer description or delete this line."
13-
spec.homepage = "TODO: Put your gem's website or public repo URL here."
11+
spec.summary = "RSpec extension for ruby-lsp"
12+
spec.description = "RSpec extension for ruby-lsp"
13+
spec.homepage = "https://github.com/st0012/ruby-lsp-rspec"
1414
spec.license = "MIT"
15-
spec.required_ruby_version = ">= 2.6.0"
16-
17-
spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
15+
spec.required_ruby_version = ">= 3.0.0"
1816

1917
spec.metadata["homepage_uri"] = spec.homepage
20-
spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
21-
spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
18+
spec.metadata["source_code_uri"] = "https://github.com/st0012/ruby-lsp-rspec"
19+
spec.metadata["changelog_uri"] = "https://github.com/st0012/ruby-lsp-rspec/releases"
2220

2321
# Specify which files should be added to the gem when it is released.
2422
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -32,9 +30,5 @@ Gem::Specification.new do |spec|
3230
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
3331
spec.require_paths = ["lib"]
3432

35-
# Uncomment to register a new dependency of your gem
36-
# spec.add_dependency "example-gem", "~> 1.0"
37-
38-
# For more information and examples about making a new gem, check out our
39-
# guide at: https://bundler.io/guides/creating_gem.html
33+
spec.add_dependency "ruby-lsp", "~> 0.10.1"
4034
end

0 commit comments

Comments
 (0)