Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
ruby-version-file: .ruby-version

- uses: oxidize-rb/actions/cross-gem@v1
id: cross-gem
Expand Down Expand Up @@ -88,7 +88,7 @@

- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: "3.4"
ruby-version-file: .ruby-version
bundler-cache: true
cargo-cache: false

Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ jobs:
run: bundle exec rake
- name: Compile rust ext
run: bundle exec rake compile:release

rspec_ruby_version_file:
name: "RSpec (ruby-version-file)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version-file: .ruby-version
rustup-toolchain: stable
bundler-cache: true
cargo-cache: false
- name: Run ruby tests
run: bundle exec rake
- name: Compile rust ext
run: bundle exec rake compile:release
static_type_check:
name: "Type Check"
runs-on: ubuntu-latest
Expand All @@ -49,7 +65,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.3
ruby-version-file: .ruby-version
- name: Run static type checks
run: bundle exec srb tc
notify_on_failure:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
/target/
/vendor

# Locally-built native extensions (installed into versioned directories)
# Keep this narrowly scoped so we don't accidentally ignore real Ruby source dirs
# like lib/code_ownership/private/.
/lib/code_ownership/[0-9]*.[0-9]*/

Gemfile.lock

# rspec failure tracking
Expand Down
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ AllCops:
NewCops: enable
Exclude:
- vendor/bundle/**/**
- tmp/**/**
- target/**/**
TargetRubyVersion: 3.2

Metrics/ParameterLists:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.5
4.0.1
2 changes: 1 addition & 1 deletion code_ownership.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
'public gem pushes.'
end

spec.required_ruby_version = '>= 3.2'
spec.required_ruby_version = Gem::Requirement.new('>= 3.2', '< 4.1.dev')

# https://guides.rubygems.org/make-your-own-gem/#adding-an-executable
# and
Expand Down
3 changes: 2 additions & 1 deletion ext/code_ownership/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
require 'mkmf'
require 'rb_sys/mkmf'

create_rust_makefile('code_ownership/code_ownership') do |ext|
ruby_minor = RUBY_VERSION[/\d+\.\d+/]
create_rust_makefile("code_ownership/#{ruby_minor}/code_ownership") do |ext|
ext.extra_cargo_args += ['--crate-type', 'cdylib']
ext.extra_cargo_args += ['--package', 'code_ownership']
end
2 changes: 1 addition & 1 deletion lib/code_ownership/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# frozen_string_literal: true

module CodeOwnership
VERSION = '2.1.0'
VERSION = '2.1.1'
end
3 changes: 2 additions & 1 deletion rakelib/compile.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'rb_sys/extensiontask'

RbSys::ExtensionTask.new('code_ownership', GEMSPEC) do |ext|
ext.lib_dir = 'lib/code_ownership'
ruby_minor = RUBY_VERSION[/\d+\.\d+/]
ext.lib_dir = "lib/code_ownership/#{ruby_minor}"
end
2 changes: 2 additions & 0 deletions sorbet/config
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--dir=.
--ignore=/spec
--ignore=/tmp
--ignore=/target
--ignore=/vendor/bundle
Loading