Permalink
Browse files

auto generating the IDL interface

  • Loading branch information...
1 parent 5a83776 commit 08450f39a278d964197cb08236ef8f0a61322812 @tenderlove tenderlove committed Aug 20, 2008
Showing with 743 additions and 4 deletions.
  1. +2 −1 .gitignore
  2. +15 −2 Rakefile
  3. +100 −0 idl/COPYRIGHT.html
  4. +320 −0 idl/dom.idl
  5. +2 −1 lib/nokogiri.rb
  6. +301 −0 lib/nokogiri/generated_interface.rb
  7. +3 −0 lib/nokogiri/version.rb
View
@@ -1,2 +1,3 @@
.*.swp
-*.tmproj
+*.tmproj
+lib/generated_interface.rb
View
@@ -3,11 +3,24 @@
require 'rubygems'
require 'hoe'
-$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
-require 'nokogiri'
+LIB_DIR = File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
+GENERATED_INTERFACE = File.join(LIB_DIR, 'nokogiri', 'generated_interface.rb')
+
+$LOAD_PATH << LIB_DIR
+
+require 'nokogiri/version'
Hoe.new('nokogiri', Nokogiri::VERSION) do |p|
p.developer('Aaron Patterson', 'aaronp@rubyforge.org')
+ p.clean_globs = [GENERATED_INTERFACE]
+end
+
+file GENERATED_INTERFACE => 'idl/dom.idl' do |t|
+ sh "omfg --prefix W3C::Org -o #{t.name} #{t.prerequisites.first}"
end
+Rake::Task[:test].prerequisites << GENERATED_INTERFACE
+Rake::Task[:check_manifest].prerequisites << GENERATED_INTERFACE
+
+
# vim: syntax=Ruby
View
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>W3C IPR SOFTWARE NOTICE</title>
+ </head>
+ <body bgcolor="#FFFFFF" text="#000000">
+ <h1>
+ W3C IPR SOFTWARE NOTICE
+ </h1>
+ <h3>
+ Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
+ Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</loc>, <loc
+ href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
+ Reserved.
+ </h3>
+ <p>
+ The DOM bindings are published under the W3C Software Copyright Notice
+ and License. The software license requires "Notice of any changes or
+ modifications to the W3C files, including the date changes were made."
+ Consequently, modified versions of the DOM bindings must document that
+ they do not conform to the W3C standard; in the case of the IDL binding,
+ the pragma prefix can no longer be 'w3c.org'; in the case of the Java
+ binding, the package names can no longer be in the 'org.w3c' package.
+ </p>
+ <p>
+ <b>Note:</b> The original version of the W3C Software Copyright Notice
+ and License could be found at <a
+ href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
+ </p>
+ <h3>
+ Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/
+ </h3>
+ <p>
+ This W3C work (including software, documents, or other related items) is
+ being provided by the copyright holders under the following license. By
+ obtaining, using and/or copying this work, you (the licensee) agree that
+ you have read, understood, and will comply with the following terms and
+ conditions:
+ </p>
+ <p>
+ Permission to use, copy, and modify this software and its documentation,
+ with or without modification,&nbsp; for any purpose and without fee or
+ royalty is hereby granted, provided that you include the following on ALL
+ copies of the software and documentation or portions thereof, including
+ modifications, that you make:
+ </p>
+ <ol>
+ <li>
+ The full text of this NOTICE in a location viewable to users of the
+ redistributed or derivative work.
+ </li>
+ <li>
+ Any pre-existing intellectual property disclaimers, notices, or terms
+ and conditions. If none exist, a short notice of the following form
+ (hypertext is preferred, text is permitted) should be used within the
+ body of any redistributed or derivative code: "Copyright &copy;
+ [$date-of-software] <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/"
+ </li>
+ <li>
+ Notice of any changes or modifications to the W3C files, including the
+ date changes were made. (We recommend you provide URIs to the location
+ from which the code is derived.)
+ </li>
+ </ol>
+ <p>
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+ HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+ DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+ TRADEMARKS OR OTHER RIGHTS.
+ </p>
+ <p>
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+ DOCUMENTATION.
+ </p>
+ <p>
+ The name and trademarks of copyright holders may NOT be used in
+ advertising or publicity pertaining to the software without specific,
+ written prior permission. Title to copyright in this software and any
+ associated documentation will at all times remain with copyright
+ holders.
+ </p>
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit 08450f3

Please sign in to comment.