rspec-openapi 0.18.0 → 0.18.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20d994264ab34877708e7c467c98b31f1b672ee0d73b953f2791e404895eed58
|
|
4
|
+
data.tar.gz: 6c319639b445a9178919a435a7816d0dfb5d8156c71d0fe1f929ab76d4733086
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7526eb5af4a66264ad5874c9f3fb3c9dd964196a3d91d7e0739956443fc643646822038c90a707a9b9fb5e26bba9bccd5652973ef227f4c8dd961a440a4682e
|
|
7
|
+
data.tar.gz: e3d71afaa32041ba31266832c51d4241e248cba2cb4b607adbd157b0164eedab4ef9d5e17ab89c7e196b52a64365aab584aa0dae1f5f0c0701f4dfde49f1f26c
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2024-04-
|
|
3
|
+
# on 2024-04-20 21:25:22 UTC using RuboCop version 1.62.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
9
|
+
# Offense count: 14
|
|
10
10
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
11
11
|
Metrics/AbcSize:
|
|
12
|
-
Max:
|
|
12
|
+
Max: 46
|
|
13
13
|
|
|
14
14
|
# Offense count: 1
|
|
15
15
|
# Configuration parameters: CountComments, CountAsOne.
|
|
@@ -19,7 +19,7 @@ Metrics/ClassLength:
|
|
|
19
19
|
# Offense count: 9
|
|
20
20
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
21
21
|
Metrics/CyclomaticComplexity:
|
|
22
|
-
Max:
|
|
22
|
+
Max: 13
|
|
23
23
|
|
|
24
24
|
# Offense count: 22
|
|
25
25
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
@@ -29,7 +29,7 @@ Metrics/MethodLength:
|
|
|
29
29
|
# Offense count: 5
|
|
30
30
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
31
31
|
Metrics/PerceivedComplexity:
|
|
32
|
-
Max:
|
|
32
|
+
Max: 13
|
|
33
33
|
|
|
34
34
|
# Offense count: 1
|
|
35
35
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
@@ -66,7 +66,7 @@ class << RSpec::OpenAPI::Extractors::Hanami = Object.new
|
|
|
66
66
|
deprecated = metadata[:deprecated]
|
|
67
67
|
path = request.path
|
|
68
68
|
|
|
69
|
-
raw_path_params = route.params.filter { |_key, value| number_or_nil(value) }
|
|
69
|
+
raw_path_params = route.params.filter { |_key, value| RSpec::OpenAPI::Extractors.number_or_nil(value) }
|
|
70
70
|
|
|
71
71
|
result = InspectorAnalyzer.call(request.method, add_id(path, route))
|
|
72
72
|
|
|
@@ -92,7 +92,7 @@ class << RSpec::OpenAPI::Extractors::Hanami = Object.new
|
|
|
92
92
|
return path if route.params.empty?
|
|
93
93
|
|
|
94
94
|
route.params.each_pair do |key, value|
|
|
95
|
-
next unless number_or_nil(value)
|
|
95
|
+
next unless RSpec::OpenAPI::Extractors.number_or_nil(value)
|
|
96
96
|
|
|
97
97
|
path = path.sub("/#{value}", "/:#{key}")
|
|
98
98
|
end
|
|
@@ -104,17 +104,11 @@ class << RSpec::OpenAPI::Extractors::Hanami = Object.new
|
|
|
104
104
|
return path if route.params.empty?
|
|
105
105
|
|
|
106
106
|
route.params.each_pair do |key, value|
|
|
107
|
-
next unless number_or_nil(value)
|
|
107
|
+
next unless RSpec::OpenAPI::Extractors.number_or_nil(value)
|
|
108
108
|
|
|
109
109
|
path = path.sub("/#{value}", "/{#{key}}")
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
path
|
|
113
113
|
end
|
|
114
|
-
|
|
115
|
-
def number_or_nil(string)
|
|
116
|
-
Integer(string || '')
|
|
117
|
-
rescue ArgumentError
|
|
118
|
-
nil
|
|
119
|
-
end
|
|
120
114
|
end
|
|
@@ -65,17 +65,11 @@ class << RSpec::OpenAPI::Extractors::Rails = Object.new
|
|
|
65
65
|
|
|
66
66
|
def add_id(path, parameters)
|
|
67
67
|
parameters.each_pair do |key, value|
|
|
68
|
-
next unless number_or_nil(value)
|
|
68
|
+
next unless RSpec::OpenAPI::Extractors.number_or_nil(value)
|
|
69
69
|
|
|
70
70
|
path = path.sub("/#{value}", "/:#{key}")
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
path
|
|
74
74
|
end
|
|
75
|
-
|
|
76
|
-
def number_or_nil(string)
|
|
77
|
-
Integer(string || '')
|
|
78
|
-
rescue ArgumentError
|
|
79
|
-
nil
|
|
80
|
-
end
|
|
81
75
|
end
|
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.18.
|
|
4
|
+
version: 0.18.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takashi Kokubun
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2024-04-
|
|
12
|
+
date: 2024-04-20 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionpack
|
|
@@ -109,7 +109,7 @@ licenses:
|
|
|
109
109
|
metadata:
|
|
110
110
|
homepage_uri: https://github.com/exoego/rspec-openapi
|
|
111
111
|
source_code_uri: https://github.com/exoego/rspec-openapi
|
|
112
|
-
changelog_uri: https://github.com/exoego/rspec-openapi/releases/tag/v0.18.
|
|
112
|
+
changelog_uri: https://github.com/exoego/rspec-openapi/releases/tag/v0.18.1
|
|
113
113
|
rubygems_mfa_required: 'true'
|
|
114
114
|
post_install_message:
|
|
115
115
|
rdoc_options: []
|