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: ddffcf640f1e92f0c0f6a9f33c42234db777fc7da3345b9ab35d002a4ea4be70
4
- data.tar.gz: 27e4276261a2d3c45467030c68bc81d377e1a93ffb204dde982a724abbc3340b
3
+ metadata.gz: 68d9b353ffa19e12ab97590fec31c6896800d0f006e4f878c48ec566492ff948
4
+ data.tar.gz: f21edef76ab1bed78eb7dc14bb523a45a8efc87001f9ba1a6cbc741709e47811
5
5
  SHA512:
6
- metadata.gz: 0bdc9d26235a0cf6f500f8ab50b1998aa1d11c1a3ac20799d64e82df554b40a0f9f17ec7d294c74bb7b0b482bb480d0f5a445bb2538f5a33be161c72c94dcfcd
7
- data.tar.gz: 3ee403980145afea05805574177f20ec04890aa6074abd07eae953d7f1039d1e4aada274dcf71afe04a593f7399019f737e843cb79396157c776eccd98c85a29
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.body)
12
+ success_callback.call(result)
13
13
  else
14
- failure_callback.call(result.body)
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.body)
22
+ success_callback.call(result)
23
23
  else
24
- failure_callback.call(result.body)
24
+ failure_callback.call(result)
25
25
  end
26
26
  end
27
27
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jieshun
4
4
  module Parking
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  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.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-07 00:00:00.000000000 Z
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport