Files
ubicloud/Gemfile
geemus 6d6b8317c5 Enable committee openapi schema checking in test and production
Committee is rack middleware that validates requests and responses for
adherence to an openapi specification.  It will limit the kind of
(possibly malicious) input to the API part of the program.  And, it
because it checks the test suite, and we have a 100% branch coverage
policy covering routes, fixing schema problems will keep the openapi
specification up to date as people add features.

committee already detected some mistakes, such as being too relaxed
about content types, in 793b61f260.

Applying committee obsoletes some validation code, but not a lot: at
least some validations are also called from the web application,
rather than the API.  It's not clear to me how well these can be
converged to reduce code.

However, it does obsolete several validation-related API *tests* that
were rolled in with API application testing: now, the entire API is
covered in a consistent way for that kind of thing: parsable JSON,
missing fields, extra fields, etc.

Here's a measurement of the overhead of checking all those requests
for schema conformance in test: it's not really measurable on a
whole-suite basis.

Without:

    > hyperfine -w 3 -- 'bundle exec rspec'
    Benchmark 1: bundle exec rspec
      Time (mean ± σ):     29.790 s ±  2.182 s    [User: 19.139 s, System: 1.391 s]
      Range (min … max):   26.130 s … 33.358 s    10 runs

With:

    > hyperfine -w 3 -- 'bundle exec rspec'
    Benchmark 1: bundle exec rspec
      Time (mean ± σ):     28.378 s ±  1.483 s    [User: 18.705 s, System: 1.364 s]
      Range (min … max):   25.428 s … 30.742 s    10 runs

No, that's not swapped. There's just something else going on that
makes noise larger than the margin of error.
2024-12-03 15:29:16 -08:00

73 lines
1.3 KiB
Ruby

# frozen_string_literal: true
source "https://rubygems.org"
ruby "3.2.6"
gem "argon2"
gem "committee"
gem "nokogiri"
gem "bcrypt_pbkdf"
gem "ed25519"
gem "net-ssh"
gem "netaddr"
gem "tilt", ">= 2.2"
gem "erubi", ">= 1.5"
gem "puma", ">= 6.2.2"
gem "roda", ">= 3.86"
gem "rodauth", ">= 2.37"
gem "rotp"
gem "rqrcode"
gem "mail"
gem "refrigerator", ">= 1"
gem "sequel", ">= 5.87"
gem "sequel_pg", ">= 1.8", require: "sequel"
gem "rack-unreloader", ">= 1.8"
gem "rake"
gem "warning"
gem "pry"
gem "excon"
gem "jwt"
gem "pagerduty", ">= 4.0"
gem "stripe"
gem "countries"
gem "octokit"
gem "argon2-kdf"
group :development do
gem "awesome_print"
gem "brakeman"
gem "by", ">= 1.1.0"
gem "erb-formatter", github: "ubicloud/erb-formatter", ref: "a9ff0001a1eb028e2186b222aeb02b07c04f9808"
gem "foreman"
gem "pry-byebug"
gem "rackup"
gem "sequel-annotate"
gem "rubocop-capybara"
gem "rubocop-erb"
gem "rubocop-performance"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "rubocop-sequel"
gem "standard", ">= 1.24.3"
gem "simplecov"
gem "turbo_tests"
gem "cuprite"
end
group :test do
gem "capybara"
gem "rspec"
gem "webmock"
gem "pdf-reader"
end
gem "webauthn", "~> 3.2"
gem "aws-sdk-s3", "~> 1.175"
gem "acme-client", "~> 2.0"
gem "prawn", "~> 2.5"
gem "prawn-table", "~> 0.2.2"