Skip to content

Commit

Permalink
Merge pull request #18 from bigcommerce/ruby-31
Browse files Browse the repository at this point in the history
Add support for Ruby 3.1, drop support for Ruby 2.6
  • Loading branch information
splittingred authored Apr 12, 2022
2 parents 582f0fb + 6487d4d commit 867e94b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 25 deletions.
56 changes: 34 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ ruby_env: &ruby_env
RAILS_ENV: test
RUBY_VERSION: <<parameters.ruby-version>>
docker:
- image: circleci/ruby:<<parameters.ruby-version>>
- image: cimg/ruby:<<parameters.ruby-version>>

executors:
ruby_2_6:
<<: *ruby_env
parameters:
ruby-version:
type: string
default: "2.6"
ruby_2_7:
<<: *ruby_env
parameters:
Expand All @@ -31,6 +25,12 @@ executors:
ruby-version:
type: string
default: "3.0"
ruby_3_1:
<<: *ruby_env
parameters:
ruby-version:
type: string
default: "3.1"
commands:
pre-setup:
steps:
Expand All @@ -41,13 +41,25 @@ commands:
gem_cache_key:
type: string
default: gem-cache-v2
grpc_ruby_build_procs:
type: integer
default: 4
steps:
- restore_cache:
keys:
- <<parameters.gem_cache_key>>-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- <<parameters.gem_cache_key>>-{{ arch }}-{{ .Branch }}
- <<parameters.gem_cache_key>>
- run: bundle check || bundle install --path vendor/bundle
- run:
name: "Bundle install"
command: |
export GRPC_RUBY_BUILD_PROCS=<<parameters.grpc_ruby_build_procs>>
# due to needing GRPC_RUBY_BUILD_PROCS, we need to explicitly install at least this version
gem install grpc -v '>= 1.44.0.pre2' --verbose --no-document
bundle config set --local path 'vendor/bundle'
bundle lock --add-platform x86_64-linux
bundle check || bundle install
bundle clean
- save_cache:
key: <<parameters.gem_cache_key>>-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
paths:
Expand Down Expand Up @@ -89,7 +101,7 @@ jobs:
parameters:
e:
type: executor
default: "ruby_2_6"
default: "ruby_2_7"
steps:
- pre-setup
- bundle-install
Expand All @@ -99,7 +111,7 @@ jobs:
parameters:
e:
type: executor
default: "ruby_2_6"
default: "ruby_2_7"
steps:
- pre-setup
- bundle-install
Expand All @@ -109,25 +121,14 @@ jobs:
parameters:
e:
type: executor
default: "ruby_2_6"
default: "ruby_2_7"
steps:
- pre-setup
- bundle-install
- rspec-unit

workflows:
version: 2
ruby_2_6:
jobs:
- bundle-audit:
name: "ruby-2_6-bundle_audit"
e: "ruby_2_6"
- rubocop:
name: "ruby-2_6-rubocop"
e: "ruby_2_6"
- rspec-unit:
name: "ruby-2_6-rspec"
e: "ruby_2_6"
ruby_2_7:
jobs:
- bundle-audit:
Expand All @@ -150,3 +151,14 @@ workflows:
- rspec-unit:
name: "ruby-3_0-rspec"
e: "ruby_3_0"
ruby_3_1:
jobs:
- bundle-audit:
name: "ruby-3_1-bundle_audit"
e: "ruby_3_1"
- rubocop:
name: "ruby-3_1-rubocop"
e: "ruby_3_1"
- rspec-unit:
name: "ruby-3_1-rspec"
e: "ruby_3_1"
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 2.7
Exclude:
- spec/**/*
- .bundle/**/*
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Changelog for the gruf-lightstep gem.

### Pending Release

- Add support for Ruby 3.1
- Drop support for Ruby 2.6

### 1.5.1

- Remove unnecessarily strict dev dependencies
Expand Down
2 changes: 1 addition & 1 deletion gruf-lightstep.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
spec.files = Dir['README.md', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md', 'lib/**/*', 'gruf-lightstep.gemspec']
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.6'
spec.required_ruby_version = '>= 2.7'

spec.add_development_dependency 'bundler-audit', '>= 0.6'
spec.add_development_dependency 'pry', '>= 0.13'
Expand Down
2 changes: 1 addition & 1 deletion lib/gruf/lightstep/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
#
module Gruf
module Lightstep
VERSION = '1.5.2.pre'
VERSION = '1.6.0.pre'
end
end

0 comments on commit 867e94b

Please sign in to comment.