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 | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/expense_report_review_spec.rb | Ruby | mit | 19 | master | 2,488 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe ExpenseReportReview, type: :model do
let(:conference) { FactoryBot.create(:conference) }
let(:plan) { FactoryBot.create(:plan, conference:) }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
let(:... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/plan_spec.rb | Ruby | mit | 19 | master | 5,132 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe Plan, type: :model do
describe '#booth_eligible?' do
it 'returns true when booth_size is greater than 0' do
plan = FactoryBot.build_stubbed(:plan, booth_size: 6)
expect(plan.booth_eligible?).to be true
end
it 'returns false... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/broadcast_spec.rb | Ruby | mit | 19 | master | 853 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe Broadcast, type: :model do
let(:conference) { FactoryBot.create(:conference) }
let(:staff) { FactoryBot.create(:staff) }
describe '#update_status' do
let(:broadcast) { FactoryBot.create(:broadcast, staff:, conference:, status: :ready) }
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/expense_report_spec.rb | Ruby | mit | 19 | master | 5,404 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe ExpenseReport, type: :model do
let(:conference) { FactoryBot.create(:conference) }
let(:plan) { FactoryBot.create(:plan, conference:) }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
describe '... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/conference_spec.rb | Ruby | mit | 19 | master | 15,319 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe Conference, type: :model do
describe 'associations' do
it 'has many plans' do
expect(described_class.reflect_on_association(:plans).macro).to eq(:has_many)
expect(described_class.reflect_on_association(:plans).options[:dependent]).t... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/tito_ticket_retraction_spec.rb | Ruby | mit | 19 | master | 14,296 | # frozen_string_literal: true
require 'rails_helper'
# rubocop:disable RSpec/NestedGroups
RSpec.describe TitoTicketRetraction, type: :model do
let(:conference) { FactoryBot.create(:conference, tito_slug: 'rubykaigi/2025') }
let(:plan) { FactoryBot.create(:plan, conference:) }
let(:sponsorship) { FactoryBot.crea... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/concerns/editing_history_spec.rb | Ruby | mit | 19 | master | 4,969 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe EditingHistory do
# Use SponsorshipEditingHistory as it includes the concern
let(:conference) { FactoryBot.create(:conference) }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:) }
let(:staff) { FactoryBot.create(:staff) }
d... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/concerns/editing_history_target_spec.rb | Ruby | mit | 19 | master | 5,161 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe EditingHistoryTarget do
# Use Sponsorship as it includes the concern
let(:conference) { FactoryBot.create(:conference) }
let(:staff) { FactoryBot.create(:staff) }
let(:organization) { FactoryBot.create(:organization) }
describe 'associatio... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/models/concerns/markdown_body_spec.rb | Ruby | mit | 19 | master | 4,283 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe MarkdownBody do
# Create a test class that includes the concern
let(:test_class) do
Class.new do
include ActiveModel::Model
include MarkdownBody
attr_accessor :id, :body, :updated_at
def persisted?
!!id
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/requests/expense_report_submissions_spec.rb | Ruby | mit | 19 | master | 2,103 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "Expense Report Submissions", type: :request do
let(:conference) { FactoryBot.create(:conference, :full) }
let(:plan) { conference.plans.first }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
le... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/requests/expense_line_items_spec.rb | Ruby | mit | 19 | master | 3,415 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "Expense Line Items", type: :request do
let(:conference) { FactoryBot.create(:conference, :full) }
let(:plan) { conference.plans.first }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
let(:sessi... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/requests/root_spec.rb | Ruby | mit | 19 | master | 3,852 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "Root page", type: :request do
let(:session_cookie_name) { '__Host-rk-sponsorapp2-hl' }
describe "GET /" do
context "when unauthenticated with a single open conference" do
let!(:conference) do
FactoryBot.create(:conference, app... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/requests/expense_reports_spec.rb | Ruby | mit | 19 | master | 3,495 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "Expense Reports", type: :request do
let(:conference) { FactoryBot.create(:conference, :full) }
let(:plan) { conference.plans.first }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
let(:session_... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/requests/admin/expense_report_reviews_spec.rb | Ruby | mit | 19 | master | 1,730 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "Admin Expense Report Reviews", type: :request do
let(:conference) { FactoryBot.create(:conference, :full) }
let(:plan) { conference.plans.first }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/requests/admin/expense_files_spec.rb | Ruby | mit | 19 | master | 1,665 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "Admin Expense Files", type: :request do
let(:conference) { FactoryBot.create(:conference, :full) }
let(:plan) { conference.plans.first }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
let(:staf... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/requests/admin/expense_reports_spec.rb | Ruby | mit | 19 | master | 2,049 | # frozen_string_literal: true
require 'rails_helper'
RSpec.describe "Admin Expense Reports", type: :request do
let(:conference) { FactoryBot.create(:conference, :full) }
let(:plan) { conference.plans.first }
let(:sponsorship) { FactoryBot.create(:sponsorship, conference:, plan:, customization: true) }
let(:st... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/expense_files.rb | Ruby | mit | 19 | master | 236 | # frozen_string_literal: true
FactoryBot.define do
factory :expense_file do
sponsorship
prefix { "c-1/expenses/s-1/" }
filename { 'receipt.pdf' }
content_type { 'application/pdf' }
status { 'uploaded' }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/tito_ticket_retractions.rb | Ruby | mit | 19 | master | 2,834 | # frozen_string_literal: true
FactoryBot.define do
factory :tito_ticket_retraction do
sponsorship
conference { sponsorship&.conference }
sequence(:tito_registration_id) { |n| "reg_#{n}" }
reason { "Sponsor requested cancellation" }
completed { false }
trait :with_tito_registration do
t... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/contacts.rb | Ruby | mit | 19 | master | 316 | # frozen_string_literal: true
FactoryBot.define do
factory :contact do
# sponsorship
kind { "primary" }
sequence(:email) { |n| "primary@#{n}.co.invalid" }
sequence(:address) { |n| "#{n}-#{n}-#{n}" }
sequence(:organization) { |_n| "Contoso" }
sequence(:name) { |n| "User #{n}" }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/form_descriptions.rb | Ruby | mit | 19 | master | 578 | # frozen_string_literal: true
FactoryBot.define do
factory :form_description do
conference
locale { "en" }
head { conference ? "- Head #{locale} #{conference.id}" : "- Head #{locale}" }
plan_help { conference ? "- Plan #{locale} #{conference.id}" : "- Plan #{locale}" }
booth_help { conference ? "... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/sponsorships.rb | Ruby | mit | 19 | master | 514 | # frozen_string_literal: true
FactoryBot.define do
factory :sponsorship do
conference
plan { Plan.first }
locale { 'en' }
sequence(:name) { |n| "Contoso #{n}" }
sequence(:url) { |n| "https://#{n}.co.invalid" }
sequence(:profile) { |n| "we're #{n}" }
asset_file { association(:sponsorship_... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/plans.rb | Ruby | mit | 19 | master | 310 | # frozen_string_literal: true
FactoryBot.define do
factory :plan do
conference
sequence(:name) { |n| "Plan #{n}" }
sequence(:rank) { |n| n }
summary { "na" }
capacity { 10 }
number_of_guests { 1 }
price_text { "na" }
words_limit { 15 }
auto_acceptance { true }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/broadcasts.rb | Ruby | mit | 19 | master | 303 | # frozen_string_literal: true
FactoryBot.define do
factory :broadcast do
conference
staff
status { :created }
sequence(:campaign) { |n| "Campaign #{n}" }
sequence(:description, &:to_s)
sequence(:title) { |n| "Email #{n}" }
sequence(:body) { |n| "- Email #{n}" }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/announcements.rb | Ruby | mit | 19 | master | 481 | # frozen_string_literal: true
FactoryBot.define do
factory :announcement do
conference
staff
sequence(:issue) { |n| "issue-#{n}" }
locale { 'en' }
sequence(:title) { |n| "Announcement #{n}" }
body { "This is an announcement body" }
revision { 1 }
trait :published do
published_a... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/expense_line_items.rb | Ruby | mit | 19 | master | 242 | # frozen_string_literal: true
FactoryBot.define do
factory :expense_line_item do
expense_report
title { 'Test expense' }
amount { 1000 }
tax_rate { '0.1' }
tax_amount { 100 }
sequence(:position) { |n| n }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/sponsor_events.rb | Ruby | mit | 19 | master | 676 | # frozen_string_literal: true
FactoryBot.define do
factory :sponsor_event do
sponsorship
sequence(:title) { |n| "Event #{n}" }
starts_at { 1.week.from_now }
sequence(:url) { |n| "https://example#{n}.com/event" }
policy_acknowledged_at { Time.current }
trait :pending do
status { :pendin... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/expense_reports.rb | Ruby | mit | 19 | master | 200 | # frozen_string_literal: true
FactoryBot.define do
factory :expense_report do
sponsorship { association(:sponsorship, customization: true) }
status { 'draft' }
revision { 0 }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/sponsor_event_asset_files.rb | Ruby | mit | 19 | master | 204 | # frozen_string_literal: true
FactoryBot.define do
factory :sponsor_event_asset_file do
sponsorship
prefix { "test/events/" }
extension { "png" }
checksum_sha256 { "abc123" }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/conferences.rb | Ruby | mit | 19 | master | 456 | # frozen_string_literal: true
FactoryBot.define do
factory :conference do
sequence(:name) { |n| "Conf #{n}" }
sequence(:slug) { |n| "conf#{n}" }
booth_capacity { 50 }
sequence(:contact_email_address) { |n| "info+#{n}@conf.test.invalid" }
trait :full do
after(:create) do |conference, _conte... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/tito_discount_codes.rb | Ruby | mit | 19 | master | 236 | # frozen_string_literal: true
FactoryBot.define do
factory :tito_discount_code do
sponsorship
sequence(:code) { |n| "SPONSOR#{n}" }
sequence(:tito_discount_code_id) { |n| "tito_dc_#{n}" }
kind { :attendee }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/session_tokens.rb | Ruby | mit | 19 | master | 345 | # frozen_string_literal: true
FactoryBot.define do
factory :session_token do
sequence(:email) { |n| "user#{n}@example.com" }
expires_at { 3.months.from_now }
trait :expired do
expires_at { 1.day.ago }
end
trait :with_sponsorship do
sponsorship
end
trait :with_staff do
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/staff.rb | Ruby | mit | 19 | master | 200 | # frozen_string_literal: true
FactoryBot.define do
factory :staff do
sequence(:login) { |n| "orgz#{n}" }
sequence(:name) { |n| "Orgz #{n}" }
sequence(:uid) { |n| "uid_#{n}" }
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/tickets.rb | Ruby | mit | 19 | master | 315 | # frozen_string_literal: true
FactoryBot.define do
factory :ticket do
conference
sponsorship
kind { :attendee }
sequence(:name) { |n| "Attendee #{n}" }
trait :booth_staff do
kind { :booth_staff }
end
trait :checked_in do
checked_in_at { Time.current }
end
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | spec/factories/broadcast_deliveries.rb | Ruby | mit | 19 | master | 453 | # frozen_string_literal: true
FactoryBot.define do
factory :broadcast_delivery do
broadcast
sequence(:recipient) { |n| "recipient#{n}@example.com" }
status { :created }
trait :with_sponsorship do
sponsorship
end
trait :sent do
status { :sent }
end
trait :delivered do
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/lambda_boot.rb | Ruby | mit | 19 | master | 349 | # frozen_string_literal: true
require 'aws-sdk-ssm'
ssm = Aws::SSM::Client.new
r = /^SSM_SECRET__/
params = ENV.keys.grep(r).map do |k|
[ENV[k], k.sub(r, '')]
end.to_h
params.keys.each_slice(10) do |names|
ssm.get_parameters(
names:,
with_decryption: true,
).parameters.each do |pa|
ENV[params.fetch(p... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/lambda_runner.rb | Ruby | mit | 19 | master | 1,328 | # frozen_string_literal: true
require 'pp'
require 'json'
require 'open3'
module CommandRunner
def self.handle(event:, context:)
raise "No command provided" unless event['run']
run(event['run'], context:)
end
def self.run(cmd, context:)
$stdout.puts "RUNCMD #{context.aws_request_id} #{JSON.generat... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/boot.rb | Ruby | mit | 19 | master | 251 | # frozen_string_literal: true
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
require "bundler/setup" # Set up gems listed in the Gemfile.
require 'bootsnap/setup'
require_relative 'lambda_boot' if ENV['AWS_LAMBDA_FUNCTION_NAME'] |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/routes.rb | Ruby | mit | 19 | master | 4,407 | # frozen_string_literal: true
Rails.application.routes.draw do
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
scope path: 'admin', module: 'admin' do
get '/' => 'dashboard#index', as: :dashboard
get '/slacktown' => 'dashboard#slacktown', as: :slacktown
get '/mailtown' =>... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/ci.rb | Ruby | mit | 19 | master | 529 | # frozen_string_literal: true
# Run using bin/ci
CI.run do
step "Setup", "bin/setup --skip-server"
step "Security: Importmap vulnerability audit", "bin/importmap audit"
# Optional: set a green GitHub commit status to unblock PR merge.
# Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`.
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/puma.rb | Ruby | mit | 19 | master | 2,083 | # frozen_string_literal: true
# This configuration file will be evaluated by Puma. The top-level methods that
# are invoked here are part of Puma's configuration DSL. For more information
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
#
# Puma starts a configurable number of processes (wo... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/application.rb | Ruby | mit | 19 | master | 2,128 | # frozen_string_literal: true
require_relative "boot"
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
# require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
# require "action_mail... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/omniauth.rb | Ruby | mit | 19 | master | 301 | # frozen_string_literal: true
OmniAuth.config.allowed_request_methods = %i[get post] # FIXME: migrate to OmniAuth 2 fully
Rails.application.config.middleware.use OmniAuth::Builder do
provider :github, Rails.application.config.x.github.client_id, Rails.application.config.x.github.client_secret
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/active_job.rb | Ruby | mit | 19 | master | 508 | # frozen_string_literal: true
Rails.application.configure do
ENV['JOB_ADAPTER'] ||= 'shoryuken' if ENV['ENABLE_SHORYUKEN']
adapter = case ENV['JOB_ADAPTER']
when 'shoryuken'
:shoryuken
when 'lambdakiq'
:lambdakiq
else
:inline
end
ActiveJob::Base.queue_adapter = config.active_job.queue_adapter... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/semantic_logger.rb | Ruby | mit | 19 | master | 451 | # frozen_string_literal: true
# see also config/application.rb
# Rails 8.1 compat, https://github.com/reidmorrison/rails_semantic_logger/pull/276#issuecomment-3533151110
require 'rails_semantic_logger/version'
raise "Check monkey patch best-before-by" if RailsSemanticLogger::VERSION != "4.18.0"
module RailsSemanticL... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/lambdakiq.rb | Ruby | mit | 19 | master | 217 | # frozen_string_literal: true
ActiveJob::Base.include Lambdakiq::Worker
ActionMailer::MailDeliveryJob.include Lambdakiq::Worker
ActionMailer::MailDeliveryJob.queue_as ENV['LAMBDAKIQ_QUEUE'] if ENV['LAMBDAKIQ_QUEUE'] |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/content_security_policy.rb | Ruby | mit | 19 | master | 1,854 | # 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... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/sentry.rb | Ruby | mit | 19 | master | 299 | # frozen_string_literal: true
Sentry.init do |config|
config.dsn = ENV['SENTRY_DSN']
config.background_worker_threads = 0 if ENV['AWS_LAMBDA_FUNCTION_NAME']
config.traces_sample_rate = 0.25
config.enable_logs = true
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/aws_s3_patches.rb | Ruby | mit | 19 | master | 525 | # frozen_string_literal: true
require 'aws-sdk-s3'
# force use_dualstack_endpoint for presigned posts
module Aws
module S3
class PresignedPost
def bucket_url
params = Aws::S3::EndpointParameters.new(
bucket: @bucket_name,
region: @bucket_region,
accelerate: @accelerat... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/initializers/shoryuken.rb | Ruby | mit | 19 | master | 2,663 | # frozen_string_literal: true
module Shoryuken
module Middleware
module Server
class SentryReporter
def call(worker_instance, queue, sqs_msg, body, &block)
return block.call unless ::Sentry.initialized?
::Sentry.with_scope do |scope|
contexts = generate_contexts(wor... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/environments/test.rb | Ruby | mit | 19 | master | 2,750 | # frozen_string_literal: true
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
Rails.applic... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/environments/production.rb | Ruby | mit | 19 | master | 5,453 | # frozen_string_literal: true
require "active_support/core_ext/integer/time"
Rails.application.configure do
config.x.public_url_host = ENV.fetch('DEFAULT_URL_HOST')
config.x.asset_file_uploadable.region = ENV['S3_FILES_REGION']
config.x.asset_file_uploadable.bucket = ENV['S3_FILES_BUCKET']
config.x.asset_fil... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | config/environments/development.rb | Ruby | mit | 19 | master | 4,628 | # frozen_string_literal: true
require "active_support/core_ext/integer/time"
Rails.application.configure do
config.x.public_url_host = ENV.fetch('DEFAULT_URL_HOST', 'localhost:3000')
config.x.asset_file_uploadable.region = ENV['S3_FILES_REGION']
config.x.asset_file_uploadable.bucket = ENV['S3_FILES_BUCKET']
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/schema.rb | Ruby | mit | 19 | master | 24,193 | # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rai... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/seeds.rb | Ruby | mit | 19 | master | 25,153 | # frozen_string_literal: true
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
require "securerandom"
require 'jsonnet'
Rails.logger.debug "Creating C... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181224233148_create_broadcasts.rb | Ruby | mit | 19 | master | 678 | # frozen_string_literal: true
class CreateBroadcasts < ActiveRecord::Migration[5.2]
def change
create_table :broadcasts do |t|
t.references :conference, foreign_key: true, null: false
t.string :campaign, null: false
t.text :description, null: false
t.integer :status, null: false
t.s... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251115081757_add_fallback_options.rb | Ruby | mit | 19 | master | 279 | # frozen_string_literal: true
class AddFallbackOptions < ActiveRecord::Migration[8.1]
def change
add_column :form_descriptions, :fallback_options, :jsonb, null: false, default: {}
add_column :sponsorships, :fallback_option, :string, null: false, default: ''
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260331000003_add_status_to_expense_files.rb | Ruby | mit | 19 | master | 345 | # frozen_string_literal: true
class AddStatusToExpenseFiles < ActiveRecord::Migration[8.1]
def up
add_column :expense_files, :status, :string, null: false, default: 'pending'
ExpenseFile.update_all(status: 'uploaded') # rubocop:disable Rails/SkipsModelValidations
end
def down
remove_column :expense_... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181104233211_create_organizations.rb | Ruby | mit | 19 | master | 303 | # frozen_string_literal: true
class CreateOrganizations < ActiveRecord::Migration[5.2]
def change
create_table :organizations do |t|
t.string :name, null: false
t.string :domain, null: false
t.timestamps
end
add_index :organizations, [:domain], unique: true
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181104235549_create_staffs.rb | Ruby | mit | 19 | master | 357 | # frozen_string_literal: true
class CreateStaffs < ActiveRecord::Migration[5.2]
def change
create_table :staffs do |t|
t.string :login, null: false
t.string :name, null: false
t.string :uid, null: false
t.timestamps
end
add_index :staffs, [:uid], unique: true
add_index :staf... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181111203959_change_plan_rank_to_string.rb | Ruby | mit | 19 | master | 333 | # frozen_string_literal: true
class ChangePlanRankToString < ActiveRecord::Migration[5.2]
def up
change_column :plans, :rank, :string, null: true, default: nil
change_column :plans, :rank, :integer, using: 'rank::integer', null: false, default: 0
end
def down
raise ActiveRecord::IrreversibleMigrati... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260121135759_populate_organization_affiliation_codes.rb | Ruby | mit | 19 | master | 489 | # frozen_string_literal: true
require 'securerandom'
class PopulateOrganizationAffiliationCodes < ActiveRecord::Migration[8.1]
def up
Organization.where(affiliation_code: nil).find_each do |org|
org.update_column(:affiliation_code, SecureRandom.urlsafe_base64(24)) # rubocop:disable Rails/SkipsModelValidat... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260121135127_add_affiliation_code_to_organizations.rb | Ruby | mit | 19 | master | 284 | # frozen_string_literal: true
class AddAffiliationCodeToOrganizations < ActiveRecord::Migration[8.1]
def change
add_column :organizations, :affiliation_code, :string
add_index :organizations, :affiliation_code, unique: true, where: 'affiliation_code IS NOT NULL'
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181104225716_create_plans.rb | Ruby | mit | 19 | master | 502 | # frozen_string_literal: true
class CreatePlans < ActiveRecord::Migration[5.2]
def change
create_table :plans do |t|
t.references :conference, foreign_key: true, null: false
t.string :name, null: false
t.string :rank, default: 0, null: false
t.string :summary
t.integer :capacity, nu... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181224235234_create_broadcast_deliveries.rb | Ruby | mit | 19 | master | 632 | # frozen_string_literal: true
class CreateBroadcastDeliveries < ActiveRecord::Migration[5.2]
def change
create_table :broadcast_deliveries do |t|
t.references :broadcast, foreign_key: true, null: false
t.references :sponsorship, foreign_key: true
t.string :recipient, null: false
t.integer... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260331000002_create_expense_report_tables.rb | Ruby | mit | 19 | master | 2,584 | # frozen_string_literal: true
class CreateExpenseReportTables < ActiveRecord::Migration[8.1]
def change
create_table :expense_reports do |t|
t.references :sponsorship, null: false, foreign_key: true, index: {unique: true}
t.decimal :total_amount, precision: 12, scale: 2, default: 0, null: false
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181104235647_create_sponsorship_staff_notes.rb | Ruby | mit | 19 | master | 506 | # frozen_string_literal: true
class CreateSponsorshipStaffNotes < ActiveRecord::Migration[5.2]
def change
create_table :sponsorship_staff_notes do |t|
t.references :sponsorship, null: false, foreign_key: true
t.references :staff, null: false, foreign_key: true
t.integer :stickiness, default: 0,... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260331000004_add_content_type_to_asset_files.rb | Ruby | mit | 19 | master | 248 | # frozen_string_literal: true
class AddContentTypeToAssetFiles < ActiveRecord::Migration[8.0]
def change
add_column :sponsorship_asset_files, :content_type, :string
add_column :sponsor_event_asset_files, :content_type, :string
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251116180758_create_tito_ticket_retractions.rb | Ruby | mit | 19 | master | 714 | # frozen_string_literal: true
class CreateTitoTicketRetractions < ActiveRecord::Migration[8.1]
def change
create_table :tito_ticket_retractions do |t|
t.bigint :conference_id, null: false
t.bigint :sponsorship_id, null: false
t.boolean :completed, null: false, default: false
t.text :reaso... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20210720121933_create_tito_discount_codes.rb | Ruby | mit | 19 | master | 539 | # frozen_string_literal: true
class CreateTitoDiscountCodes < ActiveRecord::Migration[6.0]
def change
create_table :tito_discount_codes do |t|
t.references :sponsorship, null: false, foreign_key: true
t.integer :kind, null: false
t.string :tito_discount_code_id, null: false, unique: true
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251116202113_add_pass_retraction_disables_at_to_conferences.rb | Ruby | mit | 19 | master | 201 | # frozen_string_literal: true
class AddPassRetractionDisablesAtToConferences < ActiveRecord::Migration[8.1]
def change
add_column :conferences, :pass_retraction_disables_at, :datetime
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20191124025609_add_accepted_at_to_sponsorships.rb | Ruby | mit | 19 | master | 395 | # frozen_string_literal: true
class AddAcceptedAtToSponsorships < ActiveRecord::Migration[6.0]
def change
add_column :sponsorships, :accepted_at, :datetime
Sponsorship.reset_column_information
Sponsorship.find_in_batches do |batch|
batch.each do |sponsorship|
sponsorship.accepted_at ||= sp... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251115231613_create_tito_sources.rb | Ruby | mit | 19 | master | 473 | # frozen_string_literal: true
class CreateTitoSources < ActiveRecord::Migration[8.1]
def change
create_table :tito_sources do |t|
t.bigint :conference_id, null: false
t.bigint :sponsorship_id, null: true
t.string :tito_source_id, null: false
t.timestamps
end
add_index :tito_sourc... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181105000319_create_sponsorship_requests.rb | Ruby | mit | 19 | master | 380 | # frozen_string_literal: true
class CreateSponsorshipRequests < ActiveRecord::Migration[5.2]
def change
create_table :sponsorship_requests do |t|
t.references :sponsorship, null: false
t.integer :kind, null: false
t.text :body, null: false
t.timestamps
end
add_index :sponsorship... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20190409232254_add_reception_key_to_conferences.rb | Ruby | mit | 19 | master | 343 | # frozen_string_literal: true
class AddReceptionKeyToConferences < ActiveRecord::Migration[5.2]
def change
add_column :conferences, :reception_key, :string
Conference.reset_column_information
Conference.find_each(&:save!) # validation assigns reception_key
change_column_null :conferences, :receptio... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260213100000_create_sponsor_events.rb | Ruby | mit | 19 | master | 1,811 | # frozen_string_literal: true
class CreateSponsorEvents < ActiveRecord::Migration[8.1]
def change
create_table :sponsor_events do |t|
t.references :sponsorship, null: false, foreign_key: true
t.references :conference, null: false, foreign_key: true
t.string :slug, null: false
t.string :ti... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20190409215851_add_ticket_key_to_sponsorships.rb | Ruby | mit | 19 | master | 409 | # frozen_string_literal: true
class AddTicketKeyToSponsorships < ActiveRecord::Migration[5.2]
def change
add_column :sponsorships, :ticket_key, :string
Sponsorship.reset_column_information
Sponsorship.find_each(&:save!) # validation assigns ticket_key
change_column_null :sponsorships, :ticket_key, ... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181223231943_create_announcements.rb | Ruby | mit | 19 | master | 875 | # frozen_string_literal: true
class CreateAnnouncements < ActiveRecord::Migration[5.2]
def change
create_table :announcements do |t|
t.references :conference, foreign_key: true, null: false
t.string :issue, null: false
t.string :locale, null: false
t.string :title, null: false
t.tex... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251115142638_add_auto_acceptance_disabled_to_organizations.rb | Ruby | mit | 19 | master | 228 | # frozen_string_literal: true
class AddAutoAcceptanceDisabledToOrganizations < ActiveRecord::Migration[8.1]
def change
add_column :organizations, :auto_acceptance_disabled, :boolean, null: false, default: false
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20190328181007_create_exhibition_editing_histories.rb | Ruby | mit | 19 | master | 432 | # frozen_string_literal: true
class CreateExhibitionEditingHistories < ActiveRecord::Migration[5.2]
def change
create_table :exhibition_editing_histories do |t|
t.references :exhibition, foreign_key: true
t.references :staff, foreign_key: true
t.string :comment
t.jsonb :diff
t.jsonb... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20190328180218_create_exhibitions.rb | Ruby | mit | 19 | master | 265 | # frozen_string_literal: true
class CreateExhibitions < ActiveRecord::Migration[5.2]
def change
create_table :exhibitions do |t|
t.references :sponsorship, foreign_key: true, unique: true
t.text :description
t.timestamps
end
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260331000001_add_price_columns_to_plans.rb | Ruby | mit | 19 | master | 300 | # frozen_string_literal: true
class AddPriceColumnsToPlans < ActiveRecord::Migration[8.1]
def change
add_column :plans, :price, :decimal, precision: 12, scale: 2, default: 0, null: false
add_column :plans, :price_booth, :decimal, precision: 12, scale: 2, default: 0, null: false
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181104235406_create_sponsorships.rb | Ruby | mit | 19 | master | 811 | # frozen_string_literal: true
class CreateSponsorships < ActiveRecord::Migration[5.2]
def change
create_table :sponsorships do |t|
t.references :conference, null: false, foreign_key: true
t.references :organization, null: false, foreign_key: true
t.references :plan, foreign_key: true
t.st... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251115003832_add_object_header_to_sponsorship_asset_file.rb | Ruby | mit | 19 | master | 380 | # frozen_string_literal: true
class AddObjectHeaderToSponsorshipAssetFile < ActiveRecord::Migration[8.1]
def change
add_column :sponsorship_asset_files, :version_id, :string, default: '', null: false
add_column :sponsorship_asset_files, :checksum_sha256, :string, default: '', null: false
add_column :spon... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181104183057_create_conferences.rb | Ruby | mit | 19 | master | 435 | # frozen_string_literal: true
class CreateConferences < ActiveRecord::Migration[5.2]
def change
create_table :conferences do |t|
t.string :name, null: false
t.datetime :application_opens_at
t.datetime :application_closes_at
t.datetime :amendment_closes_at
t.integer :booth_capacity... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181104214542_create_form_descriptions.rb | Ruby | mit | 19 | master | 567 | # frozen_string_literal: true
class CreateFormDescriptions < ActiveRecord::Migration[5.2]
def change
create_table :form_descriptions do |t|
t.references :conference, foreign_key: true, null: false
t.string :locale, null: false
t.text :head
t.text :head_html
t.text :plan_help
t... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251115233620_create_tito_cached_releases.rb | Ruby | mit | 19 | master | 414 | # frozen_string_literal: true
class CreateTitoCachedReleases < ActiveRecord::Migration[8.1]
def change
create_table :tito_cached_releases do |t|
t.bigint :conference_id, null: false
t.string :tito_release_slug, null: false
t.string :tito_release_id, null: false
t.timestamps
end
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20190120111843_add_number_of_additional_attendees_to_sponsorships.rb | Ruby | mit | 19 | master | 431 | # frozen_string_literal: true
class AddNumberOfAdditionalAttendeesToSponsorships < ActiveRecord::Migration[5.2]
def change
add_column :conferences, :additional_attendees_registration_open, :boolean, default: false, null: false
add_column :sponsorships, :number_of_additional_attendees, :integer
add_column... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20200728011008_add_no_plan_allowed_to_conferences.rb | Ruby | mit | 19 | master | 205 | # frozen_string_literal: true
class AddNoPlanAllowedToConferences < ActiveRecord::Migration[6.0]
def change
add_column :conferences, :no_plan_allowed, :boolean, null: false, default: true
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20191204233205_add_ticket_distribution_starts_at_to_conferences.rb | Ruby | mit | 19 | master | 205 | # frozen_string_literal: true
class AddTicketDistributionStartsAtToConferences < ActiveRecord::Migration[6.0]
def change
add_column :conferences, :ticket_distribution_starts_at, :datetime
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20260213200000_create_sponsor_event_asset_files.rb | Ruby | mit | 19 | master | 699 | # frozen_string_literal: true
class CreateSponsorEventAssetFiles < ActiveRecord::Migration[8.1]
def change
create_table :sponsor_event_asset_files do |t|
t.references :sponsorship, foreign_key: true, null: false
t.references :sponsor_event, foreign_key: true, index: false
t.string :prefix, null... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181107013458_create_sponsorship_asset_files.rb | Ruby | mit | 19 | master | 448 | # frozen_string_literal: true
class CreateSponsorshipAssetFiles < ActiveRecord::Migration[5.2]
def change
create_table :sponsorship_asset_files do |t|
t.references :sponsorship, foreign_key: true
t.string :prefix, null: false
t.string :handle, null: false
t.string :extension
t.time... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251116200713_change_fallback_option_not_null.rb | Ruby | mit | 19 | master | 258 | # frozen_string_literal: true
class ChangeFallbackOptionNotNull < ActiveRecord::Migration[8.1]
def change
change_column_default :sponsorships, :fallback_option, from: nil, to: ''
change_column_null :sponsorships, :fallback_option, false
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20190207015530_add_exhibitors_only_to_announcements.rb | Ruby | mit | 19 | master | 211 | # frozen_string_literal: true
class AddExhibitorsOnlyToAnnouncements < ActiveRecord::Migration[5.2]
def change
add_column :announcements, :exhibitors_only, :boolean, null: false, default: false
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20190409233347_create_tickets.rb | Ruby | mit | 19 | master | 735 | # frozen_string_literal: true
class CreateTickets < ActiveRecord::Migration[5.2]
def change
create_table :tickets do |t|
t.references :conference, foreign_key: true, null: false
t.references :sponsorship, foreign_key: true, null: false
t.integer :kind, null: false
t.string :code, null: fa... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181105000110_create_contacts.rb | Ruby | mit | 19 | master | 501 | # frozen_string_literal: true
class CreateContacts < ActiveRecord::Migration[5.2]
def change
create_table :contacts do |t|
t.references :sponsorship, null: false, foreign_key: true
t.integer :kind, null: false
t.string :email, null: false
t.string :address, null: false
t.string :org... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181111202305_add_missing_attributes_to_plans.rb | Ruby | mit | 19 | master | 206 | # frozen_string_literal: true
class AddMissingAttributesToPlans < ActiveRecord::Migration[5.2]
def change
add_column :plans, :talkable, :boolean
add_column :plans, :price_text, :string
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181111224714_create_sponsorship_editing_histories.rb | Ruby | mit | 19 | master | 488 | # frozen_string_literal: true
class CreateSponsorshipEditingHistories < ActiveRecord::Migration[5.2]
def change
create_table :sponsorship_editing_histories do |t|
t.references :sponsorship, foreign_key: true, null: false
t.references :staff, foreign_key: true, null: true
t.string :comment
... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20251115223529_add_tito_booth_paid_flat_discount_amount_to_conferences.rb | Ruby | mit | 19 | master | 267 | # frozen_string_literal: true
class AddTitoBoothPaidFlatDiscountAmountToConferences < ActiveRecord::Migration[8.1]
def change
add_column :conferences, :tito_booth_paid_flat_discount_amount, :decimal, precision: 8, scale: 2, null: false, default: 0.0
end
end |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | db/migrate/20181108073122_create_session_tokens.rb | Ruby | mit | 19 | master | 440 | # frozen_string_literal: true
class CreateSessionTokens < ActiveRecord::Migration[5.2]
def change
create_table :session_tokens do |t|
t.string :handle, null: false
t.string :email
t.references :sponsorship
t.references :staff
t.boolean :user_initiated, default: true
t.datetime... |
github | ruby-no-kai/sponsor-app | https://github.com/ruby-no-kai/sponsor-app | app/resources/expense_line_item_resource.rb | Ruby | mit | 19 | master | 224 | # frozen_string_literal: true
class ExpenseLineItemResource
include Alba::Resource
attributes :id, :title, :notes, :amount, :tax_rate, :tax_amount, :preliminal, :position
attribute :file_ids, &:expense_file_ids
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.