rubysl-rexml 2.0.2 → 2.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3751b93c373f7a55b5ff12266574f5ce5e6561b9
4
- data.tar.gz: e90b36ed09e4fc6b665024dc7565098c8838ec9d
3
+ metadata.gz: 91e30152285f87f44bc1907332626b4571ab509b
4
+ data.tar.gz: 7d4b4ad4d07dd9706c0784d1529d562881c60f9b
5
5
  SHA512:
6
- metadata.gz: ff28446a23790d85cbabe96bc2e22c100917f7397203d2eeaa922d47d4969fdbfaf7e49b9d3a658675987b788423640e6514a41b82acc3a2a78163ff3978bff2
7
- data.tar.gz: 36a51c05065fd86ef5e3d3292e1a42d7c64e588c54f6701fe8e8c0cc283ba009e79753861d0dc2b1107f741ae2c03701f24c7e3b09fc6fb043d96526d9ef097f
6
+ metadata.gz: 8e023ec5017bb01045b819ba9909543614e73182ec844143dc3d0c1506b8676f6d7fe0a5d9e00b1e3c3abe469569237beaaf332f80dee086933c45307df2af71
7
+ data.tar.gz: 52a2a21b20c89ff3c4d03ab195340030baeba8a8b22a40a315c2612f7dfd274abca21403200b439990399d0c5f822c34b7554cadbba0f60cd5bca68d31de9899
@@ -5,10 +5,10 @@ env:
5
5
  script: mspec spec
6
6
  rvm:
7
7
  - 2.0.0
8
- - rbx-2.1.1
8
+ - rbx-2.2.1
9
9
  matrix:
10
10
  exclude:
11
11
  - rvm: 2.0.0
12
12
  env: RUBYLIB=lib
13
- - rvm: rbx-2.1.1
13
+ - rvm: rbx-2.2.1
14
14
  env: RUBYLIB=
@@ -0,0 +1,21 @@
1
+ REXML is an XML toolkit for Ruby[http://www.ruby-lang.org], in Ruby.
2
+
3
+ REXML is a _pure_ Ruby, XML 1.0 conforming,
4
+ non-validating[http://www.w3.org/TR/2004/REC-xml-20040204/#sec-conformance]
5
+ toolkit with an intuitive API. REXML passes 100% of the non-validating Oasis
6
+ tests[http://www.oasis-open.org/committees/xml-conformance/xml-test-suite.shtml],
7
+ and provides tree, stream, SAX2, pull, and lightweight APIs. REXML also
8
+ includes a full XPath[http://www.w3c.org/tr/xpath] 1.0 implementation. Since
9
+ Ruby 1.8, REXML is included in the standard Ruby distribution.
10
+
11
+ Main page:: http://www.germane-software.com/software/rexml
12
+ Author:: Sean Russell <serATgermaneHYPHENsoftwareDOTcom>
13
+ Date:: 2008/019
14
+ Version:: 3.1.7.3
15
+
16
+ This API documentation can be downloaded from the REXML home page, or can
17
+ be accessed online[http://www.germane-software.com/software/rexml_doc]
18
+
19
+ A tutorial is available in the REXML distribution in docs/tutorial.html,
20
+ or can be accessed
21
+ online[http://www.germane-software.com/software/rexml/docs/tutorial.html]
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
- # Rubysl::Rexml
1
+ # RubySL::Rexml
2
2
 
3
- TODO: Write a gem description
3
+ This gem packages the MRI standard library REXML. See README.MRI.md for
4
+ license, authors, and description of the original library.
4
5
 
5
6
  ## Installation
6
7
 
@@ -63,7 +63,7 @@ module REXML
63
63
  end
64
64
  end
65
65
 
66
- # Evaluates whether the given string matchs an entity definition,
66
+ # Evaluates whether the given string matches an entity definition,
67
67
  # returning true if so, and false otherwise.
68
68
  def Entity::matches? string
69
69
  (ENTITYDECL =~ string) == 0
@@ -138,8 +138,14 @@ module REXML
138
138
  matches = @value.scan(PEREFERENCE_RE)
139
139
  rv = @value.clone
140
140
  if @parent
141
+ sum = 0
141
142
  matches.each do |entity_reference|
142
143
  entity_value = @parent.entity( entity_reference[0] )
144
+ if sum + entity_value.bytesize > Security.entity_expansion_text_limit
145
+ raise "entity expansion has grown too large"
146
+ else
147
+ sum += entity_value.bytesize
148
+ end
143
149
  rv.gsub!( /%#{entity_reference.join};/um, entity_value )
144
150
  end
145
151
  end
@@ -1,3 +1,5 @@
1
+ require "rexml/parsers/baseparser"
2
+
1
3
  module REXML
2
4
  module Parsers
3
5
  class StreamParser
@@ -27,7 +27,7 @@ module REXML
27
27
  break
28
28
  when :end_doctype
29
29
  context = context[1]
30
- when :start_element, :doctype
30
+ when :start_element, :start_doctype
31
31
  context << event
32
32
  event[1,0] = [context]
33
33
  context = event
@@ -24,7 +24,7 @@ module REXML
24
24
  COPYRIGHT = "Copyright © 2001-2008 Sean Russell <ser@germane-software.com>"
25
25
  DATE = "2008/019"
26
26
  VERSION = "3.1.7.3"
27
- REVISION = %w$Revision: 39528 $[1] || ''
27
+ REVISION = %w$Revision$[1] || ''
28
28
 
29
29
  Copyright = COPYRIGHT
30
30
  Version = VERSION
@@ -1,5 +1,5 @@
1
1
  module RubySL
2
2
  module REXML
3
- VERSION = "2.0.2"
3
+ VERSION = "2.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubysl-rexml
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-31 00:00:00.000000000 Z
11
+ date: 2014-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -77,6 +77,7 @@ files:
77
77
  - ".travis.yml"
78
78
  - Gemfile
79
79
  - LICENSE
80
+ - README.MRI.md
80
81
  - README.md
81
82
  - Rakefile
82
83
  - lib/rexml.rb
@@ -261,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
262
  version: '0'
262
263
  requirements: []
263
264
  rubyforge_project:
264
- rubygems_version: 2.0.7
265
+ rubygems_version: 2.2.2
265
266
  signing_key:
266
267
  specification_version: 4
267
268
  summary: Ruby standard library rexml.
@@ -374,4 +375,3 @@ test_files:
374
375
  - spec/text/value_spec.rb
375
376
  - spec/text/wrap_spec.rb
376
377
  - spec/text/write_with_substitution_spec.rb
377
- has_rdoc: