ld-eventsource 2.0.1 → 2.1.0

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: 4e0485d46aab9fb8bb9ac32ae49c013dde072d0695372089989a2f5e8799b6de
4
- data.tar.gz: 7ca30c7591596b56925da6f157bb2ba39a41eaf8a23679bfd823c05ac83edb81
3
+ metadata.gz: e62fdcf615bb0c699746e63a929e5eb582b8680cf873659d2be9e7e018fb0a89
4
+ data.tar.gz: f5f2b5694a3049e4f5dc2fd5f49de948ab6a8d040151d506a5589b0da4bca0f6
5
5
  SHA512:
6
- metadata.gz: 8a41b9daef952bc55ada55788415d25da1bf5bbfcbd071b52d8f39693132281a654c59cbfb05165af49f189be52bdf579ae130b21a974a67a0d96e239b67861e
7
- data.tar.gz: 650358cf13547c6db91e0a793ed45f32bdd6221f0d96224121132e6055453fb88d1977c13657c1c4230894873c90a0c66761865ae8db232bc355326d34fdbd3b
6
+ metadata.gz: dd8ec3f6a4719860f1bf32bef767917a6b97753b8c9eb060c5478fa93b9115c3090313d5cfe4d00137dd1f764cb4bdfb3af000246718dd446691912f4c17ee1d
7
+ data.tar.gz: 23a6178d006572791caddbfb372bd9a4c68c5e9f32c272c7b3230008698744e973fcecee8d51b2bfc5471ba99f18190b95e0f074307b77dee81d1274b0416d07
data/.circleci/config.yml CHANGED
@@ -20,7 +20,7 @@ jobs:
20
20
  LD_RELEASE_DOCS_TITLE: ""
21
21
  LD_RELEASE_PROJECT: "ruby-eventsource"
22
22
  LD_RELEASE_PROJECT_TEMPLATE: "ruby"
23
- LD_RELEASE_VERSION: "2.0.1"
23
+ LD_RELEASE_VERSION: "2.1.0"
24
24
  steps:
25
25
  - checkout
26
26
  - run:
@@ -190,6 +190,15 @@ module SSE
190
190
  end
191
191
  end
192
192
 
193
+ #
194
+ # Tests whether the client has been shut down by a call to {Client#close}.
195
+ #
196
+ # @return [Boolean] true if the client has been shut down
197
+ #
198
+ def closed?
199
+ @stopped.value
200
+ end
201
+
193
202
  private
194
203
 
195
204
  def reset_http
@@ -1,3 +1,3 @@
1
1
  module SSE
2
- VERSION = "2.0.1"
2
+ VERSION = "2.1.0"
3
3
  end
data/spec/client_spec.rb CHANGED
@@ -426,4 +426,19 @@ EOT
426
426
  end
427
427
  end
428
428
  end
429
+
430
+ it "returns true from closed? when closed" do
431
+ with_server do |server|
432
+ server.setup_response("/") do |req,res|
433
+ send_stream_content(res, "", keep_open: true)
434
+ end
435
+
436
+ with_client(subject.new(server.base_uri)) do |client|
437
+ expect(client.closed?).to be(false)
438
+
439
+ client.close
440
+ expect(client.closed?).to be(true)
441
+ end
442
+ end
443
+ end
429
444
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ld-eventsource
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LaunchDarkly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-10 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler