[DRE-commits] r2170 - in packages/libxtemplate-ruby1.8/trunk: . bin debian ext lib samples
lucas at alioth.debian.org
lucas at alioth.debian.org
Sat Dec 8 12:05:29 UTC 2007
Author: lucas
Date: 2007-12-08 12:05:29 +0000 (Sat, 08 Dec 2007)
New Revision: 2170
Added:
packages/libxtemplate-ruby1.8/trunk/debian/
packages/libxtemplate-ruby1.8/trunk/debian/changelog
packages/libxtemplate-ruby1.8/trunk/debian/compat
packages/libxtemplate-ruby1.8/trunk/debian/control
packages/libxtemplate-ruby1.8/trunk/debian/copyright
packages/libxtemplate-ruby1.8/trunk/debian/dirs
packages/libxtemplate-ruby1.8/trunk/debian/docs
packages/libxtemplate-ruby1.8/trunk/debian/rules
packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.1
packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.rd
Modified:
packages/libxtemplate-ruby1.8/trunk/bin/xtemplate
packages/libxtemplate-ruby1.8/trunk/ext/xt.c
packages/libxtemplate-ruby1.8/trunk/lib/xtemplate.rb
packages/libxtemplate-ruby1.8/trunk/samples/sample33.rb
packages/libxtemplate-ruby1.8/trunk/samples/sample34.rb
Log:
[svn-inject] Applying Debian modifications to trunk
Modified: packages/libxtemplate-ruby1.8/trunk/bin/xtemplate
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/bin/xtemplate 2007-12-08 12:05:22 UTC (rev 2169)
+++ packages/libxtemplate-ruby1.8/trunk/bin/xtemplate 2007-12-08 12:05:29 UTC (rev 2170)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/ruby-1.8
+#!/usr/bin/ruby1.8
require 'xtemplate'
Property changes on: packages/libxtemplate-ruby1.8/trunk/debian
___________________________________________________________________
Name: mergeWithUpstream
+ 1
Added: packages/libxtemplate-ruby1.8/trunk/debian/changelog
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/changelog (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/changelog 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,32 @@
+libxtemplate-ruby1.8 (0.8.0-1) unstable; urgency=low
+
+ * new upstream version.
+ * applied patch. (closes: #287453)
+ Thanks to Andreas Jochens.
+ * samples/sample3[34].rb: added shebang line and removed linefeed.
+ * Standards-Version: 3.6.1
+
+ -- akira yamada <akira at debian.org> Sat, 26 Feb 2005 09:15:39 +0900
+
+libxtemplate-ruby1.8 (0.7.0-1) unstable; urgency=low
+
+ * new upstream version. (closes: #254976)
+ * lib/xtemplate/xpath.rb: escaped "{" and "}" to avoid warnings. Thanks to
+ Andres Salomon. (closes: #258526)
+ * samples/sample3[34].rb: added shebang line and removed linefeed.
+ (closes: #258522)
+
+ -- akira yamada <akira at debian.org> Tue, 13 Jul 2004 16:30:42 +0900
+
+libxtemplate-ruby1.8 (0.6.0-1) unstable; urgency=low
+
+ * uploaded to Debian, closes: #203924.
+
+ -- akira yamada <akira at debian.org> Sun, 7 Sep 2003 23:11:10 +0900
+
+libxtemplate-ruby1.8 (0.6.0-0.1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- akira yamada <akira at debian.org> Sun, 3 Aug 2003 01:59:58 +0900
+
Added: packages/libxtemplate-ruby1.8/trunk/debian/compat
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/compat (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/compat 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1 @@
+4
Added: packages/libxtemplate-ruby1.8/trunk/debian/control
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/control (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/control 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,21 @@
+Source: libxtemplate-ruby1.8
+Section: interpreters
+Priority: optional
+Maintainer: akira yamada <akira at debian.org>
+Build-Depends: debhelper (>> 4.0.0), ruby1.8, ruby1.8-dev
+Standards-Version: 3.6.1
+
+Package: libxtemplate-ruby1.8
+Architecture: any
+Depends: ruby1.8, librexml-ruby1.8
+Suggests: libyaml-ruby1.8, libxmlrpc-ruby1.8, liberb-ruby1.8
+Description: Lightweight XML templating engine like Amrita and XSLT
+ XTemplate is a package of Ruby libraries and programs which formats a
+ XML/HTML document according to a Ruby's data structure which consists of
+ Hash and Array. This idea comes from Amrita. So we do not need to
+ explicitly write iterations like for-loop in a template. Such iterations
+ are indicated by an expansion data. We can specify a data ID in XPath like
+ expression, and reconstruct a given data in a template without writing
+ Ruby programs. This mechanism provides interoperablity between a template
+ and a Ruby script. We can use XML/YAML documents as an expansion data,
+ since it is automatically converted to a Ruby's Hash object.
Added: packages/libxtemplate-ruby1.8/trunk/debian/copyright
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/copyright (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/copyright 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,33 @@
+This package was debianized by akira yamada <akira at debian.org> on
+Sun, 3 Aug 2003 01:59:58 +0900.
+
+It was downloaded from <URL:http://xtemplate.sourceforge.net/>.
+
+Upstream Author: Takaaki Tateishi <ttate at users.sourceforge.jp>
+
+Copyright:
+
+Copyright (c) 2002,2003 Takaaki Tateishi <ttate at users.sourceforge.jp>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Added: packages/libxtemplate-ruby1.8/trunk/debian/dirs
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/dirs (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/dirs 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
Added: packages/libxtemplate-ruby1.8/trunk/debian/docs
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/docs (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/docs 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,3 @@
+README
+STATUS
+TUTORIAL
Added: packages/libxtemplate-ruby1.8/trunk/debian/rules
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/rules (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/rules 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,93 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+RUBY := ruby1.8
+
+rblibdir = $(shell $(RUBY) -rrbconfig -e'print Config::CONFIG["rubylibdir"]')
+rbarchdir = $(shell $(RUBY) -rrbconfig -e'print Config::CONFIG["archdir"]')
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+ $(RUBY) install.rb config \
+ --with-ext \
+ --rb-dir=$(rblibdir) \
+ --so-dir=$(rbarchdir)
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(RUBY) install.rb setup
+ #/usr/bin/docbook-to-man debian/libxtemplate-ruby.sgml > libxtemplate-ruby.1
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(RUBY) install.rb clean
+ -cd ext && make distclean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/libxtemplate-ruby.
+ $(RUBY) install.rb install --prefix=$(CURDIR)/debian/libxtemplate-ruby1.8
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs CHANGES
+ dh_installdocs
+ dh_installexamples samples/*
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman debian/xtemplate.1
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
Property changes on: packages/libxtemplate-ruby1.8/trunk/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.1
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.1 (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.1 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,90 @@
+.\" DO NOT MODIFY THIS FILE! it was generated by rd2
+.TH xtemplate 1 "September 2003"
+.SH NAME
+.PP
+xtemplate \- (x)template expansion/serialization tool
+.SH SYNOPSIS
+.PP
+xtemplate [\-d <data\-file>|\-D <data\-expr>|\-x <xml\-file>|\-y <yaml\-file>]
+ [\-t <template\-file> | \-T <serialized\-template>]
+ [\-o <output\-file>]
+ [\-\-with\-eruby|\-\-with\-erb]
+.PP
+xtemplate \-c <template\-file> [\-o <output\-file>]
+.SH DESCRIPTION
+.SS OPTIONS FOR EXPANSION
+.TP
+.fi
+.B
+\-d file
+read input data from file which is written in Ruby.
+.TP
+.fi
+.B
+\-D expr
+get input data from expr as input data which is written in
+Ruby.
+.TP
+.fi
+.B
+\-x file
+read input data from file which is written in XML.
+.TP
+.fi
+.B
+\-y file
+read input data from file which is written in YAML.
+.TP
+.fi
+.B
+\-t file
+read (x)template from file.
+.TP
+.fi
+.B
+\-T file
+read serialized (x)template from file.
+.TP
+.fi
+.B
+\-o file
+output into file.
+.TP
+.fi
+.B
+\-\-with\-eruby
+process (x)temlate file and/or XML input file as ERuby script
+befor expantion. (using eruby.)
+.TP
+.fi
+.B
+\-\-with\-erb
+process (x)temlate file and/or XML input file as ERuby script
+befor expantion. (using ERb.)
+.SS OPTIONS FOR SERIALIZATION
+.TP
+.fi
+.B
+\-c
+read (x)template from file.
+.TP
+.fi
+.B
+\-o
+output serialized (x)template into file.
+.SS COMMON OPTIONS
+.TP
+.fi
+.B
+\-\-show\-time
+print processing time.
+.TP
+.fi
+.B
+\-\-use\-amrita
+use Amrita instead of XTemplate.
+.SH AUTHOR
+.PP
+This manual page was written by akira yamada <akira at debian.org>,
+for the Debian project (but may be used by others).
+
Added: packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.rd
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.rd (rev 0)
+++ packages/libxtemplate-ruby1.8/trunk/debian/xtemplate.rd 2007-12-08 12:05:29 UTC (rev 2170)
@@ -0,0 +1,71 @@
+=begin
+
+= NAME
+
+xtemplate - (x)template expansion/serialization tool
+
+= SYNOPSIS
+
+xtemplate [-d <data-file>|-D <data-expr>|-x <xml-file>|-y <yaml-file>]
+((' '))[-t <template-file> | -T <serialized-template>]
+((' '))[-o <output-file>]
+((' '))[--with-eruby|--with-erb]
+
+xtemplate -c <template-file> [-o <output-file>]
+
+= DESCRIPTION
+
+== OPTIONS FOR EXPANSION
+
+: -d ((|file|))
+ read input data from ((|file|)) which is written in Ruby.
+
+: -D ((|expr|))
+ get input data from ((|expr|)) as input data which is written in
+ Ruby.
+
+: -x ((|file|))
+ read input data from ((|file|)) which is written in XML.
+
+: -y ((|file|))
+ read input data from ((|file|)) which is written in YAML.
+
+: -t ((|file|))
+ read (x)template from ((|file|)).
+
+: -T ((|file|))
+ read serialized (x)template from ((|file|)).
+
+: -o ((|file|))
+ output into ((|file|)).
+
+: --with-eruby
+ process (x)temlate file and/or XML input file as ERuby script
+ befor expantion. (using eruby.)
+
+: --with-erb
+ process (x)temlate file and/or XML input file as ERuby script
+ befor expantion. (using ERb.)
+
+== OPTIONS FOR SERIALIZATION
+
+: -c
+ read (x)template from ((|file|)).
+
+: -o
+ output serialized (x)template into ((|file|)).
+
+== COMMON OPTIONS
+
+: --show-time
+ print processing time.
+
+: --use-amrita
+ use Amrita instead of XTemplate.
+
+= AUTHOR
+
+This manual page was written by akira yamada <akira at debian.org>,
+for the Debian project (but may be used by others).
+
+=end
Modified: packages/libxtemplate-ruby1.8/trunk/ext/xt.c
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/ext/xt.c 2007-12-08 12:05:22 UTC (rev 2169)
+++ packages/libxtemplate-ruby1.8/trunk/ext/xt.c 2007-12-08 12:05:29 UTC (rev 2170)
@@ -243,11 +243,12 @@
return rb_funcall(children, i_collect, 0);
}
+static VALUE rb_xt_xnode_deep_dup(int, VALUE[], VALUE);
+
static VALUE
rb_xt_xnode_deep_dup_ii(VALUE child, VALUE data)
{
VALUE node = data;
- static VALUE rb_xt_xnode_deep_dup(int, VALUE[], VALUE);
if( rb_obj_is_kind_of(child, rb_cXNode) ){
VALUE argv[1] = {node};
Modified: packages/libxtemplate-ruby1.8/trunk/lib/xtemplate.rb
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/lib/xtemplate.rb 2007-12-08 12:05:22 UTC (rev 2169)
+++ packages/libxtemplate-ruby1.8/trunk/lib/xtemplate.rb 2007-12-08 12:05:29 UTC (rev 2170)
@@ -134,10 +134,10 @@
end
def dup_data(data, oids=[])
- if( oids.include?(data.id) )
+ if( oids.include?(data.object_id) )
data
else
- oids.push(data.id)
+ oids.push(data.object_id)
case data
when Hash
data = data.dup
Modified: packages/libxtemplate-ruby1.8/trunk/samples/sample33.rb
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/samples/sample33.rb 2007-12-08 12:05:22 UTC (rev 2169)
+++ packages/libxtemplate-ruby1.8/trunk/samples/sample33.rb 2007-12-08 12:05:29 UTC (rev 2170)
@@ -1,38 +1,39 @@
-# -*- ruby -*-
-#
-# An explicit iteration using the attribute 'each'
-#
-
-require 'xtemplate'
-
-class MyEnumerable
- include Enumerable
-
- def each
- [
- {'url' => "url1", 'name' => "anchor1"},
- {'url' => "url2", 'name' => "anchor2"},
- {'url' => "url3", 'name' => "anchor3"},
- ].each{|link| yield(link)}
- end
-end
-
-data ={
- 'links' => MyEnumerable.new()
-}
-
-text = <<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns:xt="#{XTemplate::BIND_URI}">
-<body>
- <ul>
- <li xt:each="/links">
- <a><xt:select id="url{@href}" /><xt:select id="name" /></a>
- </li>
- </ul>
-</body>
-</html>
-EOF
-
-t = XTemplate::XMLTemplate.new(text)
-print(t.expand(data))
+#!/usr/bin/ruby1.8
+# -*- ruby -*-
+#
+# An explicit iteration using the attribute 'each'
+#
+
+require 'xtemplate'
+
+class MyEnumerable
+ include Enumerable
+
+ def each
+ [
+ {'url' => "url1", 'name' => "anchor1"},
+ {'url' => "url2", 'name' => "anchor2"},
+ {'url' => "url3", 'name' => "anchor3"},
+ ].each{|link| yield(link)}
+ end
+end
+
+data ={
+ 'links' => MyEnumerable.new()
+}
+
+text = <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns:xt="#{XTemplate::BIND_URI}">
+<body>
+ <ul>
+ <li xt:each="/links">
+ <a><xt:select id="url{@href}" /><xt:select id="name" /></a>
+ </li>
+ </ul>
+</body>
+</html>
+EOF
+
+t = XTemplate::XMLTemplate.new(text)
+print(t.expand(data))
Modified: packages/libxtemplate-ruby1.8/trunk/samples/sample34.rb
===================================================================
--- packages/libxtemplate-ruby1.8/trunk/samples/sample34.rb 2007-12-08 12:05:22 UTC (rev 2169)
+++ packages/libxtemplate-ruby1.8/trunk/samples/sample34.rb 2007-12-08 12:05:29 UTC (rev 2170)
@@ -1,38 +1,39 @@
-# -*- ruby -*-
-#
-# An explicit iteration using the tag <xt:each>.
-#
-
-require 'xtemplate'
-
-class MyEnumerable
- include Enumerable
-
- def each
- [
- {'url' => "url1", 'name' => "anchor1"},
- {'url' => "url2", 'name' => "anchor2"},
- {'url' => "url3", 'name' => "anchor3"},
- ].each{|link| yield(link)}
- end
-end
-
-data ={
- 'links' => MyEnumerable.new()
-}
-
-text = <<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns:xt="#{XTemplate::BIND_URI}">
-<body>
- <ul>
- <xt:each id="/links">
- <li><a><xt:select id="url{@href}" /><xt:select id="name" /></a></li>
- </xt:each>
- </ul>
-</body>
-</html>
-EOF
-
-t = XTemplate::XMLTemplate.new(text)
-print(t.expand(data))
+#!/usr/bin/ruby1.8
+# -*- ruby -*-
+#
+# An explicit iteration using the tag <xt:each>.
+#
+
+require 'xtemplate'
+
+class MyEnumerable
+ include Enumerable
+
+ def each
+ [
+ {'url' => "url1", 'name' => "anchor1"},
+ {'url' => "url2", 'name' => "anchor2"},
+ {'url' => "url3", 'name' => "anchor3"},
+ ].each{|link| yield(link)}
+ end
+end
+
+data ={
+ 'links' => MyEnumerable.new()
+}
+
+text = <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns:xt="#{XTemplate::BIND_URI}">
+<body>
+ <ul>
+ <xt:each id="/links">
+ <li><a><xt:select id="url{@href}" /><xt:select id="name" /></a></li>
+ </xt:each>
+ </ul>
+</body>
+</html>
+EOF
+
+t = XTemplate::XMLTemplate.new(text)
+print(t.expand(data))
More information about the Pkg-ruby-extras-commits
mailing list