[ruby-oci8-commit] [575] trunk/ruby-oci8: Use Dir. glob to find the Oracle instant client NLS data file.

nobody at rubyforge.org nobody at rubyforge.org
Sat Aug 24 13:21:18 UTC 2013


Revision: 575
Author:   kubo
Date:     2013-08-24 13:21:17 +0000 (Sat, 24 Aug 2013)
Log Message:
-----------
Use Dir.glob to find the Oracle instant client NLS data file.
Its name depends on the Oracle major version on Windows.

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/ext/oci8/oraconf.rb

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2013-08-03 13:00:00 UTC (rev 574)
+++ trunk/ruby-oci8/ChangeLog	2013-08-24 13:21:17 UTC (rev 575)
@@ -1,3 +1,8 @@
+2013-08-24  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/oraconf.rb: Use Dir.glob to find the Oracle instant client
+	    NLS data file. Its name depends on the Oracle major version on
+	    Windows.
+
 2013-08-03  KUBO Takehiro  <kubo at jiubao.org>
 	* lib/oci8/metadata.rb: fix undefined method 'char_used?' when
 	    OCI8::Metadata::Argument#inspect is called.

Modified: trunk/ruby-oci8/ext/oci8/oraconf.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/oraconf.rb	2013-08-03 13:00:00 UTC (rev 574)
+++ trunk/ruby-oci8/ext/oci8/oraconf.rb	2013-08-24 13:21:17 UTC (rev 575)
@@ -391,7 +391,7 @@
     when /mswin32|cygwin|mingw32|bccwin32/
       oci_basename = 'oci'
       oci_glob_postfix = ''
-      nls_data_basename = ['oraociei11', 'oraociicus11', 'oraociei10', 'oraociicus10']
+      nls_data_basename = ['oraociei*', 'oraociicus*']
       @@ld_envs = %w[PATH]
       so_ext = 'dll'
       check_proc = make_proc_to_check_cpu(is_32bit ? :i386 : :x86_64)
@@ -523,7 +523,7 @@
     if ld_path
       nls_data_ext ||= so_ext # nls_data_ext is same with so_ext by default.
       nls_data_basename.each do |basename|
-        if File.exist?(File.join(ld_path, "#{basename}.#{nls_data_ext}"))
+        if Dir.glob(File.join(ld_path, "#{basename}.#{nls_data_ext}")).size > 0
           puts "  #{file} looks like an instant client."
           return ld_path
         end



More information about the ruby-oci8-commit mailing list