jieshun-parking 1.0.0 → 1.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d9b353ffa19e12ab97590fec31c6896800d0f006e4f878c48ec566492ff948
|
4
|
+
data.tar.gz: f21edef76ab1bed78eb7dc14bb523a45a8efc87001f9ba1a6cbc741709e47811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 761cdf5a8bab9ad4baf318eb2203f3894e92cd194752419b97298d64bbf8bd7988319721932386bdbba08ac5e17b8a0c8840db26f5c87762dae60da93470e5a4
|
7
|
+
data.tar.gz: 671e89527c8175029d50f5b427c004a20a9064468c1590f9d448ab7896bccdc0b43ec38c9fa5cd073a94059bbc3551bf18a2dfecc16a83a4f17d294d1bd6614e
|
@@ -116,11 +116,11 @@ module Jieshun
|
|
116
116
|
# 0:没有异常
|
117
117
|
# 6: 无效的令牌或令牌已过期
|
118
118
|
def handle_failure(error)
|
119
|
-
case error['resultCode']
|
119
|
+
case error.body['resultCode']
|
120
120
|
when 6
|
121
121
|
@redis_client.redis_del(REDIS_AUTH_KEY)
|
122
122
|
end
|
123
|
-
raise RuntimeError.new("Unified error handling for client; resultCode:#{error['resultCode']}, message: #{error['message']}")
|
123
|
+
raise RuntimeError.new("Unified error handling for client; resultCode:#{error.body['resultCode']}, message: #{error.body['message']}")
|
124
124
|
end
|
125
125
|
end
|
126
126
|
end
|
@@ -9,9 +9,9 @@ module Jieshun
|
|
9
9
|
def post_form(server_url, headers, hash, success_callback, failure_callback)
|
10
10
|
post(server_url, 'application/x-www-form-urlencoded', headers, hash) do |result|
|
11
11
|
if result.successful
|
12
|
-
success_callback.call(result
|
12
|
+
success_callback.call(result)
|
13
13
|
else
|
14
|
-
failure_callback.call(result
|
14
|
+
failure_callback.call(result)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -19,9 +19,9 @@ module Jieshun
|
|
19
19
|
def post_json(server_url, headers, hash, success_callback, failure_callback)
|
20
20
|
post(server_url, 'application/json', headers, hash) do |result|
|
21
21
|
if result.successful
|
22
|
-
success_callback.call(result
|
22
|
+
success_callback.call(result)
|
23
23
|
else
|
24
|
-
failure_callback.call(result
|
24
|
+
failure_callback.call(result)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jieshun-parking
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LCola
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|