xml-object 0.9.91 → 0.9.92
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +16 -13
- data/WHATSNEW +13 -1
- data/lib/xml-object.rb +6 -10
- data/lib/xml-object/adapters.rb +1 -2
- data/lib/xml-object/adapters/libxml.rb +1 -2
- data/lib/xml-object/adapters/rexml.rb +1 -2
- data/lib/xml-object/collection_proxy.rb +0 -1
- data/lib/xml-object/properties.rb +0 -1
- data/lib/xml-object/version.rb +4 -0
- data/xml-object.gemspec +12 -10
- metadata +10 -11
- data/lib/jordi-xml-object.rb +0 -1
data/README.rdoc
CHANGED
@@ -7,24 +7,28 @@ convenient, by providing a syntax that fits well in most Ruby programs.
|
|
7
7
|
|
8
8
|
== Dependencies
|
9
9
|
|
10
|
-
None outside of Ruby, though some optional gems add additional features
|
11
|
-
more below.
|
10
|
+
None outside of Ruby, though some optional gems add additional features and
|
11
|
+
speedups. See more below.
|
12
12
|
|
13
|
-
|
13
|
+
== Compatibility
|
14
14
|
|
15
|
-
|
15
|
+
I've tested this release under:
|
16
16
|
|
17
|
-
|
17
|
+
ruby 1.9.1
|
18
|
+
ruby 1.8.7
|
19
|
+
ruby 1.8.6
|
20
|
+
JRuby 1.4.0RC3 (REXML only)
|
18
21
|
|
19
|
-
|
22
|
+
And with the following optionals:
|
20
23
|
|
21
|
-
|
24
|
+
version 1.1.3 of libxml-ruby (for faster execution)
|
25
|
+
version 2.3.4 of activesupport (for inflected plurals)
|
22
26
|
|
23
|
-
|
27
|
+
== Installation instructions
|
24
28
|
|
25
|
-
|
29
|
+
From Gemcutter's gem server (soon to be the new Rubyforge):
|
26
30
|
|
27
|
-
|
31
|
+
gem install xml-object --source http://gemcutter.org
|
28
32
|
|
29
33
|
== Example usage
|
30
34
|
|
@@ -132,9 +136,8 @@ With the same file as in the example above:
|
|
132
136
|
student.courses.first == student.course.first => true
|
133
137
|
|
134
138
|
Note that the pluralization algorithm is just tacking an 's' at the end of
|
135
|
-
the singular, unless +ActiveSupport+ is
|
136
|
-
|
137
|
-
new ones.
|
139
|
+
the singular, unless +ActiveSupport+ is required, in which case you get
|
140
|
+
inflected plurals.
|
138
141
|
|
139
142
|
=== Collection proxy
|
140
143
|
|
data/WHATSNEW
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
* 0.9.
|
1
|
+
* 0.9.92 (2009-10-29):
|
2
|
+
- Tested under 1.9.1, 1.8.7, 1.8.6, and JRuby 1.4.0RC3
|
3
|
+
- [API CHANGE!] No longer requires rubygems (ooops)
|
4
|
+
- [API CHANGE!] No longer attempts to require 'activesupport', you must
|
5
|
+
do it yourself to use inflections and such.
|
6
|
+
- [API CHANGE!] Removed 'jordi-xml-object' since Github gem serving is
|
7
|
+
going away, you must require 'xml-object' now.
|
8
|
+
- Added VERSION constant
|
9
|
+
- Changing gemspec to take advantage Gemcutter workflow
|
10
|
+
- Better global namespace hygiene
|
11
|
+
- Back to using Test::Unit (ze tools, ze tools, le sigh)
|
12
|
+
|
13
|
+
* 0.9.91 (2009-06-23):
|
2
14
|
- Fixes a bug where consecutive collection proxies confused XMLObject
|
3
15
|
mid-parsing (Thanks to Josef Spillner)
|
4
16
|
- Dropped the Hpricot support. Not worth it, API changes too often, and
|
data/lib/xml-object.rb
CHANGED
@@ -1,13 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
require '
|
7
|
-
require 'adapters/rexml'
|
8
|
-
require 'properties'
|
9
|
-
require 'collection_proxy'
|
10
|
-
require 'element'
|
1
|
+
require 'xml-object/version'
|
2
|
+
require 'xml-object/adapters'
|
3
|
+
require 'xml-object/adapters/rexml'
|
4
|
+
require 'xml-object/properties'
|
5
|
+
require 'xml-object/collection_proxy'
|
6
|
+
require 'xml-object/element'
|
11
7
|
|
12
8
|
module XMLObject
|
13
9
|
# Returns a String or Array object representing the given XML, decorated
|
data/lib/xml-object/adapters.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'libxml'
|
2
2
|
|
3
3
|
module XMLObject::Adapters::LibXML
|
4
|
-
|
5
4
|
# Can take a String of XML data, or anything that responds to
|
6
5
|
# either +read+ or +to_s+.
|
7
6
|
def self.new(duck)
|
@@ -32,4 +31,4 @@ module XMLObject::Adapters::LibXML
|
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
35
|
-
::XMLObject.adapter = ::XMLObject::Adapters::LibXML
|
34
|
+
::XMLObject.adapter = ::XMLObject::Adapters::LibXML
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'rexml/document'
|
2
2
|
|
3
3
|
module XMLObject::Adapters::REXML
|
4
|
-
|
5
4
|
# Can take a String of XML data, or anything that responds to
|
6
5
|
# either +read+ or +to_s+.
|
7
6
|
def self.new(duck)
|
@@ -35,4 +34,4 @@ module XMLObject::Adapters::REXML
|
|
35
34
|
end
|
36
35
|
end
|
37
36
|
|
38
|
-
::XMLObject.adapter = ::XMLObject::Adapters::REXML
|
37
|
+
::XMLObject.adapter = ::XMLObject::Adapters::REXML
|
data/xml-object.gemspec
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
|
2
|
-
gem.name = gem.rubyforge_project = 'xml-object'
|
3
|
-
gem.homepage = 'http://xml-object.rubyforge.org'
|
1
|
+
require 'lib/xml-object/version'
|
4
2
|
|
5
|
-
|
6
|
-
gem.
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = 'xml-object'
|
5
|
+
gem.version = XMLObject::VERSION
|
6
|
+
|
7
|
+
gem.author, gem.email = 'Jordi Bunster', 'jordi@bunster.org'
|
7
8
|
|
8
9
|
gem.summary = "The Rubyista's way to do quick XML sit-ups"
|
9
10
|
gem.description = %{ XMLObject is a library for reading (not writing) XML.
|
@@ -11,11 +12,12 @@ XMLOBJECT_GEMSPEC = Gem::Specification.new do |gem|
|
|
11
12
|
documents of a known structure. While not devoid of caveats, it does
|
12
13
|
have a very pleasant, idiomatic Ruby syntax. }.strip!.gsub! /\s+/, ' '
|
13
14
|
|
14
|
-
gem.
|
15
|
-
README.rdoc MIT-LICENSE WHATSNEW ])
|
15
|
+
gem.required_ruby_version = '>= 1.8.6'
|
16
16
|
|
17
|
-
gem.
|
18
|
-
|
17
|
+
gem.has_rdoc = true
|
18
|
+
gem.extra_rdoc_files = %w[ README.rdoc MIT-LICENSE WHATSNEW ]
|
19
|
+
gem.rdoc_options +=
|
20
|
+
%w[ --title XMLObject --main README.rdoc --inline-source ]
|
19
21
|
|
20
22
|
gem.files = %w[
|
21
23
|
MIT-LICENSE
|
@@ -23,8 +25,8 @@ XMLOBJECT_GEMSPEC = Gem::Specification.new do |gem|
|
|
23
25
|
TODO
|
24
26
|
WHATSNEW
|
25
27
|
lib
|
26
|
-
lib/jordi-xml-object.rb
|
27
28
|
lib/xml-object
|
29
|
+
lib/xml-object/version.rb
|
28
30
|
lib/xml-object/adapters
|
29
31
|
lib/xml-object/adapters/libxml.rb
|
30
32
|
lib/xml-object/adapters/rexml.rb
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml-object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.92
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordi Bunster
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-10-30 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -28,10 +28,7 @@ files:
|
|
28
28
|
- README.rdoc
|
29
29
|
- TODO
|
30
30
|
- WHATSNEW
|
31
|
-
- lib
|
32
|
-
- lib/jordi-xml-object.rb
|
33
|
-
- lib/xml-object
|
34
|
-
- lib/xml-object/adapters
|
31
|
+
- lib/xml-object/version.rb
|
35
32
|
- lib/xml-object/adapters/libxml.rb
|
36
33
|
- lib/xml-object/adapters/rexml.rb
|
37
34
|
- lib/xml-object/adapters.rb
|
@@ -41,7 +38,9 @@ files:
|
|
41
38
|
- lib/xml-object.rb
|
42
39
|
- xml-object.gemspec
|
43
40
|
has_rdoc: true
|
44
|
-
homepage:
|
41
|
+
homepage:
|
42
|
+
licenses: []
|
43
|
+
|
45
44
|
post_install_message:
|
46
45
|
rdoc_options:
|
47
46
|
- --title
|
@@ -55,7 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
54
|
requirements:
|
56
55
|
- - ">="
|
57
56
|
- !ruby/object:Gem::Version
|
58
|
-
version:
|
57
|
+
version: 1.8.6
|
59
58
|
version:
|
60
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
60
|
requirements:
|
@@ -65,10 +64,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
64
|
version:
|
66
65
|
requirements: []
|
67
66
|
|
68
|
-
rubyforge_project:
|
69
|
-
rubygems_version: 1.3.
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 1.3.5
|
70
69
|
signing_key:
|
71
|
-
specification_version:
|
70
|
+
specification_version: 3
|
72
71
|
summary: The Rubyista's way to do quick XML sit-ups
|
73
72
|
test_files: []
|
74
73
|
|
data/lib/jordi-xml-object.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require File.expand_path(File.join(File.dirname(__FILE__), 'xml-object'))
|