oas_parser 0.18.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af21e3945bcd537a9606bff192aed9cf48d8b0b18ff878f268bc416af4a3480d
4
- data.tar.gz: 0a200ba60fbd11885a4bd6bc50daa6a970222da2eaac9253f5f1225e37beec27
3
+ metadata.gz: cf608da9a7c2b6fa14bd6bc2c11f087a20ee378863c126d64962f361c752abbe
4
+ data.tar.gz: 894cee81f1a47c1a41057a4511bca9bca6cd5a83ce51ac7ef931aed47985ed0a
5
5
  SHA512:
6
- metadata.gz: e135ca6bf6a65fddf2c5bef4d0f802350fec90385af5d39b4e551b316a26f03362cad6c3a2fdcd9d0f63121f1367550b129cc385c1115f3c0b0dc45fcf149f36
7
- data.tar.gz: 8c5b6cd7ba282839ff8e62125cee6ad16371c80849c29e3dbd6e781e123e1d1f057aef81293f00086acbbaafb0499d592835960f42175e92706760d2b1d5f2e7
6
+ metadata.gz: 8984dab1cfa049034c1ef4c149bc3f392dcb7dd7618df32cd145498f0d4a43833e0b8f1bd9f4dffcbd72025a727d42cebf4861f9a28e1ef288d5dafdb57d380c
7
+ data.tar.gz: 2f8fbf593b4f15b00c8dd74f19a187ddec6af950c24feb2a463e7beff5912c1d4c88d5bae3b8eec5610fdea8c95c1faa62ec8d158b879815200c60709154939c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oas_parser (0.18.0)
4
+ oas_parser (0.18.1)
5
5
  activesupport (>= 4.0.0)
6
6
  addressable (~> 2.3)
7
7
  builder (~> 3.2.3)
@@ -49,21 +49,14 @@ module OasParser
49
49
  def expand_file(ref)
50
50
  absolute_path = File.expand_path(File.join("..", ref), @path)
51
51
  absolute_path, local_reference = absolute_path.split('#')
52
- if local_reference
53
- # skip first item in the split array, it is blank
54
- local_reference_path = local_reference.split('/')[1..-1]
55
- resolved_remote_reference = Parser.resolve(absolute_path)
52
+ resolved_remote_reference = Parser.resolve(absolute_path)
56
53
 
57
- # expand the pointer included as part of the remote reference
58
- # within the context of the remote reference
59
- expanded_pointer = expand_pointer('#' + local_reference, resolved_remote_reference)
60
-
61
- # extract the local reference data from the remote remote reference
62
- # and include the expanded pointer
63
- resolved_remote_reference.dig(*local_reference_path).merge(expanded_pointer)
64
- else
65
- Parser.resolve(absolute_path)
54
+ if local_reference
55
+ pointer = OasParser::Pointer.new(local_reference)
56
+ return pointer.resolve(resolved_remote_reference)
66
57
  end
58
+
59
+ resolved_remote_reference
67
60
  end
68
61
 
69
62
  def expand_pointer(ref, content=nil)
@@ -1,3 +1,3 @@
1
1
  module OasParser
2
- VERSION = '0.18.0'.freeze
2
+ VERSION = '0.18.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oas_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Butler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-25 00:00:00.000000000 Z
11
+ date: 2019-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  requirements: []
251
251
  rubyforge_project:
252
- rubygems_version: 2.7.6
252
+ rubygems_version: 2.7.6.2
253
253
  signing_key:
254
254
  specification_version: 4
255
255
  summary: A parser for Open API specifications