[ruby-oci8-commit] [264] branches/ruby-oci8-1.0: * NEWS: add changes between 1.0.1 and 1.0.2.
nobody at rubyforge.org
nobody at rubyforge.org
Thu Jun 26 10:21:07 EDT 2008
Revision: 264
Author: kubo
Date: 2008-06-26 10:21:06 -0400 (Thu, 26 Jun 2008)
Log Message:
-----------
* NEWS: add changes between 1.0.1 and 1.0.2.
* VERSION: change version to 1.0.2.
* Makefile: add targets 'gem' and 'binary_gem' to make pure ruby
and binary gems.
* ruby-oci8.spec: rename to ruby-oci8.spec.in.
* ruby-oci8.spec.in: rename from ruby-oci8.spec and set version
string from 'VERSION' file.
* ruby-oci8.gemspec: added.
* dist-files: add files to ruby-oci8 source packages for gemspec.
* test/test_clob.rb: fix to pass tests in a deep directory.
Modified Paths:
--------------
branches/ruby-oci8-1.0/ChangeLog
branches/ruby-oci8-1.0/Makefile
branches/ruby-oci8-1.0/NEWS
branches/ruby-oci8-1.0/VERSION
branches/ruby-oci8-1.0/dist-files
branches/ruby-oci8-1.0/test/test_clob.rb
Added Paths:
-----------
branches/ruby-oci8-1.0/ruby-oci8.gemspec
branches/ruby-oci8-1.0/ruby-oci8.spec.in
Removed Paths:
-------------
branches/ruby-oci8-1.0/ruby-oci8.spec
Property Changed:
----------------
branches/ruby-oci8-1.0/
Property changes on: branches/ruby-oci8-1.0
___________________________________________________________________
Name: svn:ignore
- config.save
sqlnet.log
+ config.save
sqlnet.log
ruby-oci8.spec
Modified: branches/ruby-oci8-1.0/ChangeLog
===================================================================
--- branches/ruby-oci8-1.0/ChangeLog 2008-06-24 09:36:18 UTC (rev 263)
+++ branches/ruby-oci8-1.0/ChangeLog 2008-06-26 14:21:06 UTC (rev 264)
@@ -1,3 +1,15 @@
+2008-06-26 KUBO Takehiro <kubo at jiubao.org>
+ * NEWS: add changes between 1.0.1 and 1.0.2.
+ * VERSION: change version to 1.0.2.
+ * Makefile: add targets 'gem' and 'binary_gem' to make pure ruby
+ and binary gems.
+ * ruby-oci8.spec: rename to ruby-oci8.spec.in.
+ * ruby-oci8.spec.in: rename from ruby-oci8.spec and set version
+ string from 'VERSION' file.
+ * ruby-oci8.gemspec: added.
+ * dist-files: add files to ruby-oci8 source packages for gemspec.
+ * test/test_clob.rb: fix to pass tests in a deep directory.
+
2008-06-24 KUBO Takehiro <kubo at jiubao.org>
* ext/oci8/handle.c: fix a segv bug in gc mark. (Thanks to authorNari)
* ext/oci8/oraconf.rb: fix for windows Oracle 11g instant client.
Modified: branches/ruby-oci8-1.0/Makefile
===================================================================
--- branches/ruby-oci8-1.0/Makefile 2008-06-24 09:36:18 UTC (rev 263)
+++ branches/ruby-oci8-1.0/Makefile 2008-06-26 14:21:06 UTC (rev 264)
@@ -1,5 +1,6 @@
VERSION = `cat VERSION`
RUBY = ruby
+GEM = gem
CONFIG_OPT =
all: build
@@ -27,8 +28,14 @@
site-install:
$(RUBY) setup.rb install
+gem:
+ $(GEM) build ruby-oci8.gemspec
+
+binary_gem: build
+ $(GEM) build ruby-oci8.gemspec -- current
+
# internal use only
-dist:
+dist: ruby-oci8.spec
-rm -rf ruby-oci8-$(VERSION)
mkdir ruby-oci8-$(VERSION)
tar cf - `cat dist-files` | (cd ruby-oci8-$(VERSION); tar xf - )
@@ -39,3 +46,6 @@
cd ruby-oci8-$(VERSION) && $(MAKE) RUBY="$(RUBY)" check
cd ruby-oci8-$(VERSION)/src && $(MAKE) RUBY="$(RUBY)" sitearchdir=../work sitelibdir=../work site-install
cd ruby-oci8-$(VERSION)/test && $(RUBY) -I../work -I../support test_all.rb
+
+ruby-oci8.spec: ruby-oci8.spec.in
+ $(RUBY) -rerb -e "open('ruby-oci8.spec', 'w').write(ERB.new(open('ruby-oci8.spec.in').read).result)"
Modified: branches/ruby-oci8-1.0/NEWS
===================================================================
--- branches/ruby-oci8-1.0/NEWS 2008-06-24 09:36:18 UTC (rev 263)
+++ branches/ruby-oci8-1.0/NEWS 2008-06-26 14:21:06 UTC (rev 264)
@@ -1,3 +1,18 @@
+1.0.2:
+
+1. add a gemspec file.
+ (Thanks to Jesse Hu)
+
+ To make a pure ruby gems package:
+ gem build ruby-oci8.gemspec
+
+ To make a binary gems package:
+ gem build ruby-oci8.gemspec -- current
+
+
+2. [BUG FIX] fix a segv bug in gc mark.
+ (Thanks to authorNari)
+
1.0.1:
1. [SPEC CHANGE] OCI8#exec and OCI8::Cursor#exec's return value is changed
Modified: branches/ruby-oci8-1.0/VERSION
===================================================================
--- branches/ruby-oci8-1.0/VERSION 2008-06-24 09:36:18 UTC (rev 263)
+++ branches/ruby-oci8-1.0/VERSION 2008-06-26 14:21:06 UTC (rev 264)
@@ -1 +1 @@
-1.0.1
\ No newline at end of file
+1.0.2
\ No newline at end of file
Modified: branches/ruby-oci8-1.0/dist-files
===================================================================
--- branches/ruby-oci8-1.0/dist-files 2008-06-24 09:36:18 UTC (rev 263)
+++ branches/ruby-oci8-1.0/dist-files 2008-06-26 14:21:06 UTC (rev 264)
@@ -3,9 +3,11 @@
Makefile
README
VERSION
+dist-files
metaconfig
pre-distclean.rb
ruby-oci8.spec
+ruby-oci8.gemspec
setup.rb
doc/api.en.html
doc/api.en.rd
Added: branches/ruby-oci8-1.0/ruby-oci8.gemspec
===================================================================
--- branches/ruby-oci8-1.0/ruby-oci8.gemspec (rev 0)
+++ branches/ruby-oci8-1.0/ruby-oci8.gemspec 2008-06-26 14:21:06 UTC (rev 264)
@@ -0,0 +1,54 @@
+# -*- ruby -*-
+#
+# To make a pure ruby gems package:
+# gem build ruby-oci8.gemspec
+#
+# To make a binary gems package:
+# gem build ruby-oci8.gemspec -- current
+#
+
+if ARGV.size > 3
+ gem_platform = ARGV[3]
+else
+ gem_platform = Gem::Platform::RUBY
+end
+
+spec = Gem::Specification.new do |s|
+ s.name = 'ruby-oci8'
+ s.version = File.read('VERSION').strip
+ s.summary = 'Ruby interface for Oracle using OCI8 API'
+ s.email = 'kubo at jiubao.org'
+ s.homepage = 'http://ruby-oci8.rubyforge.org'
+ s.rubyforge_project = 'ruby-oci8'
+ 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.autorequire = 'oci8'
+ s.has_rdoc = true
+ s.required_ruby_version = '~> 1.8.0'
+ s.authors = ['KUBO Takehiro']
+ s.platform = gem_platform
+ files = File.read('dist-files').split("\n")
+ if gem_platform == Gem::Platform::RUBY
+ s.require_paths = ['lib']
+ s.extensions << 'ext/oci8/extconf.rb'
+ else
+ s.require_paths = ['lib', 'ext/oci8']
+ # exclude C source files.
+ files.delete_if do |file|
+ file[0, 4] == 'ext/'
+ end
+ # check files created by a make command.
+ ['ext/oci8/oci8lib.so', 'lib/oci8.rb'].each do |file|
+ raise <<EOS unless File.exist?(file)
+#{file} doesn't exist. Run make in advance.
+EOS
+ #'
+ files << file
+ end
+ end
+ s.files = files
+ s.test_files = 'test/test_all.rb'
+ s.rdoc_options = ['--main', 'README', '--exclude', 'ext/*']
+ s.extra_rdoc_files = ['README']
+end
Deleted: branches/ruby-oci8-1.0/ruby-oci8.spec
===================================================================
--- branches/ruby-oci8-1.0/ruby-oci8.spec 2008-06-24 09:36:18 UTC (rev 263)
+++ branches/ruby-oci8-1.0/ruby-oci8.spec 2008-06-26 14:21:06 UTC (rev 264)
@@ -1,60 +0,0 @@
-%define ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
-%define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
-
-Summary: ruby interface for Oracle using OCI8 API
-Name: ruby-oci8
-Version: 1.0.0_rc2
-%define RealVersion 1.0.0-rc2
-Release: 1%{?dist}
-Group: Development/Libraries
-License: Ruby License
-URL: http://rubyforge.org/projects/ruby-oci8/
-Source0: http://rubyforge.org/frs/download.php/16630/%{name}-%{RealVersion}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
-Requires: ruby
-Requires: oracle-instantclient-basic
-BuildRequires: ruby
-BuildRequires: ruby-devel
-BuildRequires: oracle-instantclient-basic
-BuildRequires: oracle-instantclient-devel
-
-# Note: the oracle-instanclient-basic package should say
-# Provides: libclntsh.so.10.1
-# but it doesn't. So we have to turn off dependency checking in the
-# finished package. (Or else we could manually patch the package
-# using rpmrebuild)
-AutoReqProv: no
-
-%description
-Ruby/OCI8 is a ruby interface for Oracle using OCI8 API. It also provides
-a DBD driver for use with ruby-dbi, and is used by the ActiveRecord Oracle
-connection adapter.
-
-%prep
-%setup -q -n %{name}-%{RealVersion}
-
-%build
-CFLAGS="$RPM_OPT_FLAGS" \
-LD_LIBRARY_PATH="$(echo /usr/lib/oracle/*/client/lib | sed 's/^.* //')" \
-ruby setup.rb config -- --with-instant-client
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-ruby setup.rb --verbose install --prefix=$RPM_BUILD_ROOT
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-, root, root, -)
-%doc ChangeLog NEWS README
-%doc doc/api.en.html doc/manual.css
-
-%{ruby_sitelib}/oci8.rb
-%{ruby_sitelib}/DBD/OCI8/OCI8.rb
-%{ruby_sitearch}/oci8lib.so
-
-%changelog
-* Fri Mar 23 2007 Brian Candler <brian.candler at inspiredbroadcast.net> - 1.0.0_rc1-1
-- First cut
Copied: branches/ruby-oci8-1.0/ruby-oci8.spec.in (from rev 218, branches/ruby-oci8-1.0/ruby-oci8.spec)
===================================================================
--- branches/ruby-oci8-1.0/ruby-oci8.spec.in (rev 0)
+++ branches/ruby-oci8-1.0/ruby-oci8.spec.in 2008-06-26 14:21:06 UTC (rev 264)
@@ -0,0 +1,62 @@
+%define ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
+%define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
+
+Summary: ruby interface for Oracle using OCI8 API
+Name: ruby-oci8
+Version: <%=File.read('VERSION').strip%>
+Release: 1%{?dist}
+Group: Development/Libraries
+License: Ruby License
+URL: http://rubyforge.org/projects/ruby-oci8/
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
+Requires: ruby
+Requires: oracle-instantclient-basic
+BuildRequires: ruby
+BuildRequires: ruby-devel
+BuildRequires: oracle-instantclient-basic
+BuildRequires: oracle-instantclient-devel
+
+# Note: the oracle-instanclient-basic package should say
+# Provides: libclntsh.so.10.1
+# but it doesn't. So we have to turn off dependency checking in the
+# finished package. (Or else we could manually patch the package
+# using rpmrebuild)
+AutoReqProv: no
+
+%description
+Ruby/OCI8 is a ruby interface for Oracle using OCI8 API. It also provides
+a DBD driver for use with ruby-dbi, and is used by the ActiveRecord Oracle
+connection adapter.
+
+%prep
+%setup -q -n %{name}-%{Version}
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" \
+LD_LIBRARY_PATH="$(echo /usr/lib/oracle/*/client/lib | sed 's/^.* //')" \
+ruby setup.rb config -- --with-instant-client
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+ruby setup.rb --verbose install --prefix=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-, root, root, -)
+%doc ChangeLog NEWS README
+%doc doc/api.en.html doc/manual.css
+
+%{ruby_sitelib}/oci8.rb
+%{ruby_sitelib}/DBD/OCI8/OCI8.rb
+%{ruby_sitearch}/oci8lib.so
+
+%changelog
+* Thu Jun 26 2008 KUBO Takehiro <kubo at jiubao.org>
+- Thie file is made from ruby-oci8.spec.in by erb.
+
+* Fri Mar 23 2007 Brian Candler <brian.candler at inspiredbroadcast.net> - 1.0.0_rc1-1
+- First cut
Modified: branches/ruby-oci8-1.0/test/test_clob.rb
===================================================================
--- branches/ruby-oci8-1.0/test/test_clob.rb 2008-06-24 09:36:18 UTC (rev 263)
+++ branches/ruby-oci8-1.0/test/test_clob.rb 2008-06-26 14:21:06 UTC (rev 264)
@@ -11,17 +11,18 @@
end
def test_insert
+ filename = File.basename($lobfile)
@stmt.prepare("DELETE FROM test_clob WHERE filename = :1")
- @stmt.bindByPos(1, String, $lobfile.size).set($lobfile)
+ @stmt.bindByPos(1, String, filename.size).set(filename)
@stmt.execute(@svc)
@stmt.prepare("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())")
- @stmt.bindByPos(1, String, $lobfile.size).set($lobfile)
+ @stmt.bindByPos(1, String, filename.size).set(filename)
@stmt.execute(@svc)
lob = @env.alloc(OCILobLocator)
@stmt.prepare("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE")
- @stmt.bindByPos(1, String, $lobfile.size).set($lobfile)
+ @stmt.bindByPos(1, String, filename.size).set(filename)
@stmt.defineByPos(1, OCI_TYPECODE_CLOB, lob)
@stmt.execute(@svc, 1)
offset = 1 # count by charactor, not byte.
@@ -35,17 +36,18 @@
end
def test_insert_with_open_close
+ filename = File.basename($lobfile)
@stmt.prepare("DELETE FROM test_clob WHERE filename = :1")
- @stmt.bindByPos(1, String, $lobfile.size).set($lobfile)
+ @stmt.bindByPos(1, String, filename.size).set(filename)
@stmt.execute(@svc)
@stmt.prepare("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())")
- @stmt.bindByPos(1, String, $lobfile.size).set($lobfile)
+ @stmt.bindByPos(1, String, filename.size).set(filename)
@stmt.execute(@svc)
lob = @env.alloc(OCILobLocator)
@stmt.prepare("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE")
- @stmt.bindByPos(1, String, $lobfile.size).set($lobfile)
+ @stmt.bindByPos(1, String, filename.size).set(filename)
@stmt.defineByPos(1, OCI_TYPECODE_CLOB, lob)
@stmt.execute(@svc, 1)
lob.open(@svc)
@@ -63,10 +65,11 @@
end
def test_read
+ filename = File.basename($lobfile)
test_insert() # first insert data.
lob = @env.alloc(OCILobLocator)
@stmt.prepare("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE")
- @stmt.bindByPos(1, String, $lobfile.size).set($lobfile)
+ @stmt.bindByPos(1, String, filename.size).set(filename)
@stmt.defineByPos(1, OCI_TYPECODE_CLOB, lob)
@stmt.execute(@svc, 1)
More information about the ruby-oci8-commit
mailing list