oga 0.3.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +0 -1
- data/LICENSE +362 -19
- data/README.md +33 -18
- data/ext/c/lexer.c +71 -73
- data/ext/c/lexer.rl +0 -1
- data/ext/java/org/liboga/xml/Lexer.java +33 -35
- data/ext/java/org/liboga/xml/Lexer.rl +0 -1
- data/ext/ragel/base_lexer.rl +0 -1
- data/lib/oga/blacklist.rb +40 -0
- data/lib/oga/css/lexer.rb +47 -45
- data/lib/oga/css/parser.rb +3 -1
- data/lib/oga/lru.rb +2 -0
- data/lib/oga/version.rb +1 -1
- data/lib/oga/whitelist.rb +20 -0
- data/lib/oga/xml/document.rb +1 -1
- data/lib/oga/xml/element.rb +15 -13
- data/lib/oga/xml/entities.rb +1 -1
- data/lib/oga/xml/html_void_elements.rb +6 -21
- data/lib/oga/xml/lexer.rb +87 -19
- data/lib/oga/xml/parser.rb +51 -52
- data/lib/oga/xml/text.rb +1 -1
- data/lib/oga/xpath/evaluator.rb +30 -23
- data/lib/oga/xpath/lexer.rb +72 -70
- data/lib/oga/xpath/parser.rb +3 -1
- data/lib/oga.rb +2 -0
- data/oga.gemspec +1 -1
- metadata +6 -5
- data/doc/DCO.md +0 -25
data/lib/oga/xpath/parser.rb
CHANGED
@@ -11,6 +11,8 @@ module XPath
|
|
11
11
|
#
|
12
12
|
# Unlike {Oga::XML::Parser} this parser only takes String instances as input.
|
13
13
|
#
|
14
|
+
# @api private
|
15
|
+
#
|
14
16
|
class Parser < LL::Driver
|
15
17
|
CONFIG = LL::DriverConfig.new
|
16
18
|
|
@@ -454,7 +456,7 @@ class Parser < LL::Driver
|
|
454
456
|
args = val[1][1]
|
455
457
|
pred = val[1][2]
|
456
458
|
|
457
|
-
if type
|
459
|
+
if type.equal?(:test)
|
458
460
|
# Whenever a bare test is used (e.g. just "A") this actually means
|
459
461
|
# "child::A". Handling this on parser level is the easiest.
|
460
462
|
if args
|
data/lib/oga.rb
CHANGED
@@ -7,6 +7,8 @@ require_relative 'oga/version'
|
|
7
7
|
require_relative 'oga/oga'
|
8
8
|
require_relative 'oga/lru'
|
9
9
|
require_relative 'oga/entity_decoder'
|
10
|
+
require_relative 'oga/blacklist'
|
11
|
+
require_relative 'oga/whitelist'
|
10
12
|
|
11
13
|
# Load these first so that the native extensions don't have to define the
|
12
14
|
# Oga::XML namespace.
|
data/oga.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
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
|
-
s.license = '
|
11
|
+
s.license = 'MPL-2.0'
|
12
12
|
|
13
13
|
s.files = Dir.glob([
|
14
14
|
'checkum/**/*',
|
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yorick Peterse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ast
|
@@ -146,7 +146,6 @@ files:
|
|
146
146
|
- ".yardopts"
|
147
147
|
- LICENSE
|
148
148
|
- README.md
|
149
|
-
- doc/DCO.md
|
150
149
|
- doc/css/common.css
|
151
150
|
- doc/css_selectors.md
|
152
151
|
- doc/manually_creating_documents.md
|
@@ -163,6 +162,7 @@ files:
|
|
163
162
|
- ext/java/org/liboga/xml/Lexer.rl
|
164
163
|
- ext/ragel/base_lexer.rl
|
165
164
|
- lib/oga.rb
|
165
|
+
- lib/oga/blacklist.rb
|
166
166
|
- lib/oga/css/lexer.rb
|
167
167
|
- lib/oga/css/parser.rb
|
168
168
|
- lib/oga/entity_decoder.rb
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/oga/lru.rb
|
173
173
|
- lib/oga/oga.rb
|
174
174
|
- lib/oga/version.rb
|
175
|
+
- lib/oga/whitelist.rb
|
175
176
|
- lib/oga/xml/attribute.rb
|
176
177
|
- lib/oga/xml/cdata.rb
|
177
178
|
- lib/oga/xml/character_node.rb
|
@@ -200,7 +201,7 @@ files:
|
|
200
201
|
- oga.gemspec
|
201
202
|
homepage: https://github.com/yorickpeterse/oga/
|
202
203
|
licenses:
|
203
|
-
-
|
204
|
+
- MPL-2.0
|
204
205
|
metadata: {}
|
205
206
|
post_install_message:
|
206
207
|
rdoc_options: []
|
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
219
|
version: '0'
|
219
220
|
requirements: []
|
220
221
|
rubyforge_project:
|
221
|
-
rubygems_version: 2.4.
|
222
|
+
rubygems_version: 2.4.7
|
222
223
|
signing_key:
|
223
224
|
specification_version: 4
|
224
225
|
summary: Oga is an XML/HTML parser written in Ruby.
|
data/doc/DCO.md
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# Developer's Certificate of Origin 1.0
|
2
|
-
|
3
|
-
By making a contribution to this project, I certify that:
|
4
|
-
|
5
|
-
1. The contribution was created in whole or in part by me and I
|
6
|
-
have the right to submit it under the open source license
|
7
|
-
indicated in the file LICENSE; or
|
8
|
-
|
9
|
-
2. The contribution is based upon previous work that, to the best
|
10
|
-
of my knowledge, is covered under an appropriate open source
|
11
|
-
license and I have the right under that license to submit that
|
12
|
-
work with modifications, whether created in whole or in part
|
13
|
-
by me, under the same open source license (unless I am
|
14
|
-
permitted to submit under a different license), as indicated
|
15
|
-
in the file LICENSE; or
|
16
|
-
|
17
|
-
3. The contribution was provided directly to me by some other
|
18
|
-
person who certified (1), (2) or (3) and I have not modified
|
19
|
-
it.
|
20
|
-
|
21
|
-
4. I understand and agree that this project and the contribution
|
22
|
-
are public and that a record of the contribution (including all
|
23
|
-
personal information I submit with it, including my sign-off) is
|
24
|
-
maintained indefinitely and may be redistributed consistent with
|
25
|
-
this project or the open source license(s) involved.
|