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 "jdbc-sqlite3"
gem "minitest"
gem "rake"

# 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"

# 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 "turbo-rails"
  gem "stimulus-rails"
end
