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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e699f5c33a733444e21d720b923daa12ea09bd5
4
- data.tar.gz: 7b2f2c8b21a5a2c76f6966b1ac1169b06ca256cc
3
+ metadata.gz: b5871e1cefef9f7a80ac648460a158ef94b5423f
4
+ data.tar.gz: ef08d290b3c59626658e87dacdb323e5775167aa
5
5
  SHA512:
6
- metadata.gz: 33d8fd29ba4dd7a1db76a17e36f0b7c2706eaf4ac66ee48e3616c664119e210199e923f005b908ac98c7b5c4ed5f891dcd47a72974eb070d29b5902fa92fc768
7
- data.tar.gz: 8f6e9596dc352f99915f5489520bd6c9c912fa5c1bbbc9fb47bd57e92d11c0e91d1f367000edf2da23a9911a91e29663dc8ea76a6d818e29617da239df11345b
6
+ metadata.gz: 663bce73639dfa6e32158543ac23b77a43ef3071d6d077b9a950a048af71fd6c8e5b50122e9a0f299cc838e173d0474bd4e188742559462ccee176385366f731
7
+ data.tar.gz: 89919c7f88edd9a378a6de3dc50e3c1477fb1a568b5c04cb444115b6eefb9c0a89c5aca1ec7f514bd3b66185e093eab8d956d1e336ca9316743c55d72e846d13
@@ -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, format: nil
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'),
@@ -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 raise EasyCard::Error, "未知類型: #{record[?T]},#{record}"
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]}
@@ -1,3 +1,3 @@
1
1
  module EasyCard
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easycard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jian Weihang