em-eventsource 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/em-eventsource.rb +2 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f824fba4e073244ab8f97abd68a1e638edee0f5c13f317040f9dc15b64ffe242
|
4
|
+
data.tar.gz: 9a560157f4bd6d8445e51b1eec508d63731e5d1c9f5b1be2505bae63ee50ba30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1893a4ca85fab366860240aa015b4b1d7ee3c9dea803420ee4d07c0a195c797699891f7139fa943fbe16fad0aadba570aec684d4ef0408da9e17c2437ed8f83
|
7
|
+
data.tar.gz: '0593bf3405f9203efbd32a237edc73b7b07563d1c8df573ab93b53f017c54bc6d5652b56e63343372929c23aaac3b91a63dd2d366f953e080a6b644560032278'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# em-eventsource changelog
|
2
2
|
|
3
|
+
## 0.3.2
|
4
|
+
|
5
|
+
- Add TLS hostname verification by default [[#19](https://github.com/francois2metz/em-eventsource/pull/19)]
|
6
|
+
|
3
7
|
## 0.3.1
|
4
8
|
|
5
9
|
- Force UTF-8 encoding on incoming events [[#16](https://github.com/francois2metz/em-eventsource/pull/16)]
|
data/lib/em-eventsource.rb
CHANGED
@@ -35,6 +35,7 @@ module EventMachine
|
|
35
35
|
# query - the query string as hash
|
36
36
|
# headers - the headers for the request as hash
|
37
37
|
def initialize(url, query={}, headers={})
|
38
|
+
@conn = nil
|
38
39
|
@url = url
|
39
40
|
@query = query
|
40
41
|
@headers = headers
|
@@ -193,7 +194,7 @@ module EventMachine
|
|
193
194
|
end
|
194
195
|
|
195
196
|
def prepare_request
|
196
|
-
conn = EM::HttpRequest.new(@url, inactivity_timeout: @inactivity_timeout)
|
197
|
+
conn = EM::HttpRequest.new(@url, {tls: {verify_peer: true}, inactivity_timeout: @inactivity_timeout})
|
197
198
|
@middlewares.each do |middleware, block|
|
198
199
|
if block
|
199
200
|
conn.use(*middleware, &block)
|
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.
|
4
|
+
version: 0.3.2
|
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:
|
11
|
+
date: 2020-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -125,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
|
129
|
-
rubygems_version: 2.7.8
|
128
|
+
rubygems_version: 3.0.3
|
130
129
|
signing_key:
|
131
130
|
specification_version: 4
|
132
131
|
summary: em-eventsource is an eventmachine library to consume Server-Sent Events streaming
|