stream_parser 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stream_parser/syntax_error.rb +1 -0
- data/lib/stream_parser/version.rb +1 -1
- data/lib/stream_parser.rb +3 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1467f9df4e5b2bcf033a774a97ea24f61635a8249be9a1c7daad54d77251ede6
|
4
|
+
data.tar.gz: dbb178a552f4d194b25a1df946bd10ae546225bc140ce5047695370310562937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faadb8fe5f2706851da234ff47e7a6d01f78a13cc06f663d213e31cf179c35773ef30ae483619070822dad456500e66e1b5a22ba98eb4afb5935bdb6f8fd715f
|
7
|
+
data.tar.gz: 56ace2ac66d7ccdbf217d1e21250cc3d91f54320501a7d75232f613e49fb3d8920eddef54eeb6f20797c9cf5e57807256119a4fc92c0f5676624a25ef556cde3
|
@@ -0,0 +1 @@
|
|
1
|
+
class StreamParser::SyntaxError < StandardError; end
|
data/lib/stream_parser.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module StreamParser
|
2
2
|
|
3
|
-
autoload :HTML,
|
3
|
+
autoload :HTML, 'stream_parser/html'
|
4
|
+
autoload :SyntaxError, 'stream_parser/syntax_error'
|
4
5
|
|
5
6
|
def self.included(base)
|
6
7
|
base.extend ClassMethods
|
@@ -128,7 +129,7 @@ module StreamParser
|
|
128
129
|
ret_value = ""
|
129
130
|
while scan_until(/(#{quote_char}|\Z)/)
|
130
131
|
if match != quote_char
|
131
|
-
raise
|
132
|
+
raise StreamParser::SyntaxError.new("Unbalanced quotes #{quote_char}")
|
132
133
|
elsif !escape_chars.include?(pre_match[-1])
|
133
134
|
ret_value << pre_match
|
134
135
|
return ret_value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stream_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/stream_parser.rb
|
121
121
|
- lib/stream_parser/html.rb
|
122
122
|
- lib/stream_parser/html/tag.rb
|
123
|
+
- lib/stream_parser/syntax_error.rb
|
123
124
|
- lib/stream_parser/version.rb
|
124
125
|
homepage: https://github.com/malomalo/stream_parser
|
125
126
|
licenses:
|
@@ -142,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
143
|
- !ruby/object:Gem::Version
|
143
144
|
version: '0'
|
144
145
|
requirements: []
|
145
|
-
rubygems_version: 3.4
|
146
|
+
rubygems_version: 3.5.4
|
146
147
|
signing_key:
|
147
148
|
specification_version: 4
|
148
149
|
summary: SAX/Stream style parse helpers
|