From 7f964414815aa652ae8084c31f82610ac22fa14a Mon Sep 17 00:00:00 2001 From: doris-xiao-bybit Date: Wed, 22 Jul 2026 19:05:09 +0800 Subject: [PATCH] fix(gemspec): add rake to development dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rubygems/release-gem@v1 action (used by our publish workflow for OIDC trusted publishing) runs `bundle exec rake release` internally. Rakefile already loads bundler/gem_tasks — which provides the `release` task — but the rake gem itself was not declared as a development dependency, so `bundle install` did not pull it into the bundle. Result: can't find executable rake for gem rake. rake is not currently included in the bundle Adding rake ~> 13.0 as a development dependency fixes this and also enables local devs to run `bundle exec rake spec` / `rake rubocop` without a separate gem install. Verified complete chain for `bundle exec rake release` on CI: - rake dev dep: NOW PRESENT - Rakefile: exists, `require 'bundler/gem_tasks'` ✓ - s.version = Bybit::VERSION: pulls from lib/bybit/version.rb ✓ - rubygems.org trusted publisher: configured for bybit-exchange/bybit.ruby.api + publish.yml, no environment ✓ - Ruby 3.3.5 + bundler 2.5.x: aligned with .ruby-version ✓ - Git identity + OIDC creds: set up by release-gem action before rake ✓ Co-Authored-By: Claude Opus 4.7 (1M context) --- bybit-connector-ruby.gemspec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bybit-connector-ruby.gemspec b/bybit-connector-ruby.gemspec index 434a1b2..eda4385 100644 --- a/bybit-connector-ruby.gemspec +++ b/bybit-connector-ruby.gemspec @@ -27,6 +27,12 @@ Gem::Specification.new do |s| # aren't slowed down by it, but declaring it as a runtime dep gives one # `bundle install` for the common case where callers want both. s.add_dependency 'websocket-client-simple', '~> 0.6' + # rake — needed by `bundle exec rake release` (invoked internally by the + # rubygems/release-gem@v1 action for OIDC trusted publishing) and by local + # devs running `bundle exec rake spec` / `rake rubocop`. Rakefile already + # requires 'bundler/gem_tasks', so once rake is installed the standard + # `build`/`release`/`install` tasks light up automatically. + s.add_development_dependency 'rake', '~> 13.0' s.add_development_dependency 'rspec', '~> 3.12' s.add_development_dependency 'rubocop', '~> 1.60' s.add_development_dependency 'simplecov', '~> 0.22'