credit-card-sms-parser 0.3.3 → 0.3.4

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: 8086d4bd0c5b7969086205826cea1f3b7c386781
4
- data.tar.gz: 9785062d4c8edd5a8d0d8332ffa0b93bfc6bb9de
3
+ metadata.gz: 3196611e75e2e2b3d5bda3b2c012c33ab35a636e
4
+ data.tar.gz: 5971b88f3afc9fc7623b7ef692a1adda67464014
5
5
  SHA512:
6
- metadata.gz: 1ed5c3c05f2ca4340ca79c1b4778ec82d2e613b7549ced492a197d14535335f7d3ff8b24f9d09c8af6c9076971c97e59ea20f77ffe6ea939016495ea15112f26
7
- data.tar.gz: b5bc47e22e78772a7579cdcbbbe9652b60da31cab3831ebb2e3885c73fe4c83e63de50bd7b0b86fec2fc9f067714eeb2580cd394d076bef4cddb021fc194ae5d
6
+ metadata.gz: bcfd6e73ce04b62abbe86bf4ced64a015293bb6c40552312f93cf9d56e0fe0382fc3f8f670912433b37bbde2f671364a5a7ffff3df4efc84c586ba43c7715d4e
7
+ data.tar.gz: 6a98aab4864122da12e64e1819ed45314eca693dac1b22065282d5c6ff1bda3cfd8af25e387dcc66bf4e59cbc293b89f22c090dbb490631fde86367be7675436
data/Gemfile CHANGED
@@ -9,3 +9,4 @@ gem 'rake'
9
9
  gem 'minitest'
10
10
  gem 'activesupport'
11
11
  gem 'rltk'
12
+ gem 'awesome_print'
@@ -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.3'
7
+ spec.version = '0.3.4'
8
8
  spec.authors = %w(Hanson Benjamin)
9
9
  spec.email = %w(jehokim@live.com)
10
10
  if spec.respond_to?(:metadata)
@@ -18,6 +18,7 @@ class KoreanCreditCardLexer < RLTK::Lexer
18
18
  rule(/[\p{Hangul}\*]{2,4}님/) { |t| [:user_name, t]}
19
19
  rule(/누적[\s:\-]?[\d,\-]+원/) { |t| [:money_total, t.to_num] }
20
20
  rule(/누적-[\d,\-]+원/) { |t| [:money_total, t.to_num] }
21
+ rule(/잔액[\d,\-]+원?/) { |t| [:remain_total, t.to_num] }
21
22
  rule(/[\d,\-]+원?/) { |t| [:money, t.to_num] }
22
23
  rule(/\(주\)\p{Hangul}+/) {|t| [:shop_name, t[3..-1]]}
23
24
  rule(/\p{Hangul}+\([\d\*]{4}\)/) {|t| [:card, t]}
@@ -41,6 +42,7 @@ class KoreanCreditCardLexer < RLTK::Lexer
41
42
  rule(/\s/) {|t| [:space, t]}
42
43
  end
43
44
 
45
+ require 'awesome_print'
44
46
  module CreditCardSmsParser
45
47
  CARD_MAP = {
46
48
  '15776200' => '현대카드',
@@ -63,7 +65,7 @@ module CreditCardSmsParser
63
65
  end
64
66
 
65
67
  h.reject {|key, _|
66
- key == :header || key == :type || key == :punctuation || key == :space
68
+ key == :header || key == :type || key == :punctuation || key == :space || key == :EOS
67
69
  }
68
70
  end
69
71
  end
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.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hanson