repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/session_verifiable.rb
app/controllers/concerns/session_verifiable.rb
module SessionVerifiable extend ActiveSupport::Concern class_methods do def verify_session_before(**) before_action(:redirect_to_signin, **, unless: :signed_in?) before_action(:redirect_to_new_mfa, **, if: :mfa_required_not_yet_enabled?) before_action(:redirect_to_settings_strong_mfa_required...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/jwt_validation.rb
app/controllers/concerns/jwt_validation.rb
module JwtValidation extend ActiveSupport::Concern class UnsupportedIssuer < StandardError; end class UnverifiedJWT < StandardError; end class InvalidJWT < StandardError; end included do rescue_from InvalidJWT, with: :render_bad_request rescue_from( UnsupportedIssuer, UnverifiedJWT, JSO...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/latest_version.rb
app/controllers/concerns/latest_version.rb
module LatestVersion extend ActiveSupport::Concern included do def latest_version @latest_version ||= @rubygem.most_recent_version end def latest_version_by_slug @latest_version = @rubygem.find_version_by_slug!(params.expect(:version_id)) end end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/webauthn_verifiable.rb
app/controllers/concerns/webauthn_verifiable.rb
module WebauthnVerifiable extend ActiveSupport::Concern def setup_webauthn_authentication(form_url:, session_options: {}) return if @user.webauthn_credentials.none? @webauthn_options = @user.webauthn_options_for_get @webauthn_verification_url = form_url session[:webauthn_authentication] = { ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/mfa_expiry_methods.rb
app/controllers/concerns/mfa_expiry_methods.rb
module MfaExpiryMethods extend ActiveSupport::Concern included do def create_new_mfa_expiry session[:mfa_expires_at] = 15.minutes.from_now.to_s end def delete_mfa_expiry_session session.delete(:mfa_expires_at) end # Clear the session key when mfa has expired. This makes mfa_sessio...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/api_keyable.rb
app/controllers/concerns/api_keyable.rb
module ApiKeyable extend ActiveSupport::Concern private def hashed_key(key) Digest::SHA256.hexdigest(key) end def generate_unique_rubygems_key loop do key = generate_rubygems_key return key if ApiKey.where(hashed_key: hashed_key(key)).empty? end end def generate_rubygems_key ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/avo_auditable.rb
app/controllers/concerns/avo_auditable.rb
module AvoAuditable extend ActiveSupport::Concern prepended do include Auditable prepend_around_action :unscope_users end def perform_action_and_record_errors(&blk) super do action = params.fetch(:action) fields = action == "destroy" ? {} : cast_nullable(model_params) @record.e...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/concerns/maintenance_tasks_auditable.rb
app/controllers/concerns/maintenance_tasks_auditable.rb
module MaintenanceTasksAuditable extend ActiveSupport::Concern prepended do include Auditable around_action :audit_action def audit_action(&blk) return yield if params[:action].in?(%w[show index]) action = params.fetch(:action) task_name = params.fetch(:task_id) action_name ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/members_controller.rb
app/controllers/organizations/members_controller.rb
class Organizations::MembersController < Organizations::BaseController before_action :find_membership, only: %i[edit update destroy resend_invitation] skip_before_action :redirect_to_signin, only: %i[index] rescue_from Pundit::NotAuthorizedError, with: :render_not_found def index if OrganizationPolicy.ne...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/gems_controller.rb
app/controllers/organizations/gems_controller.rb
class Organizations::GemsController < Organizations::BaseController before_action :find_organization, only: %i[index] skip_before_action :redirect_to_signin, only: %i[index] layout "subject" def index @gems = @organization.rubygems.with_versions.by_downloads.preload(:most_recent_version, :gem_download).l...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/invitations_controller.rb
app/controllers/organizations/invitations_controller.rb
class Organizations::InvitationsController < Organizations::BaseController before_action :find_membership layout "hammy" def show end def update @membership.confirm! redirect_to organization_path(@organization), notice: "You have successfully joined the #{@organization.handle} organization." end ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/base_controller.rb
app/controllers/organizations/base_controller.rb
class Organizations::BaseController < ApplicationController before_action :redirect_to_signin, unless: :signed_in? before_action :redirect_to_new_mfa, if: :mfa_required_not_yet_enabled? before_action :redirect_to_settings_strong_mfa_required, if: :mfa_required_weak_level_enabled? before_action :find_organizatio...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/onboarding_controller.rb
app/controllers/organizations/onboarding_controller.rb
class Organizations::OnboardingController < Organizations::Onboarding::BaseController def destroy OrganizationOnboarding.destroy_by(created_by: Current.user, status: %i[pending failed]) redirect_to dashboard_path end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/onboarding/gems_controller.rb
app/controllers/organizations/onboarding/gems_controller.rb
class Organizations::Onboarding::GemsController < Organizations::Onboarding::BaseController def edit end def update if @organization_onboarding.update(onboarding_gems_params) redirect_to organization_onboarding_users_path else render :edit, status: :unprocessable_content end end priv...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/onboarding/users_controller.rb
app/controllers/organizations/onboarding/users_controller.rb
class Organizations::Onboarding::UsersController < Organizations::Onboarding::BaseController def edit end def update if @organization_onboarding.update(onboarding_user_params) redirect_to organization_onboarding_confirm_path else render :edit, status: :unprocessable_content end end p...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/onboarding/confirm_controller.rb
app/controllers/organizations/onboarding/confirm_controller.rb
class Organizations::Onboarding::ConfirmController < Organizations::Onboarding::BaseController def edit end def update @organization_onboarding.onboard! flash[:notice] = I18n.t("organization_onboardings.confirm.success") redirect_to organization_path(@organization_onboarding.organization) rescue A...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/onboarding/base_controller.rb
app/controllers/organizations/onboarding/base_controller.rb
class Organizations::Onboarding::BaseController < ApplicationController before_action :redirect_to_signin, unless: :signed_in? before_action :redirect_to_new_mfa, if: :mfa_required_not_yet_enabled? before_action :render_not_found, unless: :organizations_enabled? before_action :find_or_initialize_onboarding be...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/organizations/onboarding/name_controller.rb
app/controllers/organizations/onboarding/name_controller.rb
class Organizations::Onboarding::NameController < Organizations::Onboarding::BaseController def new end def create if @organization_onboarding.update(onboarding_name_params) redirect_to organization_onboarding_gems_path else render :new, status: :unprocessable_content end end private...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/attestations_controller.rb
app/controllers/avo/attestations_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::AttestationsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/subscriptions_controller.rb
app/controllers/avo/subscriptions_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::SubscriptionsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/organizations_controller.rb
app/controllers/avo/organizations_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OrganizationsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/web_hooks_controller.rb
app/controllers/avo/web_hooks_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::WebHooksController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/gem_downloads_controller.rb
app/controllers/avo/gem_downloads_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::GemDownloadsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/webauthn_credentials_controller.rb
app/controllers/avo/webauthn_credentials_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::WebauthnCredentialsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/webauthn_verifications_controller.rb
app/controllers/avo/webauthn_verifications_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::WebauthnVerificationsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/sendgrid_events_controller.rb
app/controllers/avo/sendgrid_events_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::SendgridEventsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/api_key_rubygem_scopes_controller.rb
app/controllers/avo/api_key_rubygem_scopes_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::ApiKeyRubygemScopesController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/organization_invites_controller.rb
app/controllers/avo/organization_invites_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OrganizationInvitesController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/ip_addresses_controller.rb
app/controllers/avo/ip_addresses_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::IpAddressesController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/geoip_infos_controller.rb
app/controllers/avo/geoip_infos_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::GeoipInfosController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/oidc_id_tokens_controller.rb
app/controllers/avo/oidc_id_tokens_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OIDCIdTokensController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/oidc_api_key_roles_controller.rb
app/controllers/avo/oidc_api_key_roles_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OIDCApiKeyRolesController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/oidc_providers_controller.rb
app/controllers/avo/oidc_providers_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OIDCProvidersController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/users_controller.rb
app/controllers/avo/users_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::UsersController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/events_user_events_controller.rb
app/controllers/avo/events_user_events_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::EventsUserEventsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/maintenance_tasks_runs_controller.rb
app/controllers/avo/maintenance_tasks_runs_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::MaintenanceTasksRunsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/memberships_controller.rb
app/controllers/avo/memberships_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::MembershipsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/oidc_pending_trusted_publishers_controller.rb
app/controllers/avo/oidc_pending_trusted_publishers_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OIDCPendingTrustedPublishersController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/api_keys_controller.rb
app/controllers/avo/api_keys_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::ApiKeysController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/gem_name_reservations_controller.rb
app/controllers/avo/gem_name_reservations_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::GemNameReservationsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/versions_controller.rb
app/controllers/avo/versions_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::VersionsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/ownerships_controller.rb
app/controllers/avo/ownerships_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OwnershipsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/rubygems_controller.rb
app/controllers/avo/rubygems_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::RubygemsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/events_rubygem_events_controller.rb
app/controllers/avo/events_rubygem_events_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::EventsRubygemEventsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/oidc_trusted_publisher_github_actions_controller.rb
app/controllers/avo/oidc_trusted_publisher_github_actions_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OIDCTrustedPublisherGitHubActionsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/linksets_controller.rb
app/controllers/avo/linksets_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::LinksetsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/rubygem_transfers_controller.rb
app/controllers/avo/rubygem_transfers_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/3.0/controllers.html class Avo::RubygemTransfersController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/audits_controller.rb
app/controllers/avo/audits_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::AuditsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/link_verifications_controller.rb
app/controllers/avo/link_verifications_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::LinkVerificationsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/gem_typo_exceptions_controller.rb
app/controllers/avo/gem_typo_exceptions_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::GemTypoExceptionsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/dependencies_controller.rb
app/controllers/avo/dependencies_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::DependenciesController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/log_tickets_controller.rb
app/controllers/avo/log_tickets_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::LogTicketsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/admin_github_users_controller.rb
app/controllers/avo/admin_github_users_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::AdminGitHubUsersController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/organization_onboardings_controller.rb
app/controllers/avo/organization_onboardings_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OrganizationOnboardingsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/deletions_controller.rb
app/controllers/avo/deletions_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::DeletionsController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/avo/oidc_rubygem_trusted_publishers_controller.rb
app/controllers/avo/oidc_rubygem_trusted_publishers_controller.rb
# This controller has been generated to enable Rails' resource routes. # More information on https://docs.avohq.io/2.0/controllers.html class Avo::OIDCRubygemTrustedPublishersController < Avo::ResourcesController end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/admin/admin_controller.rb
app/controllers/admin/admin_controller.rb
class Admin::AdminController < ApplicationController include GitHubOAuthable def logout admin_logout end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/compact_index_controller.rb
app/controllers/api/compact_index_controller.rb
class Api::CompactIndexController < Api::BaseController before_action :find_rubygem_by_name, only: [:info] def names cache_expiry_headers names = GemInfo.ordered_names render_range CompactIndex.names(names) end def versions set_surrogate_key "versions" cache_expiry_headers versions_pat...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/base_controller.rb
app/controllers/api/base_controller.rb
class Api::BaseController < ApplicationController skip_before_action :verify_authenticity_token after_action :skip_session rescue_from(Pundit::NotAuthorizedError) do |e| render_forbidden(e.policy.error) end private def name_params params.permit(:gem_name, :rubygem_name) end def gem_name ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/deprecated_controller.rb
app/controllers/api/deprecated_controller.rb
class Api::DeprecatedController < Api::BaseController def index render status: :forbidden, plain: "This version of the Gemcutter plugin has been deprecated." \ "Please install the latest version using: gem update gemcutter" end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/attestations_controller.rb
app/controllers/api/v1/attestations_controller.rb
class Api::V1::AttestationsController < Api::BaseController before_action :find_version def show respond_to do |format| format.json { render json: @version.attestations.pluck(:body) } end end private def find_version @version = Version.find_by(full_name: params[:id].delete_suffix(".json")...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/profiles_controller.rb
app/controllers/api/v1/profiles_controller.rb
class Api::V1::ProfilesController < Api::BaseController def show @user = User.find_by_slug!(params[:id]) respond_to do |format| format.json { render json: @user } format.yaml { render yaml: @user } end end def me authenticate_or_request_with_http_basic do |username, password| if...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/searches_controller.rb
app/controllers/api/v1/searches_controller.rb
class Api::V1::SearchesController < Api::BaseController before_action :set_page, only: %i[show autocomplete] before_action :verify_query_string, only: %i[show autocomplete] rescue_from ElasticSearcher::SearchNotAvailableError, with: :search_not_available_error rescue_from ElasticSearcher::InvalidQueryError, wi...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/web_hooks_controller.rb
app/controllers/api/v1/web_hooks_controller.rb
class Api::V1::WebHooksController < Api::BaseController before_action :authenticate_with_api_key before_action :verify_user_api_key before_action :find_rubygem_by_name, :set_url, except: :index def index authorize WebHook respond_to do |format| format.json { render json: @api_key.user.all_hooks }...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/github_secret_scanning_controller.rb
app/controllers/api/v1/github_secret_scanning_controller.rb
class Api::V1::GitHubSecretScanningController < Api::BaseController include ApiKeyable before_action :find_secret_scanning_key before_action :validate_secret_scanning_key # API called by GitHub Secret Scanning tool # see docs https://docs.github.com/en/developers/overview/secret-scanning # Sample message:...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/webauthn_verifications_controller.rb
app/controllers/api/v1/webauthn_verifications_controller.rb
# This controller generates a single-use link as part of the Webauthn CLI flow. It does not challenge # the user with a Webauthn login. That is done in controllers/webauthn_verifications_controller. class Api::V1::WebauthnVerificationsController < Api::BaseController before_action :authenticate_with_credentials bef...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/timeframe_versions_controller.rb
app/controllers/api/v1/timeframe_versions_controller.rb
class Api::V1::TimeframeVersionsController < Api::BaseController class InvalidTimeframeParameterError < StandardError; end rescue_from InvalidTimeframeParameterError, with: :render_bad_request before_action :set_page, :ensure_valid_timerange, only: :index MAXIMUM_TIMEFRAME_QUERY_IN_DAYS = 7 def index re...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/owners_controller.rb
app/controllers/api/v1/owners_controller.rb
class Api::V1::OwnersController < Api::BaseController before_action :authenticate_with_api_key, except: %i[show gems] before_action :verify_with_otp, except: %i[show gems] before_action :find_rubygem, except: :gems rescue_from ActiveRecord::RecordNotFound, with: :render_not_found def show respond_to do ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/downloads_controller.rb
app/controllers/api/v1/downloads_controller.rb
class Api::V1::DownloadsController < Api::BaseController def index total = GemDownload.total_count respond_to do |format| format.any(:all) { render plain: total } format.json { render json: { total: total } } format.yaml { render plain: { total: total }.to_yaml } end end def show ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/hook_relay_controller.rb
app/controllers/api/v1/hook_relay_controller.rb
class Api::V1::HookRelayController < Api::BaseController before_action :authenticate_hook_relay_report rescue_from ActiveSupport::SecureCompareRotator::InvalidMatch, with: :render_not_found def report HookRelayReportJob.perform_later(hook_relay_report_params) respond_to do |format| format.json { ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/api_keys_controller.rb
app/controllers/api/v1/api_keys_controller.rb
class Api::V1::ApiKeysController < Api::BaseController include ApiKeyable def show authenticate_or_request_with_http_basic do |username, password| # strip username mainly to remove null bytes user = User.authenticate(username.strip, password) check_mfa(user) do key = generate_unique_r...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/versions_controller.rb
app/controllers/api/v1/versions_controller.rb
class Api::V1::VersionsController < Api::BaseController before_action :find_rubygem, only: :show def show return unless stale?(@rubygem) cache_expiry_headers set_surrogate_key "gem/#{@rubygem.name}" versions = @rubygem.public_versions.includes(:gem_download) if versions.present? respond...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/rubygems_controller.rb
app/controllers/api/v1/rubygems_controller.rb
class Api::V1::RubygemsController < Api::BaseController before_action :authenticate_with_api_key, except: %i[show reverse_dependencies] before_action :verify_user_api_key, except: %i[show reverse_dependencies create] before_action :find_rubygem, only: %i[show reverse_dependencies] before_action :cors_preflight_...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/activities_controller.rb
app/controllers/api/v1/activities_controller.rb
class Api::V1::ActivitiesController < Api::BaseController def latest versions = Version.new_pushed_versions(50) render_rubygems(versions) end def just_updated versions = Version.just_updated(50) render_rubygems(versions) end private def render_rubygems(versions) rubygems = versions.in...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/dependencies_controller.rb
app/controllers/api/v1/dependencies_controller.rb
class Api::V1::DependenciesController < Api::BaseController def index cache_expiry_headers(expiry: 30, fastly_expiry: 60) set_surrogate_key("dependencyapi") respond_to do |format| error = "The dependency API has gone away. See https://blog.rubygems.org/2023/02/22/dependency-api-deprecation.html for...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/deletions_controller.rb
app/controllers/api/v1/deletions_controller.rb
class Api::V1::DeletionsController < Api::BaseController before_action :authenticate_with_api_key before_action :verify_user_api_key before_action :find_rubygem_by_name before_action :verify_api_key_gem_scope before_action :validate_gem_and_version before_action :verify_with_otp def create authorize ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/versions/downloads_controller.rb
app/controllers/api/v1/versions/downloads_controller.rb
class Api::V1::Versions::DownloadsController < Api::BaseController def index render plain: "This endpoint is not supported anymore", status: :gone end def search render plain: "This endpoint is not supported anymore", status: :gone end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/oidc/rubygem_trusted_publishers_controller.rb
app/controllers/api/v1/oidc/rubygem_trusted_publishers_controller.rb
class Api::V1::OIDC::RubygemTrustedPublishersController < Api::BaseController before_action :authenticate_with_api_key before_action :verify_user_api_key before_action :find_rubygem before_action :verify_with_otp before_action :find_rubygem_trusted_publisher, except: %i[index create] before_action :set_t...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/oidc/id_tokens_controller.rb
app/controllers/api/v1/oidc/id_tokens_controller.rb
class Api::V1::OIDC::IdTokensController < Api::BaseController before_action :authenticate_with_api_key before_action :verify_user_api_key def index render json: @api_key.user.oidc_id_tokens end def show render json: @api_key.user.oidc_id_tokens.find(params[:id]) end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/oidc/trusted_publisher_controller.rb
app/controllers/api/v1/oidc/trusted_publisher_controller.rb
class Api::V1::OIDC::TrustedPublisherController < Api::BaseController include ApiKeyable include JwtValidation before_action :decode_jwt before_action :validate_jwt_format before_action :verify_jwt_time before_action :find_provider before_action :validate_provider before_action :verify_signature befo...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/oidc/providers_controller.rb
app/controllers/api/v1/oidc/providers_controller.rb
class Api::V1::OIDC::ProvidersController < Api::BaseController before_action :authenticate_with_api_key before_action :verify_user_api_key def index render json: OIDC::Provider.all end def show render json: OIDC::Provider.find(params[:id]) end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v1/oidc/api_key_roles_controller.rb
app/controllers/api/v1/oidc/api_key_roles_controller.rb
class Api::V1::OIDC::ApiKeyRolesController < Api::BaseController include ApiKeyable include JwtValidation before_action :authenticate_with_api_key, except: :assume_role before_action :verify_user_api_key, except: :assume_role with_options only: :assume_role do before_action :set_api_key_role before_...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v2/versions_controller.rb
app/controllers/api/v2/versions_controller.rb
class Api::V2::VersionsController < Api::BaseController before_action :find_rubygem_by_name, only: [:show] def show return unless stale?(@rubygem) cache_expiry_headers set_surrogate_key "gem/#{@rubygem.name}" version = @rubygem.public_version_payload(version_params[:number], version_params[:platfo...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/api/v2/contents_controller.rb
app/controllers/api/v2/contents_controller.rb
class Api::V2::ContentsController < Api::BaseController before_action :find_rubygem_by_name, only: [:index] def index return unless stale?(@rubygem) cache_expiry_headers set_surrogate_key "gem/#{@rubygem.name}" find_version return unless @version checksums_file = @version.manifest.checksu...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/internal/ping_controller.rb
app/controllers/internal/ping_controller.rb
class Internal::PingController < ApplicationController def index render plain: "PONG" end def revision render plain: AppRevision.version end end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/rubygems/transfers_controller.rb
app/controllers/rubygems/transfers_controller.rb
class Rubygems::TransfersController < ApplicationController before_action :redirect_to_signin, unless: :signed_in? before_action :redirect_to_new_mfa, if: :mfa_required_not_yet_enabled? before_action :find_rubygem def destroy @rubygem_transfer = RubygemTransfer.find_by(created_by: Current.user, status: %i[...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/rubygems/transfer/organizations_controller.rb
app/controllers/rubygems/transfer/organizations_controller.rb
class Rubygems::Transfer::OrganizationsController < Rubygems::Transfer::BaseController rescue_from ActiveRecord::RecordNotFound, with: -> { redirect_to dashboard_path } layout "onboarding" def new @organizations = current_user.organizations end def create @organizations = current_user.organizations...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/rubygems/transfer/users_controller.rb
app/controllers/rubygems/transfer/users_controller.rb
class Rubygems::Transfer::UsersController < Rubygems::Transfer::BaseController layout "onboarding" def edit end def update if @rubygem_transfer.update(rubygem_transfer_params) redirect_to confirm_transfer_rubygems_path else render :edit, status: :unprocessable_content end end priv...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/rubygems/transfer/base_controller.rb
app/controllers/rubygems/transfer/base_controller.rb
class Rubygems::Transfer::BaseController < ApplicationController before_action :redirect_to_signin, unless: :signed_in? before_action :redirect_to_new_mfa, if: :mfa_required_not_yet_enabled? before_action :find_or_initialize_transfer before_action :set_breadcrumbs rescue_from Pundit::NotAuthorizedError, with...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/rubygems/transfer/rubygems_controller.rb
app/controllers/rubygems/transfer/rubygems_controller.rb
class Rubygems::Transfer::RubygemsController < Rubygems::Transfer::BaseController layout "onboarding" def show end def update if @rubygem_transfer.update(rubygem_transfer_params) redirect_to users_transfer_rubygems_path else render :edit, status: :unprocessable_content end end pri...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/rubygems/transfer/confirmations_controller.rb
app/controllers/rubygems/transfer/confirmations_controller.rb
class Rubygems::Transfer::ConfirmationsController < Rubygems::Transfer::BaseController layout "onboarding" before_action :ensure_valid_transfer def edit authorize @rubygem_transfer.organization, :add_gem? end def update authorize @rubygem_transfer.organization, :add_gem? @rubygem_transfer.trans...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/oidc/rubygem_trusted_publishers_controller.rb
app/controllers/oidc/rubygem_trusted_publishers_controller.rb
class OIDC::RubygemTrustedPublishersController < ApplicationController include OIDC::Concerns::TrustedPublisherCreation before_action :find_rubygem before_action :find_rubygem_trusted_publisher, except: %i[index new create] def index render OIDC::RubygemTrustedPublishers::IndexView.new( rubygem: @ru...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/oidc/id_tokens_controller.rb
app/controllers/oidc/id_tokens_controller.rb
# frozen_string_literal: true class OIDC::IdTokensController < ApplicationController include ApiKeyable include SessionVerifiable verify_session_before before_action :find_id_token, except: %i[index] before_action :set_page, only: :index def index id_tokens = current_user.oidc_id_tokens.includes(:a...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/oidc/pending_trusted_publishers_controller.rb
app/controllers/oidc/pending_trusted_publishers_controller.rb
class OIDC::PendingTrustedPublishersController < ApplicationController include OIDC::Concerns::TrustedPublisherCreation before_action :find_pending_trusted_publisher, only: %i[destroy] def index trusted_publishers = policy_scope(OIDC::PendingTrustedPublisher) .unexpired.includes(:trusted_publisher) ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/oidc/providers_controller.rb
app/controllers/oidc/providers_controller.rb
# frozen_string_literal: true class OIDC::ProvidersController < ApplicationController include SessionVerifiable verify_session_before before_action :find_provider, except: %i[index] before_action :set_page, only: :index def index providers = OIDC::Provider.strict_loading.page(@page) render OIDC::P...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/oidc/api_key_roles_controller.rb
app/controllers/oidc/api_key_roles_controller.rb
class OIDC::ApiKeyRolesController < ApplicationController include ApiKeyable include SessionVerifiable verify_session_before helper RubygemsHelper before_action :find_api_key_role, except: %i[index new create] before_action :redirect_for_deleted, only: %i[edit update destroy] before_action :set_page, ...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/controllers/oidc/concerns/trusted_publisher_creation.rb
app/controllers/oidc/concerns/trusted_publisher_creation.rb
module OIDC::Concerns::TrustedPublisherCreation extend ActiveSupport::Concern included do include SessionVerifiable verify_session_before before_action :set_trusted_publisher_type, only: %i[create] before_action :create_params, only: %i[create] before_action :set_page, only: :index end d...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/components/avo/audited_changes_record_diff/show_component.rb
app/components/avo/audited_changes_record_diff/show_component.rb
# frozen_string_literal: true class Avo::AuditedChangesRecordDiff::ShowComponent < ViewComponent::Base def initialize(gid:, changes:, unchanged:, view:, user:) # rubocop:disable Lint/MissingSuper @gid = gid @changes = changes @unchanged = unchanged @user = user @view = view global_id = Globa...
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/components/avo/fields/array_of_field/edit_component.rb
app/components/avo/fields/array_of_field/edit_component.rb
# frozen_string_literal: true class Avo::Fields::ArrayOfField::EditComponent < Avo::Fields::EditComponent include Avo::ApplicationHelper end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false
rubygems/rubygems.org
https://github.com/rubygems/rubygems.org/blob/2b4f35acb8b13a47b00b24519359431f54aae073/app/components/avo/fields/array_of_field/show_component.rb
app/components/avo/fields/array_of_field/show_component.rb
# frozen_string_literal: true class Avo::Fields::ArrayOfField::ShowComponent < Avo::Fields::ShowComponent end
ruby
MIT
2b4f35acb8b13a47b00b24519359431f54aae073
2026-01-04T15:55:47.223680Z
false