cbeta 2.5.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cbeta.rb +5 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43e526410db11a40ec536656bbbdcf6b382d4575e14b8c129fb61fb8bfbd7893
4
- data.tar.gz: 7f51a31cfe36711c031e6479662b0787f38d3348632376877132c9c371f75be9
3
+ metadata.gz: dc20cbb09d4047f0b3c7da48478a6ffbdbef5b179eeb3f491805b7f2485fbedb
4
+ data.tar.gz: f56ab3270a638c8041116486c45eefd6c9751b5181bde7d7dacf492d99870996
5
5
  SHA512:
6
- metadata.gz: a0018a87e49e434b4de74dd45c50cfbc01e7f3e26bb1d4cbad0425420c3be32b423efd4a0bc2a47c33e596eec97b13d63e23e2b049ce2847e438adfac33186e4
7
- data.tar.gz: 3a3462277ede2a765ca004f8e57641a561e8a0d1269521dd39d3f1c85f3c14de012514ab42496c4aa84dd51854ea5474c237b07334be968956dcf9508e4fe4f7
6
+ metadata.gz: d2c71fcca220602fcb9f5ac69689da4a1293d9a7f345febf60ee8dcfdbff1a157d65729f00239fafd1f47713b9446a35ff423bea6fd1c50cb813c8134dfb7687
7
+ data.tar.gz: 2517569bc615739f88e6b712b3d6509463384f88152d4ce0201120767c1eae7fb6d65d51b395963a459deaaf2172df9f08b97ac883369aebcbaefe958bc2a698
@@ -7,7 +7,7 @@ require 'csv'
7
7
 
8
8
  class CBETA
9
9
  CANON = 'DA|GA|GB|ZS|ZW|[A-Z]'
10
- SORT_ORDER = %w(T X A K S F C D U P J L G M N ZS I ZW B GA GB)
10
+ SORT_ORDER = %w(T X A K S F C D U P J L G M N ZS I ZW B GA GB Y)
11
11
  DATA = File.join(File.dirname(__FILE__), 'data')
12
12
  PUNCS = ',.()[] 。.,、;?!:()「」『』《》<>〈〉〔〕[]【】〖〗…— '
13
13
 
@@ -80,7 +80,10 @@ class CBETA
80
80
  def self.get_sort_order_from_canon_id(canon)
81
81
  # CBETA 提供,惠敏法師最後決定的全文檢索順序表, 2016-06-03
82
82
  i = SORT_ORDER.index(canon)
83
- abort "unknown canon id: #{canon}" if i.nil?
83
+ if i.nil?
84
+ puts "unknown canon id: #{canon}"
85
+ return nil
86
+ end
84
87
 
85
88
  (i + 'A'.ord).chr
86
89
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Chou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-31 00:00:00.000000000 Z
11
+ date: 2018-04-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby gem for use Chinese Buddhist Text resources made by CBETA (http://www.cbeta.org).
14
14
  email: zhoubx@gmail.com