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
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/utilities/credit_card_utility.rb
lib/utilities/credit_card_utility.rb
# frozen_string_literal: true class CreditCardUtility CARD_TYPE_NAMES = { "Visa" => CardType::VISA, "American Express" => CardType::AMERICAN_EXPRESS, "MasterCard" => CardType::MASTERCARD, "Discover" => CardType::DISCOVER, "JCB" => CardType::JCB, "Diners Club" => CardType::DINERS_CLUB }.free...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/utilities/card_type.rb
lib/utilities/card_type.rb
# frozen_string_literal: true class CardType UNKNOWN = "generic_card" VISA = "visa" AMERICAN_EXPRESS = "amex" MASTERCARD = "mastercard" DISCOVER = "discover" JCB = "jcb" DINERS_CLUB = "diners" PAYPAL = "paypal" UNION_PAY = "unionpay" end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/utilities/with_max_execution_time.rb
lib/utilities/with_max_execution_time.rb
# frozen_string_literal: true module WithMaxExecutionTime # NOTE: Rails >= 6.0.0.rc1 supports Optimizer hints. Consider using them instead if available. class QueryTimeoutError < Timeout::Error; end def self.timeout_queries(seconds:) connection = ActiveRecord::Base.connection previous_max_execution_tim...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/extras/bugsnag_handle_sidekiq_retries_callback.rb
lib/extras/bugsnag_handle_sidekiq_retries_callback.rb
# frozen_string_literal: true BugsnagHandleSidekiqRetriesCallback = proc do |report| sidekiq_data = report.meta_data[:sidekiq] next if sidekiq_data.nil? msg = sidekiq_data[:msg] # When a worker does not have an explicit "retry" option configured, configured_retries => `true`. # We can't use this to determin...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/extras/sidekiq_makara_reset_context_middleware.rb
lib/extras/sidekiq_makara_reset_context_middleware.rb
# frozen_string_literal: true # There are places in the codebase sticking the DB connection to master instead of replicas. # Makara, via an included Rack middleware, resets those contexts before each web request (after master_ttl). # This automatic reset doesn't exist for Sidekiq, so a thread executing many jobs may b...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/extras/mongoer.rb
lib/extras/mongoer.rb
# frozen_string_literal: true class Mongoer def self.substitute_keys(hash) hash.keys.each do |key| if hash[key].is_a? Hash substitute_keys(hash[key]) elsif hash[key].is_a? Array hash[key].each do |element| substitute_keys(element) if element.is_a? Hash end end ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/post_resend_api_preview.rb
lib/mailer_previews/post_resend_api_preview.rb
# frozen_string_literal: true class PostResendApiPreview < ActionMailer::Preview def post_with_attachment post = Installment.joins(:product_files).find_each(order: :desc).find(&:has_files?) post ||= begin record = create_generic_post record.product_files.create!(url: "#{AWS_S3_ENDPOINT}/gumroad_d...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/admin_mailer_preview.rb
lib/mailer_previews/admin_mailer_preview.rb
# frozen_string_literal: true class AdminMailerPreview < ActionMailer::Preview def chargeback_notify AdminMailer.chargeback_notify(Purchase.last.id) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/customer_low_priority_mailer_preview.rb
lib/mailer_previews/customer_low_priority_mailer_preview.rb
# frozen_string_literal: true class CustomerLowPriorityMailerPreview < ActionMailer::Preview def credit_card_expiring_membership CustomerLowPriorityMailer.credit_card_expiring_membership(Subscription.last&.id) end def deposit CustomerLowPriorityMailer.deposit(Payment.last&.id) end def preorder_canc...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/accounting_mailer_preview.rb
lib/mailer_previews/accounting_mailer_preview.rb
# frozen_string_literal: true class AccountingMailerPreview < ActionMailer::Preview def email_outstanding_balances_csv AccountingMailer.email_outstanding_balances_csv end def funds_received_report last_month = Time.current.last_month AccountingMailer.funds_received_report(last_month.month, last_mont...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/affiliate_request_mailer_preview.rb
lib/mailer_previews/affiliate_request_mailer_preview.rb
# frozen_string_literal: true class AffiliateRequestMailerPreview < ActionMailer::Preview def notify_requester_of_request_submission AffiliateRequestMailer.notify_requester_of_request_submission(AffiliateRequest.last&.id) end def notify_seller_of_new_request AffiliateRequestMailer.notify_seller_of_new_r...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/comment_mailer_preview.rb
lib/mailer_previews/comment_mailer_preview.rb
# frozen_string_literal: true class CommentMailerPreview < ActionMailer::Preview def notify_seller_of_new_comment CommentMailer.notify_seller_of_new_comment(Comment.roots.last&.id) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/two_factor_authentication_mailer_preview.rb
lib/mailer_previews/two_factor_authentication_mailer_preview.rb
# frozen_string_literal: true class TwoFactorAuthenticationMailerPreview < ActionMailer::Preview def authentication_token TwoFactorAuthenticationMailer.authentication_token(User.where.not(email: nil).last&.id) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/merchant_registration_mailer_preview.rb
lib/mailer_previews/merchant_registration_mailer_preview.rb
# frozen_string_literal: true class MerchantRegistrationMailerPreview < ActionMailer::Preview def stripe_charges_disabled MerchantRegistrationMailer.stripe_charges_disabled(User.last&.id) end def account_needs_registration_to_user MerchantRegistrationMailer.account_needs_registration_to_user(Affiliate.l...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/user_signup_mailer_preview.rb
lib/mailer_previews/user_signup_mailer_preview.rb
# frozen_string_literal: true class UserSignupMailerPreview < ActionMailer::Preview def confirmation_instructions UserSignupMailer.confirmation_instructions(User.last, {}) end def reset_password_instructions User.last&.mark_compliant!(author_name: "Gullible Admin") UserSignupMailer.reset_password_in...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/affiliate_mailer_preview.rb
lib/mailer_previews/affiliate_mailer_preview.rb
# frozen_string_literal: true class AffiliateMailerPreview < ActionMailer::Preview def direct_affiliate_invitation AffiliateMailer.direct_affiliate_invitation(DirectAffiliate.last&.id) end def notify_direct_affiliate_of_sale purchase = Purchase.where(affiliate_id: DirectAffiliate.pluck(:id)).last Af...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/customer_mailer_preview.rb
lib/mailer_previews/customer_mailer_preview.rb
# frozen_string_literal: true class CustomerMailerPreview < ActionMailer::Preview def grouped_receipt purchase_ids = Purchase.successful.order(id: :desc).limit(3).ids CustomerMailer.grouped_receipt(purchase_ids) end def giftee_receipt purchase = Gift.last&.giftee_purchase CustomerMailer.receipt(...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/follower_mailer_preview.rb
lib/mailer_previews/follower_mailer_preview.rb
# frozen_string_literal: true class FollowerMailerPreview < ActionMailer::Preview def confirm_follower if Follower.count.zero? follower_user = User.last User.first&.add_follower( follower_user&.email, follower_user_id: follower_user&.id, source: Follower::From::FOLLOW_PAGE, ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/service_mailer_preview.rb
lib/mailer_previews/service_mailer_preview.rb
# frozen_string_literal: true class ServiceMailerPreview < ActionMailer::Preview def service_charge_receipt ServiceMailer.service_charge_receipt(ServiceCharge.last&.id) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/contacting_creator_mailer_preview.rb
lib/mailer_previews/contacting_creator_mailer_preview.rb
# frozen_string_literal: true class ContactingCreatorMailerPreview < ActionMailer::Preview def cannot_pay ContactingCreatorMailer.cannot_pay(Payment.last&.id) end def preorder_release_reminder ContactingCreatorMailer.preorder_release_reminder(PreorderLink.last&.link&.id) end def preorder_summary ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/post_sendgrid_api_preview.rb
lib/mailer_previews/post_sendgrid_api_preview.rb
# frozen_string_literal: true class PostSendgridApiPreview < ActionMailer::Preview def post_with_attachment post = Installment.joins(:product_files).find_each(order: :desc).find(&:has_files?) post ||= begin record = create_generic_post record.product_files.create!(url: "#{AWS_S3_ENDPOINT}/gumroad...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/one_off_mailer_preview.rb
lib/mailer_previews/one_off_mailer_preview.rb
# frozen_string_literal: true class OneOffMailerPreview < ActionMailer::Preview def email subject = "Try our premium features, for free!" body = <<~BODY You can now try out our premium features with a 14-day free trial. They make Gumroad a lot more powerful. It also comes with cheaper per-charge pricing....
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/creator_mailer_preview.rb
lib/mailer_previews/creator_mailer_preview.rb
# frozen_string_literal: true class CreatorMailerPreview < ActionMailer::Preview include CdnUrlHelper def gumroad_day_fee_saved CreatorMailer.gumroad_day_fee_saved(seller_id: seller&.id) end def year_in_review CreatorMailer.year_in_review(seller:, year:, analytics_data:) end def year_in_review_wi...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/team_mailer_preview.rb
lib/mailer_previews/team_mailer_preview.rb
# frozen_string_literal: true class TeamMailerPreview < ActionMailer::Preview def invite TeamMailer.invite(TeamInvitation.last) end def invitation_accepted TeamMailer.invitation_accepted(TeamMembership.last) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/lib/mailer_previews/community_chat_recap_mailer_preview.rb
lib/mailer_previews/community_chat_recap_mailer_preview.rb
# frozen_string_literal: true class CommunityChatRecapMailerPreview < ActionMailer::Preview def community_chat_recap_notification CommunityChatRecapMailer.community_chat_recap_notification(User.first.id, User.last.id, CommunityChatRecap.status_finished.where(community_chat_recap_run_id: CommunityChatRecapRun.rec...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/application.rb
config/application.rb
# frozen_string_literal: true require_relative "boot" require "rails/all" require "action_cable/engine" require "socket" require_relative "../lib/catch_bad_request_errors" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups)...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/redis.rb
config/redis.rb
# frozen_string_literal: true $redis = Redis.new(url: "redis://#{ENV["REDIS_HOST"]}")
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/environment.rb
config/environment.rb
# frozen_string_literal: true # Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/puma.rb
config/puma.rb
# frozen_string_literal: true # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minim...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/domain.rb
config/domain.rb
# frozen_string_literal: true configuration_by_env = { production: { protocol: "https", domain: "gumroad.com", asset_domain: "assets.gumroad.com", root_domain: "gumroad.com", short_domain: "gum.co", discover_domain: "gumroad.com", api_domain: "api.gumroad.com", third_party_analytics_d...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/routes.rb
config/routes.rb
# frozen_string_literal: true require "api_domain_constraint" require "product_custom_domain_constraint" require "user_custom_domain_constraint" require "gumroad_domain_constraint" require "discover_domain_constraint" require "discover_taxonomy_constraint" require "sidekiq/cron/web" require "sidekiq_unique_jobs/web" ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
true
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/spring.rb
config/spring.rb
# frozen_string_literal: true %w[ .ruby-version .rbenv-vars tmp/restart.txt tmp/caching-dev.txt ].each { |path| Spring.watch(path) }
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/boot.rb
config/boot.rb
# frozen_string_literal: true # Chromedriver crashes when spawned with jemalloc in LD_PRELOAD. # By the time Rails is booted, jemalloc is already linked and keeping it in ENV is not necessary. ENV["LD_PRELOAD"] = "" ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gem...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/mailer.rb
config/initializers/mailer.rb
# frozen_string_literal: true require_relative "../../app/models/mailer_info" require_relative "../../app/models/mailer_info/delivery_method" if Rails.env.production? FOLLOWER_CONFIRMATION_MAIL_DOMAIN = GlobalConfig.get("FOLLOWER_CONFIRMATION_MAIL_DOMAIN_PROD", "followers.gumroad.com") CREATOR_CONTACTING_CUSTOMER...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/content_security_policy.rb
config/initializers/content_security_policy.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Define an application-wide content security policy. # See the Securing Rails Applications Guide for more information: # https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/filter_parameter_logging.rb
config/initializers/filter_parameter_logging.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/security_headers.rb
config/initializers/security_headers.rb
# frozen_string_literal: true
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/chat_rooms.rb
config/initializers/chat_rooms.rb
# frozen_string_literal: true CHAT_ROOMS = { accounting: { slack: { channel: "accounting" } }, announcements: { slack: { channel: "gumroad-" } }, awards: { slack: { channel: "gumroad-awards" } }, internals_log: { slack: { channel: "gumroad-" } }, migrations: { slack: { channel: "gumroad-" } }, payouts: { s...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/application_controller_renderer.rb
config/initializers/application_controller_renderer.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # ActiveSupport::Reloader.to_prepare do # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) # end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/mail_encodings.rb
config/initializers/mail_encodings.rb
# frozen_string_literal: true # TODO (vishal): Remove this initializer when we start relying on a Rails # version that includes this change https://github.com/rails/rails/pull/46650. # # Following code overrides the Mail::Encodings::QuoatedPritable class # as per https://github.com/mikel/mail/pull/1210. # See https://...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/alterity.rb
config/initializers/alterity.rb
# frozen_string_literal: true Alterity.configure do |config| config.command = -> (altered_table, alter_argument) { password_argument = "--password='#{config.password}'" if config.password.present? <<~SHELL.squish pt-online-schema-change -h #{config.host} -P #{config.port} -u #{config.us...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/vatstack.rb
config/initializers/vatstack.rb
# frozen_string_literal: true # Vatstack gives us two API keys — one for Development, and one for Production. # We're using the Production key in production, and the Development key everywhere else. VATSTACK_API_KEY = GlobalConfig.get("VATSTACK_API_KEY")
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/state_machine.rb
config/initializers/state_machine.rb
# frozen_string_literal: true module StateMachines::Integrations::ActiveModel alias around_validation_protected around_validation def around_validation(*args, &block) around_validation_protected(*args, &block) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/iras.rb
config/initializers/iras.rb
# frozen_string_literal: true # IRAS gives us two sets of credentials — one for Sandbox, and one for Production. # We're using the Production set in production, and the Sandbox set everywhere else. IRAS_API_ID = GlobalConfig.get("IRAS_API_ID") IRAS_API_SECRET = GlobalConfig.get("IRAS_API_SECRET") if Rails.env.product...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/js-routes.rb
config/initializers/js-routes.rb
# frozen_string_literal: true JsRoutes.setup do |config| config.url_links = true # Don't determine protocol from window.location (prerendering) config.default_url_options = { protocol: PROTOCOL, host: DOMAIN } config.exclude = [/^api_/] end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/time_formats.rb
config/initializers/time_formats.rb
# frozen_string_literal: true Time::DATE_FORMATS[:long_formatted_datetime] = "%e %b %Y %l:%M %p" Time::DATE_FORMATS[:formatted_date_full_month] = "%B %-d, %Y" Time::DATE_FORMATS[:formatted_date_abbrev_month] = "%b %-d, %Y" Time::DATE_FORMATS[:slashed] = "%-m/%-d/%Y"
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/sidekiq.rb
config/initializers/sidekiq.rb
# frozen_string_literal: true # `sidekiq-pro` is now only autoloaded in staging/production due to the Gemfile # group. This ensures `sidekiq-pro` is correctly loaded in all environments # when available. begin require "sidekiq-pro" rescue LoadError warn "sidekiq-pro is not installed" end require Rails.root.join("...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/lograge.rb
config/initializers/lograge.rb
# frozen_string_literal: true Rails.application.config.lograge.custom_options = lambda do |event| params = { remote_ip: event.payload[:remote_ip] } headers = event.payload[:headers] uuid = event.payload[:uuid] payload_params = event.payload[:params] if payload_params.present? if payload_params["control...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/geoip.rb
config/initializers/geoip.rb
# frozen_string_literal: true require "maxmind/geoip2" database_path = "#{Rails.root}/lib/GeoIP2-City.mmdb" GEOIP = File.exist?(database_path) ? MaxMind::GeoIP2::Reader.new(database: database_path) : nil
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/secure_headers.rb
config/initializers/secure_headers.rb
# frozen_string_literal: true cookie_config = if PROTOCOL == "https" { httponly: true, secure: true, samesite: { none: true } } else { httponly: true, secure: SecureHeaders::OPT_OUT, samesite: { lax: true } } end SecureHeaders::Configuration.default do |config| config.cookies = cooki...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/rack_timeout.rb
config/initializers/rack_timeout.rb
# frozen_string_literal: true unless ENV["DISABLE_RACK_TIMEOUT"] == "1" Rails.application.config.middleware.insert_before( Rack::Runtime, Rack::Timeout, service_timeout: 120, wait_overtime: 24.hours.to_i, wait_timeout: false ) Rack::Timeout::Logger.disable unless ENV["ENABLE_RACK_TIMEOUT_LOG...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/active_support_cache_notifications.rb
config/initializers/active_support_cache_notifications.rb
# frozen_string_literal: true Rails.application.config.after_initialize do cache_to_metric_keys = { ProfileSectionsPresenter::CACHE_KEY_PREFIX => "#{ProfileSectionsPresenter::CACHE_KEY_PREFIX}-metrics", ProductPresenter::ProductProps::SALES_COUNT_CACHE_KEY_REFIX => ProductPresenter::ProductProps::SALES_COUNT...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/session_store.rb
config/initializers/session_store.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Use tld_length 3 in staging to support subdomains like username.staging.gumroad.com tld_length = Rails.env.staging? ? 3 : 2 expire_after = Rails.env.test? ? 10.years : 1.month domain = :all base_cookie_name = "_gumroad_app_se...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/friendly_id.rb
config/initializers/friendly_id.rb
# frozen_string_literal: true # FriendlyId Global Configuration # # Use this to set up shared configuration options for your entire application. # Any of the configuration options shown here can also be applied to single # models by passing arguments to the `friendly_id` class method or defining # methods in your mode...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/prefix_for_branch_apps_es_index.rb
config/initializers/prefix_for_branch_apps_es_index.rb
# frozen_string_literal: true if Rails.env.staging? && ENV["BRANCH_DEPLOYMENT"] == "true" Rails.application.config.after_initialize do [Link, Balance, Purchase, Installment, ConfirmedFollowerEvent, ProductPageView].each do |model| model.index_name("branch-app-#{ENV['DATABASE_NAME']}__#{model.name.parameter...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/feature_toggle.rb
config/initializers/feature_toggle.rb
# frozen_string_literal: true Flipper.configure do |config| config.adapter { Flipper::Adapters::Redis.new($redis) } end Rails.application.config.flipper.preload = false Flipper::UI.configuration.application_breadcrumb_href = "/admin" Flipper::UI.configuration.cloud_recommendation = false Flipper::UI.configuration....
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/gumroad.rb
config/initializers/gumroad.rb
# frozen_string_literal: true GUMROAD_VAT_REGISTRATION_NUMBER = GlobalConfig.get("VAT_REGISTRATION_NUMBER", "EU826410924") GUMROAD_AUSTRALIAN_BUSINESS_NUMBER = GlobalConfig.get("AUSTRALIAN_BUSINESS_NUMBER", "11 374 928 117") GUMROAD_CANADA_GST_REGISTRATION_NUMBER = GlobalConfig.get("CANADA_GST_REGISTRATION_NUMBER", "7...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/devise.rb
config/initializers/devise.rb
# frozen_string_literal: true require "omniauth-facebook" require "omniauth-twitter" require "omniauth-google-oauth2" # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devi...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/spec_api_credentials.rb
config/initializers/spec_api_credentials.rb
# frozen_string_literal: true SPEC_API_USERNAME = GlobalConfig.get("SPEC_API_USERNAME") SPEC_API_PASSWORD = GlobalConfig.get("SPEC_API_PASSWORD")
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/dropbox.rb
config/initializers/dropbox.rb
# frozen_string_literal: true DROPBOX_PICKER_API_KEY = GlobalConfig.get("DROPBOX_PICKER_API_KEY")
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/doorkeeper.rb
config/initializers/doorkeeper.rb
# frozen_string_literal: true require "cgi" module VisibleScopes # Public Method: public_scopes # These are the scopes that the public should be aware of. Update this list when adding scopes to Doorkeeper. # Mobile Api scope is not included because we don't want the public to have knowledge of that scope. def...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/money.rb
config/initializers/money.rb
# frozen_string_literal: true Money.locale_backend = :i18n Money.rounding_mode = BigDecimal::ROUND_HALF_UP Money.default_currency = "USD" # technically KRW does have subunits but they are not used anymore # our currencies.yml assumes KRW to have 100 subunits and that's how we store them in the database # the gem 'mon...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/paypal.rb
config/initializers/paypal.rb
# frozen_string_literal: true # Gumroad's PayPal merchant account details PAYPAL_CLIENT_ID = GlobalConfig.get("PAYPAL_CLIENT_ID") PAYPAL_CLIENT_SECRET = GlobalConfig.get("PAYPAL_CLIENT_SECRET") PAYPAL_MERCHANT_EMAIL = GlobalConfig.get("PAYPAL_MERCHANT_EMAIL") # Gumroad's PayPal partner account details PAYPAL_BN...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/app_store_info.rb
config/initializers/app_store_info.rb
# frozen_string_literal: true IOS_APP_ID = GlobalConfig.get("IOS_APP_ID", "916819108") IOS_APP_STORE_URL = "https://itunes.apple.com/app/id#{IOS_APP_ID}" ANDROID_BUNDLE_ID = GlobalConfig.get("ANDROID_BUNDLE_ID", "com.gumroad.app") ANDROID_APP_STORE_URL = "https://play.google.com/store/apps/details?i...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/kaminari.rb
config/initializers/kaminari.rb
# frozen_string_literal: true # `will_paginate` is known to cause problems when used with `kaminari` # This configuration file enables using `page_with_kaminari()` instead of `page()` when pagination via `kaminari` is desired # Ref: https://github.com/kaminari/kaminari/issues/162#issuecomment-28673272 Kaminari.config...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/pagy.rb
config/initializers/pagy.rb
# frozen_string_literal: true require "pagy/extras/limit" require "pagy/extras/countless" require "pagy/extras/array" require "pagy/extras/overflow" Pagy::DEFAULT[:overflow] = :exception
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/inertia_rails.rb
config/initializers/inertia_rails.rb
# frozen_string_literal: true InertiaRails.configure do |config| config.deep_merge_shared_data = true end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/premailer_rails.rb
config/initializers/premailer_rails.rb
# frozen_string_literal: true Premailer::Rails.config[:remove_ids] = false Premailer::Rails.config[:preserve_style_attribute] = true
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/currency.rb
config/initializers/currency.rb
# frozen_string_literal: true OPEN_EXCHANGE_RATES_API_BASE_URL = "http://openexchangerates.org/api" OPEN_EXCHANGE_RATE_KEY = GlobalConfig.get("OPEN_EXCHANGE_RATES_APP_ID") CURRENCY_SOURCE = if Rails.env.development? || Rails.env.test? "#{Rails.root}/lib/currency/backup_rates.json" else "#{OPEN_EXCHANGE_...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/bots.rb
config/initializers/bots.rb
# frozen_string_literal: true BOT_MAP = { "Mozilla/5.0 (Windows; U; cs-CZ) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.1" => "Adobe AIR runtime", "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)" => "BinGet", "Chilkat/1.0.0 (+http://www.chilkatsoft.com/ChilkatHttpUA.asp)" => "Chilkat HTTP .NET", ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
true
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/mysql_missing_table_handler.rb
config/initializers/mysql_missing_table_handler.rb
# frozen_string_literal: true module Mysql2 class Client MISSING_TABLE_GRACE_PERIOD = 5.seconds alias original_query query def query(sql, options = {}) original_query(sql, options) rescue Mysql2::Error => e raise unless /Table .* doesn't exist/.match?(e.message) warn "Error: missin...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/openai.rb
config/initializers/openai.rb
# frozen_string_literal: true request_timeout_in_seconds = 3 OpenAI.configure do |config| config.access_token = GlobalConfig.get("OPENAI_ACCESS_TOKEN") config.request_timeout = request_timeout_in_seconds end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/json_time_precision.rb
config/initializers/json_time_precision.rb
# frozen_string_literal: true ActiveSupport::JSON::Encoding.time_precision = 0
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/sidekiq_web_csp.rb
config/initializers/sidekiq_web_csp.rb
# frozen_string_literal: true class SidekiqWebCSP def initialize(app) @app = app end def call(env) SecureHeaders.append_content_security_policy_directives( Rack::Request.new(env), { script_src: %w('unsafe-inline') } ) @app.call(env) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/paper_trail.rb
config/initializers/paper_trail.rb
# frozen_string_literal: true PaperTrail.serializer = PaperTrail::Serializers::JSON
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/cloudflare.rb
config/initializers/cloudflare.rb
# frozen_string_literal: true CLOUDFLARE_CACHE_LIMIT = GlobalConfig.get("CLOUDFLARE_CACHE_LIMIT", 8_000_000_000).to_i # 8GB
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/notification_purchase.rb
config/initializers/notification_purchase.rb
# frozen_string_literal: true Rails.application.config.after_initialize do ActiveSupport::Notifications.subscribe(ChargeProcessor::NOTIFICATION_CHARGE_EVENT) do |_, _, _, _, payload| Purchase.handle_charge_event(payload[:charge_event]) end end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/tax_id_pro.rb
config/initializers/tax_id_pro.rb
# frozen_string_literal: true # Tax ID Pro allows us to create multiple API keys. # We're using two — one for Development, and one for Production. # We're using the Production key in production, and the Development key everywhere else. TAX_ID_PRO_API_KEY = GlobalConfig.get("TAX_ID_PRO_API_KEY")
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/braintree.rb
config/initializers/braintree.rb
# frozen_string_literal: true Braintree::Configuration.environment = Rails.env.production? ? :production : :sandbox Braintree::Configuration.merchant_id = GlobalConfig.get("BRAINTREE_MERCHANT_ID") Braintree::Configuration.public_key = GlobalConfig.get("BRAINTREE_PUBLIC_KEY") Braintree::Configuration.private_key = Glob...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/wrap_parameters.rb
config/initializers/wrap_parameters.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_con...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/aws.rb
config/initializers/aws.rb
# frozen_string_literal: true # aws credentials for the web app are stored in the secrets AWS_ACCESS_KEY = GlobalConfig.get("AWS_ACCESS_KEY_ID") AWS_SECRET_KEY = GlobalConfig.get("AWS_SECRET_ACCESS_KEY") AWS_S3_ENDPOINT = GlobalConfig.get("AWS_S3_ENDPOINT", "https://s3.amazonaws.com") AWS_DEFAULT_REGION = GlobalConfig...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/countries.rb
config/initializers/countries.rb
# frozen_string_literal: true # Historically, we've gotten country names from a variety of sources: # the `iso_country_codes` gem, `maxmind/geoip2`, and most recently the `countries` gem. # # With the modifications here, a call to `ISO3166::Country.find_country_by_any_name` # will return the correct country from the `...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/pry.rb
config/initializers/pry.rb
# frozen_string_literal: true if defined?(PryByebug) Pry.commands.alias_command "c", "continue" Pry.commands.alias_command "s", "step" Pry.commands.alias_command "n", "next" Pry.commands.alias_command "f", "finish" Pry.commands.alias_command "bt", "pry-backtrace" Pry.config.editor = "vim" Pry.config.pag...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/omniauth.rb
config/initializers/omniauth.rb
# frozen_string_literal: true OmniAuth.config.full_host = "#{PROTOCOL}://#{DOMAIN}"
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/cdn_url_map.rb
config/initializers/cdn_url_map.rb
# frozen_string_literal: true # Map of origin prefixes to determine if a url is hosted at a location fronted by a CDN. # Use cdn_url_for in ProductsHelper to get the CDN url for a url on an origin contained in the map. # Should not be used to replace the use of asset_host. Should only be used for converting URLs persi...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/inflections.rb
config/initializers/inflections.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: ActiveSupport::Inflecto...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/cookie_rotator.rb
config/initializers/cookie_rotator.rb
# frozen_string_literal: true Rails.application.config.after_initialize do Rails.application.config.action_dispatch.cookies_rotations.tap do |cookies| authenticated_encrypted_cookie_salt = Rails.application.config.action_dispatch.authenticated_encrypted_cookie_salt signed_cookie_salt = Rails.application.conf...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/mail_observers.rb
config/initializers/mail_observers.rb
# frozen_string_literal: true Rails.application.configure do config.action_mailer.observers = %w[EmailDeliveryObserver] end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/devise_hooks.rb
config/initializers/devise_hooks.rb
# frozen_string_literal: true Warden::Manager.after_set_user except: :fetch do |user, warden, options| warden.session[:last_sign_in_at] = DateTime.current.to_i end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/makara.rb
config/initializers/makara.rb
# frozen_string_literal: true module Makara class ConnectionWrapper # Rails 7.0 compatibility, from: https://github.com/instacart/makara/pull/358 # TODO: Remove this file after the makara gem is updated, including this PR. def execute(*args, **kwargs) SQL_REPLACE.each do |find, replace| if ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/001_twitter.rb
config/initializers/001_twitter.rb
# frozen_string_literal: true # We're using an ancient omniauth-twitter gem that relies on this removed behavior # See https://github.com/rack/rack/pull/2183/files#diff-7ce97931f18a63a4d028696a6f4ba81991644dbc2d70eaa664285264e9a5cd64L612 # TODO (sharang): Change the gem or approach to twitter signup/connection and rem...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/koala.rb
config/initializers/koala.rb
# frozen_string_literal: true Koala.config.api_version = FACEBOOK_API_VERSION
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/bugsnag.rb
config/initializers/bugsnag.rb
# frozen_string_literal: true require Rails.root.join("lib", "extras", "bugsnag_handle_sidekiq_retries_callback") unless Rails.env.test? Rails.application.config.after_initialize do Bugsnag.configure do |config| config.api_key = GlobalConfig.get("BUGSNAG_API_KEY") config.notify_release_stages = %w[p...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/rack_profiler.rb
config/initializers/rack_profiler.rb
# frozen_string_literal: true require "rack-mini-profiler" Rack::MiniProfilerRails.initialize!(Rails.application) Rack::MiniProfiler.config.authorization_mode = :allow_authorized Rack::MiniProfiler.config.skip_paths = [ /#{ASSET_DOMAIN}/o, ] Rack::MiniProfiler.config.start_hidden = true Rack::MiniProfiler.confi...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/mongo.rb
config/initializers/mongo.rb
# frozen_string_literal: true require File.join(Rails.root, "lib", "extras", "mongoer") Mongoid.load!(Rails.root.join("config", "mongoid.yml")) MONGO_DATABASE = Mongoid::Clients.default
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/permissions_policy.rb
config/initializers/permissions_policy.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Define an application-wide HTTP permissions policy. For further # information see: https://developers.google.com/web/updates/2018/06/feature-policy # Rails.application.config.permissions_policy do |policy| # policy.camera ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/api_v2_methods.rb
config/initializers/api_v2_methods.rb
# frozen_string_literal: true GUMROAD_API_V2_METHODS = [ { name: "Products", methods: [ { type: :get, path: "/products", description: "Retrieve all of the existing products for the authenticated user.", response_layout: :products, curl_layout: :get_products ...
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/active_record_query_trace.rb
config/initializers/active_record_query_trace.rb
# frozen_string_literal: true if Rails.env.development? ActiveRecordQueryTrace.enabled = (ENV["QUERY_TRACE"] == "1") end
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/002_google.rb
config/initializers/002_google.rb
# frozen_string_literal: true GOOGLE_CLIENT_ID = GlobalConfig.get("GOOGLE_CLIENT_ID") GOOGLE_CLIENT_SECRET = GlobalConfig.get("GOOGLE_CLIENT_SECRET")
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false
antiwork/gumroad
https://github.com/antiwork/gumroad/blob/638f6c3a40b23b907c09f6881d4df18339da069c/config/initializers/blocked_object_types.rb
config/initializers/blocked_object_types.rb
# frozen_string_literal: true BLOCKED_OBJECT_TYPES = { ip_address: "ip_address", browser_guid: "browser_guid", email: "email", email_domain: "email_domain", charge_processor_fingerprint: "charge_processor_fingerprint", product: "product" }.freeze
ruby
MIT
638f6c3a40b23b907c09f6881d4df18339da069c
2026-01-04T15:39:11.815677Z
false