Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use hoe-style Rakefile-generated gemspec & such

  • Loading branch information...
commit 719cc292236dea53cc4514b2c41af2dfb472dae8 1 parent c6c4eda
@Empact Empact authored
View
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "vendor/override_rake_task"]
+ path = vendor/override_rake_task
+ url = git://github.com/Empact/override_rake_task.git
View
145 History.txt
@@ -0,0 +1,145 @@
+== 2.4.0 (January 9, 2009)
+
+* 1 major enhancement
+
+ * Add xml_convention to enable easy defaulting to common naming formats, such as camel-case and
+ underscored [Ben Woosley]
+
+* 6 minor enhancements
+
+ * Add :frozen option for freezing values on parse [Ben Woosley]
+ * Attempt to minimize node creation by better matching wrappers [Ben Woosley]
+ * Preserve hash values where a single key maps to multiple values, return them as an array rather
+ any single one of them at random (as in group_by rather than index_by) [Ben Woosley]
+ * Deprecate #xml_name? as it's only used for triggering the xml_name warning [Ben Woosley]
+ * REXML parser ignores whitespace, which doesn't matter to us anyway [Ben Woosley]
+ * xml_name is inherited by default [Ben Woosley]
+
+* 2 bug fixes
+
+ * Don't detect objects which define their own empty? as being absent for the purposes
+ of :default and :required [Ben Woosley]
+ * Sub-objects pick up their parent's attributes, even if they're added after
+ the child's use [Ben Woosley]
+
+== 2.3.2 (December 11, 2008)
+
+* Fix that both false and nil values were excluded from to_xml output, when only nil values should be [Ben Woosley]
+
+== 2.3.1 (December 9, 2008)
+
+* Add missing dependencies to extensions/enumerable and Symbol.to_proc,
+ which are as-yet inexplicably pre-included on my system... [Ben Woosley, Per Melin]
+
+== 2.3 (December 7, 2008)
+
+* Fix a bug in the application of blocks to array types [Ben Woosley]
+
+* Objects now inherit xml attributes from their parents, as they should [Ben Woosley, Per Melin]
+
+* Add #xml_initialize, which is called at the end of #from_xml, after the xml attributes
+ are set. Deprecate the half-baked xml_construct in it's favor. [Ben Woosley]
+
+* Fix a bug in the handling of empty Hash types [Ben Woosley]
+
+* Implement automatic bool-ification when the accessor name ends with ?. [Ben Woosley]
+
+* Add missing dependency ActiveSupport [Ben Woosley]
+
+* Remove support for installing as a rails plugin [Ben Woosley]
+
+* Fix a bug where xml_construct was using the refs' names rather than their accessor names for comparison [Ben Woosley]
+
+* Significantly reduce our footprint by selectively including smaller parts of ActiveSupport and Extensions.
+ This avoids problems such as the conflict between ActiveSupport's #to_json and the JSON gem's #to_json.
+ Thanks to Per Melin for reporting this problem. [Ben Woosley]
+
+* Rationalize sub-element xml naming by enforcing the following precedence for the containing xml of an object:
+ :from of parent, xml_name of child, parent's accessor name. The previous fallback did not include xml_name.
+ This new behavior is more consistent, explicit, predictable, and DRY, but it is a breaking change, so a warning
+ is printed to alert others of this behavior change. ROXML::SILENCE_XML_NAME_WARNING may be used to deactivate this
+ warning. [Ben Woosley, James W. Thompson, Delynn Berry]
+
+== 2.2 (November 2, 2008)
+
+* fix gem dependencies [James Healy]
+
+* Add block shorthands for Float and Integer, which precede the block argume if present [Ben Woosley]
+
+* Add :required option to throw on absence [Ben Woosley]
+
+* Deprecate the non-specific #parse in favor of #from_xml [Ben Woosley]
+
+* Fix a bug whereby the default value was carrying over information from one object to another [James Healy, Ben Woosley]
+
+* Fix support for :in on :attr elements [Ben Woosley]
+
+* Deprecate Array#to_h in favor of Array#to_hash [Ben Woosley]
+
+* Deprecate Object#to_latin and Object#to_utf in favor of the same methods on String [Ben Woosley]
+
+== 2.1 (October 3, 2008)
+
+* rake test now uses the default parser selection [Ben Woosley]
+
+* Added rcov code coverage for tests [Anders Engström]
+
+* Accommodate that libxml requires you to name the default namespace when available [Ben Woosley]
+
+* Enable optional selection of a parser through the early definition of ROXML::XML_PARSER
+ [Ben Woosley]
+
+* Enable fallback to the REXML parser if LibXML is unavailable [Ben Woosley]
+
+== 2.0 (September 20, 2008)
+
+* :text_content becomes simply :content, and is joined by :name [Ben Woosley]
+
+* Allow hash mapping from node names and contents: [Ben Woosley]
+
+ xml_reader :name, {:key => :name,
+ :value => :content}, :in => 'container'
+
+* Allow supplying a default via the :else option [Ben Woosley]
+
+* Allow hash mapping of text and attr elements: [Ben Woosley]
+
+ xml_reader :name, {:key => {:text => 'key_name'},
+ :value => {:attr => 'attr_name'}}, :in => 'container'
+
+* Allow 'xml_reader :name, [Type]' as an alternative to 'xml_reader :name, Type, :as => :array'
+ [Ben Woosley]
+
+* Allow attaching a block for manipulating a value on fetch: [Ben Woosley]
+
+ xml_accessor :count, :attr => 'my_int' do |val|
+ Integer(val)
+ end
+
+* Collapse xml_attr, xml_text and xml_object into a single api: xml, patterned after the standard
+ attr, and offer xml_reader and xml_accessor as well. Remove the :readonly arg in the process
+ [Ben Woosley]
+
+* Attach string extensions (#to_latin, #to_utf) to Object rather than String, so we don't have to
+ call #to_s first every time [Ben Woosley]
+
+* Allow a ROXML object to call its constructor on initialization with the xml_construct function
+ [Ben Woosley]
+
+* Use symbols (e.g. :text_content) rather than TAG_CONSTANTS (e.g. TEXT_CONTENT) for readability
+ [Ben Woosley]
+
+* Use named arguments (e.g. :as, :in) rather than positional for clarity,
+ position-independence, and invisible exclusion [Ben Woosley]
+
+* Split out rails_plugin_package_task_gem [Ben Woosley]
+
+* Increase testing significantly, particularly on new functionality & to_xml [Ben Woosley]
+
+== 1.2 (October 10, 2007)
+
+* Fix a bug such that the TEXT_CONTENT tag is no longer also READ_ONLY [Russ Olsen]
+
+== 1.1 (September 24, 2006)
+
+* Initial design & development [Zak Mandhro & Anders Engstrom]
View
77 Manifest.txt
@@ -0,0 +1,77 @@
+History.txt
+MIT-LICENSE
+Manifest.txt
+README.rdoc
+Rakefile
+TODO
+html/index.html
+html/style.css
+lib/roxml.rb
+lib/roxml/extensions/active_support.rb
+lib/roxml/extensions/array.rb
+lib/roxml/extensions/array/conversions.rb
+lib/roxml/extensions/deprecation.rb
+lib/roxml/extensions/string.rb
+lib/roxml/extensions/string/conversions.rb
+lib/roxml/extensions/string/iterators.rb
+lib/roxml/options.rb
+lib/roxml/xml.rb
+lib/roxml/xml/libxml.rb
+lib/roxml/xml/rexml.rb
+roxml.gemspec
+tasks/rspec.rake
+test/bugs/rexml_bugs.rb
+test/fixtures/book_malformed.xml
+test/fixtures/book_pair.xml
+test/fixtures/book_text_with_attribute.xml
+test/fixtures/book_valid.xml
+test/fixtures/book_with_authors.xml
+test/fixtures/book_with_contributions.xml
+test/fixtures/book_with_contributors.xml
+test/fixtures/book_with_contributors_attrs.xml
+test/fixtures/book_with_default_namespace.xml
+test/fixtures/book_with_depth.xml
+test/fixtures/book_with_octal_pages.xml
+test/fixtures/book_with_publisher.xml
+test/fixtures/book_with_wrapped_attr.xml
+test/fixtures/dictionary_of_attr_name_clashes.xml
+test/fixtures/dictionary_of_attrs.xml
+test/fixtures/dictionary_of_guarded_names.xml
+test/fixtures/dictionary_of_mixeds.xml
+test/fixtures/dictionary_of_name_clashes.xml
+test/fixtures/dictionary_of_names.xml
+test/fixtures/dictionary_of_texts.xml
+test/fixtures/library.xml
+test/fixtures/library_uppercase.xml
+test/fixtures/muffins.xml
+test/fixtures/nameless_ageless_youth.xml
+test/fixtures/node_with_attr_name_conflicts.xml
+test/fixtures/node_with_name_conflicts.xml
+test/fixtures/numerology.xml
+test/fixtures/person.xml
+test/fixtures/person_with_guarded_mothers.xml
+test/fixtures/person_with_mothers.xml
+test/mocks/dictionaries.rb
+test/mocks/mocks.rb
+test/release/dependencies_test.rb
+test/test_helper.rb
+test/unit/array_test.rb
+test/unit/freeze_test.rb
+test/unit/inheritance_test.rb
+test/unit/options_test.rb
+test/unit/overriden_output_test.rb
+test/unit/roxml_test.rb
+test/unit/string_test.rb
+test/unit/to_xml_test.rb
+test/unit/xml_attribute_test.rb
+test/unit/xml_block_test.rb
+test/unit/xml_bool_test.rb
+test/unit/xml_construct_test.rb
+test/unit/xml_convention_test.rb
+test/unit/xml_hash_test.rb
+test/unit/xml_initialize_test.rb
+test/unit/xml_name_test.rb
+test/unit/xml_namespace_test.rb
+test/unit/xml_object_test.rb
+test/unit/xml_required_test.rb
+test/unit/xml_text_test.rb
View
180 Rakefile
@@ -1,100 +1,90 @@
-# Rake libraries used
-require "rubygems"
-require "rake/rdoctask"
-require "rake/contrib/rubyforgepublisher"
-require "rake/contrib/publisher"
-require 'rake/gempackagetask'
-require 'rake/testtask'
-
-# load settings
-spec = eval(IO.read("roxml.gemspec"))
-
-# Provide the username used to upload website etc.
-RubyForgeConfig = {
- :unix_name=>"roxml",
- :user_name=>"zakmandhro"
-}
-
-task :default => :test
-
-Rake::RDocTask.new do |rd|
- rd.rdoc_dir = "doc"
- rd.rdoc_files.include('MIT-LICENSE', 'README.rdoc', "lib/**/*.rb")
- rd.options << '--main' << 'README.rdoc' << '--title' << 'ROXML Documentation'
+ENV['RUBY_FLAGS'] = '-W1'
+
+%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
+require File.join(File.dirname(__FILE__), 'lib/roxml')
+
+# Generate all the Rake tasks
+# Run 'rake -T' to see list of generated tasks (from gem root directory)
+$hoe = Hoe.new('roxml', ROXML::VERSION) do |p|
+ p.author = ["Ben Woosley", "Zak Mandhro", "Anders Engstrom", "Russ Olsen"]
+ p.email = "ben.woosley@gmail.com"
+ p.url = "http://roxml.rubyforge.org"
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
+ p.rubyforge_name = p.name
+ p.extra_deps = [
+ ['activesupport','>= 2.1.0'],
+ ['extensions', '>= 0.6.0']
+ ]
+ p.extra_dev_deps = [
+ ['newgem', ">= #{::Newgem::VERSION}"]
+ ]
+
+ p.summary = "Ruby Object to XML mapping library"
+ p.description = <<EOF
+ROXML is a Ruby library designed to make it easier for Ruby developers to work with XML.
+Using simple annotations, it enables Ruby classes to be mapped to XML. ROXML takes care
+of the marshalling and unmarshalling of mapped attributes so that developers can focus on
+building first-class Ruby classes. As a result, ROXML simplifies the development of
+RESTful applications, Web Services, and XML-RPC.
+EOF
+
+ p.test_globs = 'test/unit/*_test.rb'
+ p.clean_globs |= %w[**/.DS_Store tmp *.log]
+ path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
+ p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
+ p.rsync_args = '-av --delete --ignore-errors'
end
-desc "Publish Ruby on Rails plug-in on RubyForge"
-task :release_plugin=>:rails_plugin do |task|
- pub = Rake::SshDirPublisher.new("#{RubyForgeConfig[:user_name]}@rubyforge.org",
- "/var/www/gforge-projects/#{RubyForgeConfig[:unix_name]}",
- "pkg/rails_plugin")
- pub.upload()
-end
+require 'newgem/tasks' # load /tasks/*.rake
-desc "Publish and plugin site on RubyForge"
-task :publish do |task|
- pub = Rake::RubyForgePublisher.new(RubyForgeConfig[:unix_name], RubyForgeConfig[:user_name])
- pub.upload()
-end
-
-desc "Install the gem"
-task :install => [:package] do
- sh %{sudo gem install pkg/#{spec.name}-#{spec.version}}
-end
-
-Rake::TestTask.new(:bugs) do |t|
- t.libs << 'test'
- t.test_files = FileList['test/bugs/*_bugs.rb']
- t.verbose = true
-end
+Dir['tasks/**/*.rake'].each { |t| load t }
-@test_files = 'test/unit/*_test.rb'
-desc "Test ROXML using the default parser selection behavior"
-task :test do
- module ROXML
- SILENCE_XML_NAME_WARNING = true
- end
- require 'lib/roxml'
- require 'rake/runtest'
- Rake.run_tests @test_files
-end
-
-namespace :test do
- desc "Test ROXML under the LibXML parser"
- task :libxml do
- module ROXML
- XML_PARSER = 'libxml'
- end
- Rake::Task["test"].invoke
- end
-
- desc "Test ROXML under the REXML parser"
- task :rexml do
- module ROXML
- XML_PARSER = 'rexml'
- end
- Rake::Task["test"].invoke
- end
-
- desc "Runs tests under RCOV"
- task :rcov do
- system "rcov -T --no-html -x '^/' #{FileList[@test_files]}"
- end
-end
-
-desc "Create the ZIP package"
-Rake::PackageTask.new(spec.name, spec.version) do |p|
- p.need_zip = true
- p.package_files = FileList[
- "lib/**/*.rb", "*.txt", "README.rdoc", "Rakefile",
- "rake/**/*","test/**/*.rb", "test/**/*.xml", "html/**/*"]
-end
-
-task :package=>:rdoc
-task :rdoc=>:test
-
-desc "Create a RubyGem project"
-Rake::GemPackageTask.new(spec).define
+task :default => :test
-desc "Clobber generated files"
-task :clobber=>[:clobber_package, :clobber_rdoc]
+## Provide the username used to upload website etc.
+#RubyForgeConfig = {
+# :unix_name=>"roxml",
+# :user_name=>"zakmandhro"
+#}
+
+#Rake::RDocTask.new do |rd|
+# rd.rdoc_dir = "doc"
+# rd.rdoc_files.include('MIT-LICENSE', 'README.rdoc', "lib/**/*.rb")
+# rd.options << '--main' << 'README.rdoc' << '--title' << 'ROXML Documentation'
+#end
+#
+#desc "Publish Ruby on Rails plug-in on RubyForge"
+#task :release_plugin=>:rails_plugin do |task|
+# pub = Rake::SshDirPublisher.new("#{RubyForgeConfig[:user_name]}@rubyforge.org",
+# "/var/www/gforge-projects/#{RubyForgeConfig[:unix_name]}",
+# "pkg/rails_plugin")
+# pub.upload()
+#end
+#
+#desc "Publish and plugin site on RubyForge"
+#task :publish do |task|
+# pub = Rake::RubyForgePublisher.new(RubyForgeConfig[:unix_name], RubyForgeConfig[:user_name])
+# pub.upload()
+#end
+#
+#desc "Install the gem"
+#task :install => [:package] do
+# sh %{sudo gem install pkg/#{spec.name}-#{spec.version}}
+#end
+
+#desc "Create the ZIP package"
+#Rake::PackageTask.new(spec.name, spec.version) do |p|
+# p.need_zip = true
+# p.package_files = FileList[
+# "lib/**/*.rb", "*.txt", "README.rdoc", "Rakefile",
+# "rake/**/*","test/**/*.rb", "test/**/*.xml", "html/**/*"]
+#end
+#
+#task :package=>:rdoc
+#task :rdoc=>:test
+#
+#desc "Create a RubyGem project"
+#Rake::GemPackageTask.new(spec).define
+#
+#desc "Clobber generated files"
+#task :clobber=>[:clobber_package, :clobber_rdoc]
View
2  lib/roxml.rb
@@ -3,6 +3,8 @@
end
module ROXML # :nodoc:
+ VERSION = '2.3.2'
+
def self.included(base) # :nodoc:
base.extend ClassMethods::Accessors,
ClassMethods::Declarations,
View
2  lib/roxml/extensions/active_support.rb
@@ -18,7 +18,7 @@ class Array #:nodoc:
require 'active_support/core_ext/string'
class String
# This conflicts with builder, unless builder is required first, which we don't want to force on people
- undef_method :to_xs
+ undef_method :to_xs if method_defined?(:to_xs)
end
require 'extensions/enumerable'
View
141 roxml.gemspec
@@ -1,105 +1,44 @@
+# -*- encoding: utf-8 -*-
+
Gem::Specification.new do |s|
- s.name = "roxml"
- s.summary = "Ruby Object to XML mapping library"
- s.version = "2.3.1"
- s.homepage = "http://roxml.rubyforge.org"
- s.platform = Gem::Platform::RUBY
+ s.name = %q{roxml}
+ s.version = "2.3.2"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ben Woosley", "Zak Mandhro", "Anders Engstrom", "Russ Olsen"]
- s.email = "ben.woosley@gmail.com"
- s.rubyforge_project = 'roxml'
- s.files = [
- 'README.rdoc',
- 'MIT-LICENSE',
- 'Rakefile',
- 'roxml.gemspec',
- 'lib/roxml.rb',
- 'lib/roxml/extensions/active_support.rb',
- 'lib/roxml/extensions/array.rb',
- 'lib/roxml/extensions/array/conversions.rb',
- 'lib/roxml/extensions/string.rb',
- 'lib/roxml/extensions/string/conversions.rb',
- 'lib/roxml/extensions/string/iterators.rb',
- 'lib/roxml/extensions/deprecation.rb',
- 'lib/roxml/options.rb',
- 'lib/roxml/xml.rb',
- 'lib/roxml/xml/libxml.rb',
- 'lib/roxml/xml/rexml.rb',
- 'test/fixtures/book_malformed.xml',
- 'test/fixtures/book_pair.xml',
- 'test/fixtures/book_text_with_attribute.xml',
- 'test/fixtures/book_valid.xml',
- 'test/fixtures/book_with_authors.xml',
- 'test/fixtures/book_with_contributions.xml',
- 'test/fixtures/book_with_contributors_attrs.xml',
- 'test/fixtures/book_with_contributors.xml',
- 'test/fixtures/book_with_default_namespace.xml',
- 'test/fixtures/book_with_depth.xml',
- 'test/fixtures/book_with_publisher.xml',
- 'test/fixtures/book_with_wrapped_attr.xml',
- 'test/fixtures/dictionary_of_attrs.xml',
- 'test/fixtures/dictionary_of_attr_name_clashes.xml',
- 'test/fixtures/dictionary_of_guarded_names.xml',
- 'test/fixtures/dictionary_of_mixeds.xml',
- 'test/fixtures/dictionary_of_names.xml',
- 'test/fixtures/dictionary_of_name_clashes.xml',
- 'test/fixtures/dictionary_of_texts.xml',
- 'test/fixtures/library_uppercase.xml',
- 'test/fixtures/library.xml',
- 'test/fixtures/muffins.xml',
- 'test/fixtures/node_with_attr_name_conflicts.xml',
- 'test/fixtures/node_with_name_conflicts.xml',
- 'test/fixtures/nameless_ageless_youth.xml',
- 'test/fixtures/numerology.xml',
- 'test/fixtures/person_with_guarded_mothers.xml',
- 'test/fixtures/person_with_mothers.xml',
- 'test/fixtures/person.xml',
- 'test/mocks/mocks.rb',
- 'test/mocks/dictionaries.rb',
- 'test/release/dependencies_test.rb',
- 'test/test_helper.rb',
- 'test/unit/inheritance_test.rb',
- 'test/unit/options_test.rb',
- 'test/unit/roxml_test.rb',
- 'test/unit/string_test.rb',
- 'test/unit/to_xml_test.rb',
- 'test/unit/xml_attribute_test.rb',
- 'test/unit/xml_block_test.rb',
- 'test/unit/xml_bool_test.rb',
- 'test/unit/xml_construct_test.rb',
- 'test/unit/xml_hash_test.rb',
- 'test/unit/xml_initialize_test.rb',
- 'test/unit/xml_name_test.rb',
- 'test/unit/xml_namespace_test.rb',
- 'test/unit/xml_object_test.rb',
- 'test/unit/xml_required_test.rb',
- 'test/unit/xml_text_test.rb']
- s.requirements << 'none'
- s.add_dependency 'extensions', '>= 0.6.0'
- s.add_dependency 'activesupport', '>= 2.1.0'
- s.require_path = 'lib'
- s.test_files = [
- 'test/unit/inheritance_test.rb',
- 'test/unit/options_test.rb',
- 'test/unit/roxml_test.rb',
- 'test/unit/string_test.rb',
- 'test/unit/to_xml_test.rb',
- 'test/unit/xml_attribute_test.rb',
- 'test/unit/xml_block_test.rb',
- 'test/unit/xml_bool_test.rb',
- 'test/unit/xml_construct_test.rb',
- 'test/unit/xml_hash_test.rb',
- 'test/unit/xml_initialize_test.rb',
- 'test/unit/xml_name_test.rb',
- 'test/unit/xml_namespace_test.rb',
- 'test/unit/xml_object_test.rb',
- 'test/unit/xml_required_test.rb',
- 'test/unit/xml_text_test.rb']
+ s.date = %q{2009-01-15}
+ s.description = %q{ROXML is a Ruby library designed to make it easier for Ruby developers to work with XML. Using simple annotations, it enables Ruby classes to be mapped to XML. ROXML takes care of the marshalling and unmarshalling of mapped attributes so that developers can focus on building first-class Ruby classes. As a result, ROXML simplifies the development of RESTful applications, Web Services, and XML-RPC.}
+ s.email = %q{ben.woosley@gmail.com}
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
+ s.files = ["History.txt", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "TODO", "html/index.html", "html/style.css", "lib/roxml.rb", "lib/roxml/extensions/active_support.rb", "lib/roxml/extensions/array.rb", "lib/roxml/extensions/array/conversions.rb", "lib/roxml/extensions/deprecation.rb", "lib/roxml/extensions/string.rb", "lib/roxml/extensions/string/conversions.rb", "lib/roxml/extensions/string/iterators.rb", "lib/roxml/options.rb", "lib/roxml/xml.rb", "lib/roxml/xml/libxml.rb", "lib/roxml/xml/rexml.rb", "roxml.gemspec", "tasks/rspec.rake", "test/bugs/rexml_bugs.rb", "test/fixtures/book_malformed.xml", "test/fixtures/book_pair.xml", "test/fixtures/book_text_with_attribute.xml", "test/fixtures/book_valid.xml", "test/fixtures/book_with_authors.xml", "test/fixtures/book_with_contributions.xml", "test/fixtures/book_with_contributors.xml", "test/fixtures/book_with_contributors_attrs.xml", "test/fixtures/book_with_default_namespace.xml", "test/fixtures/book_with_depth.xml", "test/fixtures/book_with_octal_pages.xml", "test/fixtures/book_with_publisher.xml", "test/fixtures/book_with_wrapped_attr.xml", "test/fixtures/dictionary_of_attr_name_clashes.xml", "test/fixtures/dictionary_of_attrs.xml", "test/fixtures/dictionary_of_guarded_names.xml", "test/fixtures/dictionary_of_mixeds.xml", "test/fixtures/dictionary_of_name_clashes.xml", "test/fixtures/dictionary_of_names.xml", "test/fixtures/dictionary_of_texts.xml", "test/fixtures/library.xml", "test/fixtures/library_uppercase.xml", "test/fixtures/muffins.xml", "test/fixtures/nameless_ageless_youth.xml", "test/fixtures/node_with_attr_name_conflicts.xml", "test/fixtures/node_with_name_conflicts.xml", "test/fixtures/numerology.xml", "test/fixtures/person.xml", "test/fixtures/person_with_guarded_mothers.xml", "test/fixtures/person_with_mothers.xml", "test/mocks/dictionaries.rb", "test/mocks/mocks.rb", "test/release/dependencies_test.rb", "test/test_helper.rb", "test/unit/array_test.rb", "test/unit/freeze_test.rb", "test/unit/inheritance_test.rb", "test/unit/options_test.rb", "test/unit/overriden_output_test.rb", "test/unit/roxml_test.rb", "test/unit/string_test.rb", "test/unit/to_xml_test.rb", "test/unit/xml_attribute_test.rb", "test/unit/xml_block_test.rb", "test/unit/xml_bool_test.rb", "test/unit/xml_construct_test.rb", "test/unit/xml_convention_test.rb", "test/unit/xml_hash_test.rb", "test/unit/xml_initialize_test.rb", "test/unit/xml_name_test.rb", "test/unit/xml_namespace_test.rb", "test/unit/xml_object_test.rb", "test/unit/xml_required_test.rb", "test/unit/xml_text_test.rb"]
s.has_rdoc = true
- s.description = <<EOF
-ROXML is a Ruby library designed to make it easier for Ruby developers to work with XML.
-Using simple annotations, it enables Ruby classes to be mapped to XML. ROXML takes care
-of the marshalling and unmarshalling of mapped attributes so that developers can focus on
-building first-class Ruby classes. As a result, ROXML simplifies the development of
-RESTful applications, Web Services, and XML-RPC.
-EOF
+ s.homepage = %q{http://roxml.rubyforge.org}
+ s.rdoc_options = ["--main", "README.rdoc"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{roxml}
+ s.rubygems_version = %q{1.3.1.xported}
+ s.summary = %q{Ruby Object to XML mapping library}
+ s.test_files = ["test/unit/freeze_test.rb", "test/unit/array_test.rb", "test/unit/xml_convention_test.rb", "test/unit/xml_object_test.rb", "test/unit/xml_required_test.rb", "test/unit/xml_bool_test.rb", "test/unit/roxml_test.rb", "test/unit/xml_name_test.rb", "test/unit/xml_construct_test.rb", "test/unit/options_test.rb", "test/unit/string_test.rb", "test/unit/xml_namespace_test.rb", "test/unit/xml_text_test.rb", "test/unit/overriden_output_test.rb", "test/unit/xml_block_test.rb", "test/unit/xml_attribute_test.rb", "test/unit/inheritance_test.rb", "test/unit/xml_initialize_test.rb", "test/unit/xml_hash_test.rb", "test/unit/to_xml_test.rb"]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 2
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<activesupport>, [">= 2.1.0"])
+ s.add_runtime_dependency(%q<extensions>, [">= 0.6.0"])
+ s.add_development_dependency(%q<newgem>, [">= 1.2.3"])
+ s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
+ else
+ s.add_dependency(%q<activesupport>, [">= 2.1.0"])
+ s.add_dependency(%q<extensions>, [">= 0.6.0"])
+ s.add_dependency(%q<newgem>, [">= 1.2.3"])
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
+ end
+ else
+ s.add_dependency(%q<activesupport>, [">= 2.1.0"])
+ s.add_dependency(%q<extensions>, [">= 0.6.0"])
+ s.add_dependency(%q<newgem>, [">= 1.2.3"])
+ s.add_dependency(%q<hoe>, [">= 1.8.0"])
+ end
end
View
42 tasks/test.rake
@@ -0,0 +1,42 @@
+# We need to override hoe's test task in order to support separate REXML & LibXML testing
+require File.join(File.dirname(__FILE__), '../vendor/override_rake_task/lib/override_rake_task')
+
+Rake::TestTask.new(:bugs) do |t|
+ t.libs << 'test'
+ t.test_files = FileList['test/bugs/*_bugs.rb']
+ t.verbose = true
+end
+
+remove_task :test
+desc "Test ROXML using the default parser selection behavior"
+task :test do
+ module ROXML
+ SILENCE_XML_NAME_WARNING = true
+ end
+ require 'lib/roxml'
+ require 'rake/runtest'
+ Rake.run_tests $hoe.test_globs
+end
+
+namespace :test do
+ desc "Test ROXML under the LibXML parser"
+ task :libxml do
+ module ROXML
+ XML_PARSER = 'libxml'
+ end
+ Rake::Task["test"].invoke
+ end
+
+ desc "Test ROXML under the REXML parser"
+ task :rexml do
+ module ROXML
+ XML_PARSER = 'rexml'
+ end
+ Rake::Task["test"].invoke
+ end
+
+ desc "Runs tests under RCOV"
+ task :rcov do
+ system "rcov -T --no-html -x '^/' #{FileList[$hoe.test_globs]}"
+ end
+end
1  vendor/override_rake_task
@@ -0,0 +1 @@
+Subproject commit 7188d9cfed46cdb4d332cd4480946a1a4e0c9da7
Please sign in to comment.
Something went wrong with that request. Please try again.