kakasi 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: d07c817b6d00ce7eb000d93d9e9762b792ace073
4
- data.tar.gz: b8130607990cd6249715a192ae7e4bed52ddf31a
3
+ metadata.gz: 66d7391e47bb8403e1b2c4711dc44adf48cbff50
4
+ data.tar.gz: 0aac6eb3409293b0151931accfb7d59871895f23
5
5
  SHA512:
6
- metadata.gz: 48184c68e9d538bd79ffd63b8e8413b4f3f71ad8538db2cb523ec12e888ad2aa822101d5bc1d1c66b1784451e641670f5fc3f450452ec406bf9774d60e36b84e
7
- data.tar.gz: 91d0cc0e73b284d0baff1eccfbf02d0613b2a5f16adeab3a131295354b64f859066aa40a5719d7594179a5712b4b22bd150eb77dc26d6506ff27a6faada67f9e
6
+ metadata.gz: 5da52e4274de105c3820fab94dca18ce7f273354a7ac6ccbb4e57a45e3bc5400a06f14ad637587367a9510e2053d2341878d108d97434be325eb5957e2c389d6
7
+ data.tar.gz: 78d8247745fb951906e9a53d05f4a1a9654466e1d8c62483073df834e5d286ab5ce5a3c2d6f2d112a876515bdf7a6b41244503fcea26ea56ccabb354e2a1240c
@@ -3,7 +3,7 @@ language: ruby
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - 2.1.2
6
+ - 2.1.3
7
7
  - ruby-head
8
8
  - jruby-19mode
9
9
  - jruby-head
@@ -55,7 +55,7 @@ module KakasiExtConf
55
55
  }
56
56
  puts libkakasi
57
57
  rescue LoadError
58
- puts 'FAILED!'
58
+ puts 'failed -- libkakasi is not found'
59
59
  exit false
60
60
  end
61
61
 
@@ -27,7 +27,7 @@ module Kakasi
27
27
 
28
28
  DEFLIBPATH =
29
29
  begin
30
- [RbConfig::CONFIG['libir']] |
30
+ [RbConfig::CONFIG['libdir']] |
31
31
  case RbConfig::CONFIG['host_os']
32
32
  when /mingw|mswin/i
33
33
  []
@@ -36,24 +36,37 @@ module Kakasi
36
36
  end
37
37
  end.freeze
38
38
 
39
- def self.map_library_name(name)
40
- "#{LIBPREFIX}#{name}.#{LIBSUFFIX}"
41
- end
42
-
43
- def self.try_load(libpath = LIBPATH)
44
- basename = map_library_name('kakasi')
45
- (libpath | DEFLIBPATH).each { |dir|
46
- begin
39
+ class << self
40
+ def try_load(libpath = LIBPATH)
41
+ basename = map_library_name('kakasi')
42
+ (libpath | DEFLIBPATH).each { |dir|
47
43
  filename = File.join(dir, basename)
48
- yield filename
44
+ begin
45
+ yield filename
46
+ rescue LoadError
47
+ next
48
+ rescue
49
+ next
50
+ end
49
51
  return filename
50
- rescue LoadError, StandardError
51
- next
52
+ }
53
+
54
+ begin
55
+ yield basename
56
+ rescue LoadError
57
+ raise
58
+ rescue
59
+ raise LoadError, $!.message
52
60
  end
53
- }
54
61
 
55
- yield basename
56
- return basename
62
+ return basename
63
+ end
64
+
65
+ private
66
+
67
+ def map_library_name(name)
68
+ "#{LIBPREFIX}#{name}.#{LIBSUFFIX}"
69
+ end
57
70
  end
58
71
  end
59
72
  end
@@ -1,4 +1,4 @@
1
1
  module Kakasi
2
2
  KAKASI_VERSION = '2002-09-28'
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kakasi
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
  - Akinori MUSHA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-10 00:00:00.000000000 Z
11
+ date: 2014-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake