credit-card-sms-parser 0.3.0 → 0.3.1

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: 60bd0eebf64cda854c582b0f660cfe171f67c4ab
4
- data.tar.gz: 9015d4d3912ff88d77b840ad6bd5e773a22eae0f
3
+ metadata.gz: f496913835ae060eee743825b871d1737e4f99b1
4
+ data.tar.gz: 57575ed5d42397e73c976162b4649461e497c02d
5
5
  SHA512:
6
- metadata.gz: 3e82bf0c07d589244a5880fc0d72954eced2a811265324b8a1a80ed56660c554a46beb7c102c63c64249c32f058a8dc201f9483176b8aa3fba099d09b0998321
7
- data.tar.gz: 986d0e8a0fc77d022473436bfa5cfc57d058fea1032a7dcabdc9a48bf64ab581dcb74296c8b3dac6704b2c05ab270d2b536c2b68c10a082cbedb516a79e2db6f
6
+ metadata.gz: 13cc381c4780d91ac6597abc02fe47c4970d7a6b60ec5c50d60ec2871a7d9847491ba70769396a55473da29f4cd0c50a40b78a1d67cdab4f30bddcce2d143128
7
+ data.tar.gz: 2ec27aea07fce935971a93c7e918aa233eed24c093eb13ac6ec1ca7a91fc19ecf18483326731667e31d89768299a50d8436034f6c5a859e43211502809b17266
data/README.md CHANGED
@@ -12,11 +12,17 @@ $ pry
12
12
  [2] pry(main)> include CreditCardSmsParser
13
13
  => Object
14
14
  [3] pry(main)> parse_sms('하나(6*8*)***님 04/06 15:26 씨유판교 일시불/3,500원/누적-4,645원')
15
- => {:CARD=>"하나(6*8*)",
16
- :DATE=>"04/06",
17
- :TIME=>"15:26",
18
- :SHOP=>"씨유판교",
19
- :MONEY=>4645}
15
+ => {:card=>"하나(6*8*)",
16
+ :user_name=>"***님",
17
+ :space=>" ",
18
+ :date=>"04/06",
19
+ :time=>"15:26",
20
+ :shop_name=>"씨유판교",
21
+ :type=>nil,
22
+ :punctuation=>"/",
23
+ :money=>3500,
24
+ :money_total=>4645,
25
+ :EOS=>nil}
20
26
  ```
21
27
 
22
28
  ## 현재까지 지원하는(걸로 추정되는) 카드사
@@ -27,6 +33,7 @@ $ pry
27
33
  * 국민체크카드
28
34
  * 농협
29
35
  * 삼성법인카드
36
+ * 신한카드
30
37
 
31
38
  ## 프로젝트에 기여하기
32
39
  파싱이 제대로 되지 않는 SMS 문자열을 Issue 에 올려주시거나 test 코드에 추가해주시면 반영해드립니다.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'credit-card-sms-parser'
7
- spec.version = '0.3.0'
7
+ spec.version = '0.3.1'
8
8
  spec.authors = %w(Hanson Benjamin)
9
9
  spec.email = %w(jehokim@live.com)
10
10
  if spec.respond_to?(:metadata)
@@ -19,7 +19,7 @@ class KoreanCreditCardLexer < RLTK::Lexer
19
19
  rule(/누적[\s:\-]?[\d,\-]+원/) { |t| [:money_total, t.to_num] }
20
20
  rule(/누적-[\d,\-]+원/) { |t| [:money_total, t.to_num] }
21
21
  rule(/[\d,\-]+원/) { |t| [:money, t.to_num] }
22
- rule(/\(주\)\p{Hangul}+/) {|t| [:shop, t[3..-1]]}
22
+ rule(/\(주\)\p{Hangul}+/) {|t| [:shop_name, t[3..-1]]}
23
23
  rule(/\p{Hangul}+\([\d\*]{4}\)/) {|t| [:card, t]}
24
24
  rule(/\S+은행/) {|t| [:bank, t]}
25
25
  rule(/KEB하나/) {|t| [:bank, t]}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credit-card-sms-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hanson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-04-29 00:00:00.000000000 Z
12
+ date: 2015-04-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rltk