rspec-openapi 0.26.0 → 0.28.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 +4 -4
- data/lib/rspec/openapi/extractors/hanami.rb +10 -37
- data/lib/rspec/openapi/extractors/rack.rb +7 -32
- data/lib/rspec/openapi/extractors/rails.rb +9 -35
- data/lib/rspec/openapi/extractors/shared_extractor.rb +33 -26
- data/lib/rspec/openapi/record_builder.rb +8 -29
- data/lib/rspec/openapi/schema_builder/build_context.rb +20 -0
- data/lib/rspec/openapi/schema_builder.rb +275 -348
- data/lib/rspec/openapi/schema_cleaner.rb +1 -1
- data/lib/rspec/openapi/schema_file.rb +4 -6
- data/lib/rspec/openapi/schema_merger.rb +79 -49
- data/lib/rspec/openapi/version.rb +1 -1
- data/lib/rspec/openapi.rb +2 -2
- data/rspec-openapi.gemspec +3 -3
- metadata +5 -26
- data/.github/dependabot.yml +0 -8
- data/.github/release.yaml +0 -24
- data/.github/workflows/codeql-analysis.yml +0 -39
- data/.github/workflows/create_release.yml +0 -95
- data/.github/workflows/publish.yml +0 -46
- data/.github/workflows/rubocop.yml +0 -35
- data/.github/workflows/test.yml +0 -50
- data/.github/workflows/validate-openapi.yml +0 -21
- data/.gitignore +0 -18
- data/.rspec +0 -4
- data/.rubocop.yml +0 -25
- data/.rubocop_todo.yml +0 -52
- data/.simplecov_spawn.rb +0 -16
- data/CHANGELOG.md +0 -290
- data/Gemfile +0 -38
- data/Rakefile +0 -10
- data/bin/console +0 -15
- data/bin/setup +0 -8
- data/redocly.yaml +0 -31
- data/scripts/rspec +0 -11
- data/scripts/rspec_with_simplecov +0 -48
- data/test.png +0 -0
data/.rubocop.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
|
2
|
-
|
|
3
|
-
AllCops:
|
|
4
|
-
NewCops: enable
|
|
5
|
-
SuggestExtensions: false
|
|
6
|
-
TargetRubyVersion: 2.7
|
|
7
|
-
Exclude:
|
|
8
|
-
- 'spec/apps/**/*'
|
|
9
|
-
- 'vendor/**/*'
|
|
10
|
-
|
|
11
|
-
Style/TrailingCommaInHashLiteral:
|
|
12
|
-
EnforcedStyleForMultiline: consistent_comma
|
|
13
|
-
Style/TrailingCommaInArguments:
|
|
14
|
-
EnforcedStyleForMultiline: consistent_comma
|
|
15
|
-
Style/TrailingCommaInArrayLiteral:
|
|
16
|
-
EnforcedStyleForMultiline: consistent_comma
|
|
17
|
-
Style/ClassAndModuleChildren:
|
|
18
|
-
EnforcedStyle: compact
|
|
19
|
-
Exclude:
|
|
20
|
-
- 'lib/rspec/openapi/version.rb'
|
|
21
|
-
Layout/FirstArrayElementIndentation:
|
|
22
|
-
EnforcedStyle: consistent
|
|
23
|
-
Metrics/BlockLength:
|
|
24
|
-
Exclude:
|
|
25
|
-
- 'spec/**/*'
|
data/.rubocop_todo.yml
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2024-04-20 21:25:22 UTC using RuboCop version 1.62.1.
|
|
4
|
-
# The point is for the user to remove these configuration records
|
|
5
|
-
# one by one as the offenses are removed from the code base.
|
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
-
|
|
9
|
-
# Offense count: 14
|
|
10
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
11
|
-
Metrics/AbcSize:
|
|
12
|
-
Max: 46
|
|
13
|
-
|
|
14
|
-
# Offense count: 1
|
|
15
|
-
# Configuration parameters: CountComments, CountAsOne.
|
|
16
|
-
Metrics/ClassLength:
|
|
17
|
-
Max: 195
|
|
18
|
-
|
|
19
|
-
# Offense count: 9
|
|
20
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
21
|
-
Metrics/CyclomaticComplexity:
|
|
22
|
-
Max: 13
|
|
23
|
-
|
|
24
|
-
# Offense count: 22
|
|
25
|
-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
26
|
-
Metrics/MethodLength:
|
|
27
|
-
Max: 37
|
|
28
|
-
|
|
29
|
-
# Offense count: 5
|
|
30
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
31
|
-
Metrics/PerceivedComplexity:
|
|
32
|
-
Max: 13
|
|
33
|
-
|
|
34
|
-
# Offense count: 1
|
|
35
|
-
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
36
|
-
# SupportedStyles: snake_case, normalcase, non_integer
|
|
37
|
-
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
|
|
38
|
-
Naming/VariableNumber:
|
|
39
|
-
Exclude:
|
|
40
|
-
- 'spec/integration_tests/roda_test.rb'
|
|
41
|
-
|
|
42
|
-
# Offense count: 7
|
|
43
|
-
# Configuration parameters: AllowedConstants.
|
|
44
|
-
Style/Documentation:
|
|
45
|
-
Exclude:
|
|
46
|
-
- 'spec/**/*'
|
|
47
|
-
- 'test/**/*'
|
|
48
|
-
- 'lib/rspec/openapi.rb'
|
|
49
|
-
- 'lib/rspec/openapi/minitest_hooks.rb'
|
|
50
|
-
- 'lib/rspec/openapi/result_recorder.rb'
|
|
51
|
-
- 'lib/rspec/openapi/schema_file.rb'
|
|
52
|
-
- 'lib/rspec/openapi/shared_hooks.rb'
|
data/.simplecov_spawn.rb
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
unless ENV['COVERAGE'] && ENV['COVERAGE'].empty?
|
|
4
|
-
require 'simplecov'
|
|
5
|
-
require 'simplecov-cobertura'
|
|
6
|
-
|
|
7
|
-
SimpleCov.at_fork.call(Process.pid)
|
|
8
|
-
SimpleCov.formatter SimpleCov::Formatter::MultiFormatter.new([
|
|
9
|
-
SimpleCov::Formatter::CoberturaFormatter,
|
|
10
|
-
])
|
|
11
|
-
SimpleCov.start do
|
|
12
|
-
enable_coverage :branch
|
|
13
|
-
add_filter '/spec/'
|
|
14
|
-
add_filter '/scripts/'
|
|
15
|
-
end
|
|
16
|
-
end
|
data/CHANGELOG.md
DELETED
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
# THIS CHANGELOG IS DEPRECATED!!
|
|
2
|
-
|
|
3
|
-
Refer https://github.com/exoego/rspec-openapi/releases instead.
|
|
4
|
-
|
|
5
|
-
## v0.12.0
|
|
6
|
-
|
|
7
|
-
- feat: Initial support of complex schema with manually-added `oneOf`
|
|
8
|
-
[#174](https://github.com/exoego/rspec-openapi/pull/174)
|
|
9
|
-
- chore: Test with Ruby 3.3 and Rails 7.1.x
|
|
10
|
-
[#169](https://github.com/exoego/rspec-openapi/pull/169)
|
|
11
|
-
|
|
12
|
-
## v0.11.0
|
|
13
|
-
- feat: Allow path-based config overrides
|
|
14
|
-
[#162](https://github.com/exoego/rspec-openapi/pull/162)
|
|
15
|
-
- enhancement: Sort HTTP methods, response status codes, and contents lexicographically
|
|
16
|
-
[#163](https://github.com/exoego/rspec-openapi/pull/163)
|
|
17
|
-
- enhancement: Remove parameters that conflict with security schemas
|
|
18
|
-
[#166](https://github.com/exoego/rspec-openapi/pull/166)
|
|
19
|
-
|
|
20
|
-
## v0.10.0
|
|
21
|
-
- bugfix: Merge parameter data to preserve description in manually edited Openapi spec
|
|
22
|
-
[#149](https://github.com/exoego/rspec-openapi/pull/149)
|
|
23
|
-
- feat: Add ability to configure which path params to ignore
|
|
24
|
-
[#150](https://github.com/exoego/rspec-openapi/pull/150)
|
|
25
|
-
- feat: Add custom title
|
|
26
|
-
[#147](https://github.com/exoego/rspec-openapi/pull/147)
|
|
27
|
-
- feat: Add ability to define custom summary and tags builders
|
|
28
|
-
[#148](https://github.com/exoego/rspec-openapi/pull/148)
|
|
29
|
-
- enhancement: Sort paths lexicographically so the order of paths is more stable and predictable
|
|
30
|
-
[#155](https://github.com/exoego/rspec-openapi/pull/155)
|
|
31
|
-
- enhancement: requestBody should not merge requestBody from error examples
|
|
32
|
-
[#154](https://github.com/exoego/rspec-openapi/pull/154)
|
|
33
|
-
|
|
34
|
-
## v0.9.0
|
|
35
|
-
- bugfix: Fix engine path resolution
|
|
36
|
-
[#113](https://github.com/exoego/rspec-openapi/pull/113)
|
|
37
|
-
- bugfix: fix multiple uploaded files
|
|
38
|
-
[#117](https://github.com/exoego/rspec-openapi/pull/117), [#126](https://github.com/exoego/rspec-openapi/pull/126)
|
|
39
|
-
- feat: Add required_request_params to metadata
|
|
40
|
-
[#114](https://github.com/exoego/rspec-openapi/pull/114)
|
|
41
|
-
- bugfix(minitest):
|
|
42
|
-
[#128](https://github.com/exoego/rspec-openapi/pull/128)
|
|
43
|
-
- doc(minitest): Add instructions for minitest triggered yaml generation
|
|
44
|
-
[#116](https://github.com/exoego/rspec-openapi/pull/116)
|
|
45
|
-
- chore: Don't dump records into temporary file
|
|
46
|
-
[#127](https://github.com/exoego/rspec-openapi/pull/127)
|
|
47
|
-
|
|
48
|
-
## v0.8.1
|
|
49
|
-
- bugfix: Empty `required` array should not be present.
|
|
50
|
-
[#111](https://github.com/exoego/rspec-openapi/pull/111)
|
|
51
|
-
|
|
52
|
-
## v0.8.0
|
|
53
|
-
- Set `required` in request body and response body
|
|
54
|
-
[#95](https://github.com/exoego/rspec-openapi/pull/95), [#98](https://github.com/exoego/rspec-openapi/pull/98)
|
|
55
|
-
- Generate OpenAPI with minitest instead of RSpec
|
|
56
|
-
[#90](https://github.com/exoego/rspec-openapi/pull/90)
|
|
57
|
-
- Generate security schemas via RSpec::OpenAPI.security_schemes
|
|
58
|
-
[#84](https://github.com/exoego/rspec-openapi/pull/84)
|
|
59
|
-
- Bunch of refactorings
|
|
60
|
-
|
|
61
|
-
## v0.7.2
|
|
62
|
-
- $ref enhancements: Support $ref in arbitrary depth
|
|
63
|
-
[#82](https://github.com/k0kubun/rspec-openapi/pull/82)
|
|
64
|
-
|
|
65
|
-
## v0.7.1
|
|
66
|
-
- $ref enhancements: Auto-generate components referenced in "items"
|
|
67
|
-
[#80](https://github.com/k0kubun/rspec-openapi/pull/80)
|
|
68
|
-
- Administration
|
|
69
|
-
- Setup RuboCop
|
|
70
|
-
[#73](https://github.com/k0kubun/rspec-openapi/pull/73)
|
|
71
|
-
- Setup CodeQL
|
|
72
|
-
[#73](https://github.com/k0kubun/rspec-openapi/pull/73)
|
|
73
|
-
- Bump Rails v6.0.3.x to fix bundle failure
|
|
74
|
-
[#72](https://github.com/k0kubun/rspec-openapi/pull/72)
|
|
75
|
-
|
|
76
|
-
## v0.7.0
|
|
77
|
-
- Generate Response Headers
|
|
78
|
-
[#69](https://github.com/k0kubun/rspec-openapi/pull/69)
|
|
79
|
-
- Initial support for $ref
|
|
80
|
-
[#67](https://github.com/k0kubun/rspec-openapi/pull/67)
|
|
81
|
-
- Fixed an empty array is turned into nullable object wrongly
|
|
82
|
-
[#70](https://github.com/k0kubun/rspec-openapi/pull/70)
|
|
83
|
-
|
|
84
|
-
## v0.6.1
|
|
85
|
-
|
|
86
|
-
* Stabilize the order parameter objects and preserve newer examples
|
|
87
|
-
[#59](https://github.com/k0kubun/rspec-openapi/pull/59)
|
|
88
|
-
|
|
89
|
-
## v0.6.0
|
|
90
|
-
|
|
91
|
-
* Replace `RSpec::OpenAPI.server_urls` with `RSpec::OpenAPI.servers`
|
|
92
|
-
[#60](https://github.com/k0kubun/rspec-openapi/pull/60)
|
|
93
|
-
|
|
94
|
-
## v0.5.1
|
|
95
|
-
|
|
96
|
-
* Clarify the version requirement for actionpack
|
|
97
|
-
[#62](https://github.com/k0kubun/rspec-openapi/pull/62)
|
|
98
|
-
|
|
99
|
-
## v0.5.0
|
|
100
|
-
|
|
101
|
-
* Overwrite fields in an existing schema file instead of leaving all existing fields as is
|
|
102
|
-
[#55](https://github.com/k0kubun/rspec-openapi/pull/55)
|
|
103
|
-
|
|
104
|
-
## v0.4.8
|
|
105
|
-
|
|
106
|
-
* Fix a bug in nested parameters handling
|
|
107
|
-
[#46](https://github.com/k0kubun/rspec-openapi/pull/46)
|
|
108
|
-
|
|
109
|
-
## v0.4.7
|
|
110
|
-
|
|
111
|
-
* Add `info` config hash
|
|
112
|
-
[#43](https://github.com/k0kubun/rspec-openapi/pull/43)
|
|
113
|
-
|
|
114
|
-
## v0.4.6
|
|
115
|
-
|
|
116
|
-
* Fix "No route matched for" error in engine routes
|
|
117
|
-
[#38](https://github.com/k0kubun/rspec-openapi/pull/38)
|
|
118
|
-
|
|
119
|
-
## v0.4.5
|
|
120
|
-
|
|
121
|
-
* Fix linter issues for `tags` and `summary`
|
|
122
|
-
[#40](https://github.com/k0kubun/rspec-openapi/pull/40)
|
|
123
|
-
|
|
124
|
-
## v0.4.4
|
|
125
|
-
|
|
126
|
-
* De-duplicate parameters by a combination of `name` and `in`
|
|
127
|
-
[#39](https://github.com/k0kubun/rspec-openapi/pull/39)
|
|
128
|
-
|
|
129
|
-
## v0.4.3
|
|
130
|
-
|
|
131
|
-
* Allow customizing `schema`, `description`, and `tags` through `:openapi` metadata
|
|
132
|
-
[#36](https://github.com/k0kubun/rspec-openapi/pull/36)
|
|
133
|
-
|
|
134
|
-
## v0.4.2
|
|
135
|
-
|
|
136
|
-
* Allow using Proc as `RSpec::OpenAPI.path`
|
|
137
|
-
[#35](https://github.com/k0kubun/rspec-openapi/pull/35)
|
|
138
|
-
|
|
139
|
-
## v0.4.1
|
|
140
|
-
|
|
141
|
-
* Add `RSpec::OpenAPI.example_types` to hook types other than `type: :request`.
|
|
142
|
-
[#32](https://github.com/k0kubun/rspec-openapi/pull/32)
|
|
143
|
-
|
|
144
|
-
## v0.4.0
|
|
145
|
-
|
|
146
|
-
* Drop `RSpec::OpenAPI.output` introduced in v0.3.20
|
|
147
|
-
* Guess whether it's JSON or not by the extension of `RSpec::OpenAPI.path`
|
|
148
|
-
|
|
149
|
-
## v0.3.20
|
|
150
|
-
|
|
151
|
-
* Add `RSpec::OpenAPI.output` config to output JSON
|
|
152
|
-
[#31](https://github.com/k0kubun/rspec-openapi/pull/31)
|
|
153
|
-
|
|
154
|
-
## v0.3.19
|
|
155
|
-
|
|
156
|
-
* Add `server_urls` and `request_headers` configs
|
|
157
|
-
[#30](https://github.com/k0kubun/rspec-openapi/pull/30)
|
|
158
|
-
|
|
159
|
-
## v0.3.18
|
|
160
|
-
|
|
161
|
-
* Support nested query parameters
|
|
162
|
-
[#29](https://github.com/k0kubun/rspec-openapi/pull/29)
|
|
163
|
-
|
|
164
|
-
## v0.3.17
|
|
165
|
-
|
|
166
|
-
* Rescue NotImplementedError in the after suite hook as well
|
|
167
|
-
[#28](https://github.com/k0kubun/rspec-openapi/pull/28)
|
|
168
|
-
|
|
169
|
-
## v0.3.16
|
|
170
|
-
|
|
171
|
-
* Use `media_type` instead of `content_type` for Rails 6.1
|
|
172
|
-
[#26](https://github.com/k0kubun/rspec-openapi/pull/26)
|
|
173
|
-
* Avoid crashing the after suite hook when it fails to build schema
|
|
174
|
-
[#27](https://github.com/k0kubun/rspec-openapi/pull/27)
|
|
175
|
-
|
|
176
|
-
## v0.3.15
|
|
177
|
-
|
|
178
|
-
* Fix an error when Content-Disposition header is inline
|
|
179
|
-
[#24](https://github.com/k0kubun/rspec-openapi/pull/24)
|
|
180
|
-
|
|
181
|
-
## v0.3.14
|
|
182
|
-
|
|
183
|
-
* Avoid an error when an application calls `request.body.read`
|
|
184
|
-
[#20](https://github.com/k0kubun/rspec-openapi/pull/20)
|
|
185
|
-
|
|
186
|
-
## v0.3.13
|
|
187
|
-
|
|
188
|
-
* Avoid crashing when there's no request made in a spec
|
|
189
|
-
[#19](https://github.com/k0kubun/rspec-openapi/pull/19)
|
|
190
|
-
|
|
191
|
-
## v0.3.12
|
|
192
|
-
|
|
193
|
-
* Generate `nullable: true` for null fields in schema
|
|
194
|
-
[#18](https://github.com/k0kubun/rspec-openapi/pull/18)
|
|
195
|
-
|
|
196
|
-
## v0.3.11
|
|
197
|
-
|
|
198
|
-
* Show a filename as an `example` for `ActionDispatch::Http::UploadedFile`
|
|
199
|
-
[#17](https://github.com/k0kubun/rspec-openapi/pull/17)
|
|
200
|
-
|
|
201
|
-
## v0.3.10
|
|
202
|
-
|
|
203
|
-
* Add `info.version`
|
|
204
|
-
[#16](https://github.com/k0kubun/rspec-openapi/pull/16)
|
|
205
|
-
|
|
206
|
-
## v0.3.9
|
|
207
|
-
|
|
208
|
-
* Initial support for multipart/form-data
|
|
209
|
-
[#12](https://github.com/k0kubun/rspec-openapi/pull/12)
|
|
210
|
-
|
|
211
|
-
## v0.3.8
|
|
212
|
-
|
|
213
|
-
* Generate `type: 'number', format: 'float'` instead of `type: 'float'` for Float
|
|
214
|
-
[#11](https://github.com/k0kubun/rspec-openapi/issues/11)
|
|
215
|
-
|
|
216
|
-
## v0.3.7
|
|
217
|
-
|
|
218
|
-
* Classify tag names and remove controller names from summary in Rails
|
|
219
|
-
|
|
220
|
-
## v0.3.6
|
|
221
|
-
|
|
222
|
-
* Fix documents generated by Rails engines
|
|
223
|
-
|
|
224
|
-
## v0.3.5
|
|
225
|
-
|
|
226
|
-
* Support finding routes in Rails engines
|
|
227
|
-
|
|
228
|
-
## v0.3.4
|
|
229
|
-
|
|
230
|
-
* Generate tags by controller names
|
|
231
|
-
[#10](https://github.com/k0kubun/rspec-openapi/issues/10)
|
|
232
|
-
|
|
233
|
-
## v0.3.3
|
|
234
|
-
|
|
235
|
-
* Avoid `JSON::ParserError` when a response body is no content
|
|
236
|
-
[#9](https://github.com/k0kubun/rspec-openapi/issues/9)
|
|
237
|
-
|
|
238
|
-
## v0.3.2
|
|
239
|
-
|
|
240
|
-
* Stop generating format as path parameters in Rails
|
|
241
|
-
[#8](https://github.com/k0kubun/rspec-openapi/issues/8)
|
|
242
|
-
|
|
243
|
-
## v0.3.1
|
|
244
|
-
|
|
245
|
-
* Add `RSpec::OpenAPI.description_builder` config to dynamically generate a description [experimental]
|
|
246
|
-
[#6](https://github.com/k0kubun/rspec-openapi/issues/6)
|
|
247
|
-
|
|
248
|
-
## v0.3.0
|
|
249
|
-
|
|
250
|
-
* Initial support of rack-test and non-Rails apps [#5](https://github.com/k0kubun/rspec-openapi/issues/5)
|
|
251
|
-
|
|
252
|
-
## v0.2.2
|
|
253
|
-
|
|
254
|
-
* Allow disabling `example` by `RSpec::OpenAPI.enable_example = false`
|
|
255
|
-
|
|
256
|
-
## v0.2.1
|
|
257
|
-
|
|
258
|
-
* Generate `example` of request body and path / query params
|
|
259
|
-
[#4](https://github.com/k0kubun/rspec-openapi/issues/4)
|
|
260
|
-
* Remove a wrapper param created by Rails in request body
|
|
261
|
-
[#4](https://github.com/k0kubun/rspec-openapi/issues/4)
|
|
262
|
-
|
|
263
|
-
## v0.2.0
|
|
264
|
-
|
|
265
|
-
* Generate `example` of response body [#3](https://github.com/k0kubun/rspec-openapi/issues/3)
|
|
266
|
-
|
|
267
|
-
## v0.1.5
|
|
268
|
-
|
|
269
|
-
* Support detecting `float` type [#2](https://github.com/k0kubun/rspec-openapi/issues/2)
|
|
270
|
-
|
|
271
|
-
## v0.1.4
|
|
272
|
-
|
|
273
|
-
* Avoid NoMethodError on nil Content-Type
|
|
274
|
-
* Include a space between controller and action in summary
|
|
275
|
-
|
|
276
|
-
## v0.1.3
|
|
277
|
-
|
|
278
|
-
* Add `RSpec::OpenAPI.comment` configuration
|
|
279
|
-
|
|
280
|
-
## v0.1.2
|
|
281
|
-
|
|
282
|
-
* Generate `required: true` for path params [#1](https://github.com/k0kubun/rspec-openapi/issues/1)
|
|
283
|
-
|
|
284
|
-
## v0.1.1
|
|
285
|
-
|
|
286
|
-
* Generate a path like `/{id}` instead of `/:id`
|
|
287
|
-
|
|
288
|
-
## v0.1.0
|
|
289
|
-
|
|
290
|
-
* Initial release
|
data/Gemfile
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
source 'https://rubygems.org'
|
|
4
|
-
|
|
5
|
-
# Specify your gem's dependencies in rspec-openapi.gemspec
|
|
6
|
-
gemspec
|
|
7
|
-
|
|
8
|
-
gem 'rails', ENV['RAILS_VERSION'] || '6.0.6.1'
|
|
9
|
-
|
|
10
|
-
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
|
|
11
|
-
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')
|
|
12
|
-
gem 'dry-logger', '1.2.1'
|
|
13
|
-
gem 'hanami', ENV['HANAMI_VERSION'] || '2.3.2'
|
|
14
|
-
else
|
|
15
|
-
gem 'dry-logger', '1.0.3'
|
|
16
|
-
gem 'hanami', ENV['HANAMI_VERSION'] || '2.1.0'
|
|
17
|
-
end
|
|
18
|
-
gem 'hanami-controller'
|
|
19
|
-
gem 'hanami-router'
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
gem 'concurrent-ruby', '1.3.4'
|
|
23
|
-
|
|
24
|
-
gem 'roda'
|
|
25
|
-
|
|
26
|
-
gem 'rails-dom-testing', '~> 2.2'
|
|
27
|
-
gem 'rspec-rails', '>= 5.0'
|
|
28
|
-
|
|
29
|
-
group :test do
|
|
30
|
-
gem 'simplecov', git: 'https://github.com/exoego/simplecov.git', branch: 'branch-fix'
|
|
31
|
-
gem 'simplecov-cobertura'
|
|
32
|
-
gem 'super_diff'
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
group :development do
|
|
36
|
-
gem 'code-scanning-rubocop'
|
|
37
|
-
gem 'pry'
|
|
38
|
-
end
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require 'bundler/setup'
|
|
5
|
-
require 'rspec/openapi'
|
|
6
|
-
|
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
-
|
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
-
# require "pry"
|
|
12
|
-
# Pry.start
|
|
13
|
-
|
|
14
|
-
require 'irb'
|
|
15
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/redocly.yaml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Config for `redocly lint` used by .github/workflows/validate-openapi.yml
|
|
2
|
-
# to validate test-fixture OpenAPI documents shipped under spec/apps/.
|
|
3
|
-
#
|
|
4
|
-
# spec/apps/rails/doc/smart/openapi.yaml is intentionally excluded:
|
|
5
|
-
# it is the input fixture for the smart-merge feature test (it contains
|
|
6
|
-
# unresolved $refs by design), not a complete API description.
|
|
7
|
-
extends:
|
|
8
|
-
- minimal
|
|
9
|
-
apis:
|
|
10
|
-
rails-rspec-yaml:
|
|
11
|
-
root: spec/apps/rails/doc/rspec_openapi.yaml
|
|
12
|
-
rails-rspec-json:
|
|
13
|
-
root: spec/apps/rails/doc/rspec_openapi.json
|
|
14
|
-
rails-minitest-yaml:
|
|
15
|
-
root: spec/apps/rails/doc/minitest_openapi.yaml
|
|
16
|
-
rails-minitest-json:
|
|
17
|
-
root: spec/apps/rails/doc/minitest_openapi.json
|
|
18
|
-
rails-smart-expected:
|
|
19
|
-
root: spec/apps/rails/doc/smart/expected.yaml
|
|
20
|
-
roda-rspec-yaml:
|
|
21
|
-
root: spec/apps/roda/doc/rspec_openapi.yaml
|
|
22
|
-
roda-rspec-json:
|
|
23
|
-
root: spec/apps/roda/doc/rspec_openapi.json
|
|
24
|
-
roda-minitest-yaml:
|
|
25
|
-
root: spec/apps/roda/doc/minitest_openapi.yaml
|
|
26
|
-
roda-minitest-json:
|
|
27
|
-
root: spec/apps/roda/doc/minitest_openapi.json
|
|
28
|
-
hanami-yaml:
|
|
29
|
-
root: spec/apps/hanami/doc/openapi.yaml
|
|
30
|
-
hanami-json:
|
|
31
|
-
root: spec/apps/hanami/doc/openapi.json
|
data/scripts/rspec
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
# (The MIT License)
|
|
5
|
-
# Copyright (c) 2012 Chad Humphries, David Chelimsky, Myron Marston
|
|
6
|
-
# Copyright (c) 2009 Chad Humphries, David Chelimsky
|
|
7
|
-
# Copyright (c) 2006 David Chelimsky, The RSpec Development Team
|
|
8
|
-
# Copyright (c) 2005 Steven Baker
|
|
9
|
-
|
|
10
|
-
require 'rspec/core'
|
|
11
|
-
RSpec::Core::Runner.invoke
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
# (The MIT License)
|
|
5
|
-
# Copyright (c) 2012 Chad Humphries, David Chelimsky, Myron Marston
|
|
6
|
-
# Copyright (c) 2009 Chad Humphries, David Chelimsky
|
|
7
|
-
# Copyright (c) 2006 David Chelimsky, The RSpec Development Team
|
|
8
|
-
# Copyright (c) 2005 Steven Baker
|
|
9
|
-
|
|
10
|
-
# Turn on verbose to make sure we not generating any ruby warning
|
|
11
|
-
$VERBOSE = true
|
|
12
|
-
|
|
13
|
-
# So our "did they run the rspec command?" detection logic thinks
|
|
14
|
-
# that we run `rspec`.
|
|
15
|
-
$0 = 'rspec'
|
|
16
|
-
|
|
17
|
-
# This is necessary for when `--standalone` is being used.
|
|
18
|
-
$LOAD_PATH.unshift File.expand_path '../bundle', __dir__
|
|
19
|
-
|
|
20
|
-
# For the travis build we put the bundle directory up a directory
|
|
21
|
-
# so it can be shared among the repos for faster bundle installs.
|
|
22
|
-
$LOAD_PATH.unshift File.expand_path '../../bundle', __dir__
|
|
23
|
-
|
|
24
|
-
require 'bundler/setup'
|
|
25
|
-
|
|
26
|
-
# To use simplecov while running rspec-core's test suite, we must
|
|
27
|
-
# load simplecov _before_ loading any of rspec-core's files.
|
|
28
|
-
# So, this executable exists purely as a wrapper script that
|
|
29
|
-
# first loads simplecov, and then loads rspec.
|
|
30
|
-
begin
|
|
31
|
-
# Simplecov emits some ruby warnings when loaded, so silence them.
|
|
32
|
-
old_verbose = $VERBOSE
|
|
33
|
-
$VERBOSE = false
|
|
34
|
-
|
|
35
|
-
unless (ENV.fetch('COVERAGE', nil) && ENV['COVERAGE'].empty?) || RUBY_VERSION < '1.9.3'
|
|
36
|
-
require 'simplecov'
|
|
37
|
-
|
|
38
|
-
SimpleCov.start do
|
|
39
|
-
enable_coverage :branch
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
rescue LoadError
|
|
43
|
-
# simplecov is not available
|
|
44
|
-
ensure
|
|
45
|
-
$VERBOSE = old_verbose
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
load File.expand_path('rspec', __dir__)
|
data/test.png
DELETED
|
Binary file
|