Skip to content

Commit c769011

Browse files
authored
update dependencies and add CI for ruby 3 (#141)
1 parent 97d2ca0 commit c769011

File tree

8 files changed

+70
-65
lines changed

8 files changed

+70
-65
lines changed

.circleci/config.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ workflows:
44
version: 2
55
test:
66
jobs:
7-
- test-2.4
87
- test-2.5
98
- test-2.6
109
- test-2.7
10+
- test-3.0
1111
- test-jruby-9.2
1212

1313
ruby-docker-template: &ruby-docker-template
@@ -19,7 +19,7 @@ ruby-docker-template: &ruby-docker-template
1919
sudo apt-get update -y && sudo apt-get install -y build-essential
2020
fi
2121
- run: ruby -v
22-
- run: gem install bundler -v 1.17.3
22+
- run: gem install bundler
2323
- run: bundle install
2424
- run: mkdir ./rspec
2525
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec
@@ -29,13 +29,6 @@ ruby-docker-template: &ruby-docker-template
2929
path: ./rspec
3030

3131
jobs:
32-
test-2.4:
33-
<<: *ruby-docker-template
34-
docker:
35-
- image: circleci/ruby:2.4
36-
- image: consul
37-
- image: redis
38-
- image: amazon/dynamodb-local
3932
test-2.5:
4033
<<: *ruby-docker-template
4134
docker:
@@ -57,6 +50,13 @@ jobs:
5750
- image: consul
5851
- image: redis
5952
- image: amazon/dynamodb-local
53+
test-3.0:
54+
<<: *ruby-docker-template
55+
docker:
56+
- image: circleci/ruby:3.0
57+
- image: consul
58+
- image: redis
59+
- image: amazon/dynamodb-local
6060
test-jruby-9.2:
6161
<<: *ruby-docker-template
6262
docker:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Build instructions
1818

1919
### Prerequisites
2020

21-
This SDK is built with [Bundler](https://bundler.io/). To install Bundler, run `gem install bundler -v 1.17.3`. You might need `sudo` to execute the command successfully. As of this writing, the SDK does not support being built with Bundler 2.0.
21+
This SDK is built with [Bundler](https://bundler.io/). To install Bundler, run `gem install bundler`. You might need `sudo` to execute the command successfully.
2222

2323
To install the runtime dependencies:
2424

Gemfile.lock

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: .
33
specs:
44
launchdarkly-server-sdk (5.8.2)
5-
concurrent-ruby (~> 1.0)
5+
concurrent-ruby (~> 1.1)
66
http (~> 4.4.1)
77
json (~> 2.3.1)
88
ld-eventsource (= 2.0.0.pre.beta.1)
@@ -13,14 +13,16 @@ GEM
1313
specs:
1414
addressable (2.7.0)
1515
public_suffix (>= 2.0.2, < 5.0)
16+
ansi (1.5.0)
17+
ast (2.4.2)
1618
aws-eventstream (1.1.0)
17-
aws-partitions (1.388.0)
18-
aws-sdk-core (3.109.1)
19+
aws-partitions (1.418.0)
20+
aws-sdk-core (3.111.2)
1921
aws-eventstream (~> 1, >= 1.0.2)
2022
aws-partitions (~> 1, >= 1.239.0)
2123
aws-sigv4 (~> 1.1)
2224
jmespath (~> 1.0)
23-
aws-sdk-dynamodb (1.55.0)
25+
aws-sdk-dynamodb (1.58.0)
2426
aws-sdk-core (~> 3, >= 3.109.0)
2527
aws-sigv4 (~> 1.1)
2628
aws-sigv4 (1.2.2)
@@ -34,9 +36,9 @@ GEM
3436
faraday (>= 0.9, < 1.1.0)
3537
domain_name (0.5.20190701)
3638
unf (>= 0.0.5, < 1.0.0)
37-
faraday (0.17.3)
39+
faraday (1.0.1)
3840
multipart-post (>= 1.2, < 3)
39-
ffi (1.12.0)
41+
ffi (1.14.2)
4042
ffi-compiler (1.0.1)
4143
ffi (>= 1.0.0)
4244
rake
@@ -55,53 +57,60 @@ GEM
5557
ld-eventsource (2.0.0.pre.beta.1)
5658
concurrent-ruby (~> 1.0)
5759
http (~> 4.4.1)
58-
listen (3.2.1)
60+
listen (3.4.1)
5961
rb-fsevent (~> 0.10, >= 0.10.3)
6062
rb-inotify (~> 0.9, >= 0.9.10)
6163
multipart-post (2.1.1)
64+
oga (2.15)
65+
ast
66+
ruby-ll (~> 2.1)
6267
public_suffix (4.0.6)
6368
rake (13.0.3)
6469
rb-fsevent (0.10.4)
6570
rb-inotify (0.10.1)
6671
ffi (~> 1.0)
67-
redis (3.3.5)
68-
rspec (3.9.0)
69-
rspec-core (~> 3.9.0)
70-
rspec-expectations (~> 3.9.0)
71-
rspec-mocks (~> 3.9.0)
72-
rspec-core (3.9.3)
73-
rspec-support (~> 3.9.3)
74-
rspec-expectations (3.9.3)
72+
redis (4.2.5)
73+
rspec (3.10.0)
74+
rspec-core (~> 3.10.0)
75+
rspec-expectations (~> 3.10.0)
76+
rspec-mocks (~> 3.10.0)
77+
rspec-core (3.10.1)
78+
rspec-support (~> 3.10.0)
79+
rspec-expectations (3.10.1)
7580
diff-lcs (>= 1.2.0, < 2.0)
76-
rspec-support (~> 3.9.0)
77-
rspec-mocks (3.9.1)
81+
rspec-support (~> 3.10.0)
82+
rspec-mocks (3.10.1)
7883
diff-lcs (>= 1.2.0, < 2.0)
79-
rspec-support (~> 3.9.0)
80-
rspec-support (3.9.4)
81-
rspec_junit_formatter (0.3.0)
84+
rspec-support (~> 3.10.0)
85+
rspec-support (3.10.1)
86+
rspec_junit_formatter (0.4.1)
8287
rspec-core (>= 2, < 4, != 2.12.0)
88+
ruby-ll (2.1.2)
89+
ansi
90+
ast
8391
semantic (1.6.1)
8492
timecop (0.9.2)
8593
unf (0.1.4)
8694
unf_ext
8795
unf_ext (0.0.7.7)
96+
webrick (1.7.0)
8897

8998
PLATFORMS
9099
ruby
91100

92101
DEPENDENCIES
93-
aws-sdk-dynamodb (~> 1.18)
94-
bundler (~> 1.17)
95-
connection_pool (>= 2.1.2)
96-
diplomat (>= 2.0.2)
97-
faraday (~> 0.17)
98-
ffi (<= 1.12)
102+
aws-sdk-dynamodb (~> 1.57)
103+
bundler (~> 2.1)
104+
connection_pool (~> 2.2.3)
105+
diplomat (~> 2.4.2)
99106
launchdarkly-server-sdk!
100-
listen (~> 3.0)
101-
redis (~> 3.3.5)
102-
rspec (~> 3.2)
103-
rspec_junit_formatter (~> 0.3.0)
104-
timecop (~> 0.9.1)
107+
listen (~> 3.3)
108+
oga (~> 2.2)
109+
redis (~> 4.2)
110+
rspec (~> 3.10)
111+
rspec_junit_formatter (~> 0.4)
112+
timecop (~> 0.9)
113+
webrick (~> 1.7)
105114

106115
BUNDLED WITH
107-
1.17.3
116+
2.2.3

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LaunchDarkly overview
1717
Supported Ruby versions
1818
-----------------------
1919

20-
This version of the LaunchDarkly SDK has a minimum Ruby version of 2.3.0, or 9.2.0 for JRuby.
20+
This version of the LaunchDarkly SDK has a minimum Ruby version of 2.5.0, or 9.2.0 for JRuby.
2121

2222
Getting started
2323
-----------
@@ -55,4 +55,4 @@ About LaunchDarkly
5555
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
5656
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
5757
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
58-
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies
58+
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
workingDirectory: $(System.DefaultWorkingDirectory)
4646
script: |
4747
ruby -v
48-
gem install bundler -v 1.17.3
48+
gem install bundler
4949
bundle install
5050
mkdir rspec
5151
bundle exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec

launchdarkly-server-sdk.gemspec

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,23 @@ Gem::Specification.new do |spec|
1919
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
2020
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
2121
spec.require_paths = ["lib"]
22-
spec.required_ruby_version = ">= 2.4.0"
22+
spec.required_ruby_version = ">= 2.5.0"
2323

24-
spec.add_development_dependency "aws-sdk-dynamodb", "~> 1.18"
25-
spec.add_development_dependency "bundler", "~> 1.17"
26-
spec.add_development_dependency "rspec", "~> 3.2"
27-
spec.add_development_dependency "diplomat", ">= 2.0.2"
28-
spec.add_development_dependency "redis", "~> 3.3.5"
29-
spec.add_development_dependency "connection_pool", ">= 2.1.2"
30-
spec.add_development_dependency "rspec_junit_formatter", "~> 0.3.0"
31-
spec.add_development_dependency "timecop", "~> 0.9.1"
32-
spec.add_development_dependency "listen", "~> 3.0" # see file_data_source.rb
33-
# these are transitive dependencies of listen and consul respectively
34-
# we constrain them here to make sure the ruby 2.2, 2.3, and 2.4 CI
35-
# cases all pass
36-
spec.add_development_dependency "ffi", "<= 1.12" # >1.12 doesnt support ruby 2.2
37-
spec.add_development_dependency "faraday", "~> 0.17" # >=0.18 doesnt support ruby 2.2
24+
spec.add_development_dependency "aws-sdk-dynamodb", "~> 1.57"
25+
spec.add_development_dependency "bundler", "~> 2.1"
26+
spec.add_development_dependency "rspec", "~> 3.10"
27+
spec.add_development_dependency "diplomat", "~> 2.4.2"
28+
spec.add_development_dependency "redis", "~> 4.2"
29+
spec.add_development_dependency "connection_pool", "~> 2.2.3"
30+
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4"
31+
spec.add_development_dependency "timecop", "~> 0.9"
32+
spec.add_development_dependency "listen", "~> 3.3" # see file_data_source.rb
33+
spec.add_development_dependency "webrick", "~> 1.7"
34+
# required by dynamodb
35+
spec.add_development_dependency "oga", "~> 2.2"
3836

3937
spec.add_runtime_dependency "semantic", "~> 1.6"
40-
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
38+
spec.add_runtime_dependency "concurrent-ruby", "~> 1.1"
4139
spec.add_runtime_dependency "ld-eventsource", "2.0.0.pre.beta.1"
4240

4341
# lock json to 2.3.x as ruby libraries often remove

lib/ldclient-rb/impl/integrations/redis_impl.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ def upsert_internal(kind, new_item)
114114
end
115115

116116
def initialized_internal?
117-
with_connection do |redis|
118-
redis.respond_to?(:exists?) ? redis.exists?(inited_key) : redis.exists(inited_key)
119-
end
117+
with_connection { |redis| redis.exists?(inited_key) }
120118
end
121119

122120
def stop

spec/launchdarkly-server-sdk_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
describe LaunchDarkly do
55
it "can be automatically loaded by Bundler.require" do
66
ldclient_loaded =
7-
Bundler.with_clean_env do
7+
Bundler.with_unbundled_env do
88
Kernel.system("ruby", "./spec/launchdarkly-server-sdk_spec_autoloadtest.rb")
99
end
1010

0 commit comments

Comments
 (0)