rspec-openapi 0.33.0 → 0.33.1
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/record_builder.rb +5 -0
- data/lib/rspec/openapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb54f98b3234ebee5ea46c0c703f094265d37c17f8fc1c8dcfec5c1f70c88667
|
|
4
|
+
data.tar.gz: 30972c7a4dd8387e1db47d954b3b5e380ee9a0d6282981ba73d14007e5fcdce8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19552292efc3339da373ca62b6e7c20ce23546d5ba81bd7b245ce6796dca729a12fd4138c905b11d90b9892e67f0a3abc18f15eaf7ea8f153f3a4c4b5f76de3c
|
|
7
|
+
data.tar.gz: ff754813db11c90118d4169428547b84c7c5a7163384124e94c15eefacff9dd62e701cc6c0c37716cb889dccba061086858ccc32161ed41f4a275d2a0eb8fcff
|
|
@@ -11,6 +11,7 @@ class << RSpec::OpenAPI::RecordBuilder = Object.new
|
|
|
11
11
|
def build(context, example:, extractor:)
|
|
12
12
|
request, response = select_request_response(context, example, extractor)
|
|
13
13
|
return if request.nil?
|
|
14
|
+
return unless request_dispatched?(request)
|
|
14
15
|
|
|
15
16
|
attributes = extractor.request_attributes(request, example)
|
|
16
17
|
return if RSpec::OpenAPI.ignored_paths.any? { |ignored_path| attributes[:path].match?(ignored_path) }
|
|
@@ -21,6 +22,10 @@ class << RSpec::OpenAPI::RecordBuilder = Object.new
|
|
|
21
22
|
|
|
22
23
|
private
|
|
23
24
|
|
|
25
|
+
def request_dispatched?(request)
|
|
26
|
+
!request.path.to_s.empty?
|
|
27
|
+
end
|
|
28
|
+
|
|
24
29
|
def select_request_response(context, example, extractor)
|
|
25
30
|
pattern = RSpec::OpenAPI::ExchangeRecorder.pattern_for(example)
|
|
26
31
|
return RSpec::OpenAPI::ExchangeRecorder.fetch(pattern) if pattern
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec-openapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.33.
|
|
4
|
+
version: 0.33.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takashi Kokubun
|
|
@@ -99,7 +99,7 @@ licenses:
|
|
|
99
99
|
metadata:
|
|
100
100
|
homepage_uri: https://github.com/exoego/rspec-openapi
|
|
101
101
|
source_code_uri: https://github.com/exoego/rspec-openapi
|
|
102
|
-
changelog_uri: https://github.com/exoego/rspec-openapi/releases/tag/v0.33.
|
|
102
|
+
changelog_uri: https://github.com/exoego/rspec-openapi/releases/tag/v0.33.1
|
|
103
103
|
rubygems_mfa_required: 'true'
|
|
104
104
|
rdoc_options: []
|
|
105
105
|
require_paths:
|