jieshun-parking 0.6.2 → 0.6.3

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: ae1b05c5df13925f6987df22d4586859d7887d8cf9dbc4ce17c6c2c008994d14
4
- data.tar.gz: 21074f7efc9c3e4c0addd8715df66757ed1772cd551726553ef5cbb2f65c2084
3
+ metadata.gz: e62dbeac0ad063a0b1ccfd6c05f734d9eb029601db476a8902e76f90ccd020b2
4
+ data.tar.gz: 4a74322b5e1e9736dd085019b5dc7b5757778d3cc0f4a23b047c4799767c2d45
5
5
  SHA512:
6
- metadata.gz: c36c19dc3179417597d1c7386d45e92e9423e42fcfa1f5d6a9972cdb50c1ea6197f05b49f12bbe90a9bdeabdaa44c4ba8110393fe2dae4e0fd2b81b5c8bc83bb
7
- data.tar.gz: 486cafe53c34bd9003c4cbadb32057060cca63a64ee37f3e0aec8491e298c1314b086d39bfdaf869b4199dfcddff06ee78e3b8f712708b9e119aef136dde19f3
6
+ metadata.gz: 9eea2615ad75a03358adb76f297570df9f5ca3ce04f477ce48119c71fea806b7477123ee5d19b937d3e3af35c6ad3fe09252d3e84c802e451d64d4640aae2f24
7
+ data.tar.gz: aee37bc88b551134697e7c8f5575d21c5f8282d0cc9ffe38ed0f461cdcdee735c3f1863ffe4d19d7490cc97c7a0a54c312a7d31cd5cd4c2322f5d7c6ed7d15d0
data/README.md CHANGED
@@ -21,8 +21,29 @@ Or install it yourself as:
21
21
  $ gem install jieshun-parking
22
22
 
23
23
  ## Usage
24
-
25
- TODO: Write usage instructions here
24
+ ```ruby
25
+ def jieshun_client
26
+ redis_config = Rails.application.config_for(:redis).symbolize_keys!
27
+ jieshun_config = Jieshun::Parking::Configuration.new(
28
+ Rails.application.config.configuration['jieshun']['server_url'],
29
+ Rails.application.config.configuration['jieshun']['businesser_code'],
30
+ Rails.application.config.configuration['jieshun']['cid'],
31
+ Rails.application.config.configuration['jieshun']['usr'],
32
+ Rails.application.config.configuration['jieshun']['psw'],
33
+ Rails.application.config.configuration['jieshun']['sign_key'],
34
+ redis_config
35
+ )
36
+ Jieshun::Parking::Client.new(jieshun_config)
37
+ end
38
+
39
+
40
+ def create_order_by_plate_number(parking_lot, plate_number)
41
+ jieshun_client.create_order_by_car_no(parking_lot.code, plate_number) do |result|
42
+ parking_order = create_or_update_parking_order(parking_lot, plate_number, result)
43
+ yield(parking_order)
44
+ end
45
+ end
46
+ ```
26
47
 
27
48
  ## Development
28
49
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jieshun
4
4
  module Parking
5
- VERSION = "0.6.2"
5
+ VERSION = "0.6.3"
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: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - LCola
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-26 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport