solargraph-rspec 0.5.4 → 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: 8be3e0236b9ee7ad2bc78abe9764001fc4ec2432a381571e23dddc27923caacb
4
- data.tar.gz: 217d891f9561406a322f037948f13a3197f39d980f8394e36fc86304b8bccde9
3
+ metadata.gz: f5479aea692e6eb35870d21e537641872b30e6bdfe8a868110d79488f84c4964
4
+ data.tar.gz: 4c8bfb43f8dececdfe0d19b9c50a963e487caa0c623a020c67f82f0a83f55b7a
5
5
  SHA512:
6
- metadata.gz: 1c91744f1a8a2bb3a021f6cf008d627a292bf112c15b8215d7c9217d7bddf812b1f73b92a8d434d54755b10dd77b1f6b571c0b77ada0087b28e01e9f311e9c58
7
- data.tar.gz: 3d9a7e4405f2ce232d31e7310a2af32c1f0e1d86cc8b48b461c899310b6bf9a8c9f43a1a0c661074fd670d1433827472161618a3ddb0cbfda551b8ab06953bac
6
+ metadata.gz: c098385b10b165f9619f0e64a0ad01b5da028fcd9e0f90a028f48132438d29af1394967492d2de9a964d66da98bcd6a8a66207af7d8903a853aca6ad3e52d86f
7
+ data.tar.gz: cf40aae6cb2777d1314bf6c510e4f38c2227f43b2bde6db5b3ed4144358775151c17f4a95970da9d0a9fcb295b0305b6226c11472e25e5ec6cf49e8e56fd772c
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
1
  --format documentation
2
2
  --color
3
3
  --require spec_helper
4
+ --profile
data/.rubocop.yml CHANGED
@@ -1,17 +1,19 @@
1
+ plugins:
2
+ - rubocop-yard
3
+
1
4
  AllCops:
2
5
  TargetRubyVersion: 3.0
3
6
  NewCops: enable
7
+ Exclude:
8
+ - 'gemfiles/**/*' # these are autogenerated files
9
+ - 'tmp/**/*' # git ignored anyway
4
10
 
5
11
  Style/StringLiterals:
6
12
  Enabled: true
7
13
  EnforcedStyle: single_quotes
8
- Exclude:
9
- - "gemfiles/**/*"
10
14
 
11
15
  Style/FrozenStringLiteralComment:
12
16
  Enabled: true
13
- Exclude:
14
- - "gemfiles/**/*"
15
17
 
16
18
  Style/StringLiteralsInInterpolation:
17
19
  Enabled: true
@@ -0,0 +1,26 @@
1
+ ---
2
+ include:
3
+ - "**/*.rb"
4
+ exclude:
5
+ - "spec/solargraph/**/*"
6
+ - test/**/*
7
+ - vendor/**/*
8
+ - ".bundle/**/*"
9
+ require: []
10
+ domains: []
11
+ reporters:
12
+ - typecheck:strict
13
+ - rubocop
14
+ - require_not_found
15
+ formatter:
16
+ rubocop:
17
+ cops: all
18
+ require_paths: []
19
+ plugins:
20
+ - solargraph-rspec
21
+ max_files: 20000
22
+ rspec:
23
+ let_methods:
24
+ - let_it_be
25
+ example_methods:
26
+ - my_example
data/Appraisals CHANGED
@@ -2,4 +2,11 @@
2
2
 
3
3
  appraise 'default' do
4
4
  # default gems from Gemfile
5
+ gem 'net-imap', '~> 0.4.0' # https://github.com/lsegal/yard/issues/1629
6
+ gem 'actionmailer', '>= 7'
7
+ gem 'airborne'
8
+ gem 'rspec-rails', '>= 7'
9
+ gem 'rspec-sidekiq'
10
+ gem 'shoulda-matchers'
11
+ gem 'webmock'
5
12
  end
data/CHANGELOG.md CHANGED
@@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2026-08-12
11
+
12
+ ### Added
13
+ - Add Rspec included modules support by @ShadiestGoat in #32
14
+
15
+ ### Changed
16
+ - Chore: Test solargraph prereleases (#31)
17
+ - Chore: More reliable closure and location updates by @apiology in #30
18
+ - Chore: Less limiting of gem pin processing in specs by @apiology in #29
19
+ Avoid inference from literal values by @castwide (#34)
20
+ - Chore: fix failing specs (#35)
21
+
22
+
23
+ ## [0.5.5] - 2025-10-05
24
+
25
+ ### Fixed
26
+ - Go-to-defintion/Hover for RSpec DSL methods (eg. context or it)
27
+
28
+ ### Other Changes
29
+ - Chore: Add rubocop-yard by @lekemula in #20
30
+ - Chore: Add CI solargraph typecheck step by @lekemula in #21
31
+ - Chore: Adjust specs/CI for next solargraph release after 0.56.2 by @lekemula in #22
32
+ - Chore: Improve CI speed by @lekemula in #23
33
+ - Chore: Improve tests speed by @lekemula in #24
34
+ - Chore: Update testing steps in developer documentation by @apiology in #25
35
+ - Chore: Move 3rd party gems to Appraisals by @lekemula in #27
36
+
37
+ ### Changed
38
+ - Update testing steps in developer documentation
39
+
40
+ ## [0.5.4] - 2025-09-06
41
+
42
+ ### Fixed
43
+ - Fix breaking of solargraph rubocop diagnostics by @lekemula in #19
44
+
10
45
  ## [0.5.3] - 2025-09-02
11
46
 
12
47
  ### Fixed
@@ -125,7 +160,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
125
160
  ### Added
126
161
 
127
162
  - `describe` and `it` methods completion
128
- - memoized `let` and `let!` methods completion
163
+ - memoized `let` and `let!` methods completion
129
164
  - implicit and explicit `subject` methods
130
165
  - `described_class` with appropriate type inference
131
166
  - `RSpec::Matchers` methods completion
data/README.md CHANGED
@@ -5,11 +5,11 @@
5
5
  [![codecov](https://codecov.io/gh/lekemula/solargraph-rspec/graph/badge.svg?token=FH7ER8ZDPW)](https://codecov.io/gh/lekemula/solargraph-rspec)
6
6
 
7
7
 
8
- RSpec is a testing framework of choice for many Ruby developers. But at the same time is highly dynamic and heavily relying on metaprogramming making it hard to provide accurate code completion and type inference.
8
+ RSpec is a testing framework of choice for many Ruby developers. But at the same time is highly dynamic and heavily relying on metaprogramming making it hard to provide accurate code completion and type inference.
9
9
 
10
10
  This gem aims to provide better support for RSpec in Solargraph and it supports the following features (completion, jump to definition and type inference 🚀):
11
- - `describe` and `it` methods
12
- - memoized `let` and `let!` methods
11
+ - `describe` and `it` methods
12
+ - memoized `let` and `let!` methods
13
13
  - `described_class` with appropriate type inference
14
14
  - implicit and explicit `subject` methods
15
15
  - one liner syntax helpers `is_expected`, `should` and `should_not` linked to the appropriate subject
@@ -77,27 +77,25 @@ Add `solargraph-rspec` to your `.solargraph.yml` as a plugin.
77
77
  ```
78
78
  ### Configuration
79
79
 
80
- If you have your own custom `let`-like memoized methods, you can add them to your `.solargraph.yml` file like this:
80
+ You can customize the plugin behavior in your `.solargraph.yml`:
81
81
 
82
82
  ```yaml
83
83
  # .solargraph.yml
84
84
  # ...
85
85
  rspec:
86
+ # Custom let-like memoized methods (e.g., from rspec-given, test-prof)
86
87
  let_methods:
87
88
  - let_it_be
88
- ```
89
-
90
- If you have your own custom `example`-like methods like `it`, you can add them to your `.solargraph.yml` file like this:
91
89
 
92
- ```yaml
93
- # .solargraph.yml
94
- # ...
95
- rspec:
90
+ # Custom example-like methods (e.g., from rspec-given)
96
91
  example_methods:
97
92
  - my_it
98
- ```
99
93
 
100
- This is useful if you use gems like [rspec-given](https://github.com/rspec-given/rspec-given) which introduces its own `let` and `example` methods.
94
+ # RSpec helper files to analyze for included modules (shared contexts, custom matchers)
95
+ config_helper_files:
96
+ - spec/spec_helper.rb
97
+ - spec/rails_helper.rb
98
+ ```
101
99
 
102
100
 
103
101
  ### Gem completions
@@ -110,7 +108,7 @@ Run `yard config --gem-install-yri` to generate YARD documentation automatically
110
108
 
111
109
  ## Acknowledgements
112
110
 
113
- This gem is inspired by the [solargraph-rails](https://github.com/iftheshoefritz/solargraph-rails) which gave me an idea of how to extend Solargraph with custom features and provided me with simple and very understandable test suite which helped me to get started with playing around with Solargraph.
111
+ This gem is inspired by the [solargraph-rails](https://github.com/iftheshoefritz/solargraph-rails) which gave me an idea of how to extend Solargraph with custom features and provided me with simple and very understandable test suite which helped me to get started with playing around with Solargraph.
114
112
 
115
113
  In fact, most of the code I initially wrote on [a fork](https://github.com/lekemula/solargraph-rails/tree/rspec-support) of it, but then I realized that it would make more sense to extract it into a separate gem where it could be used by non-Rails projects as well.
116
114
 
@@ -128,17 +126,22 @@ It's codebase IMO is an exemplary of how Ruby code written in a very simple PORO
128
126
 
129
127
  Code contributions are always appreciated. Feel free to fork the repo and submit pull requests. Check for open issues that could use help. Start new issues to discuss changes that have a major impact on the code or require large time commitments.
130
128
 
131
- Contributing is easy:
129
+ Contributing is easy - note that this Gem uses 'appraisal' to test against RSpec 3rd party plugins without adding to the main `Gemfile`:
132
130
  1. Create a fork and clone it
133
- 2. Run `bundle install` to install dependencies
134
- 3. Run `yard gems` to generate YARD documentation for your installed gems
135
- 4. Run `bundle exec spec` to run the tests
136
- 5. Introduce your awesome changes
137
- 6. Ensure they are well covered with tests
138
- 7. Record your changes in the [CHANGELOG.md](./CHANGELOG.md)
139
- 7. Submit a pull request :rocket:
131
+ 2. Verify tests are green:
132
+ ```sh
133
+ bundle install
134
+ bundle exec appraisal install
135
+ cp .solargraph.yml.example .solargraph.yml
136
+ bundle exec appraisal bundle exec rbs collection update
137
+ bundle exec appraisal bundle exec solargraph gems $(bundle exec appraisal bundle exec ruby -r './lib/solargraph-rspec' -e 'puts Solargraph::Rspec::Gems.gem_names.join(" ")' 2>/dev/null | tail -n1)
138
+ bundle exec appraisal rspec
139
+ ```
140
+ 3. Introduce your awesome changes
141
+ 4. Ensure they are well covered with tests
142
+ 5. Record your changes in the [CHANGELOG.md](./CHANGELOG.md)
143
+ 6. Submit a pull request :rocket:
140
144
 
141
145
  ## License
142
146
 
143
147
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
144
-
@@ -8,18 +8,19 @@ gem "debug"
8
8
  gem "profile-viewer"
9
9
  gem "pry-byebug"
10
10
  gem "rake"
11
+ gem "rbs"
11
12
  gem "rspec"
12
13
  gem "rubocop"
14
+ gem "rubocop-yard"
13
15
  gem "simplecov"
14
16
  gem "simplecov-cobertura"
15
-
16
- group :third_party_plugin_tests do
17
- gem "actionmailer"
18
- gem "airborne"
19
- gem "rspec-rails"
20
- gem "rspec-sidekiq"
21
- gem "shoulda-matchers"
22
- gem "webmock"
23
- end
17
+ gem "unparser"
18
+ gem "net-imap", "~> 0.4.0"
19
+ gem "actionmailer", ">= 7"
20
+ gem "airborne"
21
+ gem "rspec-rails", ">= 7"
22
+ gem "rspec-sidekiq"
23
+ gem "shoulda-matchers"
24
+ gem "webmock"
24
25
 
25
26
  gemspec path: "../"