diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e7dd560..90ae4c57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,66 +1,54 @@ -version: 2 +version: 2.1 workflows: version: 2 test: jobs: - - test-2.5 - - test-2.6 - - test-2.7 - - test-3.0 - - test-jruby-9.2 - -ruby-docker-template: &ruby-docker-template - steps: - - checkout - - run: | - if [[ $CIRCLE_JOB == test-jruby* ]]; then - gem install jruby-openssl; # required by bundler, no effect on Ruby MRI - sudo apt-get update -y && sudo apt-get install -y build-essential - fi - - run: ruby -v - - run: gem install bundler - - run: bundle install - - run: mkdir ./rspec - - run: bundle exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec - - store_test_results: - path: ./rspec - - store_artifacts: - path: ./rspec + - build-test-linux: + name: Ruby 2.5 + docker-image: cimg/ruby:2.5 + - build-test-linux: + name: Ruby 2.6 + docker-image: cimg/ruby:2.6 + - build-test-linux: + name: Ruby 2.7 + docker-image: cimg/ruby:2.7 + - build-test-linux: + name: Ruby 3.0 + docker-image: cimg/ruby:3.0 + - build-test-linux: + name: JRuby 9.2 + docker-image: circleci/jruby:9.2-jdk + jruby: true jobs: - test-2.5: - <<: *ruby-docker-template - docker: - - image: circleci/ruby:2.5 - - image: consul - - image: redis - - image: amazon/dynamodb-local - test-2.6: - <<: *ruby-docker-template - docker: - - image: circleci/ruby:2.6 - - image: consul - - image: redis - - image: amazon/dynamodb-local - test-2.7: - <<: *ruby-docker-template - docker: - - image: circleci/ruby:2.7 - - image: consul - - image: redis - - image: amazon/dynamodb-local - test-3.0: - <<: *ruby-docker-template - docker: - - image: circleci/ruby:3.0 - - image: consul - - image: redis - - image: amazon/dynamodb-local - test-jruby-9.2: - <<: *ruby-docker-template + build-test-linux: + parameters: + docker-image: + type: string + jruby: + type: boolean + default: false + docker: - - image: circleci/jruby:9.2-jdk + - image: <> - image: consul - image: redis - image: amazon/dynamodb-local + + steps: + - checkout + - when: + condition: <> + steps: + - run: gem install jruby-openssl # required by bundler, no effect on Ruby MRI + - run: sudo apt-get update -y && sudo apt-get install -y build-essential + - run: ruby -v + - run: gem install bundler -v 2.2.10 + - run: bundle _2.2.10_ install + - run: mkdir ./rspec + - run: bundle _2.2.10_ exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec + - store_test_results: + path: ./rspec + - store_artifacts: + path: ./rspec diff --git a/launchdarkly-server-sdk.gemspec b/launchdarkly-server-sdk.gemspec index dcf281fe..4321c874 100644 --- a/launchdarkly-server-sdk.gemspec +++ b/launchdarkly-server-sdk.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 2.5.0" spec.add_development_dependency "aws-sdk-dynamodb", "~> 1.57" - spec.add_development_dependency "bundler", "~> 2.1" + spec.add_development_dependency "bundler", "2.2.10" spec.add_development_dependency "rspec", "~> 3.10" spec.add_development_dependency "diplomat", "~> 2.4.2" spec.add_development_dependency "redis", "~> 4.2" @@ -36,10 +36,8 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "semantic", "~> 1.6" spec.add_runtime_dependency "concurrent-ruby", "~> 1.1" - spec.add_runtime_dependency "ld-eventsource", "~> 2.0" + spec.add_runtime_dependency "ld-eventsource", "2.0.1" - # lock json to 2.3.x as ruby libraries often remove - # support for older ruby versions in minor releases - spec.add_runtime_dependency "json", "~> 2.3.1" - spec.add_runtime_dependency "http", "~> 4.4.1" + spec.add_runtime_dependency "json", "~> 2.3" + spec.add_runtime_dependency "http", ">= 4.4.0", "< 6.0.0" end