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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cc1101615985f944d1a8f88cd37509d985860be8950fed026bd75399184ce2d
4
- data.tar.gz: c5088acc9378bb08a988a4d53c6fc3d9ec0d92ddfb20a4484a8c5b83e5ce6031
3
+ metadata.gz: 1467f9df4e5b2bcf033a774a97ea24f61635a8249be9a1c7daad54d77251ede6
4
+ data.tar.gz: dbb178a552f4d194b25a1df946bd10ae546225bc140ce5047695370310562937
5
5
  SHA512:
6
- metadata.gz: 8519f3bbcd0dc82e16fb52d366f893fc2465720ac626aa7822604a294c55baed11567bf62ae4b2f6971de0df8f67c2b5722413f1fdd8a86466b894810ef105ec
7
- data.tar.gz: 7c5888f18e4dd6f65d86d117826294bfa4d3aac80a9c14c529764ac93243beb06fbef751107374818b5497fd9e571cfeab5f585c4012cf6763b440d5d23c8885
6
+ metadata.gz: faadb8fe5f2706851da234ff47e7a6d01f78a13cc06f663d213e31cf179c35773ef30ae483619070822dad456500e66e1b5a22ba98eb4afb5935bdb6f8fd715f
7
+ data.tar.gz: 56ace2ac66d7ccdbf217d1e21250cc3d91f54320501a7d75232f613e49fb3d8920eddef54eeb6f20797c9cf5e57807256119a4fc92c0f5676624a25ef556cde3
@@ -0,0 +1 @@
1
+ class StreamParser::SyntaxError < StandardError; end
@@ -1,3 +1,3 @@
1
1
  module StreamParser
2
- VERSION = '0.3'
2
+ VERSION = '0.4'
3
3
  end
data/lib/stream_parser.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module StreamParser
2
2
 
3
- autoload :HTML, File.expand_path('../stream_parser/html', __FILE__)
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 Net::HTTPHeaderSyntaxError.new("Invalid Set-Cookie header format: unbalanced quotes (#{quote_char})")
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.3'
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: 2023-08-09 00:00:00.000000000 Z
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.13
146
+ rubygems_version: 3.5.4
146
147
  signing_key:
147
148
  specification_version: 4
148
149
  summary: SAX/Stream style parse helpers