ld-eventsource 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +34 -46
- data/.gitignore +2 -1
- data/.ldrelease/circleci/linux/execute.sh +18 -0
- data/.ldrelease/circleci/mac/execute.sh +18 -0
- data/.ldrelease/circleci/template/build.sh +19 -0
- data/.ldrelease/circleci/template/gems-setup.sh +16 -0
- data/.ldrelease/circleci/template/prepare.sh +17 -0
- data/.ldrelease/circleci/template/publish.sh +19 -0
- data/.ldrelease/circleci/template/test.sh +10 -0
- data/.ldrelease/circleci/template/update-version.sh +8 -0
- data/.ldrelease/circleci/windows/execute.ps1 +19 -0
- data/.ldrelease/config.yml +5 -0
- data/CHANGELOG.md +15 -0
- data/ld-eventsource.gemspec +2 -2
- data/lib/ld-eventsource/version.rb +1 -1
- metadata +24 -11
- data/Gemfile.lock +0 -67
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4e0485d46aab9fb8bb9ac32ae49c013dde072d0695372089989a2f5e8799b6de
|
4
|
+
data.tar.gz: 7ca30c7591596b56925da6f157bb2ba39a41eaf8a23679bfd823c05ac83edb81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a41b9daef952bc55ada55788415d25da1bf5bbfcbd071b52d8f39693132281a654c59cbfb05165af49f189be52bdf579ae130b21a974a67a0d96e239b67861e
|
7
|
+
data.tar.gz: 650358cf13547c6db91e0a793ed45f32bdd6221f0d96224121132e6055453fb88d1977c13657c1c4230894873c90a0c66761865ae8db232bc355326d34fdbd3b
|
data/.circleci/config.yml
CHANGED
@@ -1,51 +1,39 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# This CircleCI configuration was generated by Releaser for a specific release. It is not to be used
|
2
|
+
# for regular CI builds. Be aware that rerunning this build may cause it to repeat release actions
|
3
|
+
# such as publishing to a package manager. However, it will not perform any Git actions other than
|
4
|
+
# reading the repository.
|
5
|
+
version: 2.1
|
3
6
|
workflows:
|
4
|
-
version: 2
|
5
7
|
test:
|
6
8
|
jobs:
|
7
|
-
-
|
8
|
-
|
9
|
-
- test-2.7
|
10
|
-
- test-3.0
|
11
|
-
- test-jruby-9.2
|
12
|
-
|
13
|
-
ruby-docker-template: &ruby-docker-template
|
14
|
-
steps:
|
15
|
-
- checkout
|
16
|
-
- run: |
|
17
|
-
if [[ $CIRCLE_JOB == test-jruby* ]]; then
|
18
|
-
gem install jruby-openssl; # required by bundler, no effect on Ruby MRI
|
19
|
-
fi
|
20
|
-
- run: sudo apt-get update -y && sudo apt-get install -y build-essential
|
21
|
-
- run: ruby -v
|
22
|
-
- run: gem install bundler -v "~> 1.17"
|
23
|
-
- run: bundle install
|
24
|
-
- run: mkdir ./rspec
|
25
|
-
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec
|
26
|
-
- store_test_results:
|
27
|
-
path: ./rspec
|
28
|
-
- store_artifacts:
|
29
|
-
path: ./rspec
|
30
|
-
|
9
|
+
- release_linux:
|
10
|
+
context: org-global
|
31
11
|
jobs:
|
32
|
-
|
33
|
-
<<: *ruby-docker-template
|
12
|
+
release_linux:
|
34
13
|
docker:
|
35
|
-
- image:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
14
|
+
- image: cimg/ruby:2.5
|
15
|
+
environment:
|
16
|
+
LD_RELEASE_CIRCLECI_TYPE: linux
|
17
|
+
LD_RELEASE_BRANCH: "master"
|
18
|
+
LD_RELEASE_CIRCLECI_BRANCH: ""
|
19
|
+
LD_RELEASE_DOCS_GITHUB_PAGES: ""
|
20
|
+
LD_RELEASE_DOCS_TITLE: ""
|
21
|
+
LD_RELEASE_PROJECT: "ruby-eventsource"
|
22
|
+
LD_RELEASE_PROJECT_TEMPLATE: "ruby"
|
23
|
+
LD_RELEASE_VERSION: "2.0.1"
|
24
|
+
steps:
|
25
|
+
- checkout
|
26
|
+
- run:
|
27
|
+
name: "Releaser: prepare"
|
28
|
+
command: .ldrelease/circleci/mac/execute.sh prepare .ldrelease/circleci/template/prepare.sh
|
29
|
+
- run:
|
30
|
+
name: "Releaser: build"
|
31
|
+
command: .ldrelease/circleci/mac/execute.sh build .ldrelease/circleci/template/build.sh
|
32
|
+
- run:
|
33
|
+
name: "Releaser: test"
|
34
|
+
command: .ldrelease/circleci/mac/execute.sh test .ldrelease/circleci/template/test.sh
|
35
|
+
- run:
|
36
|
+
name: "Releaser: publish"
|
37
|
+
command: .ldrelease/circleci/mac/execute.sh publish .ldrelease/circleci/template/publish.sh
|
38
|
+
- store_artifacts:
|
39
|
+
path: artifacts
|
data/.gitignore
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Performs a delegated release step in a CircleCI Linux container. This mechanism is described
|
6
|
+
# in scripts/circleci/README.md. All of the necessary environment variables should already be
|
7
|
+
# in the generated CircleCI configuration.
|
8
|
+
|
9
|
+
mkdir -p artifacts
|
10
|
+
|
11
|
+
export LD_RELEASE_TEMP_DIR=/tmp/project-releaser-temp
|
12
|
+
mkdir -p ${LD_RELEASE_TEMP_DIR}
|
13
|
+
|
14
|
+
STEP="$1"
|
15
|
+
SCRIPT="$2"
|
16
|
+
echo
|
17
|
+
echo "[${STEP}] executing ${SCRIPT}"
|
18
|
+
"./${SCRIPT}"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Performs a delegated release step in a CircleCI Mac container. This mechanism is described
|
6
|
+
# in scripts/circleci/README.md. All of the necessary environment variables should already be
|
7
|
+
# in the generated CircleCI configuration.
|
8
|
+
|
9
|
+
mkdir -p artifacts
|
10
|
+
|
11
|
+
export LD_RELEASE_TEMP_DIR=/tmp/project-releaser-temp
|
12
|
+
mkdir -p ${LD_RELEASE_TEMP_DIR}
|
13
|
+
|
14
|
+
STEP="$1"
|
15
|
+
SCRIPT="$2"
|
16
|
+
echo
|
17
|
+
echo "[${STEP}] executing ${SCRIPT}"
|
18
|
+
"./${SCRIPT}"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Standard build.sh for Ruby-based projects that publish a gem
|
6
|
+
|
7
|
+
echo "Using gem $(gem --version)"
|
8
|
+
|
9
|
+
#shellcheck source=/dev/null
|
10
|
+
source "$(dirname "$0")/gems-setup.sh"
|
11
|
+
|
12
|
+
echo; echo "Installing dependencies"
|
13
|
+
${BUNDLER_COMMAND} install
|
14
|
+
|
15
|
+
# Build Ruby Gem - this assumes there is a single .gemspec file in the main project directory
|
16
|
+
# Note that the gemspec must be able to get the project version either from $LD_RELEASE_VERSION,
|
17
|
+
# or from somewhere in the source code that the project-specific update-version.sh has updated.
|
18
|
+
echo "Running gem build"
|
19
|
+
gem build ./*.gemspec || { echo "gem build failed" >&2; exit 1; }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# helper script to set GEM_HOME, PATH, and BUNDLER_COMMAND for Ruby - must be sourced, not executed
|
4
|
+
|
5
|
+
mkdir -p "${LD_RELEASE_TEMP_DIR}/gems"
|
6
|
+
export GEM_HOME="${LD_RELEASE_TEMP_DIR}/gems"
|
7
|
+
export PATH="${GEM_HOME}/bin:${PATH}"
|
8
|
+
|
9
|
+
# also, determine whether we'll need to run a specific version of Bundler
|
10
|
+
|
11
|
+
GEMSPEC_BUNDLER_VERSION=$(sed -n -e "s/.*['\"]bundler['\"], *['\"]\([^'\"]*\)['\"]/\1/p" ./*.gemspec | tr -d ' ')
|
12
|
+
if [ -n "${GEMSPEC_BUNDLER_VERSION}" ]; then
|
13
|
+
BUNDLER_COMMAND="bundler _${GEMSPEC_BUNDLER_VERSION}_"
|
14
|
+
else
|
15
|
+
BUNDLER_COMMAND="bundler"
|
16
|
+
fi
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
echo "Using gem $(gem --version)"
|
6
|
+
|
7
|
+
#shellcheck source=/dev/null
|
8
|
+
source "$(dirname "$0")/gems-setup.sh"
|
9
|
+
|
10
|
+
# If the gemspec specifies a certain version of bundler, we need to make sure we install that version.
|
11
|
+
echo "Installing bundler"
|
12
|
+
if [ -n "${GEMSPEC_BUNDLER_VERSION:-}" ]; then
|
13
|
+
GEMSPEC_OPTIONS="-v ${GEMSPEC_BUNDLER_VERSION}"
|
14
|
+
else
|
15
|
+
GEMSPEC_OPTIONS=""
|
16
|
+
fi
|
17
|
+
gem install bundler ${GEMSPEC_OPTIONS} || { echo "installing bundler failed" >&2; exit 1; }
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Standard publish.sh for Ruby-based projects - we can assume build.sh has already been run
|
6
|
+
|
7
|
+
#shellcheck source=/dev/null
|
8
|
+
source "$(dirname "$0")/gems-setup.sh"
|
9
|
+
|
10
|
+
# If we're running in CircleCI, the RubyGems credentials will be in an environment
|
11
|
+
# variable and should be copied to the variable the gem command expects
|
12
|
+
if [ -n "${LD_RELEASE_RUBYGEMS_API_KEY:-}" ]; then
|
13
|
+
export GEM_HOST_API_KEY="${LD_RELEASE_RUBYGEMS_API_KEY}"
|
14
|
+
fi
|
15
|
+
|
16
|
+
# Since all Releaser builds are clean builds, we can assume that the only .gem file here
|
17
|
+
# is the one we just built
|
18
|
+
echo "Running gem push"
|
19
|
+
gem push ./*.gem || { echo "gem push failed" >&2; exit 1; }
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Standard update-version.sh for Ruby-based projects - this will work only if the version string
|
6
|
+
# is in a source file under lib/ that has a line like his: VERSION = "2.0.0"
|
7
|
+
|
8
|
+
"$(dirname "$0")/../update-version-constant.sh" lib '*.rb'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
param(
|
2
|
+
[string]$step,
|
3
|
+
[string]$script
|
4
|
+
)
|
5
|
+
|
6
|
+
# Performs a delegated release step in a CircleCI Windows container using PowerShell. This
|
7
|
+
# mechanism is described in scripts/circleci/README.md. All of the necessary environment
|
8
|
+
# variables should already be in the generated CircleCI configuration.
|
9
|
+
|
10
|
+
$ErrorActionPreference = "Stop"
|
11
|
+
|
12
|
+
New-Item -Path "./artifacts" -ItemType "directory" -Force | Out-Null
|
13
|
+
|
14
|
+
$env:LD_RELEASE_TEMP_DIR = "$env:TEMP\project-releaser-temp"
|
15
|
+
New-Item -Path $env:LD_RELEASE_TEMP_DIR -ItemType "directory" -Force | Out-Null
|
16
|
+
|
17
|
+
Write-Host
|
18
|
+
Write-Host "[$step] executing $script"
|
19
|
+
& "./$script"
|
data/.ldrelease/config.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,21 @@
|
|
2
2
|
|
3
3
|
All notable changes to the LaunchDarkly SSE Client for Ruby will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
|
4
4
|
|
5
|
+
## [2.0.1] - 2021-08-10
|
6
|
+
### Changed:
|
7
|
+
- The dependency version constraint for the `http` gem is now looser: it allows 5.x versions as well as 4.x. The breaking changes in `http` v5.0.0 do not affect `ld-eventsource`.
|
8
|
+
- The project's build now uses v2.2.10 of `bundler` due to known vulnerabilities in other versions.
|
9
|
+
- `Gemfile.lock` has been removed from source control. As this is a library project, the lockfile never affected application code that used this gem, but only affected the gem's own CI build. It is preferable for the CI build to refer only to the gemspec so that it resolves dependencies the same way an application using this gem would, rather than using pinned dependencies that an application would not use.
|
10
|
+
|
11
|
+
## [2.0.0] - 2021-01-26
|
12
|
+
### Added:
|
13
|
+
- Added a `socket_factory` configuration option which can be used for socket creation by the HTTP client if provided. The value of `socket_factory` must be an object providing an `open(uri, timeout)` method and returning a connected socket.
|
14
|
+
|
15
|
+
### Changed:
|
16
|
+
- Switched to the `http` gem instead of `socketry` and a custom HTTP client.
|
17
|
+
- Dropped support for Ruby < version 2.5
|
18
|
+
- Dropped support for JRuby < version 9.2
|
19
|
+
|
5
20
|
## [1.0.3] - 2020-03-17
|
6
21
|
### Fixed:
|
7
22
|
- The backoff delay logic for reconnecting after a stream failure was broken so that if a failure occurred after a stream had been active for at least `reconnect_reset_interval` (default 60 seconds), retries would use _no_ delay, potentially causing a flood of requests and a spike in CPU usage.
|
data/ld-eventsource.gemspec
CHANGED
@@ -20,11 +20,11 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler", "
|
23
|
+
spec.add_development_dependency "bundler", "2.2.10"
|
24
24
|
spec.add_development_dependency "rspec", "~> 3.2"
|
25
25
|
spec.add_development_dependency "rspec_junit_formatter", "~> 0.3.0"
|
26
26
|
spec.add_development_dependency "webrick", "~> 1.7"
|
27
27
|
|
28
28
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
29
|
-
spec.add_runtime_dependency "http", "
|
29
|
+
spec.add_runtime_dependency "http", ">= 4.4.1", "< 6.0.0"
|
30
30
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ld-eventsource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LaunchDarkly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.10
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,22 @@ dependencies:
|
|
84
84
|
name: http
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 4.4.1
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 6.0.0
|
90
93
|
type: :runtime
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
|
-
- - "
|
97
|
+
- - ">="
|
95
98
|
- !ruby/object:Gem::Version
|
96
99
|
version: 4.4.1
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 6.0.0
|
97
103
|
description: LaunchDarkly SSE client for Ruby
|
98
104
|
email:
|
99
105
|
- team@launchdarkly.com
|
@@ -103,10 +109,18 @@ extra_rdoc_files: []
|
|
103
109
|
files:
|
104
110
|
- ".circleci/config.yml"
|
105
111
|
- ".gitignore"
|
112
|
+
- ".ldrelease/circleci/linux/execute.sh"
|
113
|
+
- ".ldrelease/circleci/mac/execute.sh"
|
114
|
+
- ".ldrelease/circleci/template/build.sh"
|
115
|
+
- ".ldrelease/circleci/template/gems-setup.sh"
|
116
|
+
- ".ldrelease/circleci/template/prepare.sh"
|
117
|
+
- ".ldrelease/circleci/template/publish.sh"
|
118
|
+
- ".ldrelease/circleci/template/test.sh"
|
119
|
+
- ".ldrelease/circleci/template/update-version.sh"
|
120
|
+
- ".ldrelease/circleci/windows/execute.ps1"
|
106
121
|
- ".ldrelease/config.yml"
|
107
122
|
- CHANGELOG.md
|
108
123
|
- Gemfile
|
109
|
-
- Gemfile.lock
|
110
124
|
- LICENSE
|
111
125
|
- README.md
|
112
126
|
- ld-eventsource.gemspec
|
@@ -142,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
156
|
- !ruby/object:Gem::Version
|
143
157
|
version: '0'
|
144
158
|
requirements: []
|
145
|
-
|
146
|
-
rubygems_version: 2.5.2.3
|
159
|
+
rubygems_version: 3.2.15
|
147
160
|
signing_key:
|
148
161
|
specification_version: 4
|
149
162
|
summary: LaunchDarkly SSE client
|
data/Gemfile.lock
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
ld-eventsource (2.0.0)
|
5
|
-
concurrent-ruby (~> 1.0)
|
6
|
-
http (~> 4.4.1)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.7.0)
|
12
|
-
public_suffix (>= 2.0.2, < 5.0)
|
13
|
-
concurrent-ruby (1.1.8)
|
14
|
-
diff-lcs (1.3)
|
15
|
-
domain_name (0.5.20190701)
|
16
|
-
unf (>= 0.0.5, < 1.0.0)
|
17
|
-
ffi (1.14.2)
|
18
|
-
ffi (1.14.2-java)
|
19
|
-
ffi-compiler (1.0.1)
|
20
|
-
ffi (>= 1.0.0)
|
21
|
-
rake
|
22
|
-
http (4.4.1)
|
23
|
-
addressable (~> 2.3)
|
24
|
-
http-cookie (~> 1.0)
|
25
|
-
http-form_data (~> 2.2)
|
26
|
-
http-parser (~> 1.2.0)
|
27
|
-
http-cookie (1.0.3)
|
28
|
-
domain_name (~> 0.5)
|
29
|
-
http-form_data (2.3.0)
|
30
|
-
http-parser (1.2.3)
|
31
|
-
ffi-compiler (>= 1.0, < 2.0)
|
32
|
-
public_suffix (4.0.6)
|
33
|
-
rake (13.0.3)
|
34
|
-
rspec (3.7.0)
|
35
|
-
rspec-core (~> 3.7.0)
|
36
|
-
rspec-expectations (~> 3.7.0)
|
37
|
-
rspec-mocks (~> 3.7.0)
|
38
|
-
rspec-core (3.7.1)
|
39
|
-
rspec-support (~> 3.7.0)
|
40
|
-
rspec-expectations (3.7.0)
|
41
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.7.0)
|
43
|
-
rspec-mocks (3.7.0)
|
44
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.7.0)
|
46
|
-
rspec-support (3.7.0)
|
47
|
-
rspec_junit_formatter (0.3.0)
|
48
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
49
|
-
unf (0.1.4)
|
50
|
-
unf_ext
|
51
|
-
unf (0.1.4-java)
|
52
|
-
unf_ext (0.0.7.7)
|
53
|
-
webrick (1.7.0)
|
54
|
-
|
55
|
-
PLATFORMS
|
56
|
-
java
|
57
|
-
ruby
|
58
|
-
|
59
|
-
DEPENDENCIES
|
60
|
-
bundler (~> 1.7)
|
61
|
-
ld-eventsource!
|
62
|
-
rspec (~> 3.2)
|
63
|
-
rspec_junit_formatter (~> 0.3.0)
|
64
|
-
webrick (~> 1.7)
|
65
|
-
|
66
|
-
BUNDLED WITH
|
67
|
-
1.17.3
|