[DRE-commits] [ruby-kakasi-ffi] 01/07: Imported Upstream version 1.0.2

zeha at debian.org zeha at debian.org
Thu Feb 25 00:13:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

zeha pushed a commit to branch master
in repository ruby-kakasi-ffi.

commit a38d0e39ae6cea05ce4a4b1f28d111b35e6efdc9
Author: Christian Hofstaedtler <zeha at debian.org>
Date:   Wed Feb 24 23:43:23 2016 +0000

    Imported Upstream version 1.0.2
---
 .travis.yml                  |  2 +-
 ext/kakasi-config/extconf.rb |  2 +-
 lib/kakasi/platform.rb       | 43 ++++++++++++++++++++++++++++---------------
 lib/kakasi/version.rb        |  2 +-
 metadata.yml                 |  4 ++--
 5 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a1e9ceb..a7b4a88 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ language: ruby
 rvm:
 - 1.9.3
 - 2.0.0
-- 2.1.2
+- 2.1.3
 - ruby-head
 - jruby-19mode
 - jruby-head
diff --git a/ext/kakasi-config/extconf.rb b/ext/kakasi-config/extconf.rb
index 81a7c39..db03360 100644
--- a/ext/kakasi-config/extconf.rb
+++ b/ext/kakasi-config/extconf.rb
@@ -55,7 +55,7 @@ module KakasiExtConf
     }
     puts libkakasi
   rescue LoadError
-    puts 'FAILED!'
+    puts 'failed -- libkakasi is not found'
     exit false
   end
 
diff --git a/lib/kakasi/platform.rb b/lib/kakasi/platform.rb
index 965d74c..a2de9d3 100644
--- a/lib/kakasi/platform.rb
+++ b/lib/kakasi/platform.rb
@@ -27,7 +27,7 @@ module Kakasi
 
     DEFLIBPATH =
       begin
-        [RbConfig::CONFIG['libir']] |
+        [RbConfig::CONFIG['libdir']] |
           case RbConfig::CONFIG['host_os']
           when /mingw|mswin/i
             []
@@ -36,24 +36,37 @@ module Kakasi
           end
       end.freeze
 
-    def self.map_library_name(name)
-      "#{LIBPREFIX}#{name}.#{LIBSUFFIX}"
-    end
-
-    def self.try_load(libpath = LIBPATH)
-      basename = map_library_name('kakasi')
-      (libpath | DEFLIBPATH).each { |dir|
-        begin
+    class << self
+      def try_load(libpath = LIBPATH)
+        basename = map_library_name('kakasi')
+        (libpath | DEFLIBPATH).each { |dir|
           filename = File.join(dir, basename)
-          yield filename
+          begin
+            yield filename
+          rescue LoadError
+            next
+          rescue
+            next
+          end
           return filename
-        rescue LoadError, StandardError
-          next
+        }
+
+        begin
+          yield basename
+        rescue LoadError
+          raise
+        rescue
+          raise LoadError, $!.message
         end
-      }
 
-      yield basename
-      return basename
+        return basename
+      end
+
+      private
+
+      def map_library_name(name)
+        "#{LIBPREFIX}#{name}.#{LIBSUFFIX}"
+      end
     end
   end
 end
diff --git a/lib/kakasi/version.rb b/lib/kakasi/version.rb
index a63d5e8..308c2a4 100644
--- a/lib/kakasi/version.rb
+++ b/lib/kakasi/version.rb
@@ -1,4 +1,4 @@
 module Kakasi
   KAKASI_VERSION = '2002-09-28'
-  VERSION = '1.0.1'
+  VERSION = '1.0.2'
 end
diff --git a/metadata.yml b/metadata.yml
index 1379ac5..0a65dff 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: kakasi
 version: !ruby/object:Gem::Version
-  version: 1.0.1
+  version: 1.0.2
 platform: ruby
 authors:
 - Akinori MUSHA
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2014-07-10 00:00:00.000000000 Z
+date: 2014-10-13 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-kakasi-ffi.git



More information about the Pkg-ruby-extras-commits mailing list