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 +4 -4
- data/README.md +23 -2
- data/lib/jieshun/parking/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e62dbeac0ad063a0b1ccfd6c05f734d9eb029601db476a8902e76f90ccd020b2
|
4
|
+
data.tar.gz: 4a74322b5e1e9736dd085019b5dc7b5757778d3cc0f4a23b047c4799767c2d45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
|
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.
|
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-
|
11
|
+
date: 2023-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|