oga 2.2-java → 2.3-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 163b0e7eadf5bb5ebadb66dc597decb340081f8f
4
- data.tar.gz: d69fa27825859e9facb54c4086636c7cc747f5bb
3
+ metadata.gz: a4fd0ab4f036f1a99d7890724b96d4d25daaae9d
4
+ data.tar.gz: a0fcf107d5b3f7164e3f1c9e6b2d1c9ed516c4a9
5
5
  SHA512:
6
- metadata.gz: 624e6f145b2dbef574096a5a0e4bd2201549efabe3864f376b3d287c82c0b2acb1878ac90ffea47f4992cc4447b1dbba0885088f99f343b8e1aa65a03f167b90
7
- data.tar.gz: 066f854584acda346eacd3155c1ff44ed1452174483d9c2633d9a84c61fdbfc141509d54af3e3b456673d4c745f4f885194bf7c7bfd0a09be8c8e13d81df905a
6
+ metadata.gz: 25fe29e2fe661f8bf23dd7fac1a7c6655e055e60983ee5bf7c698c920ec6f9a8c283ef3baa9e67ffd8ba39f9a8ff9836e1034c6c2357235e5cf06810cdbe30b1
7
+ data.tar.gz: fcd04611a4ffafffe8ec60eff7e60fb07255931b3df5174e84311b5050932428b1c24c8618062e91fd6e7900a619a3bd9a36c69657d799ac8dc8603edebc20ed
data/README.md CHANGED
@@ -158,7 +158,7 @@ Querying a document using a namespace:
158
158
  * Stream/pull parsing
159
159
  * SAX parsing
160
160
  * Low memory footprint
161
- * High performance, if something doesn't perform well enough it's a bug
161
+ * High performance (taking into account most work happens in Ruby)
162
162
  * Support for XPath 1.0
163
163
  * CSS3 selector support
164
164
  * XML namespace support (registering, querying, etc)
Binary file
@@ -1,3 +1,3 @@
1
1
  module Oga
2
- VERSION = '2.2'
2
+ VERSION = '2.3'
3
3
  end # Oga
@@ -112,19 +112,8 @@ module Oga
112
112
  @data = data
113
113
  @html = options[:html]
114
114
  @strict = options[:strict] || false
115
-
116
- reset
117
- end
118
-
119
- # Resets the internal state of the lexer. Typically you don't need to
120
- # call this method yourself as its called by #lex after lexing a given
121
- # String.
122
- def reset
123
115
  @line = 1
124
116
  @elements = []
125
-
126
- @data.rewind if @data.respond_to?(:rewind)
127
-
128
117
  reset_native
129
118
  end
130
119
 
@@ -149,9 +138,6 @@ module Oga
149
138
 
150
139
  # Gathers all the tokens for the input and returns them as an Array.
151
140
  #
152
- # This method resets the internal state of the lexer after consuming the
153
- # input.
154
- #
155
141
  # @see #advance
156
142
  # @return [Array]
157
143
  def lex
@@ -161,8 +147,6 @@ module Oga
161
147
  tokens << [type, value, line]
162
148
  end
163
149
 
164
- reset
165
-
166
150
  tokens
167
151
  end
168
152
 
@@ -178,8 +162,6 @@ module Oga
178
162
  # This method stores the supplied block in `@block` and resets it after
179
163
  # the lexer loop has finished.
180
164
  #
181
- # This method does *not* reset the internal state of the lexer.
182
- #
183
165
  # @yieldparam [Symbol] type
184
166
  # @yieldparam [String] value
185
167
  # @yieldparam [Fixnum] line
@@ -218,15 +218,8 @@ class Parser < LL::Driver
218
218
  def initialize(data, options = {})
219
219
  @data = data
220
220
  @lexer = Lexer.new(data, options)
221
-
222
- reset
223
- end
224
-
225
- # Resets the internal state of the parser.
226
- def reset
227
221
  @line = 1
228
-
229
- @lexer.reset
222
+ @lexer.reset_native
230
223
  end
231
224
 
232
225
  # Yields the next token from the lexer.
@@ -264,15 +257,6 @@ class Parser < LL::Driver
264
257
  raise LL::ParserError, message
265
258
  end
266
259
 
267
- # @see [LL::Driver#parse]
268
- def parse
269
- retval = super
270
-
271
- reset
272
-
273
- retval
274
- end
275
-
276
260
  # @param [Array] children
277
261
  # @return [Oga::XML::Document]
278
262
  def on_document(children = [])
@@ -54,13 +54,9 @@ module Oga
54
54
  :xml_declaration => XML::XmlDeclaration
55
55
  }
56
56
 
57
- # @see Oga::XML::Parser#reset
58
- def reset
57
+ def initialize(*args)
59
58
  super
60
-
61
- @block = nil
62
59
  @nesting = []
63
- @node = nil
64
60
  end
65
61
 
66
62
  # Parses the input and yields every node to the supplied block.
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: '2.2'
4
+ version: '2.3'
5
5
  platform: java
6
6
  authors:
7
7
  - Yorick Peterse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-23 00:00:00.000000000 Z
11
+ date: 2016-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -229,3 +229,4 @@ signing_key:
229
229
  specification_version: 4
230
230
  summary: Oga is an XML/HTML parser written in Ruby.
231
231
  test_files: []
232
+ has_rdoc: yard