em-eventsource 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +3 -2
- data/lib/em-eventsource.rb +4 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3ec07f875ae92715156e29869ab067b4974c573982101c3c277ad12e7fd48bd7
|
4
|
+
data.tar.gz: 334a6048430469e842a07d7fcce31f2f7628c3eaac8846c742c39b19a5010f32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a414fff1fce900ccea8e036b39a22bf21b2e6a7a7af79148be176393767fce8364b9a40edacd7bd8c68c331d1bfbbc2fef6bf7e513060100994667e3d851cfc8
|
7
|
+
data.tar.gz: 1767363f1a0ca930a9636091912301ccfa61ed03246aa2b4a0ad90e18c7afc26f585f75a27c1435ff750d162e34f716dbb7d5cde1b7ec869237f5cec0f961651
|
data/README.md
CHANGED
@@ -95,8 +95,9 @@ source.inactivity_timeout = 120 # in seconds (default: 60).
|
|
95
95
|
|
96
96
|
MIT License
|
97
97
|
|
98
|
-
Copyright (C)
|
99
|
-
|
98
|
+
Copyright (C) 2018 François de Metz
|
99
|
+
|
100
|
+
Copyright (C) 2011 af83
|
100
101
|
|
101
102
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
102
103
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/em-eventsource.rb
CHANGED
@@ -178,15 +178,16 @@ module EventMachine
|
|
178
178
|
end
|
179
179
|
|
180
180
|
def prepare_request
|
181
|
-
conn = EM::HttpRequest.new(@url, :
|
181
|
+
conn = EM::HttpRequest.new(@url, inactivity_timeout: @inactivity_timeout)
|
182
182
|
@middlewares.each { |middleware|
|
183
183
|
block = middleware.pop
|
184
184
|
conn.use(*middleware, &block)
|
185
185
|
}
|
186
186
|
headers = @headers.merge({'Cache-Control' => 'no-cache', 'Accept' => 'text/event-stream'})
|
187
187
|
headers.merge!({'Last-Event-Id' => @last_event_id }) if not @last_event_id.nil?
|
188
|
-
[conn, conn.get({ :
|
189
|
-
:
|
188
|
+
[conn, conn.get({ query: @query,
|
189
|
+
head: headers,
|
190
|
+
keepalive: true })]
|
190
191
|
end
|
191
192
|
end
|
192
193
|
end
|
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.2.
|
4
|
+
version: 0.2.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: 2018-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -106,7 +106,7 @@ files:
|
|
106
106
|
- Gemfile
|
107
107
|
- README.md
|
108
108
|
- lib/em-eventsource.rb
|
109
|
-
homepage:
|
109
|
+
homepage: https://github.com/francois2metz/em-eventsource
|
110
110
|
licenses: []
|
111
111
|
metadata: {}
|
112
112
|
post_install_message:
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.7.6
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: em-eventsource is an eventmachine library to consume Server-Sent Events streaming
|