[ruby-oci8-commit] [511] trunk/ruby-oci8: fix documents

nobody at rubyforge.org nobody at rubyforge.org
Sun Apr 22 09:56:15 UTC 2012


Revision: 511
Author:   kubo
Date:     2012-04-22 09:56:15 +0000 (Sun, 22 Apr 2012)
Log Message:
-----------
fix documents

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/NEWS
    trunk/ruby-oci8/dist-files
    trunk/ruby-oci8/docs/platform-specific-issues.md
    trunk/ruby-oci8/lib/oci8/bindtype.rb
    trunk/ruby-oci8/lib/oci8/connection_pool.rb
    trunk/ruby-oci8/lib/oci8/object.rb
    trunk/ruby-oci8/lib/oci8/properties.rb
    trunk/ruby-oci8/ruby-oci8.gemspec

Added Paths:
-----------
    trunk/ruby-oci8/.yardopts
    trunk/ruby-oci8/README.md
    trunk/ruby-oci8/docs/install-binary-package.md
    trunk/ruby-oci8/docs/report-installation-issue.md

Removed Paths:
-------------
    trunk/ruby-oci8/README

Added: trunk/ruby-oci8/.yardopts
===================================================================
--- trunk/ruby-oci8/.yardopts	                        (rev 0)
+++ trunk/ruby-oci8/.yardopts	2012-04-22 09:56:15 UTC (rev 511)
@@ -0,0 +1,13 @@
+--protected
+--no-private
+--exclude ext/oci8/apiwrap.rb
+--exclude ext/oci8/oraconf.rb
+--exclude lib/oci8/compat.rb
+--exclude lib/dbd
+-
+NEWS
+docs/install-full-client.md
+docs/install-instant-client.md
+docs/install-binary-package.md
+docs/platform-specific-issues.md
+docs/report-installation-issue.md

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/ChangeLog	2012-04-22 09:56:15 UTC (rev 511)
@@ -1,3 +1,13 @@
+2012-04-22  KUBO Takehiro  <kubo at jiubao.org>
+	* NEWS: add changes between 2.1.0 and 2.1.1.
+	* README -> README.md: renamed.
+	* .yardopts: added for yard.
+	* docs/install-binary-package.md, docs/report-installation-issue.md:
+	    added.
+	* docs/platform-specific-issues.md, lib/oci8/bindtype.rb, lib/oci8/connection_pool.rb
+	  lib/oci8/object.rb, lib/oci8/properties.rb: fix documents.
+	* ruby-oci8.gemspec, dist-files: fix for renamed and added files.
+
 2012-04-21  KUBO Takehiro  <kubo at jiubao.org>
 	* test/test_datetime.rb: fix to pass tests on ruby 1.9.1 and earlier.
 

Modified: trunk/ruby-oci8/NEWS
===================================================================
--- trunk/ruby-oci8/NEWS	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/NEWS	2012-04-22 09:56:15 UTC (rev 511)
@@ -1,5 +1,51 @@
 # @markup markdown
 
+2.1.1
+=====
+
+New Features
+------------
+
+### Statement caching in OCI
+
+See {http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#i471377}.
+This feature is enabled only when the Oracle client is 9iR2 or upper.
+
+The default cache size is 20. It can be changed as follows.
+
+    # change the size to 100.
+    OCI8.properties[:statement_cache_size] = 100
+
+Specification changes
+---------------------
+
+### OCI8::LOB#read() returns an empty string '' when it is an empty lob.
+
+It had been returned nil.
+
+Fixed Issues
+------------
+
+-   OCI8::CLOB.new(conn, '') works now.
+
+-   fix core dump when calling PL/SQL procedure with cursor argument.
+    See: {https://github.com/kubo/ruby-oci8/issues/11}
+
+    (reported by Raimonds Simanovskis)
+
+-   fix testcase failures in DST.
+    See: {https://github.com/kubo/ruby-oci8/issues/8}
+
+    (reported by Yasuo Honda)
+
+-   fix a compilation issue on Redhat.
+
+    (reported by John Beckwith and others)
+
+-   fix "wrong number of arguments (1 for 2)" when a date member in a object type is accessed.
+
+    (repored by Leoš Bitto)
+
 2.1.0
 =====
 

Deleted: trunk/ruby-oci8/README
===================================================================
--- trunk/ruby-oci8/README	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/README	2012-04-22 09:56:15 UTC (rev 511)
@@ -1,5 +0,0 @@
-Ruby-oci8 is a ruby interface for Oracle using OCI8 API. 
-The latest version (2.1.x) works with Oracle9i or later.
-Use ruby-oci8 2.0.6 or earlier for Oracle 8.
-
-See: http://ruby-oci8.rubyforge.org

Copied: trunk/ruby-oci8/README.md (from rev 497, trunk/ruby-oci8/README)
===================================================================
--- trunk/ruby-oci8/README.md	                        (rev 0)
+++ trunk/ruby-oci8/README.md	2012-04-22 09:56:15 UTC (rev 511)
@@ -0,0 +1,36 @@
+# @markup markdown
+
+What is ruby-oci8
+=================
+
+Ruby-oci8 is a ruby interface for Oracle Database. The latest version
+is available for all Oracle versions after Oracle 9i including Oracle
+Instant Client.
+
+If you need to use Oracle 8, use ruby-oci8 2.0.6.
+
+As for Oracle7, use Oracle7 Module for Ruby by Yoshida Masato.
+
+What's new
+==========
+
+See {file:NEWS}.
+
+Sample one-liner
+================
+
+Connect to scott/tiger, select `emp` and print as CSV format.
+
+    ruby -r oci8 -e "OCI8.new('scott', 'tiger').exec('select * from emp') do |r| puts r.join(','); end"
+
+If you install a ruby-oci8 gem package, you may need to add `-rubygems` before `-r oci8`.
+
+Installation
+============
+
+Look at the followings:
+
+* {file:docs/install-full-client.md}
+* {file:docs/install-instant-client.md}
+* {file:docs/install-binary-package.md}
+

Modified: trunk/ruby-oci8/dist-files
===================================================================
--- trunk/ruby-oci8/dist-files	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/dist-files	2012-04-22 09:56:15 UTC (rev 511)
@@ -1,16 +1,18 @@
 ChangeLog
 Makefile
 NEWS
-README
+README.md
 VERSION
 dist-files
 metaconfig
 pre-distclean.rb
 ruby-oci8.gemspec
 setup.rb
+docs/install-binary-package.md
 docs/install-full-client.md
 docs/install-instant-client.md
 docs/platform-specific-issues.md
+docs/report-installation-issue.md
 ext/oci8/.document
 ext/oci8/MANIFEST
 ext/oci8/apiwrap.c.tmpl

Added: trunk/ruby-oci8/docs/install-binary-package.md
===================================================================
--- trunk/ruby-oci8/docs/install-binary-package.md	                        (rev 0)
+++ trunk/ruby-oci8/docs/install-binary-package.md	2012-04-22 09:56:15 UTC (rev 511)
@@ -0,0 +1,40 @@
+# @title Install Binary Package
+
+Windows 32-bit (mingw32 ruby)
+=============================
+
+Run the following command:
+
+    gem install ruby-oci8
+
+Windows 32-bit (mswin32 ruby)
+=============================
+
+Run the following command:
+
+    gem install --platform x86-mingw32 ruby-oci8
+
+Ruby-oci8 gem for x86-mingw32 works on mswin32 ruby.
+If it doesn't work, see {file:docs/install-instant-client.md} or {file:docs/install-full-client.md}.
+
+Other platforms
+===============
+
+We doesn't make binary gems for other platforms.
+If you need to distribute a binary gem, compile ruby-oci8 and run the following command.
+
+    gem build ruby-oci8.gemspec -- current
+
+Note that you need to compile it on the oldest versions of the platform you support
+and for the oldest versions of the Oracle databases.
+
+If you could not fix the Oracle versions, compile ruby-oci8 and make a gem as follows:
+
+    gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf -
+    cd ruby-oci8-VERSION
+    ruby setup.rb config -- --with-runtime-check
+    make
+    gem build ruby-oci8.gemspec -- current
+
+When the option `--with-runtime-check` is set, ruby-oci8 checks the Oracle version
+and available OCI functions at runtime.

Modified: trunk/ruby-oci8/docs/platform-specific-issues.md
===================================================================
--- trunk/ruby-oci8/docs/platform-specific-issues.md	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/docs/platform-specific-issues.md	2012-04-22 09:56:15 UTC (rev 511)
@@ -8,12 +8,12 @@
 
 If the following error occurs even though libc6-dev is installed,
 
-  Do you install glibc-devel(redhat) or libc6-dev(debian)?
-  You need /usr/include/sys/types.h to compile ruby-oci8.
+    Do you install glibc-devel(redhat) or libc6-dev(debian)?
+    You need /usr/include/sys/types.h to compile ruby-oci8.
 
 You need to use ruby-oci8 2.1.0 or upper. Otherwise, run the following command and re-install ruby-oci8.
 
- $ sudo ln -s /usr/include/linux/ /usr/include/sys
+    $ sudo ln -s /usr/include/linux/ /usr/include/sys
 
 General Linux
 -------------
@@ -37,12 +37,13 @@
 OS X 10.7 Lion
 --------------
 
-64-bit instant client doesn't work. Use 32-bit instant client or jruby.
+64-bit instant client doesn't work. Use 32-bit ruby and instant client or jruby.
 
 See:
-* http://rubyforge.org/forum/forum.php?thread_id=49548&forum_id=1078
-* https://forums.oracle.com/forums/thread.jspa?threadID=2187558
 
+* {http://rubyforge.org/forum/forum.php?thread\_id=49548&forum\_id=1078}
+* {https://forums.oracle.com/forums/thread.jspa?threadID=2187558}
+
 Intel Mac (64-bit)
 ------------------
 

Added: trunk/ruby-oci8/docs/report-installation-issue.md
===================================================================
--- trunk/ruby-oci8/docs/report-installation-issue.md	                        (rev 0)
+++ trunk/ruby-oci8/docs/report-installation-issue.md	2012-04-22 09:56:15 UTC (rev 511)
@@ -0,0 +1,50 @@
+# @title Report Installation Issues
+
+Look at {file:docs/platform-specific-issues.md},
+[the issues page on github][github] and [the ruby-oci8 help forum on rubyforge][rubyforge]
+to check whether your issue is fixed or not.
+
+If it is a new one, post the following information to [github][] or [rubyforge][].
+
+[github]: https://github.com/kubo/ruby-oci8/issues
+[rubyforge]: http://rubyforge.org/forum/forum.php?forum_id=1078
+
+*    Messages printed out to the console
+
+*    `gem_make.out` if you install a gem
+
+*    Last 100 lines of 'ext/oci8/mkmf.log'
+
+     Get them as follows.
+
+         tail -100 ext/oci8/mkmf.log
+
+*    The results of the following commands:
+
+         file `which ruby`
+         ruby --version
+         ruby -r rbconfig -e "p Config::CONFIG['host']"
+         ruby -r rbconfig -e "p Config::CONFIG['CC']"
+         ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']"
+         ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']"
+         ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']"
+         ruby -r rbconfig -e "p Config::CONFIG['DLDLAGS']"
+         ruby -r rbconfig -e "p Config::CONFIG['LIBS']"
+         ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']"
+         
+         # if you use gcc,
+         gcc --print-prog-name=ld
+         gcc --print-prog-name=as
+         
+         # Oracle full client
+         file $ORACLE_HOME/bin/oracle
+         
+         # Oracle Instant client. You need to change INSTANT_CLIENT_DIRECTORY.
+         file INSTANT_CLIENT_DIRECTORY/libclntsh.*
+         
+         echo $LD_LIBRARY_PATH
+         echo $LIBPATH              # AIX
+         echo $SHLIB_PATH           # HP-UX PA-RISC 32-bit ruby
+         echo $DYLD_LIBRARY_PATH    # Mac OS X
+         echo $LD_LIBRARY_PATH_32   # Solaris 32-bit ruby
+         echo $LD_LIBRARY_PATH_64   # Solaris 64-bit ruby

Modified: trunk/ruby-oci8/lib/oci8/bindtype.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/bindtype.rb	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/lib/oci8/bindtype.rb	2012-04-22 09:56:15 UTC (rev 511)
@@ -4,6 +4,7 @@
 # Copyright (C) 2009-2011 KUBO Takehiro <kubo at jiubao.org>
 #++
 
+#
 class OCI8
   module BindType
     Mapping = {}

Modified: trunk/ruby-oci8/lib/oci8/connection_pool.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/connection_pool.rb	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/lib/oci8/connection_pool.rb	2012-04-22 09:56:15 UTC (rev 511)
@@ -4,6 +4,7 @@
 # Copyright (C) 2010 KUBO Takehiro <kubo at jiubao.org>
 #++
 
+#
 class OCI8
 
   # Connection pooling is the use of a group (the pool) of reusable

Modified: trunk/ruby-oci8/lib/oci8/object.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/object.rb	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/lib/oci8/object.rb	2012-04-22 09:56:15 UTC (rev 511)
@@ -5,11 +5,17 @@
 
 class OCI8
 
+  # Returns the type descriptor object which correspond to the given class.
+  #
+  # @param [class of an OCI8::Object::Base's subclass]
+  # @return [OCI8::TDO]
+  #
+  # @private
   def get_tdo_by_class(klass)
     @id_to_tdo ||= {}
     @name_to_tdo ||= {}
     tdo = @name_to_tdo[klass.typename]
-    return tdo if tdo
+    return tdo if tdo # found in the cache.
 
     metadata = describe_any(klass.typename)
     if metadata.is_a? OCI8::Metadata::Synonym
@@ -21,6 +27,12 @@
     OCI8::TDO.new(self, metadata, klass)
   end
 
+  # Returns the type descriptor object which correspond to the given metadata.
+  #
+  # @param [OCI8::Metadata::Base's subclass]
+  # @return [OCI8::TDO]
+  #
+  # @private
   def get_tdo_by_metadata(metadata)
     @id_to_tdo ||= {}
     @name_to_tdo ||= {}
@@ -59,7 +71,10 @@
     OCI8::TDO.new(self, metadata, klass)
   end
 
-  class BindArgumentHelper # :nodoc:
+  # A helper class to bind arguments.
+  #
+  # @private
+  class BindArgumentHelper
     attr_reader :arg_str
     def initialize(*args)
       if args.length == 1 and args[0].is_a? Hash
@@ -102,12 +117,14 @@
       @@name_to_class = {}
       @@default_connection = nil
 
+      # @private
       def self.inherited(klass)
         name = klass.to_s.gsub(/^.*::/, '').gsub(/([a-z\d])([A-Z])/,'\1_\2').upcase
         @@class_to_name[klass] = name
         @@name_to_class[name] = klass
       end
 
+      # @private
       def self.get_class_by_typename(name)
         @@name_to_class[name]
       end
@@ -125,6 +142,7 @@
         @@name_to_class[name] = self
       end
 
+      # @deprecated
       def self.default_connection=(con)
         @@default_connection = con
       end
@@ -158,6 +176,8 @@
       end
 
       # class method
+
+      # @private
       def self.method_missing(method_id, *args)
         if args[0].is_a? OCI8
           con = args.shift
@@ -204,6 +224,8 @@
       end
 
       # instance method
+
+      # @private
       def method_missing(method_id, *args)
         if @attributes.is_a? Array
           return @attributes if method_id == :to_ary
@@ -283,13 +305,14 @@
     end # OCI8::Object::Base
   end # OCI8::Object
 
+  # @private
   class TDO
     # full-qualified object type name.
     #  e.g.
     #   MDSYS.SDO_GEOMETRY
     attr_reader :typename
 
-    # named_type
+    # a subclass of OCI8::Object::Base
     attr_reader :ruby_class
 
     attr_reader :val_size
@@ -495,6 +518,7 @@
     end
   end
 
+  # @private
   class NamedType
     def to_value
       return nil if self.null?
@@ -528,6 +552,7 @@
     end
   end
 
+  # @private
   class NamedCollection
     def to_value
       attr = self.attributes

Modified: trunk/ruby-oci8/lib/oci8/properties.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/properties.rb	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/lib/oci8/properties.rb	2012-04-22 09:56:15 UTC (rev 511)
@@ -2,6 +2,7 @@
 #
 # Copyright (C) 2010-2011 KUBO Takehiro <kubo at jiubao.org>
 
+#
 class OCI8
 
   @@properties = {

Modified: trunk/ruby-oci8/ruby-oci8.gemspec
===================================================================
--- trunk/ruby-oci8/ruby-oci8.gemspec	2012-04-21 12:03:15 UTC (rev 510)
+++ trunk/ruby-oci8/ruby-oci8.gemspec	2012-04-22 09:56:15 UTC (rev 511)
@@ -31,7 +31,7 @@
   s.description = <<EOS
 ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available with Oracle8, Oracle8i, Oracle9i, Oracle10g and Oracle Instant Client.
 EOS
-  s.has_rdoc = true
+  s.has_rdoc = 'yard'
   s.authors = ['KUBO Takehiro']
   s.platform = gem_platform
   files = File.read('dist-files').split("\n")
@@ -67,8 +67,8 @@
     end
     files << 'lib/oci8.rb'
   end
+  s.require_paths = ['lib', 'ext/oci8']
   s.files = files
   s.test_files = 'test/test_all.rb'
-  s.rdoc_options = ['--main', 'README']
-  s.extra_rdoc_files = ['README']
+  s.extra_rdoc_files = ['README.md']
 end



More information about the ruby-oci8-commit mailing list