Sha256: 749bb78a8ee70be510e78f53f038529b3ffd016b07dcdbdc96647171dafe79c1

Contents?: true

Size: 745 Bytes

Versions: 35

Compression:

Stored size: 745 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module PlugApp
  module HTTP
    extend T::Sig

    OK = "OK"
    OK_I = 200

    CREATED = "Created"
    CREATED_I = 201
    NO_CONTENT = "No Content"
    NO_CONTENT_I = 204

    FOUND = "Found"
    FOUND_I = 302

    NOT_FOUND = "Not Found"
    NOT_FOUND_I = 404
    BAD_REQUEST = "Bad Request"
    BAD_REQUEST_I = 400
    UNAUTHORIZED = "Unauthorized"
    UNAUTHORIZED_I = 401
    FORBIDDEN = "Forbidden"
    FORBIDDEN_I = 403
    NOT_ACCEPTABLE = "Not Acceptable"
    NOT_ACCEPTABLE_I = 406
    SERVICE_UNAVAILABLE = "Service Unavailable"
    SERVICE_UNAVAILABLE_I = 503

    sig { params(status: Integer).returns(T::Boolean) }
    def status_ok?(status)
      status == OK_I
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
hephaestus-0.8.3 templates/app/lib/plug_app/http.rb
hephaestus-0.8.2 templates/app/lib/plug_app/http.rb
hephaestus-0.8.1 templates/app/lib/plug_app/http.rb
hephaestus-0.8.0 templates/app/lib/plug_app/http.rb
hephaestus-0.7.7.2 templates/app/lib/plug_app/http.rb
hephaestus-0.7.7 templates/app/lib/plug_app/http.rb
hephaestus-0.7.6.2 templates/app/lib/plug_app/http.rb
hephaestus-0.7.6.1 templates/app/lib/plug_app/http.rb
hephaestus-0.7.6 templates/app/lib/plug_app/http.rb
hephaestus-0.7.5.3 templates/app/lib/plug_app/http.rb
hephaestus-0.7.5.2 templates/app/lib/plug_app/http.rb
hephaestus-0.7.5.1 templates/app/lib/plug_app/http.rb
hephaestus-0.7.5 templates/app/lib/plug_app/http.rb
hephaestus-0.7.4.2 templates/app/lib/plug_app/http.rb
hephaestus-0.7.4.1 templates/app/lib/plug_app/http.rb
hephaestus-0.7.4 templates/app/lib/plug_app/http.rb
hephaestus-0.7.3.1 templates/app/lib/plug_app/http.rb
hephaestus-0.7.3 templates/app/lib/plug_app/http.rb
hephaestus-0.7.2.5 templates/app/lib/plug_app/http.rb
hephaestus-0.7.2.4 templates/app/lib/plug_app/http.rb