source "https://rubygems.org"
ruby "3.4.0"

# Bare gem.
gem "rake"

# Single version constraint.
gem "rails", "~> 8.0.0"

# Multi-version constraint — `*requirements` splat in the
# prelude's `def gem(name, *requirements, **opts)`.
gem "rack", ">= 3.0", "< 4.0"

# Single hash kwarg.
gem "puma", require: false

# Multiple hash kwargs.
gem "pry-byebug", require: "pry-byebug", platforms: :mri

# group block — multi-symbol args.
group :development, :test do
  gem "rspec-rails", "~> 7.0"
  gem "factory_bot_rails"
  gem "dotenv-rails", "~> 3.1"
end

# group block — single symbol.
group :development do
  gem "web-console"
  gem "listen", "~> 3.8"
  gem "annotate", require: false
end

group :test do
  gem "capybara"
  gem "selenium-webdriver"
end

# Conditional — exercises `if` at file scope.
if RUBY_VERSION >= "3.4.0"
  gem "csv"
end

# Negative branch — must NOT include the gem. The lock-in
# test asserts this gem is absent, so a regression in
# String comparison or `if` polarity is caught.
if RUBY_VERSION >= "99.0.0"
  gem "future-only-gem"
end

# A gem with a fully populated hash kwarg.
gem "sidekiq", "~> 7.3", require: "sidekiq", platforms: :mri

# platforms block — multi-symbol args, like `group`.
platforms :mri do
  gem "rb-readline"
end

# git block — source override scope.
git "https://github.com/example/forked-gem.git" do
  gem "forked-gem"
end

# path block — local source override scope.
path "vendor/cache" do
  gem "vendored-gem"
end
