easycard 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/easycard.rb +1 -1
- data/lib/easycard/response.rb +3 -1
- data/lib/easycard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5871e1cefef9f7a80ac648460a158ef94b5423f
|
4
|
+
data.tar.gz: ef08d290b3c59626658e87dacdb323e5775167aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 663bce73639dfa6e32158543ac23b77a43ef3071d6d077b9a950a048af71fd6c8e5b50122e9a0f299cc838e173d0474bd4e188742559462ccee176385366f731
|
7
|
+
data.tar.gz: 89919c7f88edd9a378a6de3dc50e3c1477fb1a568b5c04cb444115b6eefb9c0a89c5aca1ec7f514bd3b66185e093eab8d956d1e336ca9316743c55d72e846d13
|
data/lib/easycard.rb
CHANGED
@@ -15,7 +15,7 @@ module EasyCard
|
|
15
15
|
|
16
16
|
module_function
|
17
17
|
|
18
|
-
def query cart_number, from: Date.today-30, to: Date.today
|
18
|
+
def query cart_number, from: Date.today-30, to: Date.today
|
19
19
|
query_hash = {
|
20
20
|
cardID: card_id(cart_number),
|
21
21
|
begin: from.strftime('%Y-%m-%d'),
|
data/lib/easycard/response.rb
CHANGED
@@ -16,7 +16,9 @@ module EasyCard
|
|
16
16
|
when ?U then :deposit
|
17
17
|
when '罰款' then :fine
|
18
18
|
when '查無交易資料' then raise EasyCard::NotFound, record[?T]
|
19
|
-
else
|
19
|
+
else
|
20
|
+
record[?T]
|
21
|
+
$stderr.puts "未知類型:#{record}"
|
20
22
|
end
|
21
23
|
record[?L].gsub!('<BR>', ?-)
|
22
24
|
{type: type, datetime: record[?D], location: record[?L], balance: record[?A], amount: record[?Q]}
|
data/lib/easycard/version.rb
CHANGED