open_api-rspec 0.1.9 → 0.1.10

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: eae22068105e1aac1b31e6dc0efe2e98c00cf686e74b38c0f9d100338e150e0d
4
- data.tar.gz: 1b718583684a6ffd8f713656555da193c02b7ec1673febf44a31576232dd1708
3
+ metadata.gz: b3f3ce8bd883e699c960d0037bc9d7d6f85585708d7b156edc3253ed52f8b57f
4
+ data.tar.gz: b52896c54a1f4b8df2085f23a68dd914d58de9a6557586c88e78ce214d4cfcf8
5
5
  SHA512:
6
- metadata.gz: 5469708795938a8458b787768f637630805abbbfc81ede6009cdb8f35da71eaeb7651e4cd1e2db813a3fedc1b3cd840b50902262ebcd296e862e3c563d569e5d
7
- data.tar.gz: c29ae21d4a3e9feff6e35cd3e17aa96f25b268c6855cd4d53c6d7ae0448f5a0aa9ae403aff867c766a45ef34d61daeb1aa60f1786e018653e913dfb67073340c
6
+ metadata.gz: 3fd66983bd547523ed9d7321d25d2f41fec7c6d62f9d3d61c625f7d6cfa8560315c436decbf183e413e678d3134e3dd9ffefd5fde3db627e5b2378cc3fe50b84
7
+ data.tar.gz: a81de6ab95ed1af0b696e805b1c1e5965abb5925981ecf47654f3b73f95acf6485b0a283bce37c49c28b2321d25e83a6ea8a5094679de167d08af68f3f079e9a
@@ -15,3 +15,7 @@ Style/Documentation:
15
15
 
16
16
  Metrics/LineLength:
17
17
  Max: 100
18
+
19
+ Metrics/ClassLength:
20
+ Exclude:
21
+ - 'lib/open_api/rspec/schema_parser.rb'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- open_api-rspec (0.1.9)
4
+ open_api-rspec (0.1.10)
5
5
  activesupport
6
6
  open_api-schema_validator (>= 0.1.1)
7
7
  rspec
@@ -9,20 +9,20 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (5.2.2)
13
- actionview (= 5.2.2)
14
- activesupport (= 5.2.2)
12
+ actionpack (5.2.3)
13
+ actionview (= 5.2.3)
14
+ activesupport (= 5.2.3)
15
15
  rack (~> 2.0)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
19
- actionview (5.2.2)
20
- activesupport (= 5.2.2)
19
+ actionview (5.2.3)
20
+ activesupport (= 5.2.3)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
25
- activesupport (5.2.2)
25
+ activesupport (5.2.3)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 0.7, < 2)
28
28
  minitest (~> 5.1)
@@ -34,18 +34,18 @@ GEM
34
34
  descendants_tracker (~> 0.0.4)
35
35
  ice_nine (~> 0.11.0)
36
36
  thread_safe (~> 0.3, >= 0.3.1)
37
- brakeman (4.3.1)
37
+ brakeman (4.5.0)
38
38
  builder (3.2.3)
39
- bundler-audit (0.6.0)
40
- bundler (~> 1.2)
39
+ bundler-audit (0.6.1)
40
+ bundler (>= 1.2.0, < 3)
41
41
  thor (~> 0.18)
42
- byebug (10.0.2)
42
+ byebug (11.0.1)
43
43
  codeclimate-engine-rb (0.4.1)
44
44
  virtus (~> 1.0)
45
45
  coderay (1.1.2)
46
46
  coercible (1.0.0)
47
47
  descendants_tracker (~> 0.0.1)
48
- concurrent-ruby (1.1.4)
48
+ concurrent-ruby (1.1.5)
49
49
  crass (1.0.4)
50
50
  descendants_tracker (0.0.4)
51
51
  thread_safe (~> 0.3, >= 0.3.1)
@@ -53,14 +53,14 @@ GEM
53
53
  docile (1.3.1)
54
54
  equalizer (0.0.11)
55
55
  erubi (1.8.0)
56
- httparty (0.16.3)
56
+ httparty (0.17.0)
57
57
  mime-types (~> 3.0)
58
58
  multi_xml (>= 0.5.2)
59
- i18n (1.5.1)
59
+ i18n (1.6.0)
60
60
  concurrent-ruby (~> 1.0)
61
61
  ice_nine (0.11.2)
62
62
  jaro_winkler (1.5.2)
63
- json (2.1.0)
63
+ json (2.2.0)
64
64
  json-schema (2.8.1)
65
65
  addressable (>= 2.4)
66
66
  kwalify (0.7.2)
@@ -79,27 +79,26 @@ GEM
79
79
  method_source (0.9.2)
80
80
  mime-types (3.2.2)
81
81
  mime-types-data (~> 3.2015)
82
- mime-types-data (3.2018.0812)
82
+ mime-types-data (3.2019.0331)
83
83
  mini_portile2 (2.4.0)
84
84
  minitest (5.11.3)
85
85
  multi_xml (0.6.0)
86
- nokogiri (1.10.0)
86
+ nokogiri (1.10.3)
87
87
  mini_portile2 (~> 2.4.0)
88
88
  open_api-schema_validator (0.1.1)
89
89
  json-schema
90
- parallel (1.12.1)
91
- parser (2.5.3.0)
90
+ parallel (1.17.0)
91
+ parser (2.6.3.0)
92
92
  ast (~> 2.4.0)
93
- powerpack (0.1.2)
94
93
  pry (0.12.2)
95
94
  coderay (~> 1.1.0)
96
95
  method_source (~> 0.9.0)
97
- pry-byebug (3.6.0)
98
- byebug (~> 10.0)
96
+ pry-byebug (3.7.0)
97
+ byebug (~> 11.0)
99
98
  pry (~> 0.10)
100
99
  psych (3.1.0)
101
100
  public_suffix (3.0.3)
102
- rack (2.0.6)
101
+ rack (2.0.7)
103
102
  rack-test (1.1.0)
104
103
  rack (>= 1.0, < 3)
105
104
  rails-dom-testing (2.0.3)
@@ -109,10 +108,10 @@ GEM
109
108
  loofah (~> 2.2, >= 2.2.2)
110
109
  rainbow (3.0.0)
111
110
  rake (12.3.2)
112
- reek (5.3.0)
111
+ reek (5.4.0)
113
112
  codeclimate-engine-rb (~> 0.4.0)
114
113
  kwalify (~> 0.7.0)
115
- parser (>= 2.5.0.0, < 2.6, != 2.5.1.1)
114
+ parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
116
115
  psych (~> 3.1.0)
117
116
  rainbow (>= 2.0, < 4.0)
118
117
  rspec (3.8.0)
@@ -121,22 +120,21 @@ GEM
121
120
  rspec-mocks (~> 3.8.0)
122
121
  rspec-core (3.8.0)
123
122
  rspec-support (~> 3.8.0)
124
- rspec-expectations (3.8.2)
123
+ rspec-expectations (3.8.3)
125
124
  diff-lcs (>= 1.2.0, < 2.0)
126
125
  rspec-support (~> 3.8.0)
127
126
  rspec-mocks (3.8.0)
128
127
  diff-lcs (>= 1.2.0, < 2.0)
129
128
  rspec-support (~> 3.8.0)
130
129
  rspec-support (3.8.0)
131
- rubocop (0.62.0)
130
+ rubocop (0.68.1)
132
131
  jaro_winkler (~> 1.5.1)
133
132
  parallel (~> 1.10)
134
133
  parser (>= 2.5, != 2.5.1.1)
135
- powerpack (~> 0.1)
136
134
  rainbow (>= 2.2.2, < 4.0)
137
135
  ruby-progressbar (~> 1.7)
138
- unicode-display_width (~> 1.4.0)
139
- rubocop-rspec (1.31.0)
136
+ unicode-display_width (>= 1.4.0, < 1.6)
137
+ rubocop-rspec (1.32.0)
140
138
  rubocop (>= 0.60.0)
141
139
  ruby-progressbar (1.10.0)
142
140
  simplecov (0.16.1)
@@ -148,7 +146,7 @@ GEM
148
146
  thread_safe (0.3.6)
149
147
  tzinfo (1.2.5)
150
148
  thread_safe (~> 0.1)
151
- unicode-display_width (1.4.1)
149
+ unicode-display_width (1.5.0)
152
150
  virtus (1.0.5)
153
151
  axiom-types (~> 0.1)
154
152
  coercible (~> 1.0)
@@ -151,8 +151,20 @@ module OpenApi
151
151
  p['schema']
152
152
  end
153
153
 
154
- body['properties'].flat_map do |k, v|
155
- deep_body_keys(k, v)
154
+ if body['allOf']
155
+ scheme = body['allOf'].first['$ref'].tr('/', ' ')[2..-1].strip.split.map(&:to_s)
156
+ all_of_schema_properties = @openapi_schema.dig(*scheme)
157
+ scheme_props = all_of_schema_properties['properties'].flat_map do |k, v|
158
+ deep_body_keys(k, v)
159
+ end
160
+ additional_props = body['allOf'].last['properties'].flat_map do |k, v|
161
+ deep_body_keys(k, v)
162
+ end
163
+ scheme_props + additional_props
164
+ else
165
+ body['properties'].flat_map do |k, v|
166
+ deep_body_keys(k, v)
167
+ end
156
168
  end
157
169
  else
158
170
  p['name'].to_s
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OpenApi
4
4
  module RSpec
5
- VERSION = '0.1.9'
5
+ VERSION = '0.1.10'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_api-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hansen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-16 00:00:00.000000000 Z
11
+ date: 2019-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  - !ruby/object:Gem::Version
228
228
  version: '0'
229
229
  requirements: []
230
- rubygems_version: 3.0.2
230
+ rubygems_version: 3.0.3
231
231
  signing_key:
232
232
  specification_version: 4
233
233
  summary: RSpec matchers and shared examples for OpenApi