em-eventsource 0.3.0 → 0.3.1

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: 07eb2474b4e317acf72bc0d1b3d6a6c9ec4302a6c1991fa54d78d30eb824497b
4
- data.tar.gz: 714df708bb8d021db927e63bb7df451d0fb62e29af6b54b87c452dfae02cd7a7
3
+ metadata.gz: 36fde224b8e6113cc864828bb287d234c2d05a32b6a890c79a0a8b265993ecdf
4
+ data.tar.gz: a2739bb05bd948fadfb298628ef775ceaea4dc3b488fde32c01bc423a8d6fc06
5
5
  SHA512:
6
- metadata.gz: 866e483737d4f1f3607918ed21682359865a025107394bc16e802e4c9fc414e0c2302c597593c272d47f321bfe335d6f3f33ce60ea53f2be505cf94a4feaf0dd
7
- data.tar.gz: b7140a888a565b307b9054ff61334c1d9c5c30b126ffea54354ba8b9f13631e42a3259e0fed8e2892b28918669bb92b3da3d39fef78ea37cedfaca4692e11d08
6
+ metadata.gz: d5e44ab237e728636ad30c0be3aff5de80e95587b8057364bc3f79404a3742834dc1406a3128c9a140b902777340b1aa048966244c9cd7a681488b5e5c457e38
7
+ data.tar.gz: 6adafb35a2d039cc47b52b2e11ebe3b3f6c5a0a1b4f3f243e33325ca5a5ce2e6d2b0ffee0d6eb20ac082b20b86530cd7a8b48189686db6798e93b305ae0bdde1
@@ -1,5 +1,9 @@
1
1
  # em-eventsource changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ - Force UTF-8 encoding on incoming events [[#16](https://github.com/francois2metz/em-eventsource/pull/16)]
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  - Handle retry values sent by the server as milliseconds [[#14](https://github.com/francois2metz/em-eventsource/issues/14)]
data/README.md CHANGED
@@ -10,7 +10,7 @@ Install with Rubygems:
10
10
 
11
11
  If you use bundler, add it to your Gemfile:
12
12
 
13
- gem "em-eventsource", "~> 0.2.0"
13
+ gem "em-eventsource", "~> 0.3.0"
14
14
 
15
15
  ## Usage
16
16
 
@@ -117,6 +117,9 @@ module EventMachine
117
117
  @req.callback(&method(:handle_reconnect))
118
118
  buffer = ""
119
119
  @req.stream do |chunk|
120
+ unless chunk.valid_encoding?
121
+ chunk.scrub!('?')
122
+ end
120
123
  buffer += chunk
121
124
  while index = buffer.index(/\r\n\r\n|\n\n/)
122
125
  stream = buffer.slice!(0..index)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-eventsource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - François de Metz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-03 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.7.6
129
+ rubygems_version: 2.7.8
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: em-eventsource is an eventmachine library to consume Server-Sent Events streaming