oga 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/doc/changelog.md +6 -0
- data/lib/oga/version.rb +1 -1
- data/lib/oga/xml/element.rb +1 -3
- data/oga.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 197d219e1e3d722989d7f3a21eaf2139800b5cfa
|
4
|
+
data.tar.gz: ac2bbb8efcb330220afdd86eb7baf8133eca0b70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9124ebd40992d9f53776d4d1eddf920b782c51bfe563da4b6503a7cfda53b00720a9e600aaf905607cd0ee7882a2451477a27aa5bf89be3d056631fdc4baac8
|
7
|
+
data.tar.gz: da9b064ee0fc949d9b6cf699964bf7c7d0922216fd60f882724a15455c05e745c44d8aee92f6c08bcdf4af9d3e92c6a6abe7ed222705371e26ec5df271c49cba
|
data/README.md
CHANGED
@@ -59,6 +59,13 @@ Modifying a document and serializing it back to XML:
|
|
59
59
|
|
60
60
|
document.to_xml # => "<people><person>Bob</person></people>"
|
61
61
|
|
62
|
+
Querying a document using a namespace:
|
63
|
+
|
64
|
+
document = Oga.parse_xml('<root xmlns:x="foo"><x:div></x:div></root>')
|
65
|
+
div = document.xpath('root/x:div').first
|
66
|
+
|
67
|
+
div.namespace # => Namespace(name: "x" uri: "foo")
|
68
|
+
|
62
69
|
## Features
|
63
70
|
|
64
71
|
* Support for parsing XML and HTML(5)
|
@@ -67,6 +74,7 @@ Modifying a document and serializing it back to XML:
|
|
67
74
|
* Low memory footprint
|
68
75
|
* High performance, if something doesn't perform well enough it's a bug
|
69
76
|
* Support for XPath 1.0
|
77
|
+
* XML namespace support (registering, querying, etc)
|
70
78
|
|
71
79
|
## Requirements
|
72
80
|
|
data/doc/changelog.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.1 - 2014-09-13
|
4
|
+
|
5
|
+
This release fixes a problem where element attributes were not separated by
|
6
|
+
spaces. Thanks to Jonathan Rochkind for reporting it and Bill Dueber providing
|
7
|
+
an initial patch for this problem.
|
8
|
+
|
3
9
|
## 0.1.0 - 2014-09-12
|
4
10
|
|
5
11
|
The first public release of Oga. This release contains support for parsing XML,
|
data/lib/oga/version.rb
CHANGED
data/lib/oga/xml/element.rb
CHANGED
@@ -211,11 +211,9 @@ module Oga
|
|
211
211
|
attrs = ''
|
212
212
|
|
213
213
|
attributes.each do |attr|
|
214
|
-
attrs << attr.to_xml
|
214
|
+
attrs << " #{attr.to_xml}"
|
215
215
|
end
|
216
216
|
|
217
|
-
attrs = " #{attrs}" unless attrs.empty?
|
218
|
-
|
219
217
|
return "<#{ns}#{name}#{attrs}>#{body}</#{ns}#{name}>"
|
220
218
|
end
|
221
219
|
|
data/oga.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.version = Oga::VERSION
|
6
6
|
s.authors = ['Yorick Peterse']
|
7
7
|
s.email = 'yorickpeterse@gmail.com'
|
8
|
-
s.summary = '
|
8
|
+
s.summary = 'Oga is an XML/HTML parser written in Ruby.'
|
9
9
|
s.homepage = 'https://github.com/yorickpeterse/oga/'
|
10
10
|
s.description = s.summary
|
11
11
|
s.license = 'MIT'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yorick Peterse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: racc
|
@@ -142,7 +142,7 @@ dependencies:
|
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
|
-
description:
|
145
|
+
description: Oga is an XML/HTML parser written in Ruby.
|
146
146
|
email: yorickpeterse@gmail.com
|
147
147
|
executables: []
|
148
148
|
extensions:
|
@@ -216,6 +216,6 @@ rubyforge_project:
|
|
216
216
|
rubygems_version: 2.4.1
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
|
-
summary:
|
219
|
+
summary: Oga is an XML/HTML parser written in Ruby.
|
220
220
|
test_files: []
|
221
221
|
has_rdoc: yard
|