oga 2.2-java → 2.3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +1 -1
 - data/lib/liboga.jar +0 -0
 - data/lib/oga/version.rb +1 -1
 - data/lib/oga/xml/lexer.rb +0 -18
 - data/lib/oga/xml/parser.rb +1 -17
 - data/lib/oga/xml/pull_parser.rb +1 -5
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: a4fd0ab4f036f1a99d7890724b96d4d25daaae9d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a0fcf107d5b3f7164e3f1c9e6b2d1c9ed516c4a9
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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 
     | 
| 
      
 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)
         
     | 
    
        data/lib/liboga.jar
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/oga/version.rb
    CHANGED
    
    
    
        data/lib/oga/xml/lexer.rb
    CHANGED
    
    | 
         @@ -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
         
     | 
    
        data/lib/oga/xml/parser.rb
    CHANGED
    
    | 
         @@ -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 = [])
         
     | 
    
        data/lib/oga/xml/pull_parser.rb
    CHANGED
    
    | 
         @@ -54,13 +54,9 @@ module Oga 
     | 
|
| 
       54 
54 
     | 
    
         
             
                    :xml_declaration => XML::XmlDeclaration
         
     | 
| 
       55 
55 
     | 
    
         
             
                  }
         
     | 
| 
       56 
56 
     | 
    
         | 
| 
       57 
     | 
    
         
            -
                   
     | 
| 
       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. 
     | 
| 
      
 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- 
     | 
| 
      
 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
         
     |