source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/recommended_purchase_infos.rb
Ruby
mit
8,966
main
791
# frozen_string_literal: true FactoryBot.define do factory :recommended_purchase_info do purchase recommended_link { purchase.link } factory :recommended_purchase_info_via_discover do recommendation_type { "discover" } end factory :recommended_purchase_info_via_product do recommende...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/romania_bank_accounts.rb
Ruby
mit
8,966
main
249
# frozen_string_literal: true FactoryBot.define do factory :romania_bank_account do user account_number { "RO49AAAA1B31007593840000" } account_number_last_four { "0000" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/cart_products.rb
Ruby
mit
8,966
main
250
# frozen_string_literal: true FactoryBot.define do factory :cart_product do association :cart, factory: :cart association :product, factory: :product price { product.price_cents } quantity { 1 } referrer { "direct" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/service_charges.rb
Ruby
mit
8,966
main
1,258
# frozen_string_literal: true FactoryBot.define do factory :service_charge do user charge_cents { 1000 } charge_processor_fingerprint { "shfbeg5142fff" } charge_processor_transaction_id { "2763276372637263" } card_type { "visa" } card_visual { "**** **** **** 4062" } card_country { "US" }...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/swiss_bank_accounts.rb
Ruby
mit
8,966
main
244
# frozen_string_literal: true FactoryBot.define do factory :swiss_bank_account do user account_number { "CH9300762011623852957" } account_number_last_four { "3000" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/carts.rb
Ruby
mit
8,966
main
255
# frozen_string_literal: true FactoryBot.define do factory :cart do association :user, factory: :user browser_guid { SecureRandom.uuid } ip_address { Faker::Internet.ip_v4_address } trait :guest do user { nil } end end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/qatar_bank_accounts.rb
Ruby
mit
8,966
main
284
# frozen_string_literal: true FactoryBot.define do factory :qatar_bank_account do user account_number { "QA87CITI123456789012345678901" } account_number_last_four { "8901" } bank_code { "AAAAQAQAXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/namibia_bank_accounts.rb
Ruby
mit
8,966
main
269
# frozen_string_literal: true FactoryBot.define do factory :namibia_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "AAAANANXXYZ" } account_holder_full_name { "Namibia Creator I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/purchase_custom_fields.rb
Ruby
mit
8,966
main
216
# frozen_string_literal: true FactoryBot.define do factory :purchase_custom_field do purchase field_type { CustomField::TYPE_TEXT } name { "Custom field" } value { "custom field value" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/rich_content.rb
Ruby
mit
8,966
main
246
# frozen_string_literal: true FactoryBot.define do factory :rich_content do association :entity, factory: :product description { [] } factory :product_rich_content do association :entity, factory: :product end end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/chargeables.rb
Ruby
mit
8,966
main
3,913
# frozen_string_literal: true FactoryBot.define do factory :chargeable, class: Chargeable do skip_create # Chargeable is not an ActiveRecord object transient do card { StripePaymentMethodHelper.success } expiry_date { card[:expiry_date] } cvc { card[:cvc] } with_zip_code { nil } ...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/bahrain_bank_accounts.rb
Ruby
mit
8,966
main
282
# frozen_string_literal: true FactoryBot.define do factory :bahrain_bank_account do user account_number { "BH29BMAG1299123456BH00" } account_number_last_four { "BH00" } bank_code { "AAAABHBMXYZ" } account_holder_full_name { "Bahrainian Creator I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/bhutan_bank_accounts.rb
Ruby
mit
8,966
main
266
# frozen_string_literal: true FactoryBot.define do factory :bhutan_bank_account do user account_number { "0000123456789" } account_number_last_four { "6789" } bank_code { "AAAABTBTXXX" } account_holder_full_name { "Bhutan Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/argentina_bank_accounts.rb
Ruby
mit
8,966
main
249
# frozen_string_literal: true FactoryBot.define do factory :argentina_bank_account do user account_number { "0110000600000000000000" } account_number_last_four { "0000" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/saint_lucia_bank_accounts.rb
Ruby
mit
8,966
main
275
# frozen_string_literal: true FactoryBot.define do factory :saint_lucia_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "AAAALCLCXYZ" } account_holder_full_name { "Saint Lucia Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/dispute_evidences.rb
Ruby
mit
8,966
main
1,707
# frozen_string_literal: true FactoryBot.define do factory :dispute_evidence do dispute { create(:dispute_formalized) } purchased_at { dispute.purchase.created_at } customer_email { dispute.purchase.email } seller_contacted_at { Time.current } after(:create) do |dispute_evidence| blob = Ac...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/poland_bank_accounts.rb
Ruby
mit
8,966
main
252
# frozen_string_literal: true FactoryBot.define do factory :poland_bank_account do user account_number { "PL61109010140000071219812874" } account_number_last_four { "2874" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/mexico_bank_accounts.rb
Ruby
mit
8,966
main
242
# frozen_string_literal: true FactoryBot.define do factory :mexico_bank_account do user account_number { "000000001234567897" } account_number_last_four { "7897" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/purchases.rb
Ruby
mit
8,966
main
9,772
# frozen_string_literal: true FactoryBot.define do factory :purchase do association :link, factory: :product seller { link.user } price_cents { link.price_cents } shipping_cents { 0 } tax_cents { 0 } gumroad_tax_cents { 0 } total_transaction_cents { price_cents + gumroad_tax_cents } d...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/indonesia_bank_accounts.rb
Ruby
mit
8,966
main
263
# frozen_string_literal: true FactoryBot.define do factory :indonesia_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "000" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/singaporean_bank_accounts.rb
Ruby
mit
8,966
main
291
# frozen_string_literal: true FactoryBot.define do factory :singaporean_bank_account do user account_number { "000123456" } branch_code { "000" } bank_number { "1100" } account_number_last_four { "3456" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/devices.rb
Ruby
mit
8,966
main
294
# frozen_string_literal: true FactoryBot.define do factory :device do token { generate(:token) } app_version { "1.0.0" } device_type { "ios" } app_type { Device::APP_TYPES[:creator] } user factory :android_device do device_type { "android" } end end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/custom_domains.rb
Ruby
mit
8,966
main
246
# frozen_string_literal: true FactoryBot.define do factory :custom_domain do association :user domain { Faker::Internet.domain_name(subdomain: true) } end trait :with_product do association :product user { nil } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/installment_plan_snapshots.rb
Ruby
mit
8,966
main
215
# frozen_string_literal: true FactoryBot.define do factory :installment_plan_snapshot do payment_option number_of_installments { 3 } recurrence { "monthly" } total_price_cents { 14700 } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/zip_tax_rate.rb
Ruby
mit
8,966
main
377
# frozen_string_literal: true FactoryBot.define do factory :zip_tax_rate do combined_rate { "0.1100000" } county_rate { "0.0100000" } special_rate { "0.0300000" } state_rate { "0.0500000" } city_rate { "0.0200000" } state { "NY" } zip_code { "10087" } country { "US" } is_seller_re...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/bangladesh_bank_accounts.rb
Ruby
mit
8,966
main
272
# frozen_string_literal: true FactoryBot.define do factory :bangladesh_bank_account do user account_number { "0000123456789" } account_number_last_four { "6789" } bank_code { "110000000" } account_holder_full_name { "Bangladesh Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/product_files.rb
Ruby
mit
8,966
main
1,382
# frozen_string_literal: true FactoryBot.define do factory :product_file do association :link, factory: :product url { "#{S3_BASE_URL}specs/#{SecureRandom.hex}.pdf" } trait :analyze do after(:create) { |file| file.analyze } end factory :external_link do url { "https://www.gumroad.co...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/transcoded_videos.rb
Ruby
mit
8,966
main
431
# frozen_string_literal: true FactoryBot.define do factory :transcoded_video do streamable { create(:streamable_video, is_transcoded_for_hls: true) } transient do key_base_path { "/attachments/#{SecureRandom.hex}" } end original_video_key { "#{key_base_path}/movie.mp4" } transcoded_video_...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/installments.rb
Ruby
mit
8,966
main
3,298
# frozen_string_literal: true FactoryBot.define do factory :installment, aliases: [:post] do association :link, factory: :product seller { link&.user } message { Faker::Lorem.paragraph } name { Faker::Book.title } send_emails { true } installment_type { "product" } shown_on_profile { fals...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/azerbaijan_bank_accounts.rb
Ruby
mit
8,966
main
316
# frozen_string_literal: true FactoryBot.define do factory :azerbaijan_bank_account do user account_number { "AZ77ADJE12345678901234567890" } account_number_last_four { "7890" } bank_code { "123456" } branch_code { "123456" } account_holder_full_name { "Azerbaijani Creator I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/chile_bank_accounts.rb
Ruby
mit
8,966
main
259
# frozen_string_literal: true FactoryBot.define do factory :chile_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "999" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/refunds.rb
Ruby
mit
8,966
main
344
# frozen_string_literal: true FactoryBot.define do factory :refund do purchase refunding_user_id { create(:user).id } total_transaction_cents { purchase.total_transaction_cents } amount_cents { purchase.price_cents } creator_tax_cents { purchase.tax_cents } gumroad_tax_cents { purchase.gumroa...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/norway_bank_accounts.rb
Ruby
mit
8,966
main
239
# frozen_string_literal: true FactoryBot.define do factory :norway_bank_account do user account_number { "NO9386011117947" } account_number_last_four { "7947" } account_holder_full_name { "Norwegian Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/oman_bank_accounts.rb
Ruby
mit
8,966
main
262
# frozen_string_literal: true FactoryBot.define do factory :oman_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "AAAAOMOMXXX" } account_holder_full_name { "Omani Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/bahamas_bank_accounts.rb
Ruby
mit
8,966
main
264
# frozen_string_literal: true FactoryBot.define do factory :bahamas_bank_account do user account_number { "0001234" } account_number_last_four { "1234" } bank_code { "AAAABSNSXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/czech_republic_bank_accounts.rb
Ruby
mit
8,966
main
256
# frozen_string_literal: true FactoryBot.define do factory :czech_republic_bank_account do user account_number { "CZ6508000000192000145399" } account_number_last_four { "3000" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/team_memberships.rb
Ruby
mit
8,966
main
293
# frozen_string_literal: true FactoryBot.define do factory :team_membership do user association :seller, factory: :user role { TeamMembership::ROLE_ADMIN } before(:create) do |team_membership| team_membership.user.create_owner_membership_if_needed! end end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/kazakhstan_bank_accounts.rb
Ruby
mit
8,966
main
274
# frozen_string_literal: true FactoryBot.define do factory :kazakhstan_bank_account do user account_number { "KZ221251234567890123" } account_number_last_four { "0123" } bank_code { "AAAAKZKZXXX" } account_holder_full_name { "Kaz creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/preorder_links.rb
Ruby
mit
8,966
main
287
# frozen_string_literal: true FactoryBot.define do factory :preorder_link do association :link, factory: :product release_at { 2.months.from_now } factory :preorder_product_with_content do url { "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/magic.mp3" } end end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/uae_bank_accounts.rb
Ruby
mit
8,966
main
244
# frozen_string_literal: true FactoryBot.define do factory :uae_bank_account do user account_number { "AE070331234567890123456" } account_number_last_four { "3456" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/calls.rb
Ruby
mit
8,966
main
525
# frozen_string_literal: true FactoryBot.define do factory :call do start_time { 1.day.from_now } end_time { 1.day.from_now + 30.minutes } call_url { "https://zoom.us/j/gmrd" } transient do link { nil } end after(:build) do |call, evaluator| purchase_params = { call:, link: eval...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/creator_contacting_customers_email_infos.rb
Ruby
mit
8,966
main
628
# frozen_string_literal: true FactoryBot.define do factory :creator_contacting_customers_email_info do purchase installment email_name { "purchase_installment" } state { "created" } factory :creator_contacting_customers_email_info_sent do state { "sent" } sent_at { Time.current } ...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/malaysia_bank_accounts.rb
Ruby
mit
8,966
main
269
# frozen_string_literal: true FactoryBot.define do factory :malaysia_bank_account do user account_number { "000123456000" } account_number_last_four { "6000" } bank_code { "HBMBMYKL" } account_holder_full_name { "Malaysian Creator I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/consumption_events.rb
Ruby
mit
8,966
main
387
# frozen_string_literal: true FactoryBot.define do factory :consumption_event do product_file_id { create(:product_file).id } url_redirect_id { create(:url_redirect).id } purchase_id { create(:purchase).id } link_id { create(:product).id } event_type { ConsumptionEvent::EVENT_TYPE_WATCH } pla...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/affiliate_credits.rb
Ruby
mit
8,966
main
298
# frozen_string_literal: true FactoryBot.define do factory :affiliate_credit do basis_points { 300 } association :affiliate_user association :affiliate, factory: :direct_affiliate purchase { create(:purchase) } seller { purchase.seller } link { purchase.link } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/indian_bank_accounts.rb
Ruby
mit
8,966
main
263
# frozen_string_literal: true FactoryBot.define do factory :indian_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } ifsc { "HDFC0004051" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/jordan_bank_accounts.rb
Ruby
mit
8,966
main
288
# frozen_string_literal: true FactoryBot.define do factory :jordan_bank_account do user account_number { "JO32ABCJ0010123456789012345678" } account_number_last_four { "5678" } bank_code { "AAAAJOJOXXX" } account_holder_full_name { "Jordanian Creator I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/colombia_bank_accounts.rb
Ruby
mit
8,966
main
293
# frozen_string_literal: true FactoryBot.define do factory :colombia_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "060" } account_type { "savings" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/video_files.rb
Ruby
mit
8,966
main
515
# frozen_string_literal: true FactoryBot.define do factory :video_file do url { "#{AWS_S3_ENDPOINT}/#{S3_BUCKET}/specs/ScreenRecording.mov" } filetype { "mov" } user { create(:user) } record { user } trait :with_thumbnail do after(:build) do |video_file| video_file.thumbnail.attach...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/self_service_affiliate_product.rb
Ruby
mit
8,966
main
229
# frozen_string_literal: true FactoryBot.define do factory :self_service_affiliate_product do association :seller, factory: :user product { create(:product, user: seller) } affiliate_basis_points { 500 } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/early_fraud_warnings.rb
Ruby
mit
8,966
main
305
# frozen_string_literal: true FactoryBot.define do factory :early_fraud_warning do purchase processor_id { "issfr_0O3PbF9e1RjUNIyYjsCznU4B" } fraud_type { "made_with_stolen_card" } charge_risk_level { "normal" } actionable { true } processor_created_at { 1.hour.ago } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/sequences.rb
Ruby
mit
8,966
main
717
# frozen_string_literal: true FactoryBot.define do sequence(:browser_guid) do |n| ["SDJKF-#{n}-#{rand(99_999)}-DSFKLLFK", "SDFJKLDF-#{n}-#{rand(999_999)}-JDSFKLDSF", "JKDDSFJKSFD-#{n}-#{rand(99_999)}-SDFJ"].sample end sequence(:username) { |n| "edgar#{SecureRandom.hex(4)}#{n}" } sequence(:email) { |n| "edg...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/kenya_bank_accounts.rb
Ruby
mit
8,966
main
267
# frozen_string_literal: true FactoryBot.define do factory :kenya_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "BARCKENXMDR" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/charges.rb
Ruby
mit
8,966
main
610
# frozen_string_literal: true FactoryBot.define do factory :charge do order { create(:order) } seller { create(:user) } processor { "stripe" } processor_transaction_id { "ch_#{SecureRandom.hex}" } payment_method_fingerprint { "pm_#{SecureRandom.hex}" } merchant_account { create(:merchant_acco...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/pakistan_bank_accounts.rb
Ruby
mit
8,966
main
282
# frozen_string_literal: true FactoryBot.define do factory :pakistan_bank_account do user account_number { "PK36SCBL0000001123456702" } account_number_last_four { "6702" } bank_code { "AAAAPKKAXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/uk_bank_accounts.rb
Ruby
mit
8,966
main
256
# frozen_string_literal: true FactoryBot.define do factory :uk_bank_account do user account_number { "1234567" } sort_code { "06-21-11" } account_number_last_four { "4567" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/seller_profile_products_sections.rb
Ruby
mit
8,966
main
263
# frozen_string_literal: true FactoryBot.define do factory :seller_profile_products_section do seller { create(:user) } default_product_sort { "page_layout" } shown_products { [] } show_filters { false } add_new_products { true } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/ethiopia_bank_accounts.rb
Ruby
mit
8,966
main
270
# frozen_string_literal: true FactoryBot.define do factory :ethiopia_bank_account do user account_number { "0000000012345" } account_number_last_four { "2345" } bank_code { "AAAAETETXXX" } account_holder_full_name { "Ethiopia Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/sent_abandoned_cart_emails.rb
Ruby
mit
8,966
main
226
# frozen_string_literal: true FactoryBot.define do factory :sent_abandoned_cart_email do cart { create(:cart) } installment { create(:abandoned_cart_workflow, published_at: 1.day.ago).installments.first } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/backtax_collections.rb
Ruby
mit
8,966
main
262
# frozen_string_literal: true FactoryBot.define do factory :backtax_collection do user backtax_agreement amount_cents { 1000 } amount_cents_usd { 1000 } currency { "usd" } stripe_transfer_id { "tr_2M97Bm9e1RjUNIyY0WbsSZGp" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/sweden_bank_accounts.rb
Ruby
mit
8,966
main
248
# frozen_string_literal: true FactoryBot.define do factory :sweden_bank_account do user account_number { "SE3550000000054910000003" } account_number_last_four { "0003" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/credit_cards.rb
Ruby
mit
8,966
main
250
# frozen_string_literal: true FactoryBot.define do factory :credit_card do transient do chargeable { build(:chargeable) } user { nil } end initialize_with do CreditCard.create(chargeable, nil, user) end end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/ach_accounts.rb
Ruby
mit
8,966
main
835
# frozen_string_literal: true FactoryBot.define do factory :ach_account do user account_number { "1112121234" } routing_number { "110000000" } account_number_last_four { "1234" } account_holder_full_name { "Gumbot Gumstein I" } account_type { "checking" } end factory :ach_account_2, pare...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/variants.rb
Ruby
mit
8,966
main
518
# frozen_string_literal: true FactoryBot.define do factory :variant do variant_category price_difference_cents { 0 } name { Faker::Subscription.plan } transient do active_integrations { [] } end trait :with_product_file do after(:create) do |variant| variant.product_file...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/taiwan_bank_accounts.rb
Ruby
mit
8,966
main
266
# frozen_string_literal: true FactoryBot.define do factory :taiwan_bank_account do user account_number { "0001234567" } account_number_last_four { "4567" } bank_code { "AAAATWTXXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/european_bank_accounts.rb
Ruby
mit
8,966
main
782
# frozen_string_literal: true FactoryBot.define do factory :european_bank_account do user account_number { "DE89370400440532013000" } account_number_last_four { "3000" } account_holder_full_name { "Stripe DE Account" } account_type { "checking" } end factory :nl_bank_account, parent: :europe...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/users.rb
Ruby
mit
8,966
main
5,328
# frozen_string_literal: true FactoryBot.define do factory :user do email { generate :email } username { generate :username } password { "-42Q_.c_3628Ca!mW-xTJ8v*" } confirmed_at { Time.current } user_risk_state { "not_reviewed" } payment_address { generate :email } current_sign_in_ip { ...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/algeria_bank_accounts.rb
Ruby
mit
8,966
main
277
# frozen_string_literal: true FactoryBot.define do factory :algeria_bank_account do user account_number { "00001234567890123456" } account_number_last_four { "3456" } bank_code { "AAAADZDZXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/costa_rica_bank_accounts.rb
Ruby
mit
8,966
main
250
# frozen_string_literal: true FactoryBot.define do factory :costa_rica_bank_account do user account_number { "CR04010212367856709123" } account_number_last_four { "9123" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/gabon_bank_accounts.rb
Ruby
mit
8,966
main
278
# frozen_string_literal: true FactoryBot.define do factory :gabon_bank_account do user account_number { "00001234567890123456789" } account_number_last_four { "6789" } bank_code { "AAAAGAGAXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/mozambique_bank_accounts.rb
Ruby
mit
8,966
main
282
# frozen_string_literal: true FactoryBot.define do factory :mozambique_bank_account do user account_number { "001234567890123456789" } account_number_last_four { "6789" } bank_code { "AAAAMZMXXXX" } account_holder_full_name { "Mozambique Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/turkey_bank_accounts.rb
Ruby
mit
8,966
main
279
# frozen_string_literal: true FactoryBot.define do factory :turkey_bank_account do user account_number { "TR320010009999901234567890" } account_number_last_four { "7890" } bank_code { "ADABTRIS" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/thailand_bank_accounts.rb
Ruby
mit
8,966
main
264
# frozen_string_literal: true FactoryBot.define do factory :thailand_bank_account do user account_number { "000123456789" } bank_number { "999" } account_number_last_four { "6789" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/serbia_bank_accounts.rb
Ruby
mit
8,966
main
278
# frozen_string_literal: true FactoryBot.define do factory :serbia_bank_account do user account_number { "RS35105008123123123173" } account_number_last_four { "3173" } bank_code { "TESTSERBXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/angola_bank_accounts.rb
Ruby
mit
8,966
main
278
# frozen_string_literal: true FactoryBot.define do factory :angola_bank_account do user account_number { "AO06004400006729503010102" } account_number_last_four { "0102" } bank_code { "AAAAAOAOXXX" } account_holder_full_name { "Angola Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/albania_bank_accounts.rb
Ruby
mit
8,966
main
286
# frozen_string_literal: true FactoryBot.define do factory :albania_bank_account do user account_number { "AL35202111090000000001234567" } account_number_last_four { "4567" } bank_code { "AAAAALTXXXX" } account_holder_full_name { "Albanian Creator I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/japan_bank_accounts.rb
Ruby
mit
8,966
main
280
# frozen_string_literal: true FactoryBot.define do factory :japan_bank_account do user account_number { "0001234" } account_number_last_four { "1234" } bank_code { "1100" } branch_code { "000" } account_holder_full_name { "Japanese Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/gibraltar_bank_accounts.rb
Ruby
mit
8,966
main
264
# frozen_string_literal: true FactoryBot.define do factory :gibraltar_bank_account do user account_number { "00012345" } account_number_last_four { "2345" } sort_code { "10-88-00" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/hungary_bank_accounts.rb
Ruby
mit
8,966
main
253
# frozen_string_literal: true FactoryBot.define do factory :hungary_bank_account do user account_number { "HU42117730161111101800000000" } account_number_last_four { "2874" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/morocco_bank_accounts.rb
Ruby
mit
8,966
main
285
# frozen_string_literal: true FactoryBot.define do factory :morocco_bank_account do user account_number { "MA64011519000001205000534921" } account_number_last_four { "4921" } bank_code { "AAAAMAMAXXX" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/new_zealand_bank_accounts.rb
Ruby
mit
8,966
main
245
# frozen_string_literal: true FactoryBot.define do factory :new_zealand_bank_account do user account_number { "1100000000000010" } account_number_last_four { "0010" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/guatemala_bank_accounts.rb
Ruby
mit
8,966
main
287
# frozen_string_literal: true FactoryBot.define do factory :guatemala_bank_account do user account_number { "GT20AGRO00000000001234567890" } account_number_last_four { "7890" } bank_code { "AAAAGTGCXYZ" } account_holder_full_name { "Guatemala Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/ghana_bank_accounts.rb
Ruby
mit
8,966
main
261
# frozen_string_literal: true FactoryBot.define do factory :ghana_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "022112" } account_holder_full_name { "Ghanaian Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/balances.rb
Ruby
mit
8,966
main
366
# frozen_string_literal: true FactoryBot.define do factory :balance do user merchant_account { MerchantAccount.gumroad(StripeChargeProcessor.charge_processor_id) } date { Date.today } currency { Currency::USD } amount_cents { 10_00 } holding_currency { currency } holding_amount_cents { am...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/asset_previews.rb
Ruby
mit
8,966
main
1,855
# frozen_string_literal: true FactoryBot.define do factory :asset_preview do association :link, factory: :product transient do attach { true } end before(:create) do |preview, evaluator| preview.file.attach Rack::Test::UploadedFile.new(Rails.root.join("spec", "support", "fixtures", "kFD...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/sales_related_products_infos.rb
Ruby
mit
8,966
main
207
# frozen_string_literal: true FactoryBot.define do factory :sales_related_products_info do smaller_product { create(:product) } larger_product { create(:product) } sales_count { 1 } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/south_africa_bank_accounts.rb
Ruby
mit
8,966
main
268
# frozen_string_literal: true FactoryBot.define do factory :south_africa_bank_account do user account_number { "000001234" } account_number_last_four { "0054" } bank_code { "FIRNZAJJ" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/niger_bank_accounts.rb
Ruby
mit
8,966
main
247
# frozen_string_literal: true FactoryBot.define do factory :niger_bank_account do user account_number { "NE58NE0380100100130305000268" } account_number_last_four { "0268" } account_holder_full_name { "Niger Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/philippines_bank_accounts.rb
Ruby
mit
8,966
main
280
# frozen_string_literal: true FactoryBot.define do factory :philippines_bank_account do user account_number { "01567890123456789" } bank_number { "BCDEFGHI123" } account_number_last_four { "I123" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/san_marino_bank_accounts.rb
Ruby
mit
8,966
main
288
# frozen_string_literal: true FactoryBot.define do factory :san_marino_bank_account do user account_number { "SM86U0322509800000000270100" } account_number_last_four { "0100" } bank_code { "AAAASMSMXXX" } account_holder_full_name { "San Marino Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/url_redirects.rb
Ruby
mit
8,966
main
931
# frozen_string_literal: true FactoryBot.define do factory :url_redirect do purchase { create(:purchase, purchaser: create(:named_user), link:) } association :link, factory: :product uses { 0 } expires_at { "2012-01-11 12:46:23" } factory :streamable_url_redirect do after(:create) do |url_...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/guyana_bank_accounts.rb
Ruby
mit
8,966
main
265
# frozen_string_literal: true FactoryBot.define do factory :guyana_bank_account do user account_number { "000123456789" } account_number_last_four { "6789" } bank_code { "AAAAGYGGXYZ" } account_holder_full_name { "Guyana Creator" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/gumroad_daily_analytics.rb
Ruby
mit
8,966
main
280
# frozen_string_literal: true FactoryBot.define do factory :gumroad_daily_analytic do period_ended_at { "2023-02-03 17:07:30" } gumroad_price_cents { 1500 } gumroad_fee_cents { 150 } creators_with_sales { 45 } gumroad_discover_price_cents { 700 } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/wishlist_products.rb
Ruby
mit
8,966
main
417
# frozen_string_literal: true FactoryBot.define do factory :wishlist_product do wishlist product trait :with_quantity do product { create(:physical_product) } quantity { 5 } end trait :with_recurring_variant do product { create(:membership_product_with_preset_tiered_pricing) }...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/product_refund_policies.rb
Ruby
mit
8,966
main
275
# frozen_string_literal: true FactoryBot.define do factory :product_refund_policy do product seller { product.user } max_refund_period_in_days { RefundPolicy::DEFAULT_REFUND_PERIOD_IN_DAYS } fine_print { "This is a product-level refund policy" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/nigeria_bank_accounts.rb
Ruby
mit
8,966
main
268
# frozen_string_literal: true FactoryBot.define do factory :nigeria_bank_account do user account_number { "1111111112" } account_number_last_four { "1112" } bank_code { "AAAANGLAXXX" } account_holder_full_name { "Nigerian Creator I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/iceland_bank_accounts.rb
Ruby
mit
8,966
main
251
# frozen_string_literal: true FactoryBot.define do factory :iceland_bank_account do user account_number { "IS140159260076545510730339" } account_number_last_four { "0339" } account_holder_full_name { "Gumbot Gumstein I" } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/purchase_refund_policies.rb
Ruby
mit
8,966
main
253
# frozen_string_literal: true FactoryBot.define do factory :purchase_refund_policy do purchase title { "30-day money back guarantee" } fine_print { "This is a purchase-level refund policy" } max_refund_period_in_days { 30 } end end
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/third_party_analytics.rb
Ruby
mit
8,966
main
370
# frozen_string_literal: true FactoryBot.define do factory :third_party_analytic do user name { "Gumhead's Snippet" } link { FactoryBot.create(:product, user:) } analytics_code { "<script>console.log('running script')</script><noscript><img height='1' width='1' alt='' style='display:none' src='http:/...
github
antiwork/gumroad
https://github.com/antiwork/gumroad
spec/support/factories/direct_affiliates.rb
Ruby
mit
8,966
main
250
# frozen_string_literal: true FactoryBot.define do factory :direct_affiliate do association :affiliate_user, factory: :affiliate_user association :seller, factory: :user affiliate_basis_points { 300 } send_posts { true } end end