You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
(78) |
Jul
(43) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sean C. <se...@ch...> - 2002-07-22 08:22:21
|
> Modified Files: > package.xml > Log Message: > *) Added the digest tag to the standard Anyone have any thoughts on possibly changing this to checksum instead of digest? I think checksum is a tad more clear, but that could be just me. -sc -- Sean Chittenden |
From: Sean C. <the...@us...> - 2002-07-22 08:20:07
|
Update of /cvsroot/rubynet/rubynet/standards In directory usw-pr-cvs1:/tmp/cvs-serv19090 Modified Files: package.xml Log Message: *) Added the digest tag to the standard Index: package.xml =================================================================== RCS file: /cvsroot/rubynet/rubynet/standards/package.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- package.xml 13 Jul 2002 03:55:29 -0000 1.8 +++ package.xml 22 Jul 2002 08:20:03 -0000 1.9 @@ -47,12 +47,14 @@ <!ATTLIST required_version restriction (no-lower-than|no-greater-than|any) "any"> <!ELEMENT files (file*)> -<!ELEMENT file (filename, mode?, path, content)> +<!ELEMENT file (filename, mode?, path, digest, content)> <!ELEMENT filename (#PCDATA)> <!ELEMENT path (#PCDATA)> <!ELEMENT mode (#PCDATA)> <!ELEMENT content (#PCDATA)> <!ATTLIST content encoding (xml|mime64) "xml"> +<!ELEMENT digest (#PCDATA)> +<!ATTLIST digest type (sha1|md5) "md5"> <!ENTITY % rbconfig SYSTEM "/usr/local/lib/ruby/site_ruby/1.7/rubynet/xml/rbconfig.xml"> %rbconfig; @@ -110,12 +112,14 @@ <filename>uga.rb</filename> <mode>0444</mode> <path>&rbconfig.libdir;/rexml</path> + <digest type="md5">UIDHTNUIDHTCNREJUKIXDHMTN</digest> <content encoding="xml">... the file here</content> </file> <file> <filename>booga.h</filename> <mode>0444</mode> <path>&rbconfig.includedir;</path> + <digest type="md5">UIDHTNUIDHTCNREJUKIXDHMTN</digest> <content encoding="xml">... the file here</content> </file> <file> @@ -124,6 +128,7 @@ <path>&rbconfig.sitearchdir;/rexml</path> <!-- Encode routine: str.to_a.pack('m') Decode routine: str.unpack('m') --> + <digest type="md5">4cc5ed1956e666d51d7760e1e21a2a79</digest> <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> </file> </files> |
From: Sean C. <the...@us...> - 2002-07-22 08:17:13
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules In directory usw-pr-cvs1:/tmp/cvs-serv15808/src/clients/rubynet/modules Added Files: verify.rb Log Message: *) Added a some new md5 verification functionality ala the retreat --- NEW FILE: verify.rb --- # $Id: verify.rb,v 1.1 2002/07/22 08:17:10 thetitan Exp $ require 'libxml' require 'rubynet' require 'md5' require 'sha1' module Rubynet class Verify FILE_XPATH = '/rubynet/pkg/files/file' attr_accessor :files def initialize(arg) @arg = arg end ########################################################### Public Methods public def execute package_xml_path = Rubynet::get_module_xml(@arg) # HACK: package_xml_path = '/usr/home/ryand/192.168.1.104/data/rubynet/rubynet/standards/package.xml' package_xml_file = package_xml_path verify_package(package_xml_file) rescue IOError => e puts "There was an error using the package file: #{e}" end ########################################################### Protected Methods protected def verify_package(package_xml_path) error_detected = false xd = XML::Document.file(package_xml_path) xd.xpath_find(FILE_XPATH).each do |node| filename = node.child('filename').to_s path = node.child('path').to_s mode = node.child('mode').to_s.oct digest = node.child('digest').to_s type = node.child('digest').property('type').to_s.upcase # TODO: deal with type! fullpath = File.join (path, filename) #HACK fullpath = "/bin/ls" content = IO.readlines (fullpath).join "" realdigest = eval("#{type}.new(content).hexdigest") if realdigest != digest puts "MD5 mismatch on #{fullpath}, expected #{digest} got #{realdigest}" error_detected = true end realmode = File.stat(fullpath).mode & 0777 if realmode != mode puts "Mode mismatch on #{fullpath}, expected #{sprintf("%o", mode)} got #{sprintf("%o", realmode)}" error_detected = true end end if error_detected exit 1 end end end # class Verify end # module Rubynet |
From: Sean C. <the...@us...> - 2002-07-22 08:17:13
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet In directory usw-pr-cvs1:/tmp/cvs-serv15808/src/clients/rubynet Modified Files: rubynet.rb Log Message: *) Added a some new md5 verification functionality ala the retreat Index: rubynet.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/rubynet.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- rubynet.rb 4 Jul 2002 01:03:02 -0000 1.4 +++ rubynet.rb 22 Jul 2002 08:17:10 -0000 1.5 @@ -14,7 +14,8 @@ OPTION_LIST = [ ['--initialize', '-I', GetoptLong::NO_ARGUMENT], ['--install', '-i', GetoptLong::REQUIRED_ARGUMENT], - ['--query', '-q', GetoptLong::REQUIRED_ARGUMENT] + ['--query', '-q', GetoptLong::REQUIRED_ARGUMENT], + ['--verify', '-V', GetoptLong::REQUIRED_ARGUMENT], ] @@ -30,8 +31,11 @@ options: - --initialize forces an initialization of the rubynet environment - --install install a package from rubynet. + --initialize forces an initialization of the rubynet environment. + --verify <name> verify an installation. + --install <name> install a package from rubynet. + --query <query> query the server. + EOUSAGE exit(1) @@ -41,7 +45,7 @@ def initialize(server = 'http://localhost:2000/') @server = server - usage if ARGV.length == 0 + usage("need an argument") if ARGV.length == 0 opt_parser = GetoptLong.new(*OPTION_LIST) opt_parser.quiet = true @@ -51,14 +55,17 @@ when '--initialize' require 'modules/initialize' Rubynet::Initialize.new(arg).execute + when '--query' + require 'modules/query' + Rubynet::Query.new(arg).execute when '--install' require 'modules/install' Rubynet::Install.new(arg).execute - when '--query' - require 'modules/query' - Rubynet::Query.new(arg).execute + when '--verify' + require 'modules/verify' + Rubynet::Verify.new(arg).execute else - usage + usage("Unknown option #{opt}") end end |
From: Sean C. <the...@us...> - 2002-07-22 08:10:53
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules In directory usw-pr-cvs1:/tmp/cvs-serv15136/src/clients/rubynet/modules Modified Files: initialize.rb Log Message: *) Added a better comment describing rbconfig.xml Index: initialize.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/initialize.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- initialize.rb 8 Jul 2002 10:31:50 -0000 1.2 +++ initialize.rb 22 Jul 2002 08:10:50 -0000 1.3 @@ -44,6 +44,8 @@ File.open(tmp_file, 'w') do |f| f.puts '<!-- DO NOT EDIT!!! THIS FILE IS AUTO-GENERATED!!! DO NOT EDIT!!! -->' f.puts "<!-- This File was generated at: #{Time.now()} -->" + f.puts "<!-- This File was created by: rubynet --initialize -->" + f.puts '<!-- DO NOT EDIT!!! THIS FILE IS AUTO-GENERATED!!! DO NOT EDIT!!! -->' for key in c.keys.sort val = c[key] |
From: Sean C. <the...@us...> - 2002-07-13 04:36:40
|
Update of /cvsroot/rubynet/rubynet/standards In directory usw-pr-cvs1:/tmp/cvs-serv14275 Added Files: hierarchy.xml Log Message: *) 1st cut at a rubynet index --- NEW FILE: hierarchy.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <rubynet xmlns:xlink="http://www.w3.org/1999/xlink"> <index version="1.0"> <category> <meta> <name>textproc</name> <homepage>http://www.rubynet.org/category/textproc/</homepage> <contact> <primary> <individual> <first_name>Sean</first_name> <last_name>Chittenden</last_name> <email>se...@ch...</email> </individual> </primary> </contact> </meta> <index> <node name="libxml">/rubynet/pkg/xml-libxml</node> <node name="rexml">/rubynet/pkg/xml-rexml</node> <category> <meta> <name>xml</name> <homepage>http://www.rubynet.org/category/textproc/xml/</homepage> <contact> <primary> <group> <name>Ruby XML Group</name> <email>xml...@ru...</email> </group> </primary> </contact> </meta> <index> <node name="libxml">/rubynet/pkg/xml-libxml</node> <node name="rexml">/rubynet/pkg/xml-rexml</node> <index> </category> </index> </category> <class> <meta> <name>Apache</name> <homepage>http://www.rubynet.org/class/apache/</homepage> <contact> <primary> <individual> <first_name>Shugo</first_name> <last_name>Maeda</last_name> <email>sh...@mo...</email> </individual> </primary> <secondary> &rubynet.index.sean; </secondary> </contact> </meta> <index> <node name="self">/rubynet/pkg/mod_ruby</node> <node name="Cookie">/rubynet/pkg/apache-cookie</node> </index> </class> <class> <meta> <name>XML</name> <homepage>http://www.rubynet.org/class/xml/</homepage> <contact> <primary> <individual> <first_name>Sean</first_name> <last_name>Chittenden</last_name> <email>se...@ch...</email> </individual> </primary> <secondary> <group> <name>Intl. Ruby Support Network, Inc.</name> <email>con...@ru...</email> </group> </secondary> </contact> </meta> <index> <node name="self">/rubynet/pkg/xml-libxml</node> <node name="REXML">/rubynet/pkg/xml-rexml</node> </index> </class> </index> </rubynet> |
From: Holden G. <dsa...@us...> - 2002-07-13 04:22:32
|
Update of /cvsroot/rubynet/rubynet/standards In directory usw-pr-cvs1:/tmp/cvs-serv8065 Added Files: packagedb.xml Log Message: * Initial stab at the local pacakge db xml format --- NEW FILE: packagedb.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE rubynet [ <!ELEMENT rubynet (pkg)> <!ATTLIST rubynet xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> <!ELEMENT pkg (meta,dependencies?,files?)> <!ATTLIST pkg version CDATA "1.0"> <!ELEMENT meta (pkgname,categories,version)> <!ELEMENT pkgname (#PCDATA)> <!ELEMENT categories (major_category,minor_category*)> <!ELEMENT major_category (#PCDATA)> <!ATTLIST major_category xlink:type (simple) #FIXED "simple" xlink:href CDATA #REQUIRED> <!ELEMENT minor_category (#PCDATA)> <!ATTLIST minor_category xlink:type (simple) #FIXED "simple" xlink:href CDATA #REQUIRED> <!ELEMENT version (major_version,minor_version,micro_version)> <!ELEMENT major_version (#PCDATA)> <!ELEMENT minor_version (#PCDATA)> <!ELEMENT micro_version (#PCDATA)> <!ELEMENT dependencies (dependency*)> <!ELEMENT dependency (required_version)> <!ATTLIST dependency name CDATA #REQUIRED uri CDATA #REQUIRED> <!ELEMENT required_version (version?)> <!ATTLIST required_version restriction (no-lower-than|no-greater-than|any) "any"> <!ELEMENT files (file*)> <!ELEMENT file (filename, path)> <!ELEMENT filename (#PCDATA)> <!ELEMENT path (#PCDATA)> <!ENTITY % rbconfig SYSTEM "/usr/lib/ruby/site_ruby/1.6/rubynet/xml/rbconfig.xml"> %rbconfig; ]> <rubynet xmlns:xlink="http://www.w3.org/1999/xlink"> <pkg version="1.0"> <meta> <pkgname>REXML</pkgname> <categories> <major_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/xml/">XML</major_category> <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/text%20processing/">Text Processing</minor_category> <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/storage/">Storage</minor_category> </categories> <version> <major_version>1</major_version> <minor_version>2</minor_version> <micro_version>3</micro_version> </version> </meta> <dependencies> <dependency name="ruby" uri="http://www.rubynet.org/packages/ruby/"> <required_version restriction="no-lower-than"> <version> <major_version>1</major_version> <minor_version>6</minor_version> <micro_version>0</micro_version> </version> </required_version> </dependency> </dependencies> <files> <file> <filename>uga.rb</filename> <path>&rbconfig.libdir;/rexml</path> </file> <file> <filename>booga.h</filename> <path>&rbconfig.includedir;</path> </file> <file> <filename>foo.so</filename> <path>&rbconfig.sitearchdir;/rexml</path> </file> </files> </pkg> </rubynet> |
From: Sean C. <the...@us...> - 2002-07-13 03:55:33
|
Update of /cvsroot/rubynet/rubynet/standards In directory usw-pr-cvs1:/tmp/cvs-serv32615 Modified Files: package.xml Log Message: *) Removing category information from the package Index: package.xml =================================================================== RCS file: /cvsroot/rubynet/rubynet/standards/package.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- package.xml 11 Jul 2002 03:22:47 -0000 1.7 +++ package.xml 13 Jul 2002 03:55:29 -0000 1.8 @@ -5,7 +5,7 @@ <!ATTLIST rubynet xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> <!ELEMENT pkg (meta,dependencies?,files?)> <!ATTLIST pkg version CDATA "1.0"> -<!ELEMENT meta (pkgname,authors,maintainers,categories,version,copyright,license,status,full_name,description,homepage,download)> +<!ELEMENT meta (pkgname,authors,maintainers,version,copyright,license,status,full_name,description,homepage,download)> <!ELEMENT pkgname (#PCDATA)> <!ELEMENT authors (author*)> @@ -19,16 +19,6 @@ <!ELEMENT maintainers (maintainer+)> <!ELEMENT maintainer (name?,(first_name, last_name)?,email,irc_network?,irc_channel?,irc_handle?)> -<!ELEMENT categories (major_category,minor_category*)> -<!ELEMENT major_category (#PCDATA)> -<!ATTLIST major_category - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> -<!ELEMENT minor_category (#PCDATA)> -<!ATTLIST minor_category - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> - <!ELEMENT version (major_version,minor_version,micro_version)> <!ELEMENT major_version (#PCDATA)> <!ELEMENT minor_version (#PCDATA)> @@ -91,11 +81,6 @@ <irc_handle>TinyT</irc_handle> </maintainer> </maintainers> - <categories> - <major_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/xml/">XML</major_category> - <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/text%20processing/">Text Processing</minor_category> - <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/storage/">Storage</minor_category> - </categories> <version> <major_version>1</major_version> <minor_version>2</minor_version> |
From: Holden G. <dsa...@us...> - 2002-07-12 11:03:34
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules In directory usw-pr-cvs1:/tmp/cvs-serv23164/src/clients/rubynet/modules Modified Files: install.rb Log Message: * Minor formatting * Fixed the creation of the XML file to take in the @arg instance var. Index: install.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/install.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- install.rb 11 Jul 2002 03:20:13 -0000 1.5 +++ install.rb 12 Jul 2002 11:03:30 -0000 1.6 @@ -23,7 +23,7 @@ public def execute - package_file = File.new(arg) + package_file = File.new(@arg) collect_files(package_file) write_local_db(package_file) install_files @@ -41,10 +41,10 @@ xd = XML::Document.file(filename) xd.xpath_find(FILE_XPATH).each do |node| file = Rubynet::Installee.new(node.child('filename').to_s, - node.child('path').to_s, - node.child('mode').to_s, - node.child('content').to_s, - node.child('content').property('encoding').to_s) + node.child('path').to_s, + node.child('mode').to_s, + node.child('content').to_s, + node.child('content').property('encoding').to_s) @files << file end |
From: Sean C. <the...@us...> - 2002-07-11 03:22:49
|
Update of /cvsroot/rubynet/rubynet/standards In directory usw-pr-cvs1:/tmp/cvs-serv25773 Modified Files: package.xml Log Message: *) package.xml has a site-specific hack in it now that is required at the moment until libxml can generate a DTD its DTD on the fly for document parsing. Index: package.xml =================================================================== RCS file: /cvsroot/rubynet/rubynet/standards/package.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- package.xml 10 Jul 2002 08:14:17 -0000 1.6 +++ package.xml 11 Jul 2002 03:22:47 -0000 1.7 @@ -64,7 +64,7 @@ <!ELEMENT content (#PCDATA)> <!ATTLIST content encoding (xml|mime64) "xml"> -<!ENTITY % rbconfig SYSTEM "rbconfig.xml"> +<!ENTITY % rbconfig SYSTEM "/usr/local/lib/ruby/site_ruby/1.7/rubynet/xml/rbconfig.xml"> %rbconfig; ]> |
From: Sean C. <the...@us...> - 2002-07-11 03:21:51
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests In directory usw-pr-cvs1:/tmp/cvs-serv25449/clients/rubynet/modules/tests Modified Files: tc_packageInstall.rb Log Message: *) Removed inline XML document in favor of an external filename/path to the standard trial package. This makes things slightly more fragile in you have to be in the src/ directory to run the unit tests at the moment. Index: tc_packageInstall.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests/tc_packageInstall.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- tc_packageInstall.rb 11 Jul 2002 01:59:08 -0000 1.3 +++ tc_packageInstall.rb 11 Jul 2002 03:21:48 -0000 1.4 @@ -9,7 +9,7 @@ def test_package_file_opens install = Rubynet::Install::new('demo-package') - install.__send__(:locate_files, mock_package_file_data) + install.__send__(:collect_files, "../standards/package.xml") assert_equal(3, install.files.length, "There are not 3 files to install") end @@ -20,201 +20,4 @@ install.__send__(:write_local_db, MOCK_PACKAGE) end - - - - def mock_package_file_data - <<-EOS -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - -<!DOCTYPE rubynet [ -<!ELEMENT rubynet (pkg)> -<!ATTLIST rubynet xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> -<!ELEMENT pkg (meta,dependencies?,files?)> -<!ATTLIST pkg version CDATA "1.0"> -<!ELEMENT meta (pkgname,authors,maintainers,categories,version,copyright,license,status,full_name,description,homepage,download)> - -<!ELEMENT pkgname (#PCDATA)> -<!ELEMENT authors (author*)> -<!ELEMENT author (name?,(first_name, last_name)?,email?,irc_network?,irc_channel?,irc_handle?)> -<!ELEMENT name (#PCDATA)> -<!ELEMENT email (#PCDATA)> -<!ELEMENT irc_network (#PCDATA)> -<!ELEMENT irc_channel (#PCDATA)> -<!ELEMENT irc_handle (#PCDATA)> - -<!ELEMENT maintainers (maintainer+)> -<!ELEMENT maintainer (name?,(first_name, last_name)?,email,irc_network?,irc_channel?,irc_handle?)> - -<!ELEMENT categories (major_category,minor_category*)> -<!ELEMENT major_category (#PCDATA)> -<!ATTLIST major_category - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> -<!ELEMENT minor_category (#PCDATA)> -<!ATTLIST minor_category - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> - -<!ELEMENT version (major_version,minor_version,micro_version)> -<!ELEMENT major_version (#PCDATA)> -<!ELEMENT minor_version (#PCDATA)> -<!ELEMENT micro_version (#PCDATA)> - -<!ELEMENT copyright (#PCDATA)> -<!ELEMENT license (#PCDATA)> -<!ELEMENT status (#PCDATA)> -<!ELEMENT full_name (#PCDATA)> -<!ELEMENT description (#PCDATA)> -<!ELEMENT homepage (#PCDATA)> -<!ATTLIST homepage - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> -<!ELEMENT download (#PCDATA)> -<!ATTLIST download - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> - -<!ELEMENT dependencies (dependency*)> -<!ELEMENT dependency (required_version)> -<!ATTLIST dependency - name CDATA #REQUIRED - uri CDATA #REQUIRED> -<!ELEMENT required_version (version?)> -<!ATTLIST required_version restriction (no-lower-than|no-greater-than|any) "any"> - -<!ELEMENT files (file*)> -<!ELEMENT file (filename, mode?, path, content)> -<!ELEMENT filename (#PCDATA)> -<!ELEMENT path (#PCDATA)> -<!ELEMENT mode (#PCDATA)> -<!ELEMENT content (#PCDATA)> -<!ATTLIST content encoding (xml|mime64) "xml"> - -<!ENTITY % rbconfig SYSTEM "rbconfig.xml"> -%rbconfig; -]> - - -<rubynet xmlns:xlink="http://www.w3.org/1999/xlink"> - <pkg version="1.0"> - <meta> - <pkgname>REXML</pkgname> - <authors> - <author> - <name>Aaron Malone</name> - <email>aa...@mu...</email> - <irc_network>irc.opentprojects.org</irc_network> - <irc_channel>#ruby-lang</irc_channel> - <irc_handle>AAmalone</irc_handle> - </author> - </authors> - <maintainers> - <maintainer> - <name>Tools Team</name> - <email>to...@ge...</email> - <irc_network>irc.opentprojects.org</irc_network> - <irc_channel>#ruby-lang</irc_channel> - <irc_handle>TinyT</irc_handle> - </maintainer> - </maintainers> - <categories> - <major_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/xml/">XML</major_category> - <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/text%20processing/">Text Processing</minor_category> - <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/storage/">Storage</minor_category> - </categories> - <version> - <major_version>1</major_version> - <minor_version>2</minor_version> - <micro_version>3</micro_version> - </version> - <copyright>1999-2002 Gentoo Technologies,Inc.</copyright> - <license>Ruby</license> - <status>Stable</status> - <full_name>Ruby Electric XML</full_name> - <description>Pure Ruby parser, blah blah. Based of Electrice XML</description> - <homepage xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/">REXML Home</homepage> - <download xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/rexml-1.2.3.bz2/">REXML Download</download> - </meta> - <dependencies> - <dependency name="ruby" uri="http://www.rubynet.org/packages/ruby/"> - <required_version restriction="no-lower-than"> - <version> - <major_version>1</major_version> - <minor_version>6</minor_version> - <micro_version>0</micro_version> - </version> - </required_version> - </dependency> - </dependencies> - <files> - <file> - <filename>uga.rb</filename> - <mode>0444</mode> - <path>&rbconfig.libdir;/rexml</path> - <content encoding="xml">... the file here</content> - </file> - <file> - <filename>booga.h</filename> - <mode>0444</mode> - <path>&rbconfig.includedir;</path> - <content encoding="xml">... the file here</content> - </file> - <file> - <filename>foo.so</filename> - <mode>0555</mode> - <path>&rbconfig.sitearchdir;/rexml</path> - <!-- Encode routine: str.to_a.pack('m') - Decode routine: str.unpack('m') --> - <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> - </file> - </files> - </pkg> -</rubynet> - EOS - end - - -# def mock_package_file_data -# <<-EOS -#<?xml version="1.0" encoding="UTF-8"?> -#<!DOCTYPE rubynet [ -#<!ENTITY rbconfig.MAJOR "1"> -#<!ENTITY rbconfig.MINOR "7"> -#<!ENTITY rbconfig.TEENY "2"> -#<!ENTITY rbconfig.ruby_version "&rbconfig.MAJOR;.&rbconfig.MINOR;"> -#<!ENTITY rbconfig.arch "i686"> -#<!ENTITY rbconfig.prefix "/tmp"> -#<!ENTITY rbconfig.libdir "&rbconfig.prefix;"> -#<!ENTITY rbconfig.includedir "&rbconfig.prefix;"> -#<!ENTITY rbconfig.sitedir "&rbconfig.prefix;"> -#<!ENTITY rbconfig.sitelibdir "&rbconfig.sitedir;"> -#<!ENTITY rbconfig.sitearchdir "&rbconfig.prefix;"> -#]> -#<rubynet> -# <pkg="version1.0"> -# <files> -# <file> -# <filename>uga.rb</filename> -# <mode>0444</mode> -# <path>&rbconfig.libdir;</path> -# <content encoding="xml">... the file here</content> -# </file> -# <file> -# <filename>booga.h</filename> -# <mode>0444</mode> -# <path>&rbconfig.includedir;</path> -# <content encoding="xml">... the file here</content> -# </file> -# <file> -# <filename>foo.so</filename> -# <mode>0555</mode> -# <path>&rbconfig.sitearchdir;</path> -# <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> -# </file> -# </files> -# </pkg> -#</rubynet> -# EOS -# end end |
From: Sean C. <the...@us...> - 2002-07-11 03:20:16
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules In directory usw-pr-cvs1:/tmp/cvs-serv25279/clients/rubynet/modules Modified Files: install.rb Log Message: *) Wishes REXML a nice life: libxml's in the house. Index: install.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/install.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- install.rb 11 Jul 2002 01:59:40 -0000 1.4 +++ install.rb 11 Jul 2002 03:20:13 -0000 1.5 @@ -2,7 +2,7 @@ require 'modules/support/installee' -require 'rexml/document' +require 'libxml' module Rubynet @@ -37,15 +37,14 @@ ########################################################### Protected Methods protected - def collect_files(package_file) - root = REXML::Document.new(package_file) - - root.elements.each(FILE_XPATH) do |metadata| - file = Rubynet::Installee.new(metadata.elements['filename'].text, - metadata.elements['path'].text, - metadata.elements['mode'].text, - metadata.elements['content'].text, - metadata.elements['content'].attributes['encoding']) + def collect_files(filename) + xd = XML::Document.file(filename) + xd.xpath_find(FILE_XPATH).each do |node| + file = Rubynet::Installee.new(node.child('filename').to_s, + node.child('path').to_s, + node.child('mode').to_s, + node.child('content').to_s, + node.child('content').property('encoding').to_s) @files << file end |
From: Holden G. <dsa...@us...> - 2002-07-11 01:59:45
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules In directory usw-pr-cvs1:/tmp/cvs-serv10146/src/clients/rubynet/modules Modified Files: install.rb Log Message: * Minor method name change * Stubbed write_local_db method Index: install.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/install.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- install.rb 6 Jul 2002 10:19:03 -0000 1.3 +++ install.rb 11 Jul 2002 01:59:40 -0000 1.4 @@ -24,10 +24,11 @@ def execute package_file = File.new(arg) - locate_files(package_file) + collect_files(package_file) + write_local_db(package_file) install_files rescue IOError => e - puts "There was an error opening the package file: #{e}" + puts "There was an error using the package file: #{e}" ensure package_file.close unless package_file.nil? end @@ -36,7 +37,7 @@ ########################################################### Protected Methods protected - def locate_files(package_file) + def collect_files(package_file) root = REXML::Document.new(package_file) root.elements.each(FILE_XPATH) do |metadata| @@ -51,6 +52,11 @@ nil end + + + def write_local_db(package_file) + + end def install_files |
From: Holden G. <dsa...@us...> - 2002-07-11 01:59:12
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests In directory usw-pr-cvs1:/tmp/cvs-serv10011/src/clients/rubynet/modules/tests Modified Files: tc_packageInstall.rb Log Message: * Attempted to write a test to verify the writing of the local package db Index: tc_packageInstall.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests/tc_packageInstall.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tc_packageInstall.rb 6 Jul 2002 10:08:56 -0000 1.2 +++ tc_packageInstall.rb 11 Jul 2002 01:59:08 -0000 1.3 @@ -15,29 +15,143 @@ end + def test_write_local_db + install = Rubynet::Install.new('demo-package') + install.__send__(:write_local_db, MOCK_PACKAGE) + + end + + + def mock_package_file_data <<-EOS -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> + <!DOCTYPE rubynet [ -<!ENTITY rbconfig.MAJOR "1"> -<!ENTITY rbconfig.MINOR "7"> -<!ENTITY rbconfig.TEENY "2"> -<!ENTITY rbconfig.ruby_version "&rbconfig.MAJOR;.&rbconfig.MINOR;"> -<!ENTITY rbconfig.arch "i686"> -<!ENTITY rbconfig.prefix "/tmp"> -<!ENTITY rbconfig.libdir "&rbconfig.prefix;"> -<!ENTITY rbconfig.includedir "&rbconfig.prefix;"> -<!ENTITY rbconfig.sitedir "&rbconfig.prefix;"> -<!ENTITY rbconfig.sitelibdir "&rbconfig.sitedir;"> -<!ENTITY rbconfig.sitearchdir "&rbconfig.prefix;"> +<!ELEMENT rubynet (pkg)> +<!ATTLIST rubynet xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> +<!ELEMENT pkg (meta,dependencies?,files?)> +<!ATTLIST pkg version CDATA "1.0"> +<!ELEMENT meta (pkgname,authors,maintainers,categories,version,copyright,license,status,full_name,description,homepage,download)> + +<!ELEMENT pkgname (#PCDATA)> +<!ELEMENT authors (author*)> +<!ELEMENT author (name?,(first_name, last_name)?,email?,irc_network?,irc_channel?,irc_handle?)> +<!ELEMENT name (#PCDATA)> +<!ELEMENT email (#PCDATA)> +<!ELEMENT irc_network (#PCDATA)> +<!ELEMENT irc_channel (#PCDATA)> +<!ELEMENT irc_handle (#PCDATA)> + +<!ELEMENT maintainers (maintainer+)> +<!ELEMENT maintainer (name?,(first_name, last_name)?,email,irc_network?,irc_channel?,irc_handle?)> + +<!ELEMENT categories (major_category,minor_category*)> +<!ELEMENT major_category (#PCDATA)> +<!ATTLIST major_category + xlink:type (simple) #FIXED "simple" + xlink:href CDATA #REQUIRED> +<!ELEMENT minor_category (#PCDATA)> +<!ATTLIST minor_category + xlink:type (simple) #FIXED "simple" + xlink:href CDATA #REQUIRED> + +<!ELEMENT version (major_version,minor_version,micro_version)> +<!ELEMENT major_version (#PCDATA)> +<!ELEMENT minor_version (#PCDATA)> +<!ELEMENT micro_version (#PCDATA)> + +<!ELEMENT copyright (#PCDATA)> +<!ELEMENT license (#PCDATA)> +<!ELEMENT status (#PCDATA)> +<!ELEMENT full_name (#PCDATA)> +<!ELEMENT description (#PCDATA)> +<!ELEMENT homepage (#PCDATA)> +<!ATTLIST homepage + xlink:type (simple) #FIXED "simple" + xlink:href CDATA #REQUIRED> +<!ELEMENT download (#PCDATA)> +<!ATTLIST download + xlink:type (simple) #FIXED "simple" + xlink:href CDATA #REQUIRED> + +<!ELEMENT dependencies (dependency*)> +<!ELEMENT dependency (required_version)> +<!ATTLIST dependency + name CDATA #REQUIRED + uri CDATA #REQUIRED> +<!ELEMENT required_version (version?)> +<!ATTLIST required_version restriction (no-lower-than|no-greater-than|any) "any"> + +<!ELEMENT files (file*)> +<!ELEMENT file (filename, mode?, path, content)> +<!ELEMENT filename (#PCDATA)> +<!ELEMENT path (#PCDATA)> +<!ELEMENT mode (#PCDATA)> +<!ELEMENT content (#PCDATA)> +<!ATTLIST content encoding (xml|mime64) "xml"> + +<!ENTITY % rbconfig SYSTEM "rbconfig.xml"> +%rbconfig; ]> -<rubynet> - <pkg="version1.0"> + + +<rubynet xmlns:xlink="http://www.w3.org/1999/xlink"> + <pkg version="1.0"> + <meta> + <pkgname>REXML</pkgname> + <authors> + <author> + <name>Aaron Malone</name> + <email>aa...@mu...</email> + <irc_network>irc.opentprojects.org</irc_network> + <irc_channel>#ruby-lang</irc_channel> + <irc_handle>AAmalone</irc_handle> + </author> + </authors> + <maintainers> + <maintainer> + <name>Tools Team</name> + <email>to...@ge...</email> + <irc_network>irc.opentprojects.org</irc_network> + <irc_channel>#ruby-lang</irc_channel> + <irc_handle>TinyT</irc_handle> + </maintainer> + </maintainers> + <categories> + <major_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/xml/">XML</major_category> + <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/text%20processing/">Text Processing</minor_category> + <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/storage/">Storage</minor_category> + </categories> + <version> + <major_version>1</major_version> + <minor_version>2</minor_version> + <micro_version>3</micro_version> + </version> + <copyright>1999-2002 Gentoo Technologies,Inc.</copyright> + <license>Ruby</license> + <status>Stable</status> + <full_name>Ruby Electric XML</full_name> + <description>Pure Ruby parser, blah blah. Based of Electrice XML</description> + <homepage xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/">REXML Home</homepage> + <download xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/rexml-1.2.3.bz2/">REXML Download</download> + </meta> + <dependencies> + <dependency name="ruby" uri="http://www.rubynet.org/packages/ruby/"> + <required_version restriction="no-lower-than"> + <version> + <major_version>1</major_version> + <minor_version>6</minor_version> + <micro_version>0</micro_version> + </version> + </required_version> + </dependency> + </dependencies> <files> <file> <filename>uga.rb</filename> <mode>0444</mode> - <path>&rbconfig.libdir;</path> + <path>&rbconfig.libdir;/rexml</path> <content encoding="xml">... the file here</content> </file> <file> @@ -49,7 +163,9 @@ <file> <filename>foo.so</filename> <mode>0555</mode> - <path>&rbconfig.sitearchdir;</path> + <path>&rbconfig.sitearchdir;/rexml</path> + <!-- Encode routine: str.to_a.pack('m') + Decode routine: str.unpack('m') --> <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> </file> </files> @@ -57,4 +173,48 @@ </rubynet> EOS end + + +# def mock_package_file_data +# <<-EOS +#<?xml version="1.0" encoding="UTF-8"?> +#<!DOCTYPE rubynet [ +#<!ENTITY rbconfig.MAJOR "1"> +#<!ENTITY rbconfig.MINOR "7"> +#<!ENTITY rbconfig.TEENY "2"> +#<!ENTITY rbconfig.ruby_version "&rbconfig.MAJOR;.&rbconfig.MINOR;"> +#<!ENTITY rbconfig.arch "i686"> +#<!ENTITY rbconfig.prefix "/tmp"> +#<!ENTITY rbconfig.libdir "&rbconfig.prefix;"> +#<!ENTITY rbconfig.includedir "&rbconfig.prefix;"> +#<!ENTITY rbconfig.sitedir "&rbconfig.prefix;"> +#<!ENTITY rbconfig.sitelibdir "&rbconfig.sitedir;"> +#<!ENTITY rbconfig.sitearchdir "&rbconfig.prefix;"> +#]> +#<rubynet> +# <pkg="version1.0"> +# <files> +# <file> +# <filename>uga.rb</filename> +# <mode>0444</mode> +# <path>&rbconfig.libdir;</path> +# <content encoding="xml">... the file here</content> +# </file> +# <file> +# <filename>booga.h</filename> +# <mode>0444</mode> +# <path>&rbconfig.includedir;</path> +# <content encoding="xml">... the file here</content> +# </file> +# <file> +# <filename>foo.so</filename> +# <mode>0555</mode> +# <path>&rbconfig.sitearchdir;</path> +# <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> +# </file> +# </files> +# </pkg> +#</rubynet> +# EOS +# end end |
From: Holden G. <dsa...@us...> - 2002-07-10 08:14:19
|
Update of /cvsroot/rubynet/rubynet/standards In directory usw-pr-cvs1:/tmp/cvs-serv16065/standards Modified Files: package.xml Log Message: * Formatting Index: package.xml =================================================================== RCS file: /cvsroot/rubynet/rubynet/standards/package.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- package.xml 23 Jun 2002 06:31:12 -0000 1.5 +++ package.xml 10 Jul 2002 08:14:17 -0000 1.6 @@ -92,12 +92,6 @@ </maintainer> </maintainers> <categories> - - <!-- For pieces of data that are repeated constnatly, could we - use XLink to centralize some of these definitions? If we move - stuff around on rubynet.org, we don't want to have to do a - search/replace: just update the entity, IMHO. --> - <major_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/xml/">XML</major_category> <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/text%20processing/">Text Processing</minor_category> <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/storage/">Storage</minor_category> @@ -129,23 +123,23 @@ <files> <file> <filename>uga.rb</filename> - <mode>0444</mode> - <path>&rbconfig.libdir;/rexml</path> - <content encoding="xml">... the file here</content> + <mode>0444</mode> + <path>&rbconfig.libdir;/rexml</path> + <content encoding="xml">... the file here</content> </file> <file> <filename>booga.h</filename> - <mode>0444</mode> - <path>&rbconfig.includedir;</path> - <content encoding="xml">... the file here</content> + <mode>0444</mode> + <path>&rbconfig.includedir;</path> + <content encoding="xml">... the file here</content> </file> <file> <filename>foo.so</filename> - <mode>0555</mode> - <path>&rbconfig.sitearchdir;/rexml</path> - <!-- Encode routine: str.to_a.pack('m') - Decode routine: str.unpack('m') --> - <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> + <mode>0555</mode> + <path>&rbconfig.sitearchdir;/rexml</path> + <!-- Encode routine: str.to_a.pack('m') + Decode routine: str.unpack('m') --> + <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> </file> </files> </pkg> |
From: Holden G. <dsa...@us...> - 2002-07-08 10:31:54
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules In directory usw-pr-cvs1:/tmp/cvs-serv381/src/clients/rubynet/modules Modified Files: initialize.rb Log Message: * Modified the removal of items from an array to use set differnce Index: initialize.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/initialize.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- initialize.rb 4 Jul 2002 01:03:02 -0000 1.1 +++ initialize.rb 8 Jul 2002 10:31:50 -0000 1.2 @@ -14,6 +14,7 @@ public def execute() + emptyset = [nil, ''] c = Config::CONFIG # rubynet specific entries @@ -26,29 +27,29 @@ # Create the directories and their previous components for dir in c.keys.sort.collect{|k| c[k] if k =~ /^rubynet/ } - next if dir.nil? - bits = dir.split(File::SEPARATOR) - bits.delete(''); bits.delete(nil) # I wish delete accepted a list + next if dir.nil? + bits = dir.split(File::SEPARATOR) + bits -= emptyset - rnet_path = [] - for dirbit in bits - rnet_path.push(dirbit.dup) - newdir = File.expand_path(File.join(File::SEPARATOR, rnet_path)) - next if File.directory?(newdir) - Dir.mkdir(newdir) - end # for dirbit in bits + rnet_path = [] + for dirbit in bits + rnet_path.push(dirbit.dup) + newdir = File.expand_path(File.join(File::SEPARATOR, rnet_path)) + next if File.directory?(newdir) + Dir.mkdir(newdir) + end # for dirbit in bits end # for dir in... tmp_file = File.join(c['rubynettmpdir'], "rbconfig.xml-#{$$}-#{Time.now.to_f}") File.open(tmp_file, 'w') do |f| - f.puts '<!-- DO NOT EDIT!!! THIS FILE IS AUTO-GENERATED!!! DO NOT EDIT!!! -->' - f.puts "<!-- This File was generated at: #{Time.now()} -->" + f.puts '<!-- DO NOT EDIT!!! THIS FILE IS AUTO-GENERATED!!! DO NOT EDIT!!! -->' + f.puts "<!-- This File was generated at: #{Time.now()} -->" - for key in c.keys.sort - val = c[key] - val = "&rbconfig.#{Regexp.last_match[1]};" if val =~ /^\$\(([^\)]+)\)$/ - f.puts "<!ENTITY rbconfig.#{key} #{val.inspect}>" - end # for key in c.keys... + for key in c.keys.sort + val = c[key] + val = "&rbconfig.#{Regexp.last_match[1]};" if val =~ /^\$\(([^\)]+)\)$/ + f.puts "<!ENTITY rbconfig.#{key} #{val.inspect}>" + end # for key in c.keys... end # File.open(...) do |f| # Use rename because it provides an atomic operation |
From: Holden G. <dsa...@us...> - 2002-07-07 10:09:39
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support/tests In directory usw-pr-cvs1:/tmp/cvs-serv17659/clients/rubynet/modules/support/tests Modified Files: tc_installee.rb Log Message: * modified the test so that it makes new directories as well Index: tc_installee.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support/tests/tc_installee.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tc_installee.rb 6 Jul 2002 10:08:37 -0000 1.1 +++ tc_installee.rb 7 Jul 2002 10:09:35 -0000 1.2 @@ -10,15 +10,16 @@ def test_install read_only_perms_as_dec = 33060 - installee = Rubynet::Installee.new('uga.rb', '/tmp', '0444', + installee = Rubynet::Installee.new('uga.rb', '/tmp/uga', '0444', '... the file here', 'xml') installee.install - assert(File.exist?("/tmp/uga.rb"), "uga.rb does not exist in /tmp") - assert_equal(read_only_perms_as_dec, File.stat("/tmp/uga.rb").mode, + assert(File.exist?("/tmp/uga/uga.rb"), "uga.rb does not exist in /tmp/uga") + assert_equal(read_only_perms_as_dec, File.stat("/tmp/uga/uga.rb").mode, "uga.rb is not mode 0444") ensure - File.delete("/tmp/uga.rb") if File.exist?("/tmp/uga.rb") + File.delete("/tmp/uga/uga.rb") if File.exist?("/tmp/uga/uga.rb") + Dir.delete("/tmp/uga") end end |
From: Holden G. <dsa...@us...> - 2002-07-07 10:08:44
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support In directory usw-pr-cvs1:/tmp/cvs-serv17557/clients/rubynet/modules/support Modified Files: installee.rb Log Message: * Added code to make any number of directories if they don't already exist Index: installee.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support/installee.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- installee.rb 6 Jul 2002 10:18:02 -0000 1.2 +++ installee.rb 7 Jul 2002 10:08:40 -0000 1.3 @@ -1,5 +1,8 @@ # $Id$ +require 'ftools' + + module Rubynet class Installee @@ -24,21 +27,28 @@ # existing. def install file = nil + fullname = @path + File::SEPARATOR + @name - if File.directory?(@path) - fullname = @path + File::SEPARATOR + @name - - unless File.exists?(fullname) || File.symlink?(fullname) - file = File.new(fullname, 'w') - @content.xml_decode - file.write(@content) - file.chmod(@permission.oct) - end + unless File.exists?(fullname) || File.symlink?(fullname) + setup_directories + install_file(fullname) end ensure file.close unless file.nil? end + +protected + def setup_directories + File.mkpath(@path) + end + + + def install_file(fullname) + file = File.new(fullname, 'w') + file.write(@content.xml_decode) + file.chmod(@permission.oct) + end end end |
From: Holden G. <dsa...@us...> - 2002-07-06 10:19:06
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules In directory usw-pr-cvs1:/tmp/cvs-serv6277a/src/clients/rubynet/modules Modified Files: install.rb Log Message: * Initial commit * Extracting more information from metadate of files to install. * Installing a file. Index: install.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/install.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- install.rb 2 Jul 2002 10:55:57 -0000 1.2 +++ install.rb 6 Jul 2002 10:19:03 -0000 1.3 @@ -42,8 +42,9 @@ root.elements.each(FILE_XPATH) do |metadata| file = Rubynet::Installee.new(metadata.elements['filename'].text, metadata.elements['path'].text, - metadata.elements['mode'].text) - p file + metadata.elements['mode'].text, + metadata.elements['content'].text, + metadata.elements['content'].attributes['encoding']) @files << file end @@ -53,7 +54,9 @@ def install_files - nil + @files.each do |installee| + installee.install + end end end |
From: Holden G. <dsa...@us...> - 2002-07-06 10:18:04
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support In directory usw-pr-cvs1:/tmp/cvs-serv6055/src/clients/rubynet/modules/support Modified Files: installee.rb Log Message: * Initial commit. * Added code to deal with installing one file in an existing directory. Index: installee.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support/installee.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- installee.rb 2 Jul 2002 10:53:57 -0000 1.1 +++ installee.rb 6 Jul 2002 10:18:02 -0000 1.2 @@ -7,12 +7,36 @@ attr_reader :name attr_reader :path attr_reader :permission + attr_reader :content + attr_reader :encoding - def initialize(name, path, permission) + def initialize(name, path, permission, content, encoding) @name = name @path = path @permission = permission + @content = content.nil? ? Rubynet::String.new('') : Rubynet::String.new(content) + @encoding = encoding + end + + + # TODO needs to work with multiple diretories in the specified path not + # existing. + def install + file = nil + + if File.directory?(@path) + fullname = @path + File::SEPARATOR + @name + + unless File.exists?(fullname) || File.symlink?(fullname) + file = File.new(fullname, 'w') + @content.xml_decode + file.write(@content) + file.chmod(@permission.oct) + end + end + ensure + file.close unless file.nil? end end |
From: Holden G. <dsa...@us...> - 2002-07-06 10:14:24
|
Update of /cvsroot/rubynet/rubynet/src/share In directory usw-pr-cvs1:/tmp/cvs-serv5426/src/share Added Files: string.rb Log Message: * Initial commit * Added an xml_decode method for a String --- NEW FILE: string.rb --- # $Id: string.rb,v 1.1 2002/07/06 10:14:21 dsafari2000 Exp $ module Rubynet # # Our own String class so we don't pollute the general String usage. # class String < String # # Decodes an XML string with the appropriate entity replacements. # returns: A new String with any normal XML entities expanded. # def xml_decode entities = { '&'=>'&', '<'=>'<', '>'=>'>', '"'=>'"', '''=>"'" } result = self.dup entities.each do |entity, value| entity_re = Regexp.new(Regexp.escape(entity)) result.gsub!(entity_re, value) end return result end end end |
From: Holden G. <dsa...@us...> - 2002-07-06 10:09:45
|
Update of /cvsroot/rubynet/rubynet/src In directory usw-pr-cvs1:/tmp/cvs-serv4731/src Modified Files: unit_tests.rb Log Message: * Added the test suite for the modules/support Index: unit_tests.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/unit_tests.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- unit_tests.rb 2 Jul 2002 10:51:50 -0000 1.3 +++ unit_tests.rb 6 Jul 2002 10:09:43 -0000 1.4 @@ -3,8 +3,12 @@ $: << 'clients/rubynet' +require 'share/string' + + require 'server/dataaccess/tests/ts_dataaccess' require 'server/utils/tests/ts_utils' require 'clients/rubynet/modules/tests/ts_modules' +require 'clients/rubynet/modules/support/tests/ts_support' |
From: Holden G. <dsa...@us...> - 2002-07-06 10:08:59
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests In directory usw-pr-cvs1:/tmp/cvs-serv4639/src/clients/rubynet/modules/tests Modified Files: tc_packageInstall.rb Log Message: Index: tc_packageInstall.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests/tc_packageInstall.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tc_packageInstall.rb 2 Jul 2002 10:54:16 -0000 1.1 +++ tc_packageInstall.rb 6 Jul 2002 10:08:56 -0000 1.2 @@ -23,13 +23,13 @@ <!ENTITY rbconfig.MINOR "7"> <!ENTITY rbconfig.TEENY "2"> <!ENTITY rbconfig.ruby_version "&rbconfig.MAJOR;.&rbconfig.MINOR;"> -<!ENTITY rbconfig.arch "i386-freebsd5"> -<!ENTITY rbconfig.prefix "/usr/local"> -<!ENTITY rbconfig.libdir "&rbconfig.prefix;/lib"> -<!ENTITY rbconfig.includedir "&rbconfig.prefix;/include"> -<!ENTITY rbconfig.sitedir "&rbconfig.prefix;/lib/ruby/site_ruby"> -<!ENTITY rbconfig.sitelibdir "&rbconfig.sitedir;/&rbconfig.ruby_version;"> -<!ENTITY rbconfig.sitearchdir "&rbconfig.sitelibdir;/&rbconfig.arch;"> +<!ENTITY rbconfig.arch "i686"> +<!ENTITY rbconfig.prefix "/tmp"> +<!ENTITY rbconfig.libdir "&rbconfig.prefix;"> +<!ENTITY rbconfig.includedir "&rbconfig.prefix;"> +<!ENTITY rbconfig.sitedir "&rbconfig.prefix;"> +<!ENTITY rbconfig.sitelibdir "&rbconfig.sitedir;"> +<!ENTITY rbconfig.sitearchdir "&rbconfig.prefix;"> ]> <rubynet> <pkg="version1.0"> @@ -37,7 +37,7 @@ <file> <filename>uga.rb</filename> <mode>0444</mode> - <path>&rbconfig.libdir;/rexml</path> + <path>&rbconfig.libdir;</path> <content encoding="xml">... the file here</content> </file> <file> @@ -49,7 +49,7 @@ <file> <filename>foo.so</filename> <mode>0555</mode> - <path>&rbconfig.sitearchdir;/rexml</path> + <path>&rbconfig.sitearchdir;</path> <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> </file> </files> |
From: Holden G. <dsa...@us...> - 2002-07-06 10:08:39
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support/tests In directory usw-pr-cvs1:/tmp/cvs-serv4585/src/clients/rubynet/modules/support/tests Added Files: tc_installee.rb ts_support.rb Log Message: * Initial commit --- NEW FILE: tc_installee.rb --- # $Id: tc_installee.rb,v 1.1 2002/07/06 10:08:37 dsafari2000 Exp $ require 'test/unit' require 'modules/support/installee' class TC_Installee < Test::Unit::TestCase def test_install read_only_perms_as_dec = 33060 installee = Rubynet::Installee.new('uga.rb', '/tmp', '0444', '... the file here', 'xml') installee.install assert(File.exist?("/tmp/uga.rb"), "uga.rb does not exist in /tmp") assert_equal(read_only_perms_as_dec, File.stat("/tmp/uga.rb").mode, "uga.rb is not mode 0444") ensure File.delete("/tmp/uga.rb") if File.exist?("/tmp/uga.rb") end end --- NEW FILE: ts_support.rb --- # $Id: ts_support.rb,v 1.1 2002/07/06 10:08:37 dsafari2000 Exp $ require 'clients/rubynet/modules/support/tests/tc_installee' |
From: Holden G. <dsa...@us...> - 2002-07-06 10:01:49
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support/tests In directory usw-pr-cvs1:/tmp/cvs-serv3760/src/clients/rubynet/modules/support/tests Log Message: Directory /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/support/tests added to the repository |