source "https://rubygems.org"

# SQLite backend. CRuby/Spinel use the `sqlite3` C-ext gem (swapped in
# as runtime/db.rb at transpile time). The JRuby target has no C-ext
# build, so `bin/rh transpile jruby` rewrites this line to `jdbc-sqlite3`
# in its emitted tree (see src/project.rs::jruby_runtime_files) and
# reaches SQLite through the Xerial sqlite-jdbc driver — keeping this
# committed scaffold Gemfile (and its frozen lock) MRI-only.
gem "sqlite3"
gem "minitest"
gem "rake"

# In-process Rack driving for oracle-style suites (the roda-blog
# toolchain gate runs its behavioral oracle through Rack::Test against
# config.ru's app instead of booting Puma).
gem "rack-test"

# CRuby HTTP serving — `rake dev` runs Puma against `config.ru`'s
# Rack adapter to `Main.run`. Spinel-target builds don't reference
# these at runtime (the compiled binary uses sphttp via FFI); the
# gems are still bundle-installed for the toolchain (rake test +
# rubocop run under CRuby in both target trees).
gem "puma"
gem "rack"

# WebSocket handshake + frame parsing for the CRuby target's
# Action-Cable-shape /cable endpoint. Puma supplies the raw socket
# via rack.hijack; websocket-driver owns the protocol. Spinel-target
# builds get the equivalent surface via sphttp's upgrade path
# (deferred). Pinned to 0.8.x — the API stabilized in that line.
gem "websocket-driver", "~> 0.8.0"

# The cable reactor's selector. Already in the bundle as a Puma
# dependency; named here because cable.rb requires it directly, so the
# dependency is ours and must not vanish if Puma ever drops it.
gem "nio4r", "~> 2.0"

# Spinel-subset compliance gate (CI). Runs against the shipped tree
# (scaffold + runtime + lowered emit) after toolchain-spinel emits
# into the scratch dir; catches reflection/concurrency/singleton-class
# patterns spinel rejects but CRuby silently accepts. Interim while
# spinel itself isn't yet runnable as a target.
group :development do
  gem "rubocop", "~> 1.86"
  gem "rubocop_spinel", "~> 0.1"
end

# Build-only: turbo-rails + stimulus-rails are installed for their
# bundled JS assets (`turbo.min.js`, `stimulus.min.js`,
# `stimulus-loading.js`), which `rake assets` copies out of the gem
# dirs into static/assets/. Nothing in this fixture's Ruby runtime
# requires either gem, and the spinel-compiled binary doesn't see
# them. Pulled into Bundler so the gem dirs are consistently
# locatable across machines.
group :assets do
  gem "stimulus-rails"
  gem "turbo-rails"
  gem "actioncable"
  gem "actiontext"
  gem "action_text-trix"
end

# Test-only gems the app's own suite reaches for. The emitted
# test/test_helper.rb is our shim rather than the app's, so the
# requires its helper made are re-added by
# `project.rs::apply_test_gem_wiring` — declared here so the
# tree runs where the gems are NOT already installed.
group :test do
  gem "webmock"
  gem "mocha"
  gem "ruby-vips"
end
