laximo 0.7 → 0.8

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -44
  3. data/laximo.gemspec +2 -2
  4. data/lib/laximo.rb +4 -4
  5. data/lib/laximo/am.rb +6 -6
  6. data/lib/laximo/defaults.rb +2 -0
  7. data/lib/laximo/oem.rb +46 -62
  8. data/lib/laximo/options.rb +17 -57
  9. data/lib/laximo/query.rb +69 -136
  10. data/lib/laximo/request.rb +13 -36
  11. data/lib/laximo/respond/{find_detail.rb → am/find_detail.rb} +0 -0
  12. data/lib/laximo/respond/{find_oem.rb → am/find_oem.rb} +0 -0
  13. data/lib/laximo/respond/{find_oem_correction.rb → am/find_oem_correction.rb} +0 -0
  14. data/lib/laximo/respond/{find_replacements.rb → am/find_replacements.rb} +7 -2
  15. data/lib/laximo/respond/{list_manufacturer.rb → am/list_manufacturer.rb} +6 -2
  16. data/lib/laximo/respond/{manufacturer_info.rb → am/manufacturer_info.rb} +6 -2
  17. data/lib/laximo/respond/{exec_custom_operation.rb → oem/exec_custom_operation.rb} +1 -0
  18. data/lib/laximo/respond/oem/find_vehicle.rb +27 -0
  19. data/lib/laximo/respond/{find_vehicle_by_frame.rb → oem/find_vehicle_by_frame.rb} +1 -0
  20. data/lib/laximo/respond/{find_vehicle_by_wizard.rb → oem/find_vehicle_by_frame_no.rb} +4 -3
  21. data/lib/laximo/respond/{find_vehicle_by_vin.rb → oem/find_vehicle_by_vin.rb} +1 -0
  22. data/lib/laximo/respond/{find_vehicle_by_wizard2.rb → oem/find_vehicle_by_wizard2.rb} +1 -0
  23. data/lib/laximo/respond/{get_catalog_info.rb → oem/get_catalog_info.rb} +0 -0
  24. data/lib/laximo/respond/{get_filter_by_detail.rb → oem/get_filter_by_detail.rb} +6 -2
  25. data/lib/laximo/respond/{get_filter_by_unit.rb → oem/get_filter_by_unit.rb} +1 -0
  26. data/lib/laximo/respond/{get_unit_info.rb → oem/get_unit_info.rb} +1 -0
  27. data/lib/laximo/respond/{get_vehicle_info.rb → oem/get_vehicle_info.rb} +1 -0
  28. data/lib/laximo/respond/{get_wizard2.rb → oem/get_wizard2.rb} +1 -0
  29. data/lib/laximo/respond/{get_wizard_next_step2.rb → oem/get_wizard_next_step2.rb} +0 -0
  30. data/lib/laximo/respond/{list_catalogs.rb → oem/list_catalogs.rb} +1 -0
  31. data/lib/laximo/respond/{list_categories.rb → oem/list_categories.rb} +6 -2
  32. data/lib/laximo/respond/{list_detail_by_unit.rb → oem/list_detail_by_unit.rb} +1 -0
  33. data/lib/laximo/respond/{list_image_map_by_unit.rb → oem/list_image_map_by_unit.rb} +6 -2
  34. data/lib/laximo/respond/{list_quick_detail.rb → oem/list_quick_detail.rb} +1 -0
  35. data/lib/laximo/respond/{list_quick_group.rb → oem/list_quick_group.rb} +6 -2
  36. data/lib/laximo/respond/{list_units.rb → oem/list_units.rb} +1 -0
  37. data/lib/laximo/version.rb +1 -1
  38. metadata +32 -32
  39. data/lib/laximo/respond/get_wizard.rb +0 -26
@@ -6,8 +6,13 @@ module Laximo
6
6
  class FindReplacements < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
- nodes_to_hash(str.xpath('//FindReplacements/row'), recursive: false)
10
- end # parsing_result
9
+
10
+ nodes_to_hash(
11
+ str.xpath('//FindReplacements/row'),
12
+ recursive: false
13
+ )
14
+
15
+ end
11
16
 
12
17
  end # FindReplacements
13
18
 
@@ -6,8 +6,12 @@ module Laximo
6
6
  class ListManufacturer < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
- nodes_to_hash(str.xpath('//ListManufacturer/row'))
10
- end # parsing_result
9
+
10
+ nodes_to_hash(
11
+ str.xpath('//ListManufacturer/row')
12
+ )
13
+
14
+ end
11
15
 
12
16
  end # ListManufacturer
13
17
 
@@ -6,8 +6,12 @@ module Laximo
6
6
  class Manufacturer_Info < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
- nodes_to_hash(str.xpath('//ManufacturerInfo/row'))
10
- end # parsing_result
9
+
10
+ nodes_to_hash(
11
+ str.xpath('//ManufacturerInfo/row')
12
+ )
13
+
14
+ end
11
15
 
12
16
  end # Manufacturer_Info
13
17
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -0,0 +1,27 @@
1
+ # encoding: utf-8
2
+ module Laximo
3
+
4
+ module Respond
5
+
6
+ class FindVehicle < Laximo::Respond::Base
7
+
8
+ def parsing_result(str)
9
+
10
+ str.xpath('//FindVehicle/row').inject([]) { |arr, node|
11
+
12
+ h = node_to_hash(node) { |h1, n1|
13
+ h1[:attributes] = nodes_to_hash(n1.xpath('./attribute'))
14
+ }
15
+
16
+ arr << h unless h.empty?
17
+ arr
18
+
19
+ }
20
+
21
+ end # parsing_result
22
+
23
+ end # FindVehicle
24
+
25
+ end # Respond
26
+
27
+ end # Laximo
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -3,23 +3,24 @@ module Laximo
3
3
 
4
4
  module Respond
5
5
 
6
- class FindVehicleByWizard < Laximo::Respond::Base
6
+ class FindVehicleByFrameNo < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
9
 
10
- str.xpath('//FindVehicleByWizard/row').inject([]) { |arr, node|
10
+ str.xpath('//FindVehicleByFrameNo/row').inject([]) { |arr, node|
11
11
 
12
12
  h = node_to_hash(node) { |h1, n1|
13
13
  h1[:attributes] = nodes_to_hash(n1.xpath('./attribute'))
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
20
21
  end # parsing_result
21
22
 
22
- end # FindVehicleByWizard
23
+ end # FindVehicleByFrameNo
23
24
 
24
25
  end # Respond
25
26
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -6,8 +6,12 @@ module Laximo
6
6
  class GetFilterByDetail < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
- nodes_to_hash(str.xpath('//GetFilterByDetail/row'))
10
- end # parsing_result
9
+
10
+ nodes_to_hash(
11
+ str.xpath('//GetFilterByDetail/row')
12
+ )
13
+
14
+ end
11
15
 
12
16
  end # GetFilterByDetail
13
17
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr < h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -22,6 +22,7 @@ module Laximo
22
22
  }
23
23
 
24
24
  arr << h unless h.empty?
25
+ arr
25
26
 
26
27
  }
27
28
 
@@ -6,8 +6,12 @@ module Laximo
6
6
  class ListCategories < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
- nodes_to_hash(str.xpath('//ListCategories/row'))
10
- end # parsing_result
9
+
10
+ nodes_to_hash(
11
+ str.xpath('//ListCategories/row')
12
+ )
13
+
14
+ end
11
15
 
12
16
  end # ListCategories
13
17
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -6,8 +6,12 @@ module Laximo
6
6
  class ListImageMapByUnit < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
- nodes_to_hash(str.xpath('//ListImageMapByUnit/row'))
10
- end # parsing_result
9
+
10
+ nodes_to_hash(
11
+ str.xpath('//ListImageMapByUnit/row')
12
+ )
13
+
14
+ end
11
15
 
12
16
  end # ListImageMapByUnit
13
17
 
@@ -30,6 +30,7 @@ module Laximo
30
30
  }
31
31
 
32
32
  arr << h unless h.empty?
33
+ arr
33
34
 
34
35
  }
35
36
 
@@ -6,8 +6,12 @@ module Laximo
6
6
  class ListQuickGroup < Laximo::Respond::Base
7
7
 
8
8
  def parsing_result(str)
9
- nodes_to_hash(str.xpath('//ListQuickGroups/row'))
10
- end # parsing_result
9
+
10
+ nodes_to_hash(
11
+ str.xpath('//ListQuickGroups/row')
12
+ )
13
+
14
+ end
11
15
 
12
16
  end # ListQuickGroup
13
17
 
@@ -14,6 +14,7 @@ module Laximo
14
14
  }
15
15
 
16
16
  arr << h unless h.empty?
17
+ arr
17
18
 
18
19
  }
19
20
 
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Laximo
3
3
 
4
- VERSION = '0.7'.freeze
4
+ VERSION = '0.8'.freeze
5
5
 
6
6
  end # Laximo
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.7'
4
+ version: '0.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Pilyaev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-09 00:00:00.000000000 Z
11
+ date: 2018-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '1.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '1.8'
27
27
  description: Api for Laximo services
28
28
  email:
29
29
  - piliaiev@gmail.com
@@ -45,32 +45,32 @@ files:
45
45
  - lib/laximo/query.rb
46
46
  - lib/laximo/request.rb
47
47
  - lib/laximo/respond.rb
48
- - lib/laximo/respond/exec_custom_operation.rb
49
- - lib/laximo/respond/find_detail.rb
50
- - lib/laximo/respond/find_oem.rb
51
- - lib/laximo/respond/find_oem_correction.rb
52
- - lib/laximo/respond/find_replacements.rb
53
- - lib/laximo/respond/find_vehicle_by_frame.rb
54
- - lib/laximo/respond/find_vehicle_by_vin.rb
55
- - lib/laximo/respond/find_vehicle_by_wizard.rb
56
- - lib/laximo/respond/find_vehicle_by_wizard2.rb
57
- - lib/laximo/respond/get_catalog_info.rb
58
- - lib/laximo/respond/get_filter_by_detail.rb
59
- - lib/laximo/respond/get_filter_by_unit.rb
60
- - lib/laximo/respond/get_unit_info.rb
61
- - lib/laximo/respond/get_vehicle_info.rb
62
- - lib/laximo/respond/get_wizard.rb
63
- - lib/laximo/respond/get_wizard2.rb
64
- - lib/laximo/respond/get_wizard_next_step2.rb
65
- - lib/laximo/respond/list_catalogs.rb
66
- - lib/laximo/respond/list_categories.rb
67
- - lib/laximo/respond/list_detail_by_unit.rb
68
- - lib/laximo/respond/list_image_map_by_unit.rb
69
- - lib/laximo/respond/list_manufacturer.rb
70
- - lib/laximo/respond/list_quick_detail.rb
71
- - lib/laximo/respond/list_quick_group.rb
72
- - lib/laximo/respond/list_units.rb
73
- - lib/laximo/respond/manufacturer_info.rb
48
+ - lib/laximo/respond/am/find_detail.rb
49
+ - lib/laximo/respond/am/find_oem.rb
50
+ - lib/laximo/respond/am/find_oem_correction.rb
51
+ - lib/laximo/respond/am/find_replacements.rb
52
+ - lib/laximo/respond/am/list_manufacturer.rb
53
+ - lib/laximo/respond/am/manufacturer_info.rb
54
+ - lib/laximo/respond/oem/exec_custom_operation.rb
55
+ - lib/laximo/respond/oem/find_vehicle.rb
56
+ - lib/laximo/respond/oem/find_vehicle_by_frame.rb
57
+ - lib/laximo/respond/oem/find_vehicle_by_frame_no.rb
58
+ - lib/laximo/respond/oem/find_vehicle_by_vin.rb
59
+ - lib/laximo/respond/oem/find_vehicle_by_wizard2.rb
60
+ - lib/laximo/respond/oem/get_catalog_info.rb
61
+ - lib/laximo/respond/oem/get_filter_by_detail.rb
62
+ - lib/laximo/respond/oem/get_filter_by_unit.rb
63
+ - lib/laximo/respond/oem/get_unit_info.rb
64
+ - lib/laximo/respond/oem/get_vehicle_info.rb
65
+ - lib/laximo/respond/oem/get_wizard2.rb
66
+ - lib/laximo/respond/oem/get_wizard_next_step2.rb
67
+ - lib/laximo/respond/oem/list_catalogs.rb
68
+ - lib/laximo/respond/oem/list_categories.rb
69
+ - lib/laximo/respond/oem/list_detail_by_unit.rb
70
+ - lib/laximo/respond/oem/list_image_map_by_unit.rb
71
+ - lib/laximo/respond/oem/list_quick_detail.rb
72
+ - lib/laximo/respond/oem/list_quick_group.rb
73
+ - lib/laximo/respond/oem/list_units.rb
74
74
  - lib/laximo/version.rb
75
75
  homepage: https://github.com/dancingbytes/laximo
76
76
  licenses:
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="
86
86
  - !ruby/object:Gem::Version
87
- version: 1.9.3
87
+ version: '2.0'
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - ">="
@@ -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.7.6
95
+ rubygems_version: 2.7.7
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Api for Laximo services
@@ -1,26 +0,0 @@
1
- # encoding: utf-8
2
- module Laximo
3
-
4
- module Respond
5
-
6
- class GetWizard < Laximo::Respond::Base
7
-
8
- def parsing_result(str)
9
-
10
- str.xpath('//GetWizard/row').inject([]) { |arr, node|
11
-
12
- h = node_to_hash(node) { |h1, n1|
13
- h1[:options] = nodes_to_hash(node.xpath('./options/row'))
14
- }
15
-
16
- arr << h unless h.empty?
17
-
18
- }
19
-
20
- end # parsing_result
21
-
22
- end # GetWizard
23
-
24
- end # Respond
25
-
26
- end # Laximo