laximo 0.5.0 → 0.5.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 +4 -4
- data/lib/laximo.rb +1 -0
- data/lib/laximo/oem.rb +7 -7
- data/lib/laximo/respond.rb +10 -12
- data/lib/laximo/respond/list_quick_detail.rb +7 -2
- data/lib/laximo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a8a5cc64dce4a7534adb6d32c38d921f9cd0106
|
|
4
|
+
data.tar.gz: 39c12a89013080d1a370c1e43cf2fe6c7706969c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4857609dc8b4dbae7b3bac1175c9340d49fb836c9ad6e082dae0ce3088f46b161adda840f3bcefbee5d25aeef844667cf7a8bb602bff828c27e152a4ad4fbef6
|
|
7
|
+
data.tar.gz: 5f9b9d285774cf8440f3bea930f795ab937c893078b9b80a62d134fc65b9bcfcd1f696c7bdb5245a4889ff843af4af17098ea6278ad742edcb234f248c1f391b
|
data/lib/laximo.rb
CHANGED
data/lib/laximo/oem.rb
CHANGED
|
@@ -377,8 +377,8 @@ module Laximo
|
|
|
377
377
|
def list_quick_group(
|
|
378
378
|
catalog:,
|
|
379
379
|
vehicle_id:,
|
|
380
|
-
ssd:
|
|
381
|
-
locale:
|
|
380
|
+
ssd: nil,
|
|
381
|
+
locale: 'ru_RU'
|
|
382
382
|
)
|
|
383
383
|
|
|
384
384
|
resp = ::Laximo::Query.
|
|
@@ -397,10 +397,10 @@ module Laximo
|
|
|
397
397
|
catalog:,
|
|
398
398
|
vehicle_id:,
|
|
399
399
|
quick_group_id:,
|
|
400
|
-
all
|
|
401
|
-
ssd:
|
|
402
|
-
localized:
|
|
403
|
-
locale:
|
|
400
|
+
all: 1,
|
|
401
|
+
ssd: nil,
|
|
402
|
+
localized: true,
|
|
403
|
+
locale: 'ru_RU'
|
|
404
404
|
)
|
|
405
405
|
|
|
406
406
|
resp = ::Laximo::Query.
|
|
@@ -408,7 +408,7 @@ module Laximo
|
|
|
408
408
|
locale(locale).
|
|
409
409
|
catalog(catalog).
|
|
410
410
|
vehicle_id(vehicle_id).
|
|
411
|
-
quick_group_id(quick_group_id)
|
|
411
|
+
quick_group_id(quick_group_id).
|
|
412
412
|
all(all).
|
|
413
413
|
ssd(ssd).
|
|
414
414
|
localized(localized).
|
data/lib/laximo/respond.rb
CHANGED
|
@@ -67,7 +67,10 @@ module Laximo
|
|
|
67
67
|
h[key.to_sym] = snd.value
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
if recursive
|
|
71
|
+
children = nodes_to_hash(node.children, recursive: true)
|
|
72
|
+
h[:children] = children unless children.empty?
|
|
73
|
+
end
|
|
71
74
|
arr << h
|
|
72
75
|
|
|
73
76
|
}
|
|
@@ -120,10 +123,11 @@ module Laximo
|
|
|
120
123
|
doc.remove_namespaces!
|
|
121
124
|
|
|
122
125
|
res = doc.xpath(RESPONSE_RESULT).children[0].to_s
|
|
123
|
-
str_to_xml_tags!(res)
|
|
124
126
|
|
|
125
127
|
@error = nil
|
|
126
|
-
@result = parsing_result(
|
|
128
|
+
@result = parsing_result(
|
|
129
|
+
::Nokogiri::XML(unescape(res))
|
|
130
|
+
) || []
|
|
127
131
|
|
|
128
132
|
rescue => ex
|
|
129
133
|
|
|
@@ -143,15 +147,9 @@ module Laximo
|
|
|
143
147
|
|
|
144
148
|
end # soap_errors
|
|
145
149
|
|
|
146
|
-
def
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
str.gsub!('"', '"')
|
|
150
|
-
str.gsub!('>', '>')
|
|
151
|
-
str.gsub!('<', '<')
|
|
152
|
-
str
|
|
153
|
-
|
|
154
|
-
end # str_to_xml_tags!
|
|
150
|
+
def unescape(str)
|
|
151
|
+
::CGI::unescapeHTML str
|
|
152
|
+
end # unescape
|
|
155
153
|
|
|
156
154
|
end # Base
|
|
157
155
|
|
|
@@ -15,8 +15,13 @@ module Laximo
|
|
|
15
15
|
|
|
16
16
|
arr1 << node_to_hash(n2) { |h2, n3|
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
h2[:details] = n3.xpath('./Detail').inject([]) { |arr2, n4|
|
|
19
|
+
|
|
20
|
+
arr2 << node_to_hash(n4) { |h3, n5|
|
|
21
|
+
h3[:attributes] = nodes_to_hash(n5.xpath('./attribute'))
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
20
25
|
|
|
21
26
|
}
|
|
22
27
|
|
data/lib/laximo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: laximo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Pilyaev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
92
92
|
version: '0'
|
|
93
93
|
requirements: []
|
|
94
94
|
rubyforge_project:
|
|
95
|
-
rubygems_version: 2.
|
|
95
|
+
rubygems_version: 2.6.4
|
|
96
96
|
signing_key:
|
|
97
97
|
specification_version: 4
|
|
98
98
|
summary: Api for Laximo services
|