rspec-openapi 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rspec/openapi/record_builder.rb +7 -4
- data/lib/rspec/openapi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c2228341b1c207993fd9f98f74069e06a14fde9107d2fce34d4d6ae6d2c2184
|
4
|
+
data.tar.gz: 23b931010297c4618edac4ce3b51e0d78a9f052891c1c9384844742846988424
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc620c878f8bc514b6f802c324984d16029632f819d2b92815f3a5c9122e93b982658c28ba1a6bf20b4c0021c0570d634a807f9d1e90cd6782f1dc0805aa3762
|
7
|
+
data.tar.gz: 2cbc49093a983dcd0c1efdf2a41785ec202b6cc582ba72a7fe2f2a4339dbfbcffcab56bf13d2899fa7e7ef067fd794362ae0ffecd1aa52980e8ecc56fa667142
|
data/CHANGELOG.md
CHANGED
@@ -59,14 +59,17 @@ class << RSpec::OpenAPI::RecordBuilder = Object.new
|
|
59
59
|
end
|
60
60
|
|
61
61
|
# @param [ActionDispatch::Request] request
|
62
|
-
def find_rails_route(request)
|
63
|
-
# Reverse the destructive modification by Rails https://github.com/rails/rails/blob/
|
64
|
-
|
62
|
+
def find_rails_route(request, app: Rails.application, fix_path: true)
|
63
|
+
# Reverse the destructive modification by Rails https://github.com/rails/rails/blob/v6.0.3.4/actionpack/lib/action_dispatch/journey/router.rb#L33-L41
|
64
|
+
if fix_path && !request.script_name.empty?
|
65
65
|
request = request.dup
|
66
66
|
request.path_info = File.join(request.script_name, request.path_info)
|
67
67
|
end
|
68
68
|
|
69
|
-
|
69
|
+
app.routes.router.recognize(request) do |route|
|
70
|
+
unless route.path.anchored
|
71
|
+
route = find_rails_route(request, app: route.app.app, fix_path: false)
|
72
|
+
end
|
70
73
|
return route
|
71
74
|
end
|
72
75
|
raise "No route matched for #{request.request_method} #{request.path_info}"
|