oas_parser 0.4.0 → 0.5.0

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
  SHA1:
3
- metadata.gz: 7621b9bf0c9a6613ec55ae5e28455a9bf3027290
4
- data.tar.gz: f7c08c893f7bb1ade6f3ab34d96e6c97a5fa184c
3
+ metadata.gz: 57b6b26e97b0ef596736fc476809afc6d4e0be0c
4
+ data.tar.gz: ec63e70f8eab67fe2f0b610ce18289b159221a5b
5
5
  SHA512:
6
- metadata.gz: 42643290ad8e381f90600da01b15ae04c706c33128f746c537ba2c9ef7999f55f261a60fb54ed77907cf179142c118a58befdb5a79b414cb9defd95f0e133569
7
- data.tar.gz: 52e6ba6b817e39fdb4745629038b0210fbd2b82c3b9444f9ea33169de7d2ce0694cd9cd8373d1d5ad1e304d1a3723c14eca133a81e044b7d6cda7be8b5b8b3e4
6
+ metadata.gz: add2add151ef95fd604946cb59f9607ef0cbcf2c639e30257e40f68c8d87a58e2778ef3b4dde2dfa664dabbbb6df412ff01d0e1987222ef05c2173a7fc10a3cf
7
+ data.tar.gz: f3aa81e29ce4e00e4091da1a2f558cbef811c39ec7fc00295ecd576a4c489b7817501adea1c6b1f9246f8978d2faca0ec01a1ea4a2ad5be6f745cba420669955
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oas_parser (0.3.0)
4
+ oas_parser (0.5.0)
5
5
  activesupport (~> 5.1.2)
6
6
  addressable (~> 2.3)
7
7
  builder (~> 3.2.3)
@@ -53,7 +53,7 @@ GEM
53
53
  lumberjack (1.0.12)
54
54
  method_source (0.9.0)
55
55
  mini_portile2 (2.3.0)
56
- minitest (5.11.1)
56
+ minitest (5.11.3)
57
57
  nenv (0.3.0)
58
58
  nokogiri (1.8.1)
59
59
  mini_portile2 (~> 2.3.0)
@@ -89,6 +89,10 @@ module OasParser
89
89
  if is_xml_text?(value)
90
90
  o['__text'] = parameter_value(value)
91
91
  end
92
+
93
+ if has_xml_name?(value)
94
+ key = xml_name(value)
95
+ end
92
96
  end
93
97
 
94
98
  o[key] = parameter_value(value)
@@ -163,5 +167,14 @@ module OasParser
163
167
  return true if object['xml']['text'] || false
164
168
  object['xml']['x-text'] || false
165
169
  end
170
+
171
+ def has_xml_name?(object)
172
+ return false unless has_xml_options?(object)
173
+ xml_name(object) || false
174
+ end
175
+
176
+ def xml_name(object)
177
+ object['xml']['name']
178
+ end
166
179
  end
167
180
  end
@@ -1,3 +1,3 @@
1
1
  module OasParser
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.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.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Butler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2018-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable