vindata 0.0.4 → 0.0.5
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/vindata/services/nada.rb +7 -0
- data/lib/vindata/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0e5ac798de6c60873ca7e787a91d4b8421090c3
|
|
4
|
+
data.tar.gz: c35914adec7b62dfe17dcd23374d208d8fb1fb85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e067e17f02927de6f8349c9eae5a60bf8fa56a475f8362c0d13b479486337b8aa4c7f706a57e468bb18f43b0c668830cdfe62c15b366ab690badf6a662926ca
|
|
7
|
+
data.tar.gz: c17141807d8af103e90dbabcd94c193625d1f8548b004283178d30c08dcfa4cd88069e8f05cd1955937e53d12257bbe36973e2a24615121fd06cd3ffe923dc90
|
|
@@ -69,6 +69,7 @@ module VinData::Services
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def get_region_by_state(state)
|
|
72
|
+
tries ||= 2
|
|
72
73
|
client = get_client
|
|
73
74
|
data = client.call(:get_region_by_state_code,
|
|
74
75
|
message: { 'l_Request' => { 'Token' => get_token,
|
|
@@ -79,6 +80,9 @@ module VinData::Services
|
|
|
79
80
|
}
|
|
80
81
|
)
|
|
81
82
|
data.to_hash[:get_region_by_state_code_response][:get_region_by_state_code_result]
|
|
83
|
+
rescue Savon::SOAPFault => error
|
|
84
|
+
retry if (tries -= 1) > 0
|
|
85
|
+
raise error.message
|
|
82
86
|
end
|
|
83
87
|
|
|
84
88
|
def details_by_vin(vin)
|
|
@@ -110,6 +114,8 @@ module VinData::Services
|
|
|
110
114
|
client = get_client
|
|
111
115
|
|
|
112
116
|
begin
|
|
117
|
+
tries ||= 2
|
|
118
|
+
|
|
113
119
|
data = client.call(:get_default_vehicle_and_value_by_vin,
|
|
114
120
|
message: { 'vehicleRequest' =>
|
|
115
121
|
{ 'Token' => token,
|
|
@@ -132,6 +138,7 @@ module VinData::Services
|
|
|
132
138
|
|
|
133
139
|
rescue Savon::SOAPFault => error
|
|
134
140
|
return false if error.message.include? 'No vehicle found'
|
|
141
|
+
retry if (tries -= 1) > 0
|
|
135
142
|
raise error.message
|
|
136
143
|
end
|
|
137
144
|
end
|
data/lib/vindata/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vindata
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Roupen Mouradian
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Library which queries vehicle databases such as Edmunds for publicly
|
|
14
14
|
available vehicle information using VIN number
|