├── .dockerignore
├── .eslintrc.yml
├── .gitattributes
├── .gitignore
├── .kamal
└── hooks
│ ├── docker-setup.sample
│ ├── post-deploy.sample
│ ├── post-proxy-reboot.sample
│ ├── pre-build.sample
│ ├── pre-connect.sample
│ ├── pre-deploy.sample
│ └── pre-proxy-reboot.sample
├── ARCHITECTURE.md
├── Dockerfile
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── Procfile.dev
├── Procfile.fly
├── Procfile.kamal
├── README.md
├── Rakefile
├── adminui-cover.webp
├── app
├── assets
│ ├── builds
│ │ └── .keep
│ ├── config
│ │ └── manifest.js
│ ├── images
│ │ ├── .keep
│ │ ├── Padlock-bronze-closed.svg
│ │ ├── Padlock-bronze-open.svg
│ │ └── arthur-murray-dance-studio.png
│ └── stylesheets
│ │ ├── actiontext.css
│ │ ├── application.css
│ │ ├── application.tailwind.css
│ │ ├── docs.css
│ │ └── xterm.css
├── channels
│ ├── application_cable
│ │ ├── channel.rb
│ │ └── connection.rb
│ ├── current_heat_channel.rb
│ ├── output_channel.rb
│ └── scores_channel.rb
├── controllers
│ ├── admin_controller.rb
│ ├── application_controller.rb
│ ├── billables_controller.rb
│ ├── categories_controller.rb
│ ├── concerns
│ │ ├── .keep
│ │ ├── configurator.rb
│ │ ├── dbQuery.rb
│ │ ├── entry_form.rb
│ │ ├── heat_scheduler.rb
│ │ ├── printable.rb
│ │ └── retriable.rb
│ ├── dances_controller.rb
│ ├── docs_controller.rb
│ ├── entries_controller.rb
│ ├── event_controller.rb
│ ├── feedbacks_controller.rb
│ ├── formations_controller.rb
│ ├── heats_controller.rb
│ ├── locations_controller.rb
│ ├── multis_controller.rb
│ ├── people_controller.rb
│ ├── scores_controller.rb
│ ├── showcases_controller.rb
│ ├── solos_controller.rb
│ ├── songs_controller.rb
│ ├── studios_controller.rb
│ └── users_controller.rb
├── helpers
│ ├── admin_helper.rb
│ ├── application_helper.rb
│ ├── billables_helper.rb
│ ├── categories_helper.rb
│ ├── dances_helper.rb
│ ├── docs_helper.rb
│ ├── entries_helper.rb
│ ├── event_helper.rb
│ ├── feedbacks_helper.rb
│ ├── formations_helper.rb
│ ├── heats_helper.rb
│ ├── locations_helper.rb
│ ├── multis_helper.rb
│ ├── people_helper.rb
│ ├── scores_helper.rb
│ ├── showcases_helper.rb
│ ├── solos_helper.rb
│ ├── songs_helper.rb
│ ├── studios_helper.rb
│ └── users_helper.rb
├── javascript
│ ├── application.js
│ ├── channels
│ │ ├── consumer.js
│ │ ├── current_heat_channel.js
│ │ ├── index.js
│ │ ├── output_channel.js
│ │ └── scores_channel.js
│ └── controllers
│ │ ├── affinity_controller.js
│ │ ├── agenda_select_controller.js
│ │ ├── anchored_controller.js
│ │ ├── application.js
│ │ ├── assign_judges_controller.js
│ │ ├── auto_submit_controller.js
│ │ ├── autoform_controller.js
│ │ ├── category_override_controller.js
│ │ ├── check_number_controller.js
│ │ ├── copy_entries_controller.js
│ │ ├── couples_controller.js
│ │ ├── date_range_controller.js
│ │ ├── drop_controller.js
│ │ ├── entry_box_controller.js
│ │ ├── event_navigation_controller.js
│ │ ├── form_builder_controller.js
│ │ ├── formation_controller.js
│ │ ├── geocode_controller.js
│ │ ├── heat_order_controller.js
│ │ ├── heat_search_controller.js
│ │ ├── index.js
│ │ ├── info_box_controller.js
│ │ ├── live_scores_controller.js
│ │ ├── logout_controller.js
│ │ ├── mapper_controller.js
│ │ ├── multi_heat_controller.js
│ │ ├── name_to_token_controller.js
│ │ ├── open_feedback_controller.js
│ │ ├── people_search_controller.js
│ │ ├── person_controller.js
│ │ ├── post_console_log_controller.js
│ │ ├── region_controller.js
│ │ ├── score_controller.js
│ │ ├── select_person_controller.js
│ │ ├── sentry_controller.js
│ │ ├── studio_price_override_controller.js
│ │ └── submit_controller.js
├── jobs
│ ├── application_job.rb
│ └── send_invoice_job.rb
├── mailers
│ └── application_mailer.rb
├── models
│ ├── age.rb
│ ├── age_cost.rb
│ ├── application_record.rb
│ ├── billable.rb
│ ├── cat_extension.rb
│ ├── category.rb
│ ├── concerns
│ │ ├── .keep
│ │ └── compmngr.rb
│ ├── dance.rb
│ ├── entry.rb
│ ├── event.rb
│ ├── feedback.rb
│ ├── formation.rb
│ ├── heat.rb
│ ├── judge.rb
│ ├── level.rb
│ ├── location.rb
│ ├── multi.rb
│ ├── package_include.rb
│ ├── person.rb
│ ├── person_option.rb
│ ├── region.rb
│ ├── score.rb
│ ├── showcase.rb
│ ├── solo.rb
│ ├── song.rb
│ ├── studio.rb
│ ├── studio_pair.rb
│ └── user.rb
└── views
│ ├── active_storage
│ └── blobs
│ │ └── _blob.html.erb
│ ├── admin
│ ├── apply.html.erb
│ ├── index.html.erb
│ ├── new_region.html.erb
│ ├── region.html.erb
│ └── regions.html.erb
│ ├── billables
│ ├── _billable.html.erb
│ ├── _billable.json.jbuilder
│ ├── _form.html.erb
│ ├── _group.html.erb
│ ├── _index.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── people.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── categories
│ ├── _category.html.erb
│ ├── _category.json.jbuilder
│ ├── _dances.html.erb
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── dances
│ ├── _categories.html.erb
│ ├── _dance.html.erb
│ ├── _dance.json.jbuilder
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── form.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── docs
│ ├── experimental
│ │ ├── Availability.md
│ │ ├── Compmngr.md
│ │ ├── Feedback.md
│ │ ├── I18n.md
│ │ ├── Scrutineering.md
│ │ └── Voice.md
│ ├── index.md
│ ├── ops
│ │ ├── Backups.md
│ │ ├── Cost.md
│ │ ├── Devices.md
│ │ ├── Hosting.md
│ │ ├── Logging.md
│ │ └── Passwords.md
│ ├── roles
│ │ ├── DJ.md
│ │ ├── Emcee.md
│ │ ├── Event-Organizer.md
│ │ ├── Judge.md
│ │ └── Visiting-Studio.md
│ └── tasks
│ │ ├── Agenda.md
│ │ ├── Back-Numbers.md
│ │ ├── Ballrooms.md
│ │ ├── Counter.md
│ │ ├── Entries.md
│ │ ├── Invoicing.md
│ │ ├── Mobile.md
│ │ ├── Publishing.md
│ │ ├── Reordering.md
│ │ ├── Scheduling.md
│ │ ├── Scoring.md
│ │ ├── Scratches-and-Walk-ons.md
│ │ ├── Settings.md
│ │ └── Solos.md
│ ├── entries
│ ├── _box.html.erb
│ ├── _dances.html.erb
│ ├── _entry.html.erb
│ ├── _entry.json.jbuilder
│ ├── _form.html.erb
│ ├── couples.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── event
│ ├── _aumap.html.erb
│ ├── _clone.html.erb
│ ├── _eumap.html.erb
│ ├── _heat.html.erb
│ ├── _jpmap.html.erb
│ ├── _map.html.erb
│ ├── _usmap.html.erb
│ ├── ages.html.erb
│ ├── auth.html.erb
│ ├── clone.html.erb
│ ├── console.html.erb
│ ├── counter.html.erb
│ ├── dances.html.erb
│ ├── env.html.erb
│ ├── import.html.erb
│ ├── instructions.html.erb
│ ├── inventory.html.erb
│ ├── judge.json.erb
│ ├── judge.xlsx.erb
│ ├── landing.html.erb
│ ├── levels.html.erb
│ ├── logs.html.erb
│ ├── publish.html.erb
│ ├── qrcode.html.erb
│ ├── region.html.erb
│ ├── regions.html.erb
│ ├── root.html.erb
│ ├── select.html.erb
│ ├── settings
│ │ ├── advanced.html.erb
│ │ ├── clone.html.erb
│ │ ├── description.html.erb
│ │ ├── heats.html.erb
│ │ ├── options.html.erb
│ │ ├── prices.html.erb
│ │ ├── scoring.html.erb
│ │ └── staff.html.erb
│ ├── showcases.html.erb
│ ├── songs.html.erb
│ ├── spreadsheet.json.erb
│ ├── spreadsheet.xlsx.erb
│ ├── summary.html.erb
│ └── upload.html.erb
│ ├── feedbacks
│ ├── _buttons.html.erb
│ ├── _feedback.html.erb
│ ├── _feedback.json.jbuilder
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── formations
│ ├── _form.html.erb
│ ├── _formation.html.erb
│ ├── _formation.json.jbuilder
│ ├── _info_box.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── heats
│ ├── _category.html.erb
│ ├── _form.html.erb
│ ├── _heat.html.erb
│ ├── _heat.json.jbuilder
│ ├── _renumber.html.erb
│ ├── _solo.html.erb
│ ├── book.html.erb
│ ├── djlist.html.erb
│ ├── edit.html.erb
│ ├── index.csv.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── index.xlsx.erb
│ ├── mobile.html.erb
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── layouts
│ ├── action_text
│ │ └── contents
│ │ │ └── _content.html.erb
│ ├── application.html.erb
│ ├── docs.html.erb
│ ├── mailer.html.erb
│ ├── mailer.text.erb
│ └── settings.html.erb
│ ├── locations
│ ├── _form.html.erb
│ ├── _location.html.erb
│ ├── _location.json.jbuilder
│ ├── _showcases.html.erb
│ ├── auth.html.erb
│ ├── edit.html.erb
│ ├── events.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ ├── show.json.jbuilder
│ └── sisters.html.erb
│ ├── multis
│ ├── _form.html.erb
│ ├── _multi.html.erb
│ ├── _multi.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── people
│ ├── _form.html.erb
│ ├── _heats.html.erb
│ ├── _options.html.erb
│ ├── _package.html.erb
│ ├── _person.html.erb
│ ├── _person.json.jbuilder
│ ├── _scores.html.erb
│ ├── _studio_list.html.erb
│ ├── back_numbers.html.erb
│ ├── backs.html.erb
│ ├── certificates.html.erb
│ ├── couples.html.erb
│ ├── edit.html.erb
│ ├── entries.html.erb
│ ├── heats.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── labels.html.erb
│ ├── new.html.erb
│ ├── scores.html.erb
│ ├── show.html.erb
│ ├── show.json.jbuilder
│ └── staff.html.erb
│ ├── scores
│ ├── _by_age.html.erb
│ ├── _by_level.html.erb
│ ├── _by_studio.html.erb
│ ├── _form.html.erb
│ ├── _instructors.html.erb
│ ├── _last_update.html.erb
│ ├── _multis.html.erb
│ ├── _pros.html.erb
│ ├── _score.html.erb
│ ├── _score.json.jbuilder
│ ├── by_age.html.erb
│ ├── by_level.html.erb
│ ├── by_studio.html.erb
│ ├── comments.csv.erb
│ ├── comments.html.erb
│ ├── details
│ │ ├── _by_age.html.erb
│ │ ├── _by_level.html.erb
│ │ └── _multis.html.erb
│ ├── edit.html.erb
│ ├── heat.html.erb
│ ├── heatlist.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── instructor.html.erb
│ ├── multis.html.erb
│ ├── new.html.erb
│ ├── pros.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── showcases
│ ├── _form.html.erb
│ ├── _showcase.html.erb
│ ├── _showcase.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── solos
│ ├── _cat.html.erb
│ ├── _form.html.erb
│ ├── _solo.html.erb
│ ├── _solo.json.jbuilder
│ ├── critique0.html.erb
│ ├── critique1.html.erb
│ ├── critique2.html.erb
│ ├── djlist.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── songs
│ ├── _form.html.erb
│ ├── _list.html.erb
│ ├── _song.html.erb
│ ├── _song.json.jbuilder
│ ├── dancelist.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── studios
│ ├── _entry.html.erb
│ ├── _form.html.erb
│ ├── _invoice.html.erb
│ ├── _studio.html.erb
│ ├── _studio.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── invoice.html.erb
│ ├── invoices.html.erb
│ ├── new.html.erb
│ ├── send_invoice.html.erb
│ ├── show.html.erb
│ ├── show.json.jbuilder
│ └── solos.html.erb
│ └── users
│ ├── _form.html.erb
│ ├── _user.html.erb
│ ├── _user.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── request_reset.html.erb
│ ├── reset.html.erb
│ ├── reset_email.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
├── bin
├── apply-changes.rb
├── backup
├── bundle
├── console
├── deploy
├── dev
├── docker-entrypoint
├── importmap
├── kamal
├── log-heartbeat.sh
├── orphan-volumes
├── passenger-hook
├── prepare.rb
├── prerender
├── rails
├── rake
├── rehome
├── replay
├── run
├── setup
└── user-update
├── cf
└── worker
│ └── showcase
│ ├── .editorconfig
│ ├── .gitignore
│ ├── .prettierrc
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── test
│ └── index.spec.js
│ ├── vitest.config.js
│ └── wrangler.toml
├── config.ru
├── config
├── application.rb
├── boot.rb
├── build.fly
├── cable.yml
├── credentials.yml.enc
├── database.yml
├── deploy.fly
├── deploy.iad.yml
├── deploy.yml
├── dockerfile.yml
├── environment.rb
├── environments
│ ├── development.rb
│ ├── production.rb
│ └── test.rb
├── importmap.rb
├── initializers
│ ├── assets.rb
│ ├── content_security_policy.rb
│ ├── csv.rb
│ ├── demo_reset.rb
│ ├── enable_yjit.rb
│ ├── filter_parameter_logging.rb
│ ├── inflections.rb
│ ├── permissions_policy.rb
│ ├── sentry.rb
│ ├── sqlite_config.rb
│ └── xlsx.rb
├── locales
│ └── en.yml
├── nginx.startup
├── puma.rb
├── routes.rb
├── storage.yml
├── storage
│ └── development.yml
├── tailwind.config.js
└── tenant
│ ├── auth.yml
│ ├── map.yml
│ ├── nginx-config.rb
│ └── showcases.yml
├── db
├── migrate
│ ├── 20220122173240_create_studios.rb
│ ├── 20220122173241_create_people.rb
│ ├── 20220122173242_create_dances.rb
│ ├── 20220122173243_create_entries.rb
│ ├── 20220124133957_create_heats.rb
│ ├── 20220202153834_create_studio_pairs.rb
│ ├── 20220206180026_create_events.rb
│ ├── 20220206193836_create_ages.rb
│ ├── 20220206193854_create_levels.rb
│ ├── 20220208221606_create_categories.rb
│ ├── 20220212001802_add_intermix_to_events.rb
│ ├── 20220212171521_add_order_to_dances.rb
│ ├── 20220214194448_create_scores.rb
│ ├── 20220217003153_create_solos.rb
│ ├── 20220218152002_add_song_to_solos.rb
│ ├── 20220223032029_add_instructor_to_entry.rb
│ ├── 20220301223832_add_solo_category_to_dance.rb
│ ├── 20220310220503_add_current_heat_to_events.rb
│ ├── 20220421013549_create_formations.rb
│ ├── 20220421144933_add_ballrooms_to_events.rb
│ ├── 20220425210448_add_heat_length_to_events.rb
│ ├── 20220427002212_add_exclude_to_person.rb
│ ├── 20220427225436_create_multis.rb
│ ├── 20220501162747_create_billables.rb
│ ├── 20220501163609_create_person_options.rb
│ ├── 20220501163652_create_package_includes.rb
│ ├── 20220507162016_add_slot_to_score.rb
│ ├── 20220509185821_add_costs_to_studios.rb
│ ├── 20220510132923_create_active_storage_tables.active_storage.rb
│ ├── 20220510132924_create_action_text_tables.action_text.rb
│ ├── 20220510161408_add_email_to_event.rb
│ ├── 20220516162358_add_default_package_to_studios.rb
│ ├── 20220517173618_add_max_heat_size_to_event.rb
│ ├── 20220519134900_add_more_default_packages_to_studios.rb
│ ├── 20220527143539_add_grid_to_dances.rb
│ ├── 20220604141131_create_users.rb
│ ├── 20220610120655_add_back_numbers_to_event.rb
│ ├── 20220611163304_add_track_ages_to_events.rb
│ ├── 20220613132933_add_column_order_to_events.rb
│ ├── 20220616181115_add_open_scoring_to_event.rb
│ ├── 20220622011356_add_solo_length_to_event.rb
│ ├── 20220622141547_add_on_floor_to_formations.rb
│ ├── 20220629150139_add_ballrooms_and_heat_size_to_category.rb
│ ├── 20220712234830_add_theme_to_events.rb
│ ├── 20220714122632_add_comments_to_scores.rb
│ ├── 20220723202802_add_locked_to_events.rb
│ ├── 20220727000152_add_studio_zero.rb
│ ├── 20220802135733_allow_heat_number_to_be_a_float.rb
│ ├── 20220818222750_add_student_costs_to_studios.rb
│ ├── 20220824111138_add_student_invoice_to_event.rb
│ ├── 20220902165123_add_ballroom_to_heats.rb
│ ├── 20220910184733_create_judges.rb
│ ├── 20221015184926_add_multi_scoring_to_event.rb
│ ├── 20230119173959_add_heats_to_category.rb
│ ├── 20230119174433_create_cat_extensions.rb
│ ├── 20230124233129_add_feedback_to_scores.rb
│ ├── 20230323024334_routine_categories.rb
│ ├── 20230430173328_add_judge_comments_to_event.rb
│ ├── 20230603231658_add_cost_override_to_dances_and_categories.rb
│ ├── 20230901183948_add_agenda_based_entries_to_events.rb
│ ├── 20230909234512_add_pro_heats.rb
│ ├── 20230923182922_assign_judges.rb
│ ├── 20230930144237_add_font_size_to_events.rb
│ ├── 20231001165834_add_semi_finals_to_multis.rb
│ ├── 20231010012726_create_songs.rb
│ ├── 20231025173707_addtimesoption.rb
│ ├── 20231027142420_create_locations.rb
│ ├── 20231027142506_create_showcases.rb
│ ├── 20231028131227_add_order_to_showcases.rb
│ ├── 20231115014415_sololevels.rb
│ ├── 20231207142159_add_region_to_location.rb
│ ├── 20231220195604_add_lock_to_category.rb
│ ├── 20231227064854_add_studio_zero_again.rb
│ ├── 20240109224242_clearwater.rb
│ ├── 20240116131352_add_duration_to_cat_extension.rb
│ ├── 20240120160513_add_sisters_to_location.rb
│ ├── 20240129193921_add_font_family_to_events.rb
│ ├── 20240219210158_include_independent_instructors.rb
│ ├── 20240226132621_add_closed_scoring_to_event.rb
│ ├── 20240229134705_add_heat_order.rb
│ ├── 20240310223701_judge_show_assignments.rb
│ ├── 20240324222321_create_age_costs.rb
│ ├── 20240425003705_add_dance_limit.rb
│ ├── 20240512170708_add_trust_level_to_locations.rb
│ ├── 20240529200032_add_ballroom_to_judge.rb
│ ├── 20240708205904_add_counter_color_to_events.rb
│ ├── 20240708213142_add_prev_number_to_heats.rb
│ ├── 20240804224317_add_ballroom_to_studios.rb
│ ├── 20240822010045_add_limit_to_dances.rb
│ ├── 20240831131433_add_invoice_to_to_person.rb
│ ├── 20241001130746_add_studio_cost_to_agenda.rb
│ ├── 20241002125818_add_pro_heat_costs.rb
│ ├── 20241010143111_add_solos_to_judges.rb
│ ├── 20241230174102_create_regions.rb
│ ├── 20250126024112_add_locale_to_locations.rb
│ ├── 20250128222542_add_strict_scoring_to_event.rb
│ ├── 20250222014457_add_split_to_categories.rb
│ ├── 20250307070516_add_available_to_person.rb
│ ├── 20250307070551_add_available_to_person_again.rb
│ ├── 20250329010216_create_feedbacks.rb
│ └── 20250407144301_add_pro_am_to_events.rb
├── schema.rb
├── seeds.rb
└── seeds
│ ├── generic.rb
│ └── generic.yaml
├── docker-compose.yml
├── fly.toml
├── fly
└── applications
│ ├── logger
│ ├── .dockerignore
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── bin
│ │ └── sync.ts
│ ├── bun.lock
│ ├── deploy.ts
│ ├── deploy.yml
│ ├── fly.toml
│ ├── index.ts
│ ├── logfiler.ts
│ ├── monitor.ts
│ ├── package.json
│ ├── public
│ │ └── client.js
│ ├── sentry.ts
│ ├── server.ts
│ ├── tsconfig.json
│ ├── view.ts
│ └── websocket.ts
│ ├── printer
│ ├── .dockerignore
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── bun.lock
│ ├── deploy.yml
│ ├── fly.toml
│ ├── package.json
│ ├── server.ts
│ └── tsconfig.json
│ ├── proxy
│ ├── Dockerfile
│ ├── README.md
│ ├── fly.toml
│ ├── go.mod
│ ├── main.go
│ ├── main_test.go
│ └── middleware.go
│ └── publish
│ ├── config.ru
│ └── public
│ └── .keep
├── lib
├── assets
│ └── .keep
└── tasks
│ ├── .keep
│ ├── cloudflare.rake
│ ├── esbuild.rake
│ ├── eslint.rake
│ ├── mapper.rake
│ └── prerender.rake
├── log
└── .keep
├── public
├── 403-index.html
├── 403.html
├── 404.html
├── 422.html
├── 500.html
├── 503.html
├── apple-touch-icon-precomposed.png
├── apple-touch-icon.png
├── arthur-murray-logo-wide.png
├── arthur-murray-logo.gif
├── carolina-dance-works.jpg
├── favicon.ico
├── fonts
│ ├── Algerian Regular.ttf
│ ├── Berlin Sans FB Demi Bold.ttf
│ ├── Bevan-Italic.ttf
│ ├── Bevan-Regular.ttf
│ └── readme.html
├── fred-astaire-logo.jpg
├── intertwingly.png
├── mdballroom.webp
├── ras.jpg
└── robots.txt
├── script
├── import_compmngr.rb
├── import_entries
├── s3-download.rb
├── s3-upload.rb
└── zones.rb
├── storage
└── .keep
├── test
├── application_system_test_case.rb
├── channels
│ ├── application_cable
│ │ └── connection_test.rb
│ ├── current_heat_channel_test.rb
│ ├── output_channel_test.rb
│ └── scores_channel_test.rb
├── controllers
│ ├── .keep
│ ├── admin_controller_test.rb
│ ├── billables_controller_test.rb
│ ├── categories_controller_test.rb
│ ├── dances_controller_test.rb
│ ├── docs_controller_test.rb
│ ├── entries_controller_test.rb
│ ├── event_controller_test.rb
│ ├── feedbacks_controller_test.rb
│ ├── formations_controller_test.rb
│ ├── heats_controller_test.rb
│ ├── locations_controller_test.rb
│ ├── multis_controller_test.rb
│ ├── people_controller_test.rb
│ ├── scores_controller_test.rb
│ ├── showcases_controller_test.rb
│ ├── solos_controller_test.rb
│ ├── songs_controller_test.rb
│ ├── studios_controller_test.rb
│ └── users_controller_test.rb
├── fixtures
│ ├── action_text
│ │ └── rich_texts.yml
│ ├── age_costs.yml
│ ├── ages.yml
│ ├── billables.yml
│ ├── cat_extensions.yml
│ ├── categories.yml
│ ├── dances.yml
│ ├── entries.yml
│ ├── events.yml
│ ├── feedbacks.yml
│ ├── files
│ │ └── .keep
│ ├── formations.yml
│ ├── heats.yml
│ ├── judges.yml
│ ├── levels.yml
│ ├── locations.yml
│ ├── multis.yml
│ ├── package_includes.yml
│ ├── people.yml
│ ├── person_options.yml
│ ├── regions.yml
│ ├── scores.yml
│ ├── showcases.yml
│ ├── solos.yml
│ ├── songs.yml
│ ├── studio_pairs.yml
│ ├── studios.yml
│ └── users.yml
├── helpers
│ └── .keep
├── integration
│ └── .keep
├── jobs
│ └── send_invoice_job_test.rb
├── mailers
│ └── .keep
├── models
│ ├── .keep
│ ├── age_cost_test.rb
│ ├── age_test.rb
│ ├── billable_test.rb
│ ├── cat_extension_test.rb
│ ├── category_test.rb
│ ├── dance_test.rb
│ ├── entry_test.rb
│ ├── event_test.rb
│ ├── feedback_test.rb
│ ├── formation_test.rb
│ ├── heat_test.rb
│ ├── judge_test.rb
│ ├── level_test.rb
│ ├── location_test.rb
│ ├── multi_test.rb
│ ├── package_include_test.rb
│ ├── person_option_test.rb
│ ├── person_test.rb
│ ├── region_test.rb
│ ├── score_test.rb
│ ├── showcase_test.rb
│ ├── solo_test.rb
│ ├── song_test.rb
│ ├── studio_pair_test.rb
│ ├── studio_test.rb
│ └── user_test.rb
├── system
│ ├── .keep
│ ├── billables_test.rb
│ ├── categories_test.rb
│ ├── dances_test.rb
│ ├── entries_test.rb
│ ├── feedbacks_test.rb
│ ├── formations_test.rb
│ ├── heats_test.rb
│ ├── locations_test.rb
│ ├── multis_test.rb
│ ├── people_test.rb
│ ├── scores_test.rb
│ ├── showcases_test.rb
│ ├── solos_test.rb
│ ├── songs_test.rb
│ ├── studios_test.rb
│ └── users_test.rb
└── test_helper.rb
├── tmp
├── .keep
├── pids
│ └── .keep
└── storage
│ └── .keep
├── utils
└── mapper
│ ├── files.yml
│ ├── makemaps.js
│ ├── package-lock.json
│ └── package.json
└── vendor
├── .keep
└── javascript
├── .keep
└── @xterm--xterm.js
/.eslintrc.yml:
--------------------------------------------------------------------------------
1 | env:
2 | browser: true
3 | es2022: true
4 | extends: eslint:recommended
5 | parserOptions:
6 | ecmaVersion: latest
7 | sourceType: module
8 | globals:
9 | Turbo: true
10 | rules:
11 | indent:
12 | - error
13 | - 2
14 | linebreak-style:
15 | - error
16 | - unix
17 | quotes:
18 | - error
19 | - double
20 | - avoidEscape: true
21 | semi:
22 | - error
23 | - always
24 | no-unused-vars:
25 | - error
26 | - argsIgnorePattern: ^_
27 | varsIgnorePattern: ^_
28 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2 |
3 | # Mark the database schema as having been generated.
4 | db/schema.rb linguist-generated
5 |
6 | # Mark any vendored files as having been vendored.
7 | vendor/* linguist-vendored
8 |
--------------------------------------------------------------------------------
/.kamal/hooks/docker-setup.sample:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Docker set up on $KAMAL_HOSTS..."
4 |
--------------------------------------------------------------------------------
/.kamal/hooks/post-deploy.sample:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # A sample post-deploy hook
4 | #
5 | # These environment variables are available:
6 | # KAMAL_RECORDED_AT
7 | # KAMAL_PERFORMER
8 | # KAMAL_VERSION
9 | # KAMAL_HOSTS
10 | # KAMAL_ROLE (if set)
11 | # KAMAL_DESTINATION (if set)
12 | # KAMAL_RUNTIME
13 |
14 | echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"
15 |
--------------------------------------------------------------------------------
/.kamal/hooks/post-proxy-reboot.sample:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Rebooted kamal-proxy on $KAMAL_HOSTS"
4 |
--------------------------------------------------------------------------------
/.kamal/hooks/pre-proxy-reboot.sample:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Rebooting kamal-proxy on $KAMAL_HOSTS..."
4 |
--------------------------------------------------------------------------------
/Procfile.dev:
--------------------------------------------------------------------------------
1 | web: bin/rails server -p 3000 -b 0.0.0.0
2 | css: bin/rails tailwindcss:watch
3 |
--------------------------------------------------------------------------------
/Procfile.fly:
--------------------------------------------------------------------------------
1 | web: nginx
2 | redis: redis-server /etc/redis/redis.conf
3 | heartbeat: bin/log-heartbeat.sh
4 | prerender: bin/prerender
5 |
--------------------------------------------------------------------------------
/Procfile.kamal:
--------------------------------------------------------------------------------
1 | web: bundle exec thrust nginx
2 | redis: redis-server /etc/redis/redis.conf
3 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative "config/application"
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/adminui-cover.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/adminui-cover.webp
--------------------------------------------------------------------------------
/app/assets/builds/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/app/assets/builds/.keep
--------------------------------------------------------------------------------
/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../stylesheets .css
3 | //= link_tree ../../javascript .js
4 | //= link_tree ../../../vendor/javascript .js
5 | //= link_tree ../builds
6 |
--------------------------------------------------------------------------------
/app/assets/images/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/app/assets/images/.keep
--------------------------------------------------------------------------------
/app/assets/images/arthur-murray-dance-studio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/app/assets/images/arthur-murray-dance-studio.png
--------------------------------------------------------------------------------
/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Channel < ActionCable::Channel::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Connection < ActionCable::Connection::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/channels/current_heat_channel.rb:
--------------------------------------------------------------------------------
1 | class CurrentHeatChannel < ApplicationCable::Channel
2 | def subscribed
3 | stream_from "current-heat-#{ENV['RAILS_APP_DB']}"
4 | end
5 |
6 | def unsubscribed
7 | # Any cleanup needed when channel is unsubscribed
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/channels/scores_channel.rb:
--------------------------------------------------------------------------------
1 | class ScoresChannel < ApplicationCable::Channel
2 | def subscribed
3 | stream_from "live-scores-#{ENV['RAILS_APP_DB']}"
4 | end
5 |
6 | def unsubscribed
7 | # Any cleanup needed when channel is unsubscribed
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/app/controllers/concerns/dbQuery.rb:
--------------------------------------------------------------------------------
1 | module DbQuery
2 | def dbquery(db, table, fields=nil, where=nil)
3 | if fields
4 | fields = Array(fields).map(&:inspect).join(', ') unless fields.is_a? String
5 | else
6 | fields = '*'
7 | end
8 |
9 | query = "select #{fields} from #{table}"
10 | query += " where #{where}" if where
11 |
12 | dbpath = ENV.fetch('RAILS_DB_VOLUME') { 'db' }
13 | csv = `sqlite3 --csv --header #{dbpath}/#{db}.sqlite3 "#{query}"`
14 |
15 | if csv.empty?
16 | []
17 | else
18 | CSV.parse(csv, headers: true).map(&:to_h)
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/app/controllers/concerns/retriable.rb:
--------------------------------------------------------------------------------
1 | module Retriable
2 | def retry_transaction(&block)
3 | f = File.open("tmp/#{ENV.fetch('RAILS_APP_DB', 'db')}-score.lock", File::RDWR|File::CREAT, 0644)
4 | f.flock File::LOCK_EX
5 | 4.times do
6 | begin
7 | return Score.transaction(&block)
8 | rescue SQLite3::BusyException, ActiveRecord::StatementInvalid, ActiveRecord::Deadlocked, ActiveRecord::LockWaitTimeout
9 | sleep 0.1
10 | end
11 | end
12 |
13 | Score.transaction(&block)
14 | ensure
15 | f.flock File::LOCK_UN
16 | end
17 | end
--------------------------------------------------------------------------------
/app/controllers/docs_controller.rb:
--------------------------------------------------------------------------------
1 | class DocsController < ApplicationController
2 | skip_before_action :authenticate_user
3 |
4 | def page
5 | file = Rails.root.join('app/views/docs', params[:page] + '.md')
6 |
7 | if File.exist? file
8 | render html: Kramdown::Document.new(IO.read(file)).to_html.html_safe,
9 | layout: 'docs'
10 | else
11 | raise ActionController::RoutingError.new('Not Found')
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/app/helpers/admin_helper.rb:
--------------------------------------------------------------------------------
1 | module AdminHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/billables_helper.rb:
--------------------------------------------------------------------------------
1 | module BillablesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/categories_helper.rb:
--------------------------------------------------------------------------------
1 | module CategoriesHelper
2 | def cat_extension_path(*args)
3 | STDERR.puts args.inspect
4 | if args.last.instance_of? Hash
5 | args.last[:part] = args.first.part
6 | else
7 | args.push(part: args.first.part)
8 | end
9 |
10 | category_path(*args)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/app/helpers/dances_helper.rb:
--------------------------------------------------------------------------------
1 | module DancesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/docs_helper.rb:
--------------------------------------------------------------------------------
1 | module DocsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/entries_helper.rb:
--------------------------------------------------------------------------------
1 | module EntriesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/event_helper.rb:
--------------------------------------------------------------------------------
1 | module EventHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/feedbacks_helper.rb:
--------------------------------------------------------------------------------
1 | module FeedbacksHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/formations_helper.rb:
--------------------------------------------------------------------------------
1 | module FormationsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/heats_helper.rb:
--------------------------------------------------------------------------------
1 | module HeatsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/locations_helper.rb:
--------------------------------------------------------------------------------
1 | module LocationsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/multis_helper.rb:
--------------------------------------------------------------------------------
1 | module MultisHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/people_helper.rb:
--------------------------------------------------------------------------------
1 | module PeopleHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/scores_helper.rb:
--------------------------------------------------------------------------------
1 | module ScoresHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/showcases_helper.rb:
--------------------------------------------------------------------------------
1 | module ShowcasesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/solos_helper.rb:
--------------------------------------------------------------------------------
1 | module SolosHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/songs_helper.rb:
--------------------------------------------------------------------------------
1 | module SongsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/studios_helper.rb:
--------------------------------------------------------------------------------
1 | module StudiosHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/users_helper.rb:
--------------------------------------------------------------------------------
1 | module UsersHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/javascript/application.js:
--------------------------------------------------------------------------------
1 | // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2 | import "@hotwired/turbo-rails"
3 | import "controllers"
4 | import "channels"
5 | import "trix"
6 | import "@rails/actiontext"
7 |
--------------------------------------------------------------------------------
/app/javascript/channels/consumer.js:
--------------------------------------------------------------------------------
1 | // Action Cable provides the framework to deal with WebSockets in Rails.
2 | // You can generate new channels where WebSocket features live using the `bin/rails generate channel` command.
3 |
4 | import { createConsumer } from "@rails/actioncable"
5 |
6 | export default createConsumer()
7 |
--------------------------------------------------------------------------------
/app/javascript/channels/current_heat_channel.js:
--------------------------------------------------------------------------------
1 | import consumer from "channels/consumer"
2 |
3 | consumer.subscriptions.create("CurrentHeatChannel", {
4 | connected() {
5 | // Called when the subscription is ready for use on the server
6 | },
7 |
8 | disconnected() {
9 | // Called when the subscription has been terminated by the server
10 | },
11 |
12 | received(data) {
13 | // Called when there's incoming data on the websocket for this channel
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/app/javascript/channels/index.js:
--------------------------------------------------------------------------------
1 | // Import all the channels to be used by Action Cable
2 | // import "channels/current_heat_channel"
3 | // import "channels/scores_channel"
4 | // import "channels/output_channel"
5 |
--------------------------------------------------------------------------------
/app/javascript/channels/output_channel.js:
--------------------------------------------------------------------------------
1 | import consumer from "channels/consumer"
2 |
3 | consumer.subscriptions.create("OutputChannel", {
4 | connected() {
5 | // Called when the subscription is ready for use on the server
6 | },
7 |
8 | disconnected() {
9 | // Called when the subscription has been terminated by the server
10 | },
11 |
12 | received(data) {
13 | // Called when there's incoming data on the websocket for this channel
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/app/javascript/channels/scores_channel.js:
--------------------------------------------------------------------------------
1 | import consumer from "channels/consumer"
2 |
3 | consumer.subscriptions.create("ScoresChannel", {
4 | connected() {
5 | // Called when the subscription is ready for use on the server
6 | },
7 |
8 | disconnected() {
9 | // Called when the subscription has been terminated by the server
10 | },
11 |
12 | received(data) {
13 | // Called when there's incoming data on the websocket for this channel
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/app/javascript/controllers/affinity_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus";
2 |
3 | // Connects to data-controller="affinity"
4 | export default class extends Controller {
5 | connect() {
6 | this.affinities = JSON.parse(this.element.dataset.affinities);
7 |
8 | for (let select of this.element.querySelectorAll("select")) {
9 | select.addEventListener("input", _event => {
10 | for (let [id, value] of Object.entries(this.affinities[select.value] || {})) {
11 | let element = document.getElementById(id);
12 | if (element && element.value == "") element.value = value;
13 | }
14 | });
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/javascript/controllers/anchored_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus";
2 |
3 | // Connects to data-controller="anchored"
4 | // see https://github.com/hotwired/turbo/issues/211
5 | // use with data-turbo=false on form elements
6 | export default class extends Controller {
7 | connect() {
8 | let id = window.location.hash;
9 | if (id.length > 1) {
10 | let element = document.getElementById(id.slice(1));
11 | if (element) element.scrollIntoView(true);
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/app/javascript/controllers/application.js:
--------------------------------------------------------------------------------
1 | import { Application } from "@hotwired/stimulus"
2 |
3 | const application = Application.start()
4 |
5 | // Configure Stimulus development experience
6 | application.debug = false
7 | window.Stimulus = application
8 |
9 | export { application }
10 |
--------------------------------------------------------------------------------
/app/javascript/controllers/auto_submit_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus";
2 |
3 | // Connects to data-controller="auto-submit"
4 | export default class extends Controller {
5 | connect() {
6 | for (let input of this.element.querySelectorAll("input,select")) {
7 | input.addEventListener("change", _event => {
8 | this.element.requestSubmit();
9 | });
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/javascript/controllers/couples_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus"
2 |
3 | // Connects to data-controller="couples"
4 | export default class extends Controller {
5 | connect() {
6 | let billable_type = document.getElementById("billable_type")
7 | let billable_couples = document.getElementById("billable_couples")
8 |
9 | function couples_visibilty() {
10 | if (billable_type.value == "Student") {
11 | billable_couples.parentElement.classList.remove("hidden")
12 | } else {
13 | billable_couples.parentElement.classList.add("hidden")
14 | billable_couples.checked = false
15 | }
16 | }
17 |
18 | if (billable_type) {
19 | couples_visibilty()
20 |
21 | billable_type.addEventListener("change", couples_visibilty)
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/javascript/controllers/index.js:
--------------------------------------------------------------------------------
1 | // Import and register all your controllers from the importmap under controllers/*
2 |
3 | import { application } from "controllers/application"
4 |
5 | // Eager load all controllers defined in the import map under controllers/**/*_controller
6 | import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
7 | eagerLoadControllersFrom("controllers", application)
8 |
9 | // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10 | // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11 | // lazyLoadControllersFrom("controllers", application)
12 |
--------------------------------------------------------------------------------
/app/javascript/controllers/info_box_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus";
2 |
3 | // Connects to data-controller="info-box"
4 | export default class extends Controller {
5 | connect() {
6 | let box = this.element.querySelector(".info-box");
7 |
8 | box.style.display = getComputedStyle(box).display;
9 |
10 | this.element.querySelector(".info-button").addEventListener("click", () => {
11 | if (box.style.display == "block") {
12 | box.style.display = "none";
13 | } else {
14 | box.style.display = "block";
15 | }
16 | });
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/javascript/controllers/logout_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus";
2 |
3 | // Connects to data-controller="logout"
4 | export default class extends Controller {
5 | connect() {
6 | this.element.addEventListener("submit", _event => {
7 | let credentials = btoa("LOGOUT:PASSWORD");
8 | var auth = { "Authorization" : `Basic ${credentials}` };
9 | fetch(window.location, { headers : auth });
10 | // Note: event.preventDefault(); is *NOT* called
11 | });
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/javascript/controllers/sentry_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus"
2 |
3 | // Connects to data-controller="sentry"
4 | export default class extends Controller {
5 | async connect() {
6 | let response = await fetch('https://smooth-logger.fly.dev/sentry/seen')
7 | let text = await response.text()
8 | if (!text) return
9 | this.element.classList.add('bg-red-600')
10 | this.element.classList.add('text-white')
11 | this.element.href = new URL(text, 'https://smooth-logger.fly.dev/')
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/javascript/controllers/studio_price_override_controller.js:
--------------------------------------------------------------------------------
1 | import { Controller } from "@hotwired/stimulus";
2 |
3 | // Connects to data-controller="studio-price-override"
4 | export default class extends Controller {
5 | connect() {
6 | this.checkbox = this.element.querySelector("input[type=checkbox]");
7 | if (!this.checkbox) return;
8 | this.checkbox.addEventListener("change", this.hideShow);
9 | this.hideShow();
10 | }
11 |
12 | hideShow = () => {
13 | for (let input of this.element.querySelectorAll("input[type=number]")) {
14 | input.parentElement.style.display = this.checkbox.checked ? "block" : "none";
15 | input.disabled = !this.checkbox.checked;
16 | }
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 | # Automatically retry jobs that encountered a deadlock
3 | # retry_on ActiveRecord::Deadlocked
4 |
5 | # Most jobs are safe to ignore if the underlying records are no longer available
6 | # discard_on ActiveJob::DeserializationError
7 | end
8 |
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: "from@example.com"
3 | layout "mailer"
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/age.rb:
--------------------------------------------------------------------------------
1 | class Age < ApplicationRecord
2 | has_one :costs, required: false, class_name: 'AgeCost', dependent: :destroy
3 | end
4 |
--------------------------------------------------------------------------------
/app/models/age_cost.rb:
--------------------------------------------------------------------------------
1 | class AgeCost < ApplicationRecord
2 | belongs_to :age
3 | end
4 |
--------------------------------------------------------------------------------
/app/models/cat_extension.rb:
--------------------------------------------------------------------------------
1 | class CatExtension < ApplicationRecord
2 | belongs_to :category
3 |
4 | def name
5 | "#{category.name} - Part #{part}"
6 | end
7 |
8 | def ballrooms
9 | category.ballrooms
10 | end
11 |
12 | def cost_override
13 | category.cost_override
14 | end
15 |
16 | def pro
17 | category.pro
18 | end
19 |
20 | def routines
21 | category.routines
22 | end
23 |
24 | def locked
25 | category.locked
26 | end
27 |
28 | def base_category
29 | category
30 | end
31 |
32 | def routines?
33 | category.routines?
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/app/models/concerns/.keep
--------------------------------------------------------------------------------
/app/models/feedback.rb:
--------------------------------------------------------------------------------
1 | class Feedback < ApplicationRecord
2 | end
3 |
--------------------------------------------------------------------------------
/app/models/formation.rb:
--------------------------------------------------------------------------------
1 | # While the formation controller represents a solo with multiple
2 | # participants, a formation model represents a single participant.
3 |
4 | class Formation < ApplicationRecord
5 | belongs_to :person
6 | belongs_to :solo
7 | end
8 |
--------------------------------------------------------------------------------
/app/models/judge.rb:
--------------------------------------------------------------------------------
1 | class Judge < ApplicationRecord
2 | belongs_to :person
3 | end
4 |
--------------------------------------------------------------------------------
/app/models/level.rb:
--------------------------------------------------------------------------------
1 | class Level < ApplicationRecord
2 | has_one :event, dependent: :nullify, class_name: 'Event', foreign_key: :solo_level_id
3 |
4 | def initials
5 | return '*' if id == 0
6 | name.gsub(/[^A-Z0-9]/, '')
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/models/location.rb:
--------------------------------------------------------------------------------
1 | class Location < ApplicationRecord
2 | normalizes :key, with: -> name { name.strip }
3 | normalizes :name, with: -> name { name.strip }
4 | normalizes :locale, with: -> locale { locale.strip }
5 |
6 | validates :key, presence: true, uniqueness: true
7 | validates :name, presence: true, uniqueness: true
8 | validates :locale, presence: true, format: { with: /\A[a-z]{2}_[A-Z]{2}\z/, message: "must be in format 'xx_XX'" }
9 |
10 | belongs_to :user, optional: true
11 | has_many :showcases, dependent: :destroy,
12 | class_name: 'Showcase', foreign_key: :location_id
13 | end
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/models/multi.rb:
--------------------------------------------------------------------------------
1 | class Multi < ApplicationRecord
2 | belongs_to :parent, class_name: 'Dance'
3 | belongs_to :dance
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/package_include.rb:
--------------------------------------------------------------------------------
1 | class PackageInclude < ApplicationRecord
2 | belongs_to :package, class_name: 'Billable'
3 | belongs_to :option, class_name: 'Billable'
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/person_option.rb:
--------------------------------------------------------------------------------
1 | class PersonOption < ApplicationRecord
2 | belongs_to :person
3 | belongs_to :option, class_name: 'Billable'
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/region.rb:
--------------------------------------------------------------------------------
1 | class Region < ApplicationRecord
2 | self.inheritance_column = nil
3 |
4 | validates :type, inclusion: { in: %{fly kamal} }
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/showcase.rb:
--------------------------------------------------------------------------------
1 | class Showcase < ApplicationRecord
2 | normalizes :name, with: -> name { name.strip }
3 | normalizes :key, with: -> name { name.strip }
4 |
5 | validates :year, presence: true
6 | validates :name, presence: true, uniqueness: { scope: %i[location_id year] }
7 | validates :key, presence: true, uniqueness: { scope: %i[location_id year] }
8 |
9 | belongs_to :location
10 |
11 | def self.url
12 | "https://#{hostname}/showcase"
13 | end
14 |
15 | def self.hostname
16 | "smooth.fly.dev"
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/app/models/song.rb:
--------------------------------------------------------------------------------
1 | class Song < ApplicationRecord
2 | normalizes :title, with: -> name { name.strip }
3 |
4 | belongs_to :dance
5 | has_one_attached :song_file, dependent: false
6 |
7 | validates :title, presence: true, uniqueness: { scope: :dance_id }
8 | validates :order, presence: true, uniqueness: true
9 |
10 | after_save :upload_blobs, if: -> { song_file.attached? && song_file.blob.created_at > 1.minute.ago }
11 |
12 | def download_song_file
13 | download_blob(song_file.blob)
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/app/models/studio.rb:
--------------------------------------------------------------------------------
1 | class Studio < ApplicationRecord
2 | normalizes :name, with: -> name { name.strip }
3 |
4 | validates :name, presence: true, uniqueness: true
5 |
6 | belongs_to :default_student_package, class_name: 'Billable', optional: true
7 | belongs_to :default_professional_package, class_name: 'Billable', optional: true
8 | belongs_to :default_guest_package, class_name: 'Billable', optional: true
9 |
10 | has_many :people, dependent: :destroy
11 |
12 | has_many :studio1_pairs, class_name: "StudioPair", foreign_key: :studio2_id,
13 | dependent: :destroy
14 | has_many :studio1s, through: :studio1_pairs, source: :studio1
15 |
16 | has_many :studio2_pairs, class_name: "StudioPair", foreign_key: :studio1_id,
17 | dependent: :destroy
18 | has_many :studio2s, through: :studio2_pairs, source: :studio2
19 |
20 | def pairs
21 | (studio1s + studio2s).uniq
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/app/models/studio_pair.rb:
--------------------------------------------------------------------------------
1 | class StudioPair < ApplicationRecord
2 | belongs_to :studio1, class_name: 'Studio'
3 | belongs_to :studio2, class_name: 'Studio'
4 | end
5 |
--------------------------------------------------------------------------------
/app/views/active_storage/blobs/_blob.html.erb:
--------------------------------------------------------------------------------
1 | attachment--<%= blob.filename.extension %>">
2 | <% if blob.representable? %>
3 | <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %>
4 | <% end %>
5 |
6 |
7 | <% if caption = blob.try(:caption) %>
8 | <%= caption %>
9 | <% else %>
10 | <%= blob.filename %>
11 | <%= number_to_human_size blob.byte_size %>
12 | <% end %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/admin/new_region.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 |
8 |
ⓘ
9 |
10 | <% if @sources and not @sources.empty? %>
11 | Feel free to skip over the "copy from another event" section if this is your first event. This section of the settings will disappear once you have added a studio.
12 | <% end %>
13 | Use the tabs across the top of this page to get to other settings.
14 |
15 |
16 |
17 | <% if @sources and not @sources.empty? %>
18 |
19 | <%= render partial: 'clone' %>
20 |
21 | <% end %>
--------------------------------------------------------------------------------
/app/views/event/spreadsheet.json.erb:
--------------------------------------------------------------------------------
1 | <%= raw JSON.pretty_generate(@sheets) %>
--------------------------------------------------------------------------------
/app/views/event/spreadsheet.xlsx.erb:
--------------------------------------------------------------------------------
1 | <%= raw begin
2 |
3 | workbook = FastExcel.open(constant_memory: true)
4 | bold = workbook.bold_format
5 |
6 | @sheets.each do |page, sheet|
7 | next if sheet.empty?
8 | worksheet = workbook.add_worksheet(page)
9 | worksheet.auto_width = true
10 |
11 | worksheet.append_row(sheet.first.keys, bold)
12 |
13 | sheet.each do |row|
14 | worksheet.append_row row.values
15 | end
16 | end
17 |
18 | workbook.read_string
19 | end %>
20 |
--------------------------------------------------------------------------------
/app/views/event/upload.html.erb:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/app/views/feedbacks/_buttons.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/feedbacks/_feedback.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | Order:
4 | <%= feedback.order %>
5 |
6 |
7 | Value:
8 | <%= feedback.value %>
9 |
10 |
11 | Abbr:
12 | <%= feedback.abbr %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/feedbacks/_feedback.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! feedback, :id, :order, :value, :abbr, :created_at, :updated_at
2 | json.url feedback_url(feedback, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/feedbacks/edit.html.erb:
--------------------------------------------------------------------------------
1 | <% content_for :title, "Editing feedback" %>
2 |
3 |
4 |
Editing feedback
5 |
6 | <%= render "form", feedback: @feedback %>
7 |
8 | <%= link_to "Show this feedback", @feedback, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
9 | <%= link_to "Back to feedbacks", feedbacks_path, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
10 |
11 |
--------------------------------------------------------------------------------
/app/views/feedbacks/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @feedbacks, partial: "feedbacks/feedback", as: :feedback
2 |
--------------------------------------------------------------------------------
/app/views/feedbacks/new.html.erb:
--------------------------------------------------------------------------------
1 | <% content_for :title, "New feedback" %>
2 |
3 |
4 |
New feedback
5 |
6 | <%= render "form", feedback: @feedback %>
7 |
8 | <%= link_to "Back to feedbacks", feedbacks_path, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
9 |
10 |
--------------------------------------------------------------------------------
/app/views/feedbacks/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "feedbacks/feedback", feedback: @feedback
2 |
--------------------------------------------------------------------------------
/app/views/formations/_formation.html.erb:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/app/views/formations/_formation.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! formation, :id, :person_id, :solo_id, :created_at, :updated_at
2 | json.url formation_url(formation, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/formations/edit.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render "info_box" %>
3 |
4 |
5 | <% if @person && @person.id > 0 %>
6 |
<%= @person.display_name %>
7 | <% else %>
8 | Edit Formation
9 | <% end %>
10 |
11 | <%= render "solos/form", solo: @solo, return_to: params['return_to'] %>
12 |
13 |
--------------------------------------------------------------------------------
/app/views/formations/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if notice.present? %>
3 |
<%= notice %>
4 | <% end %>
5 |
6 |
7 |
Formations
8 | <%= link_to 'New formation', new_formation_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
9 |
10 |
11 |
12 | <%= render @formations %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/formations/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @formations, partial: "formations/formation", as: :formation
2 |
--------------------------------------------------------------------------------
/app/views/formations/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render "info_box" %>
3 |
4 |
5 | <% if @studio && @person&.id == 0%>
6 |
<%= @studio.name %> <%= @formation ? 'Formation' : 'Solo' %>
7 | <% elsif @person %>
8 | <%= @person.display_name %>
9 | <% else %>
10 | New <%= @formation ? 'Formation' : 'Solo' %>
11 | <% end %>
12 |
13 | <%= render "solos/form", solo: @solo, return_to: nil %>
14 |
15 |
--------------------------------------------------------------------------------
/app/views/formations/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @formation %>
8 |
9 | <%= link_to 'Edit this formation', edit_formation_path(@formation), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to 'Destroy this formation', formation_path(@formation), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to 'Back to formations', formations_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/formations/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "formations/formation", formation: @formation
2 |
--------------------------------------------------------------------------------
/app/views/heats/_heat.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | Number:
4 | <%= heat.number %>
5 |
6 |
7 |
8 | Entry:
9 | <%= heat.entry_id %>
10 |
11 |
12 | <% if action_name != "show" %>
13 | <%= link_to "Show this heat", heat, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 | <%= link_to 'Edit this heat', edit_heat_path(heat), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
15 |
16 | <% end %>
17 |
18 |
--------------------------------------------------------------------------------
/app/views/heats/_heat.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! heat, :id, :number, :entry_id, :created_at, :updated_at
2 | json.url heat_url(heat, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/heats/_renumber.html.erb:
--------------------------------------------------------------------------------
1 | <% if @renumber %>
2 | <% if @locked %>
3 | <%= up_link 'Renumber', renumber_heats_path, class: "btn-blue print:hidden", id: 'renumber', method: :post, data: { turbo_confirm: 'Are you sure?' } %>
4 | <% else %>
5 | <%= up_link 'Renumber', renumber_heats_path, class: "btn-blue print:hidden", id: 'renumber', method: :post %>
6 | <% end %>
7 | <% else %>
8 | <%= up_link 'Renumber', renumber_heats_path, class: "hidden btn-blue print:hidden", id: 'renumber', method: :post %>
9 | <% end %>
10 | <% if @undoable and not @locked %>
11 | <%= up_link 'Undo', undo_heats_path, class: "btn-pale-orange print:hidden", method: :post %>
12 | <% end %>
--------------------------------------------------------------------------------
/app/views/heats/index.csv.erb:
--------------------------------------------------------------------------------
1 | <%= raw begin
2 |
3 | headers = [
4 | 'Number',
5 | 'Student',
6 | 'Open or Closed',
7 | 'Dance',
8 | 'Lead',
9 | 'Follow',
10 | 'Level',
11 | 'Category',
12 | 'Studio',
13 | ]
14 |
15 | CSV.generate(write_headers: true, headers: headers) do |csv|
16 | @agenda.values.each do |heat_group|
17 | heat_group.map do |number, heats|
18 | heats.map do |heat|
19 | csv << [
20 | heat.number,
21 | heat.entry.subject.name,
22 | heat.category,
23 | heat.dance.name,
24 | heat.entry.lead.name,
25 | heat.entry.follow.name,
26 | heat.entry.level.name,
27 | heat.entry.subject_category,
28 | heat.entry.subject.studio.name,
29 | ]
30 | end
31 | end
32 | end
33 | end
34 |
35 | end %>
36 |
--------------------------------------------------------------------------------
/app/views/heats/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @heats, partial: "heats/heat", as: :heat
2 |
--------------------------------------------------------------------------------
/app/views/heats/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if @person %>
3 |
<%= @person.display_name %>
4 | <% else %>
5 |
New Heat
6 | <% end %>
7 |
8 | <%= render "form", heat: @heat, return_to: nil %>
9 |
10 |
11 |
12 | <%= link_to 'Back to heats', heats_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/heats/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @heat %>
8 |
9 | <%= link_to 'Edit this heat', edit_heat_path(@heat), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to 'Destroy this heat', heat_path(@heat), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to 'Back to heats', heats_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/heats/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "heats/heat", heat: @heat
2 |
--------------------------------------------------------------------------------
/app/views/layouts/action_text/contents/_content.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield -%>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/app/views/locations/_location.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! location, :id, :key, :name, :latitude, :longitude, :user_id, :created_at, :updated_at
2 | json.url location_url(location, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/locations/_showcases.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% @showcases.each do |year, showcases| %>
3 |
/">
4 | <%= year %>
5 |
6 |
7 |
8 | <% showcases.reverse.each do |showcase| %>
9 |
10 | <%= link_to showcase.name, edit_showcase_path(showcase) %>
11 |
12 | <% end %>
13 |
14 | <% end %>
15 |
--------------------------------------------------------------------------------
/app/views/locations/auth.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
<%= @location.name %> - Authorization
3 |
4 | <%= form_with url: locations_users_path do |form| %>
5 | <%= form.hidden_field :location, value: @location.id %>
6 | <% @auth.each do |user| %>
7 |
8 | <%= form.check_box "auth[#{user.id}]", class: 'entry-count h-8', checked: @checked[user.id] %>
9 | <%= user.userid %> <%= user.name1 %>
10 |
11 | <% end %>
12 | <%= form.submit 'Save', class: "btn-blue" %>
13 | <%= link_to 'Back to Studio', edit_location_path(@location), class: 'btn-grey' %>
14 | <% end %>
15 |
16 |
--------------------------------------------------------------------------------
/app/views/locations/events.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
<%= @location.name %> - Events
4 |
5 | <% if notice.present? %>
6 |
<%= notice %>
7 | <% end %>
8 |
9 | <%= render "showcases" %>
10 |
11 | <%= up_link 'New showcase', new_showcase_path(location: @location), class: 'btn-blue mt-4' %>
12 | <%= link_to 'Back to Studio', edit_location_path(@location), class: 'btn-grey' %>
13 |
--------------------------------------------------------------------------------
/app/views/locations/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @locations, partial: "locations/location", as: :location
2 |
--------------------------------------------------------------------------------
/app/views/locations/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if @first_event %>
3 |
First Event
4 | <% else %>
5 |
New Studio
6 | <% end %>
7 |
8 | <%= render "form", location: @location %>
9 |
10 |
11 |
12 | <%= link_to "Back to locations", locations_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/locations/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @location %>
8 |
9 | <%= link_to "Edit this location", edit_location_path(@location), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to "Destroy this location", location_path(@location), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to "Back to locations", locations_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/locations/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "locations/location", location: @location
2 |
--------------------------------------------------------------------------------
/app/views/locations/sisters.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
<%= @location.name %> - Sister Studios
3 |
4 | <%= form_with url: update_sisters_location_path do |form| %>
5 | <%= form.hidden_field :location, value: @location.id %>
6 | <% @studios.each do |studio| %>
7 |
8 | <%= form.check_box "sisters[#{studio}]", class: 'entry-count h-8', checked: @checked[studio] %>
9 | <%= form.label "sisters[#{studio}]", studio, class: 'text-xl align-middle pt-2' %>
10 |
11 | <% end %>
12 | <%= form.submit 'Save', class: "btn-blue" %>
13 | <%= link_to 'Back to Studio', edit_location_path(@location), class: 'btn-grey' %>
14 | <% end %>
15 |
16 |
--------------------------------------------------------------------------------
/app/views/multis/_multi.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | Parent:
4 | <%= multi.parent_id %>
5 |
6 |
7 |
8 | Dance:
9 | <%= multi.dance_id %>
10 |
11 |
12 | <% if action_name != "show" %>
13 | <%= link_to "Show this multi", multi, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 | <%= link_to 'Edit this multi', edit_multi_path(multi), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
15 |
16 | <% end %>
17 |
18 |
--------------------------------------------------------------------------------
/app/views/multis/_multi.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! multi, :id, :parent_id, :dance_id, :created_at, :updated_at
2 | json.url multi_url(multi, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/multis/edit.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Editing Multi-dance
3 |
4 | <%= render "form", dance: @dance %>
5 |
6 | <% if @dance.id %>
7 | <%= link_to "Show entries", entries_path(dance: @dance), class: "btn-green" %>
8 | <%= link_to "Remove this multi",
9 | multi_path(@dance), class: 'btn-grey',
10 | data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } %>
11 | <% end %>
12 | <%= link_to "Back to dances", dances_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
13 |
--------------------------------------------------------------------------------
/app/views/multis/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if notice.present? %>
3 |
<%= notice %>
4 | <% end %>
5 |
6 |
7 |
Multis
8 | <%= link_to 'New multi', new_multi_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
9 |
10 |
11 |
12 | <%= render @multis %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/multis/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @multis, partial: "multis/multi", as: :multi
2 |
--------------------------------------------------------------------------------
/app/views/multis/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
New multi-dance
3 |
4 | <%= render "form", multi: @multi %>
5 |
6 | <%= link_to 'Back to dances', dances_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
7 |
--------------------------------------------------------------------------------
/app/views/multis/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @multi %>
8 |
9 | <%= link_to 'Edit this multi', edit_multi_path(@multi), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to 'Destroy this multi', multi_path(@multi), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to 'Back to multis', multis_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/multis/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "multis/multi", multi: @multi
2 |
--------------------------------------------------------------------------------
/app/views/people/_package.html.erb:
--------------------------------------------------------------------------------
1 |
class="my-5"<% end %> id="package-select">
2 | <% unless @packages.empty? %>
3 | <%= label_tag :person_package_id, 'Package' %>
4 | <%= select_tag 'person[package_id]', options_for_select(@packages, @person.package_id || ''), {
5 | data: {"person-target" => "package", 'action' => 'person#setPackage', 'url' => package_people_path},
6 | class: "mx-auto block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full"} %>
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/people/_person.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! person, :id, :name, :studio_id, :type, :back, :level, :age, :role, :package, :independent, :exclude_id, :created_at, :updated_at
2 | json.url person_url(person, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/people/_studio_list.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= select_tag :person_id, options_for_select(@people),
3 | class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-64" %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/people/heats.html.erb:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | <% @people.each do |person| %>
9 | <% next if @heatlist[person].empty? %>
10 | <%= render "people/heats", person: person %>
11 | <% end %>
12 |
13 |
14 | <% if @people.all? {|person| @heatlist[person].empty?} %>
15 |
No heats are scheduled yet for this event.
16 | <% end %>
17 |
18 | <% if @event.print_studio_heats %>
19 | <% if @studio %>
20 | <%= render "people/heats", person: nil %>
21 | <% elsif @people.length != 1
22 | Studio.order(:name).each do |studio|
23 | next if studio.name == 'Event Staff'
24 | @studio = studio %>
25 | <%= render "people/heats", person: nil %>
26 | <% end %>
27 | <% end %>
28 | <% end %>
--------------------------------------------------------------------------------
/app/views/people/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @people, partial: "people/person", as: :person
2 |
--------------------------------------------------------------------------------
/app/views/people/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if @person.studio %>
3 |
New Participant/Guest
4 | <% else %>
5 |
New Event Staff Member
6 | <% end %>
7 |
8 | <%= render "form", person: @person %>
9 |
10 |
11 |
12 | <%= link_to 'Back to people', people_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
13 |
14 |
--------------------------------------------------------------------------------
/app/views/people/scores.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% found = false %>
3 | <% @score_values = !Score.where.not(value: [nil, ""]).empty? %>
4 | <% @people.each do |person| %>
5 | <% next unless @heats.any? {|heat| [heat.entry.lead, heat.entry.follow].include? person} or @formations.any? {|id, number| id == person.id} %>
6 | <%= render "people/scores", person: person %>
7 | <% found = true %>
8 | <% end %>
9 |
10 | <% unless found %>
11 |
No scores are entered yet for this event.
12 | <% end %>
13 |
--------------------------------------------------------------------------------
/app/views/people/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "people/person", person: @person
2 |
--------------------------------------------------------------------------------
/app/views/scores/_last_update.html.erb:
--------------------------------------------------------------------------------
1 | <% if action -%>
2 |
3 | <% end %>
4 | <%= timestamp %>
5 | <% if action -%>
6 |
7 | <% end -%>
--------------------------------------------------------------------------------
/app/views/scores/_score.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | Judge:
4 | <%= score.judge_id %>
5 |
6 |
7 |
8 | Heat:
9 | <%= score.heat_id %>
10 |
11 |
12 |
13 | Value:
14 | <%= score.value %>
15 |
16 |
17 | <% if action_name != "show" %>
18 | <%= link_to "Show this score", score, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
19 | <%= link_to 'Edit this score', edit_score_path(score), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
20 |
21 | <% end %>
22 |
23 |
--------------------------------------------------------------------------------
/app/views/scores/_score.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! score, :id, :judge_id, :entry_id, :value, :created_at, :updated_at
2 | json.url score_url(score, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/scores/by_studio.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= turbo_stream_from "live-scores-#{ENV['RAILS_APP_DB']}" %>
8 | <%= render partial: "last_update", locals: {action: by_studio_scores_path, timestamp: @last_score_update} %>
9 |
10 | <%= render "by_studio" %>
11 |
12 | <%= link_to 'Back to summary', summary_event_index_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
13 |
14 |
--------------------------------------------------------------------------------
/app/views/scores/comments.csv.erb:
--------------------------------------------------------------------------------
1 | <%=
2 | @comments.unshift [
3 | "Heat",
4 | "Student",
5 | "Partner",
6 | "Studio",
7 | "Judge",
8 | "Comments"
9 | ]
10 |
11 | @comments.map(&:to_csv).join.html_safe
12 | %>
--------------------------------------------------------------------------------
/app/views/scores/comments.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | Heat
4 | Student
5 | Partner
6 | Studio
7 | Judge
8 | Comments
9 |
10 | <% @comments.each do |cols| %>
11 |
12 | <% cols.each do |col| %>
13 | <%= col %>
14 | <% end %>
15 |
16 | <% end %>
17 |
--------------------------------------------------------------------------------
/app/views/scores/edit.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Editing score
3 |
4 | <%= render "form", score: @score %>
5 |
6 | <%= link_to "Show this score", @score, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
7 | <%= link_to "Back to scores", scores_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8 |
9 |
--------------------------------------------------------------------------------
/app/views/scores/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if notice.present? %>
3 |
<%= notice %>
4 | <% end %>
5 |
6 |
7 |
Scores
8 | <%= link_to 'New score', new_score_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
9 |
10 |
11 |
12 | <%= render @scores %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/scores/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @scores, partial: "scores/score", as: :score
2 |
--------------------------------------------------------------------------------
/app/views/scores/instructor.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 |
Instructor Scores
8 |
9 | <%= turbo_stream_from "live-scores-#{ENV['RAILS_APP_DB']}" %>
10 | <%= render partial: "last_update", locals: {action: instructor_scores_path, timestamp: @last_score_update} %>
11 |
12 | <%= render "instructors" %>
13 |
14 | <%= link_to 'Back to summary', summary_event_index_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
15 |
16 |
--------------------------------------------------------------------------------
/app/views/scores/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
New score
3 |
4 | <%= render "form", score: @score %>
5 |
6 | <%= link_to 'Back to scores', scores_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
7 |
8 |
--------------------------------------------------------------------------------
/app/views/scores/pros.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= turbo_stream_from "live-scores-#{ENV['RAILS_APP_DB']}" %>
8 | <%= render partial: "last_update", locals: {action: pros_scores_path, timestamp: @last_score_update} %>
9 |
10 | <%= render "pros" %>
11 |
12 | <%= link_to 'Back to summary', summary_event_index_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/scores/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @score %>
8 |
9 | <%= link_to 'Edit this score', edit_score_path(@score), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to 'Destroy this score', score_path(@score), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to 'Back to scores', scores_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/scores/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "scores/score", score: @score
2 |
--------------------------------------------------------------------------------
/app/views/showcases/_showcase.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! showcase, :id, :year, :key, :name, :studio_id, :created_at, :updated_at
2 | json.url showcase_url(showcase, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/showcases/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if notice.present? %>
3 |
<%= notice %>
4 | <% end %>
5 |
6 |
7 |
Showcases
8 | <%= link_to "New showcase", new_showcase_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
9 |
10 |
11 |
12 | <%= render @showcases %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/showcases/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @showcases, partial: "showcases/showcase", as: :showcase
2 |
--------------------------------------------------------------------------------
/app/views/showcases/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
New showcase
3 |
4 | <%= render "form", showcase: @showcase %>
5 |
6 |
7 |
8 | <% if @showcase.location %>
9 | <%= link_to "Back to location", edit_location_path(@showcase.location), class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 | <% else %>
11 | <%= link_to "Back to showcases", showcases_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
12 | <% end %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/showcases/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @showcase %>
8 |
9 | <%= link_to "Edit this showcase", edit_showcase_path(@showcase), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to "Destroy this showcase", showcase_path(@showcase), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to "Back to showcases", showcases_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/showcases/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "showcases/showcase", showcase: @showcase
2 |
--------------------------------------------------------------------------------
/app/views/solos/_solo.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | Heat:
4 | <%= solo.heat_id %>
5 |
6 |
7 |
8 | Combo dance:
9 | <%= solo.combo_dance_id %>
10 |
11 |
12 |
13 | Order:
14 | <%= solo.order %>
15 |
16 |
17 | <% if action_name != "show" %>
18 | <%= link_to "Show this solo", solo, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
19 | <%= link_to 'Edit this solo', edit_solo_path(solo), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
20 |
21 | <% end %>
22 |
23 |
--------------------------------------------------------------------------------
/app/views/solos/_solo.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! solo, :id, :heat_id, :combo_dance_id, :order, :created_at, :updated_at
2 | json.url solo_url(solo, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/solos/edit.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if @person %>
3 |
<%= @person.display_name %>
4 | <% else %>
5 | Edit Solo
6 | <% end %>
7 |
8 | <%= render "form", solo: @solo, return_to: params['return_to'] %>
9 |
10 |
--------------------------------------------------------------------------------
/app/views/solos/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @solos, partial: "solos/solo", as: :solo
2 |
--------------------------------------------------------------------------------
/app/views/solos/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @solo %>
8 |
9 | <%= link_to 'Edit this solo', edit_solo_path(@solo), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to 'Destroy this solo', solo_path(@solo), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to 'Back to solos', solos_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/solos/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "solos/solo", solo: @solo
2 |
--------------------------------------------------------------------------------
/app/views/songs/_list.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% @songs.each do |song| %>
3 |
4 | <%= link_to song.title, edit_song_path(song) %>
5 | <% if @includes_artists %>
6 | <%= song.artist %>
7 | <% end %>
8 | <% if song.song_file.attached? %>
9 |
10 |
11 | type=<%= song.song_file.content_type %>>
12 |
13 | <% else %>
14 |
15 | <% end %>
16 |
17 | <% end %>
18 |
--------------------------------------------------------------------------------
/app/views/songs/_song.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! song, :id, :dance_id, :order, :title, :artist, :created_at, :updated_at
2 | json.url song_url(song, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/songs/edit.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Editing song
3 |
4 | <%= render "form", song: @song %>
5 |
6 |
--------------------------------------------------------------------------------
/app/views/songs/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if notice.present? %>
3 |
<%= notice %>
4 | <% end %>
5 |
6 |
7 |
Songs
8 | <%= link_to 'New song', new_song_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
9 |
10 |
11 |
12 | <%= render @songs %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/views/songs/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @songs, partial: "songs/song", as: :song
2 |
--------------------------------------------------------------------------------
/app/views/songs/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
New song
3 |
4 | <%= render "form", song: @song %>
5 |
6 | <%= link_to 'Back to songs', songs_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
7 |
8 |
--------------------------------------------------------------------------------
/app/views/songs/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @song %>
8 |
9 | <%= link_to 'Edit this song', edit_song_path(@song), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to 'Destroy this song', song_path(@song), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to 'Back to songs', songs_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/songs/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "songs/song", song: @song
2 |
--------------------------------------------------------------------------------
/app/views/studios/_studio.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! studio, :id, :name, :created_at, :updated_at
2 | json.url studio_url(studio, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/studios/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @studios, partial: "studios/studio", as: :studio
2 |
--------------------------------------------------------------------------------
/app/views/studios/invoice.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render "studios/invoice", studio: @studio, invoice: @invoices[@studio] %>
3 |
--------------------------------------------------------------------------------
/app/views/studios/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
New studio
3 |
4 | <%= render "form", studio: @studio %>
5 |
6 |
7 |
8 | <%= link_to 'Back to studios', studios_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/views/studios/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "studios/studio", studio: @studio
2 |
--------------------------------------------------------------------------------
/app/views/users/_user.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! user, :id, :userid, :password, :email, :name1, :name2, :token, :link, :sites, :created_at, :updated_at
2 | json.url user_url(user, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/users/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @users, partial: "users/user", as: :user
2 |
--------------------------------------------------------------------------------
/app/views/users/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
New user
3 |
4 | <%= render "form", user: @user %>
5 |
6 |
7 | <%= link_to 'Back to users', users_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8 |
--------------------------------------------------------------------------------
/app/views/users/reset.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
User Reset
3 |
4 | <% if @user %>
5 | <%= render "form", user: @user %>
6 | <% else %>
7 |
8 |
9 | Error
10 |
11 |
12 |
Password reset request expired or not valid.
13 |
14 |
15 | <% end %>
16 |
17 |
18 |
19 | <%= link_to "Back to index", root_path, class: "btn-grey" %>
20 |
21 |
--------------------------------------------------------------------------------
/app/views/users/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% if notice.present? %>
4 |
<%= notice %>
5 | <% end %>
6 |
7 | <%= render @user %>
8 |
9 | <%= link_to 'Edit this user', edit_user_path(@user), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10 |
11 | <%= button_to 'Destroy this user', user_path(@user), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
12 |
13 | <%= link_to 'Back to users', users_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/users/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "users/user", user: @user
2 |
--------------------------------------------------------------------------------
/bin/docker-entrypoint:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | if [ "$1" == "foreman" ] && [ "$2" == "start" ]; then
4 | bin/deploy
5 |
6 | # nohup bin/bundle exec rake prerender &
7 | fi
8 |
9 | exec "${@}"
10 |
--------------------------------------------------------------------------------
/bin/importmap:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | require_relative "../config/application"
4 | require "importmap/commands"
5 |
--------------------------------------------------------------------------------
/bin/kamal:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'kamal' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12 |
13 | bundle_binstub = File.expand_path("bundle", __dir__)
14 |
15 | if File.file?(bundle_binstub)
16 | if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17 | load(bundle_binstub)
18 | else
19 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21 | end
22 | end
23 |
24 | require "rubygems"
25 | require "bundler/setup"
26 |
27 | load Gem.bin_path("kamal", "kamal")
28 |
--------------------------------------------------------------------------------
/bin/log-heartbeat.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/bash
2 |
3 | if [[ -z "$FLY_MACHINE_ID" ]]; then
4 | sleep 3
5 | printenv
6 | sleep infinity
7 | else
8 | # staggered start time
9 | sleep $((16#$FLY_MACHINE_ID % 1800))
10 |
11 | while true; do
12 | echo "HEARTBEAT $FLY_MACHINE_ID $FLY_REGION"
13 | sleep 1800
14 | done
15 | fi
16 |
--------------------------------------------------------------------------------
/bin/orphan-volumes:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ "$1" == "destroy" ]; then
4 |
5 | fly volumes list --json | \
6 | jq -r '[.[] | select(.attached_machine_id == null) | .id] | .[]' | \
7 | xargs -n 1 fly volume destroy --yes
8 |
9 | else
10 |
11 | fly volumes list --json | \
12 | jq --raw-output '[.[] | select(.attached_machine_id == null)]'
13 |
14 | fi
15 |
--------------------------------------------------------------------------------
/bin/prerender:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | bin/bundle exec rake prerender > /rails/log/prerender.log
3 |
4 | input_file="tmp/tenants.list"
5 | lines=()
6 |
7 | if [ -f "$input_file" ] && [ -n "$FLY_REGION" ]; then
8 | while IFS= read -r line; do
9 | lines+=("$line")
10 | done < "$input_file"
11 |
12 | if [ ${#lines[@]} -gt 0 ]; then
13 | ruby bin/prepare.rb "${lines[@]}"
14 | fi
15 | fi
16 |
17 | sleep infinity
18 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path("../config/application", __dir__)
3 | require_relative "../config/boot"
4 | require "rails/commands"
5 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative "../config/boot"
3 | require "rake"
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/bin/run:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [[ $# -lt 2 ]]; then
4 | echo "Usage: $0 db script"
5 | exit 1
6 | fi
7 |
8 | DIR="$( dirname -- "${BASH_SOURCE[0]}"; )"; # Get the directory name
9 | if [ $(dirname $HOME) == "home" ]; then
10 | DIR="$( realpath -e -- "$DIR"; )"; # Resolve its full path if need be
11 | else
12 | DIR="$( realpath -- "$DIR"; )"; # Resolve its full path if need be
13 | fi
14 | BASE="$(realpath $DIR/..)"
15 |
16 | export RAILS_APP_DB=$(basename -s .sqlite3 $1)
17 | export RAILS_STORAGE=$BASE/storage/$(basename -s .sqlite3 $1)
18 |
19 | if [[ "$1" = "test" ]]; then
20 | export RAILS_ENV=test
21 | bin/rails db:prepare db:fixtures:load
22 | fi
23 |
24 | shift
25 | bin/rails runner $@
26 |
--------------------------------------------------------------------------------
/bin/user-update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | if ENV['FLY_APP_NAME']
4 | # get a list of ip addresses for running instances
5 | addrs =
6 | `dig +short -t aaaa global.#{ENV['FLY_APP_NAME']}.internal`.split
7 |
8 | # remove current region from the list
9 | addrs -=
10 | `dig +short -t aaaa #{ENV['FLY_REGION']}.#{ENV['FLY_APP_NAME']}.internal`.split
11 |
12 | # rsync htpasswd and index.sqlite3 to each instance
13 | addrs.each do |addr|
14 | system *(%W[
15 | rsync
16 | -av
17 | --update
18 | /data/db/index.sqlite3
19 | /data/db/htpasswd
20 | rsync://[#{addr}]/data/db
21 | ])
22 | end
23 | else
24 | system *(%W[
25 | rsync
26 | -avv
27 | --update
28 | db/index.sqlite3
29 | db/htpasswd
30 | smooth:///data/db
31 | ])
32 |
33 | system "ssh smooth /rails/bin/user-update"
34 | end
35 |
--------------------------------------------------------------------------------
/cf/worker/showcase/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = tab
6 | end_of_line = lf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.yml]
12 | indent_style = space
13 |
--------------------------------------------------------------------------------
/cf/worker/showcase/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 140,
3 | "singleQuote": true,
4 | "semi": true,
5 | "useTabs": true
6 | }
7 |
--------------------------------------------------------------------------------
/cf/worker/showcase/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-first-worker",
3 | "version": "0.0.0",
4 | "private": true,
5 | "scripts": {
6 | "deploy": "wrangler deploy",
7 | "dev": "wrangler dev",
8 | "start": "wrangler dev",
9 | "test": "vitest"
10 | },
11 | "devDependencies": {
12 | "@cloudflare/vitest-pool-workers": "^0.5.2",
13 | "vitest": "2.0.5",
14 | "wrangler": "^3.86.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/cf/worker/showcase/vitest.config.js:
--------------------------------------------------------------------------------
1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config';
2 |
3 | export default defineWorkersConfig({
4 | test: {
5 | poolOptions: {
6 | workers: {
7 | wrangler: { configPath: './wrangler.toml' },
8 | },
9 | },
10 | },
11 | });
12 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative "config/environment"
4 |
5 | if ENV['FLY_REGION']
6 | database = URI.parse(ENV['DATABASE_URL']).path
7 | system "ruby bin/prepare.rb #{database}"
8 | end
9 |
10 | map ENV.fetch 'RAILS_RELATIVE_URL_ROOT', '/' do
11 | run Rails.application
12 | end
13 |
14 | Rails.application.load_server
15 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative "boot"
2 |
3 | require "rails/all"
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module AmEvent
10 | class Application < Rails::Application
11 | # Initialize configuration defaults for originally generated Rails version.
12 | config.load_defaults 7.0
13 | config.active_support.to_time_preserves_timezone = :zone
14 |
15 | # Configuration for the application, engines, and railties goes here.
16 | #
17 | # These settings can be overridden in specific environments using the files
18 | # in config/environments, which are processed later.
19 | #
20 | # config.time_zone = "Central Time (US & Canada)"
21 | # config.eager_load_paths << Rails.root.join("extras")
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2 |
3 | require "bundler/setup" # Set up gems listed in the Gemfile.
4 | require "bootsnap/setup" # Speed up boot time by caching expensive operations.
5 |
--------------------------------------------------------------------------------
/config/build.fly:
--------------------------------------------------------------------------------
1 | # Install esbuild
2 | RUN chdir /usr/local/bin && \
3 | curl -fsSL https://esbuild.github.io/dl/latest | sh
4 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: test
6 |
7 | production:
8 | adapter: redis
9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 | channel_prefix: <%= ENV.fetch("RAILS_APP_REDIS") { "am_event_production" } %>
11 |
--------------------------------------------------------------------------------
/config/deploy.iad.yml:
--------------------------------------------------------------------------------
1 | servers:
2 | web:
3 | - 5.161.77.210
4 |
5 | proxy:
6 | ssl: true
7 | host: hetzner.intertwingly.net
8 |
--------------------------------------------------------------------------------
/config/dockerfile.yml:
--------------------------------------------------------------------------------
1 | # generated by dockerfile-rails
2 |
3 | ---
4 | options:
5 | migrate: bin/deploy
6 | passenger: true
7 | platform: linux/amd64
8 | procfile: Procfile.fly
9 | sentry: true
10 | swap: 2G
11 | packages:
12 | deploy:
13 | - sqlite3
14 | - redis-server
15 | - procps
16 | - vim
17 | - rsync
18 | - openssh-server
19 | - dnsutils
20 | - sudo
21 | - poppler-utils
22 | envs:
23 | deploy:
24 | RAILS_STORAGE: "/data/storage"
25 | RAILS_DB_VOLUME: "/data/db"
26 | RAILS_LOG_VOLUME: "/data/log"
27 | instructions:
28 | build: config/build.fly
29 | deploy: config/deploy.fly
30 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative "application"
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/config/importmap.rb:
--------------------------------------------------------------------------------
1 | # Pin npm packages by running ./bin/importmap
2 |
3 | pin "application", preload: true
4 | pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
5 | pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
6 | pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
7 | pin_all_from "app/javascript/controllers", under: "controllers"
8 | pin "@rails/actioncable", to: "actioncable.esm.js"
9 | pin_all_from "app/javascript/channels", under: "channels"
10 | pin "trix"
11 | pin "@rails/actiontext", to: "actiontext.js"
12 | pin "@xterm/xterm", to: "@xterm--xterm.js" # @5.5.0
13 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = "1.0"
5 |
6 | # Add additional assets to the asset load path.
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in the app/assets
11 | # folder are already added.
12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
13 |
--------------------------------------------------------------------------------
/config/initializers/csv.rb:
--------------------------------------------------------------------------------
1 | require 'csv'
2 |
--------------------------------------------------------------------------------
/config/initializers/demo_reset.rb:
--------------------------------------------------------------------------------
1 | if ENV["RAILS_APP_OWNER"] == "Demo"
2 | database = URI.parse(ENV["DATABASE_URL"]).path
3 |
4 | if File.exist? "#{database}.time"
5 | if Time.now.to_i - File.mtime("#{database}.time").to_i > 3600
6 | FileUtils.cp "#{database}.seed", database, preserve: true
7 | FileUtils.rm "#{database}.time"
8 |
9 | storage = ENV["RAILS_STORAGE"]
10 | FileUtils.rm_rf storage
11 | FileUtils.mkdir_p storage
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/config/initializers/enable_yjit.rb:
--------------------------------------------------------------------------------
1 | # Automatically enable YJIT as of Ruby 3.3, as it brings very
2 | # sizeable performance improvements.
3 |
4 | # If you are deploying to a memory constrained environment
5 | # you may want to delete this file, but otherwise it's free
6 | # performance.
7 | if defined? RubyVM::YJIT.enable
8 | Rails.application.config.after_initialize do
9 | RubyVM::YJIT.enable
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [
5 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
6 | ]
7 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, "\\1en"
8 | # inflect.singular /^(ox)en/i, "\\1"
9 | # inflect.irregular "person", "people"
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym "RESTful"
16 | # end
17 |
--------------------------------------------------------------------------------
/config/initializers/permissions_policy.rb:
--------------------------------------------------------------------------------
1 | # Define an application-wide HTTP permissions policy. For further
2 | # information see https://developers.google.com/web/updates/2018/06/feature-policy
3 | #
4 | # Rails.application.config.permissions_policy do |f|
5 | # f.camera :none
6 | # f.gyroscope :none
7 | # f.microphone :none
8 | # f.usb :none
9 | # f.fullscreen :self
10 | # f.payment :self, "https://secure.example.com"
11 | # end
12 |
--------------------------------------------------------------------------------
/config/initializers/sentry.rb:
--------------------------------------------------------------------------------
1 | if ENV["SENTRY_DSN"] and ENV["RAILS_APP_OWNER"]
2 |
3 | Sentry.init do |config|
4 | config.dsn = ENV["SENTRY_DSN"]
5 | config.logger = ActiveSupport::Logger.new(STDOUT)
6 | config.breadcrumbs_logger = [:active_support_logger, :http_logger]
7 |
8 | # Set traces_sample_rate to 1.0 to capture 100%
9 | # of transactions for performance monitoring.
10 | # We recommend adjusting this value in production.
11 | config.traces_sample_rate = 1.0
12 | # or
13 | config.traces_sampler = lambda do |context|
14 | true
15 | end
16 | end
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/config/initializers/xlsx.rb:
--------------------------------------------------------------------------------
1 | Mime::Type.register 'application/xlsx', :xlsx
2 |
--------------------------------------------------------------------------------
/config/nginx.startup:
--------------------------------------------------------------------------------
1 | user rails;
2 | worker_processes 1;
3 | pid /rails/tmp/nginx.pid;
4 | error_log stderr info;
5 |
6 | events {
7 | worker_connections 768;
8 | }
9 |
10 | http {
11 | root /rails/public;
12 |
13 | map $time_iso8601 $timeonly {
14 | default '00:00:00';
15 | '~^\d{4}-\d{2}-\d{2}T(?
\d{2}):(?\d{2}):(?\d{2})' $hh:$mm:$ss;
16 | }
17 |
18 | log_format main '$timeonly web.1 | $http_x_forwarded_for - $remote_user [$time_local] "$request" '
19 | '$status $body_bytes_sent "$http_referer" '
20 | '"$http_user_agent"';
21 |
22 | access_log /dev/stdout main;
23 |
24 | server {
25 | listen 3000;
26 | listen [::]:3000;
27 |
28 | error_page 503 @maintenance;
29 |
30 | location / {
31 | return 503;
32 | }
33 |
34 | location @maintenance {
35 | try_files /503.html =404;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/config/storage/development.yml:
--------------------------------------------------------------------------------
1 | test:
2 | service: Disk
3 | root: <%= Rails.root.join("tmp/storage") %>
4 |
5 | local: &local
6 | service: Disk
7 | public: true
8 | root: <%= ENV.fetch('RAILS_STORAGE', Rails.root.join("storage")) %>
9 |
10 | tigris:
11 | <<: *local
12 |
--------------------------------------------------------------------------------
/config/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const defaultTheme = require('tailwindcss/defaultTheme')
2 |
3 | module.exports = {
4 | content: [
5 | './app/helpers/**/*.rb',
6 | './app/javascript/**/*.js',
7 | './app/views/**/*'
8 | ],
9 | theme: {
10 | extend: {
11 | fontFamily: {
12 | sans: ['Inter var', ...defaultTheme.fontFamily.sans],
13 | },
14 | },
15 | },
16 | plugins: [
17 | require('@tailwindcss/forms'),
18 | require('@tailwindcss/aspect-ratio'),
19 | require('@tailwindcss/typography'),
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/config/tenant/auth.yml:
--------------------------------------------------------------------------------
1 | ---
2 | raleigh:
3 | - annapolis
4 | - charlotte
5 | - harrisburg
6 | - vabeach
7 | cary:
8 | - cary
9 |
--------------------------------------------------------------------------------
/db/migrate/20220122173240_create_studios.rb:
--------------------------------------------------------------------------------
1 | class CreateStudios < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :studios do |t|
4 | t.string :name
5 | t.integer :tables
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20220122173241_create_people.rb:
--------------------------------------------------------------------------------
1 | class CreatePeople < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :people do |t|
4 | t.string :name
5 | t.references :studio, null: true, foreign_key: true
6 | t.string :type
7 | t.integer :back
8 | t.references :level, foreign_key: true
9 | t.references :age, foreign_key: true
10 | t.string :role
11 |
12 | t.timestamps
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20220122173242_create_dances.rb:
--------------------------------------------------------------------------------
1 | class CreateDances < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :dances do |t|
4 | t.string :name
5 | t.string :category
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20220122173243_create_entries.rb:
--------------------------------------------------------------------------------
1 | class CreateEntries < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :entries do |t|
4 | t.references :age, null: false, foreign_key: true
5 | t.references :level, null: false, foreign_key: true
6 | t.references :lead, null: false, foreign_key: {to_table: :people}
7 | t.references :follow, null: false, foreign_key: {to_table: :people}
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20220124133957_create_heats.rb:
--------------------------------------------------------------------------------
1 | class CreateHeats < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :heats do |t|
4 | t.integer :number
5 | t.string :category
6 | t.references :dance, null: false, foreign_key: true
7 | t.references :entry, null: false, foreign_key: true
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20220202153834_create_studio_pairs.rb:
--------------------------------------------------------------------------------
1 | class CreateStudioPairs < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :studio_pairs do |t|
4 | t.references :studio1, null: false, foreign_key: { to_table: :studios }
5 | t.references :studio2, null: false, foreign_key: { to_table: :studios }
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20220206180026_create_events.rb:
--------------------------------------------------------------------------------
1 | class CreateEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :events do |t|
4 | t.string :name
5 | t.string :location
6 | t.string :date
7 | t.integer :heat_range_cat
8 | t.integer :heat_range_level
9 | t.integer :heat_range_age
10 |
11 | t.timestamps
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20220206193836_create_ages.rb:
--------------------------------------------------------------------------------
1 | class CreateAges < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :ages do |t|
4 | t.string :category
5 | t.string :description
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20220206193854_create_levels.rb:
--------------------------------------------------------------------------------
1 | class CreateLevels < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :levels do |t|
4 | t.string :name
5 |
6 | t.timestamps
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20220208221606_create_categories.rb:
--------------------------------------------------------------------------------
1 | class CreateCategories < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :categories do |t|
4 | t.string :name
5 | t.integer :order
6 | t.string :day
7 | t.string :time
8 |
9 | t.timestamps
10 | end
11 |
12 | remove_column :dances, :category, :string
13 |
14 | add_reference :dances, :open_category, foreign_key: {to_table: :categories}
15 | add_reference :dances, :closed_category, foreign_key: {to_table: :categories}
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/db/migrate/20220212001802_add_intermix_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddIntermixToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :intermix, :boolean, default: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220212171521_add_order_to_dances.rb:
--------------------------------------------------------------------------------
1 | class AddOrderToDances < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :dances, :order, :integer
4 |
5 | reversible do |dir|
6 | dir.up do
7 | Dance.all.each do |dance|
8 | dance.update_columns(order: dance.id)
9 | end
10 | end
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20220214194448_create_scores.rb:
--------------------------------------------------------------------------------
1 | class CreateScores < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :scores do |t|
4 | t.references :judge, null: false, foreign_key: {to_table: :people}
5 | t.references :heat, null: false, foreign_key: true
6 | t.string :value
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20220217003153_create_solos.rb:
--------------------------------------------------------------------------------
1 | class CreateSolos < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :solos do |t|
4 | t.references :heat, null: false, foreign_key: true
5 | t.references :combo_dance, null: true, foreign_key: {to_table: :dances}
6 | t.integer :order
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20220218152002_add_song_to_solos.rb:
--------------------------------------------------------------------------------
1 | class AddSongToSolos < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :solos, :song, :string
4 | add_column :solos, :artist, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20220223032029_add_instructor_to_entry.rb:
--------------------------------------------------------------------------------
1 | class AddInstructorToEntry < ActiveRecord::Migration[7.0]
2 | def change
3 | add_reference :entries, :instructor, null: true, foreign_key: {to_table: :people}
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220301223832_add_solo_category_to_dance.rb:
--------------------------------------------------------------------------------
1 | class AddSoloCategoryToDance < ActiveRecord::Migration[7.0]
2 | def change
3 | add_reference :dances, :solo_category, null: true, foreign_key: {to_table: :categories}
4 |
5 | reversible do |dir|
6 | dir.up do
7 | Dance.all.each do |dance|
8 | dance.update_columns(solo_category_id: dance.closed_category_id)
9 | end
10 | end
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20220310220503_add_current_heat_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddCurrentHeatToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :current_heat, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220421013549_create_formations.rb:
--------------------------------------------------------------------------------
1 | class CreateFormations < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :formations do |t|
4 | t.references :person, null: false, foreign_key: true
5 | t.references :solo, null: false, foreign_key: true
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20220421144933_add_ballrooms_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddBallroomsToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :ballrooms, :integer, default: 1
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220425210448_add_heat_length_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddHeatLengthToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :heat_length, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220427002212_add_exclude_to_person.rb:
--------------------------------------------------------------------------------
1 | class AddExcludeToPerson < ActiveRecord::Migration[7.0]
2 | def change
3 | add_reference :people, :exclude, null: true, foreign_key: {to_table: :people}
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220427225436_create_multis.rb:
--------------------------------------------------------------------------------
1 | class CreateMultis < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :multis do |t|
4 | t.references :parent, null: false, foreign_key: { to_table: :dances }
5 | t.references :dance, null: false, foreign_key: true
6 | t.integer :slot
7 |
8 | t.timestamps
9 | end
10 |
11 | add_reference :dances, :multi_category, null: true, foreign_key: {to_table: :categories}
12 | add_column :dances, :heat_length, :integer
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20220501162747_create_billables.rb:
--------------------------------------------------------------------------------
1 | class CreateBillables < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :billables do |t|
4 | t.string :type
5 | t.string :name
6 | t.decimal :price, precision: 7, scale: 2
7 | t.integer :order
8 |
9 | t.timestamps
10 | end
11 |
12 | add_column :events, :heat_cost, :decimal, precision: 7, scale: 2
13 | add_column :events, :solo_cost, :decimal, precision: 7, scale: 2
14 | add_column :events, :multi_cost, :decimal, precision: 7, scale: 2
15 |
16 | add_reference :people, :package, null: true, foreign_key: {to_table: :billables}
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/db/migrate/20220501163609_create_person_options.rb:
--------------------------------------------------------------------------------
1 | class CreatePersonOptions < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :person_options do |t|
4 | t.references :person, null: false, foreign_key: true
5 | t.references :option, null: false, foreign_key: { to_table: :billables }
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20220501163652_create_package_includes.rb:
--------------------------------------------------------------------------------
1 | class CreatePackageIncludes < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :package_includes do |t|
4 | t.references :package, null: false, foreign_key: { to_table: :billables }
5 | t.references :option, null: false, foreign_key: { to_table: :billables }
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20220507162016_add_slot_to_score.rb:
--------------------------------------------------------------------------------
1 | class AddSlotToScore < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :scores, :slot, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220509185821_add_costs_to_studios.rb:
--------------------------------------------------------------------------------
1 | class AddCostsToStudios < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :studios, :heat_cost, :decimal, precision: 7, scale: 2
4 | add_column :studios, :solo_cost, :decimal, precision: 7, scale: 2
5 | add_column :studios, :multi_cost, :decimal, precision: 7, scale: 2
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20220510161408_add_email_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddEmailToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :email, :string
4 | add_column :studios, :email, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20220516162358_add_default_package_to_studios.rb:
--------------------------------------------------------------------------------
1 | class AddDefaultPackageToStudios < ActiveRecord::Migration[7.0]
2 | def change
3 | add_reference :studios, :default_student_package, null: true, foreign_key: {to_table: :billables}
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220517173618_add_max_heat_size_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddMaxHeatSizeToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :max_heat_size, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220519134900_add_more_default_packages_to_studios.rb:
--------------------------------------------------------------------------------
1 | class AddMoreDefaultPackagesToStudios < ActiveRecord::Migration[7.0]
2 | def change
3 | add_reference :studios, :default_professional_package, null: true, foreign_key: {to_table: :billables}
4 | add_reference :studios, :default_guest_package, null: true, foreign_key: {to_table: :billables}
5 | add_column :events, :package_required, :boolean, default: true
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20220527143539_add_grid_to_dances.rb:
--------------------------------------------------------------------------------
1 | class AddGridToDances < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :dances, :row, :integer
4 | add_column :dances, :col, :integer
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20220604141131_create_users.rb:
--------------------------------------------------------------------------------
1 | class CreateUsers < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :users do |t|
4 | t.string :userid
5 | t.string :password
6 | t.string :email
7 | t.string :name1
8 | t.string :name2
9 | t.string :token
10 | t.string :link
11 | t.string :sites
12 |
13 | t.timestamps
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/db/migrate/20220610120655_add_back_numbers_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddBackNumbersToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :backnums, :boolean, default: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220611163304_add_track_ages_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddTrackAgesToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :track_ages, :boolean, default: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220613132933_add_column_order_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddColumnOrderToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :column_order, :integer, default: 1
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220616181115_add_open_scoring_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddOpenScoringToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :open_scoring, :string, default: '1'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220622011356_add_solo_length_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddSoloLengthToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :solo_length, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220622141547_add_on_floor_to_formations.rb:
--------------------------------------------------------------------------------
1 | class AddOnFloorToFormations < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :formations, :on_floor, :boolean, default: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220629150139_add_ballrooms_and_heat_size_to_category.rb:
--------------------------------------------------------------------------------
1 | class AddBallroomsAndHeatSizeToCategory < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :categories, :ballrooms, :integer
4 | add_column :categories, :max_heat_size, :integer
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20220712234830_add_theme_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddThemeToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :theme, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220714122632_add_comments_to_scores.rb:
--------------------------------------------------------------------------------
1 | class AddCommentsToScores < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :scores, :comments, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220723202802_add_locked_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddLockedToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :locked, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220802135733_allow_heat_number_to_be_a_float.rb:
--------------------------------------------------------------------------------
1 | class AllowHeatNumberToBeAFloat < ActiveRecord::Migration[7.0]
2 | def up
3 | change_column :heats, :number, :float
4 | end
5 |
6 | def down
7 | change_column :heats, :number, :integer
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20220818222750_add_student_costs_to_studios.rb:
--------------------------------------------------------------------------------
1 | class AddStudentCostsToStudios < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :studios, :student_registration_cost, :decimal, precision: 7, scale: 2
4 | add_column :studios, :student_heat_cost, :decimal, precision: 7, scale: 2
5 | add_column :studios, :student_solo_cost, :decimal, precision: 7, scale: 2
6 | add_column :studios, :student_multi_cost, :decimal, precision: 7, scale: 2
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20220824111138_add_student_invoice_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddStudentInvoiceToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :student_package_description, :string
4 | add_column :events, :payment_due, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20220902165123_add_ballroom_to_heats.rb:
--------------------------------------------------------------------------------
1 | class AddBallroomToHeats < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :heats, :ballroom, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20220910184733_create_judges.rb:
--------------------------------------------------------------------------------
1 | class CreateJudges < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :judges do |t|
4 | t.references :person, null: false, foreign_key: true
5 | t.string :sort
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20221015184926_add_multi_scoring_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddMultiScoringToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :multi_scoring, :string, default: '1'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20230119173959_add_heats_to_category.rb:
--------------------------------------------------------------------------------
1 | class AddHeatsToCategory < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :categories, :heats, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20230119174433_create_cat_extensions.rb:
--------------------------------------------------------------------------------
1 | class CreateCatExtensions < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :cat_extensions do |t|
4 | t.references :category, null: false, foreign_key: true
5 | t.integer :start_heat
6 | t.integer :part
7 | t.integer :order
8 | t.string :day
9 | t.string :time
10 |
11 | t.timestamps
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20230124233129_add_feedback_to_scores.rb:
--------------------------------------------------------------------------------
1 | class AddFeedbackToScores < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :scores, :good, :string
4 | add_column :scores, :bad, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20230323024334_routine_categories.rb:
--------------------------------------------------------------------------------
1 | class RoutineCategories < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :categories, :routines, :boolean
4 | add_column :categories, :duration, :integer
5 |
6 | add_reference :solos, :category_override, foreign_key: {to_table: :categories}
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20230430173328_add_judge_comments_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddJudgeCommentsToEvent < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :judge_comments, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20230603231658_add_cost_override_to_dances_and_categories.rb:
--------------------------------------------------------------------------------
1 | class AddCostOverrideToDancesAndCategories < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :dances, :cost_override, :decimal, precision: 7, scale: 2
4 | add_column :categories, :cost_override, :decimal, precision: 7, scale: 2
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20230901183948_add_agenda_based_entries_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddAgendaBasedEntriesToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :agenda_based_entries, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20230909234512_add_pro_heats.rb:
--------------------------------------------------------------------------------
1 | class AddProHeats < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :pro_heats, :boolean, default: false
4 |
5 | add_reference :dances, :pro_open_category, null: true, foreign_key: {to_table: :categories}
6 | add_reference :dances, :pro_closed_category, null: true, foreign_key: {to_table: :categories}
7 | add_reference :dances, :pro_solo_category, null: true, foreign_key: {to_table: :categories}
8 | add_reference :dances, :pro_multi_category, null: true, foreign_key: {to_table: :categories}
9 |
10 | add_column :categories, :pro, :boolean, default: false
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20230923182922_assign_judges.rb:
--------------------------------------------------------------------------------
1 | class AssignJudges < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :assign_judges, :integer, default: 0
4 |
5 | add_column :people, :present, :boolean, default: true
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20230930144237_add_font_size_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddFontSizeToEvents < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :font_size, :string, default: "100%"
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20231001165834_add_semi_finals_to_multis.rb:
--------------------------------------------------------------------------------
1 | class AddSemiFinalsToMultis < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :dances, :semi_finals, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20231010012726_create_songs.rb:
--------------------------------------------------------------------------------
1 | class CreateSongs < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :songs do |t|
4 | t.references :dance, null: false, foreign_key: true
5 | t.integer :order
6 | t.string :title
7 | t.string :artist
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20231025173707_addtimesoption.rb:
--------------------------------------------------------------------------------
1 | class Addtimesoption < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :include_times, :boolean, default: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20231027142420_create_locations.rb:
--------------------------------------------------------------------------------
1 | class CreateLocations < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :locations do |t|
4 | t.string :key
5 | t.string :name
6 | t.string :logo
7 | t.float :latitude
8 | t.float :longitude
9 | t.references :user, null: true, foreign_key: true
10 |
11 | t.timestamps
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20231027142506_create_showcases.rb:
--------------------------------------------------------------------------------
1 | class CreateShowcases < ActiveRecord::Migration[7.0]
2 | def change
3 | create_table :showcases do |t|
4 | t.integer :year
5 | t.string :key
6 | t.string :name
7 | t.references :location, null: false, foreign_key: true
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20231028131227_add_order_to_showcases.rb:
--------------------------------------------------------------------------------
1 | class AddOrderToShowcases < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :showcases, :order, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20231115014415_sololevels.rb:
--------------------------------------------------------------------------------
1 | class Sololevels < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :events, :include_open, :boolean, default: true
4 | add_column :events, :include_closed, :boolean, default: true
5 | add_reference :events, :solo_level, null: true, foreign_key: {to_table: :levels}
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20231207142159_add_region_to_location.rb:
--------------------------------------------------------------------------------
1 | class AddRegionToLocation < ActiveRecord::Migration[7.0]
2 | def change
3 | add_column :locations, :region, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20231220195604_add_lock_to_category.rb:
--------------------------------------------------------------------------------
1 | class AddLockToCategory < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :categories, :locked, :boolean
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20231227064854_add_studio_zero_again.rb:
--------------------------------------------------------------------------------
1 | class AddStudioZeroAgain < ActiveRecord::Migration[7.1]
2 | def up
3 | unless Studio.where(id: 0).first
4 | Studio.create! name: 'Event Staff', id: 0
5 | end
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20240109224242_clearwater.rb:
--------------------------------------------------------------------------------
1 | class Clearwater < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :print_studio_heats, :boolean, default: false
4 | add_column :billables, :couples, :boolean, default: false
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20240116131352_add_duration_to_cat_extension.rb:
--------------------------------------------------------------------------------
1 | class AddDurationToCatExtension < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :cat_extensions, :duration, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240120160513_add_sisters_to_location.rb:
--------------------------------------------------------------------------------
1 | class AddSistersToLocation < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :locations, :sisters, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240129193921_add_font_family_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddFontFamilyToEvents < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :font_family, :string, default: "Helvetica, Arial"
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240219210158_include_independent_instructors.rb:
--------------------------------------------------------------------------------
1 | class IncludeIndependentInstructors < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :independent_instructors, :boolean, default: false
4 | add_column :people, :independent, :boolean, default: false
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20240226132621_add_closed_scoring_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddClosedScoringToEvent < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :closed_scoring, :string, default: 'G'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240229134705_add_heat_order.rb:
--------------------------------------------------------------------------------
1 | class AddHeatOrder < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :heat_order, :string, default: 'L'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240310223701_judge_show_assignments.rb:
--------------------------------------------------------------------------------
1 | class JudgeShowAssignments < ActiveRecord::Migration[7.1]
2 | def up
3 | absent = Person.where(type: 'Judge', present: false)
4 |
5 | add_column :judges, :show_assignments, :string, default: 'first', null: false
6 | add_column :judges, :present, :boolean, default: true, null: false
7 |
8 | absent.each do |person|
9 | judge=Judge.find_or_create_by(person_id: person.id)
10 | judge.update(present: false)
11 | end
12 |
13 | remove_column :people, :present
14 | end
15 |
16 | def down
17 | add_column :people, :present, :boolean, default: true, null: false
18 |
19 | Judge.where(present: false).each do |judge|
20 | judge.person.update(present: false)
21 | end
22 |
23 | remove_column :judges, :show_assignments
24 | remove_column :judges, :present
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/db/migrate/20240324222321_create_age_costs.rb:
--------------------------------------------------------------------------------
1 | class CreateAgeCosts < ActiveRecord::Migration[7.1]
2 | def change
3 | create_table :age_costs do |t|
4 | t.references :age, null: false, foreign_key: true
5 | t.decimal :heat_cost, precision: 7, scale: 2
6 | t.decimal :solo_cost, precision: 7, scale: 2
7 | t.decimal :multi_cost, precision: 7, scale: 2
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20240425003705_add_dance_limit.rb:
--------------------------------------------------------------------------------
1 | class AddDanceLimit < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :dance_limit, :integer, null: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240512170708_add_trust_level_to_locations.rb:
--------------------------------------------------------------------------------
1 | class AddTrustLevelToLocations < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :locations, :trust_level, :integer, default: 0
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240529200032_add_ballroom_to_judge.rb:
--------------------------------------------------------------------------------
1 | class AddBallroomToJudge < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :judges, :ballroom, :string, null: false, default: 'Both'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240708205904_add_counter_color_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddCounterColorToEvents < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :counter_color, :string, default: '#FFFFFF'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240708213142_add_prev_number_to_heats.rb:
--------------------------------------------------------------------------------
1 | class AddPrevNumberToHeats < ActiveRecord::Migration[7.1]
2 | def up
3 | add_column :heats, :prev_number, :float
4 | Heat.update_all 'prev_number = number'
5 | end
6 |
7 | def down
8 | remove_column :heats, :prev_number
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20240804224317_add_ballroom_to_studios.rb:
--------------------------------------------------------------------------------
1 | class AddBallroomToStudios < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :studios, :ballroom, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240822010045_add_limit_to_dances.rb:
--------------------------------------------------------------------------------
1 | class AddLimitToDances < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :dances, :limit, :integer, null: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20240831131433_add_invoice_to_to_person.rb:
--------------------------------------------------------------------------------
1 | class AddInvoiceToToPerson < ActiveRecord::Migration[7.1]
2 | def change
3 | add_reference :people, :invoice_to, foreign_key: { to_table: :people }
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20241001130746_add_studio_cost_to_agenda.rb:
--------------------------------------------------------------------------------
1 | class AddStudioCostToAgenda < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :categories, :studio_cost_override, :decimal, precision: 7, scale: 2
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20241002125818_add_pro_heat_costs.rb:
--------------------------------------------------------------------------------
1 | class AddProHeatCosts < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :events, :pro_heat_cost, :decimal, precision: 7, scale: 2
4 | add_column :events, :pro_solo_cost, :decimal, precision: 7, scale: 2
5 | add_column :events, :pro_multi_cost, :decimal, precision: 7, scale: 2
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20241010143111_add_solos_to_judges.rb:
--------------------------------------------------------------------------------
1 | class AddSolosToJudges < ActiveRecord::Migration[7.1]
2 | def change
3 | add_column :judges, :review_solos, :string, default: 'All'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20241230174102_create_regions.rb:
--------------------------------------------------------------------------------
1 | class CreateRegions < ActiveRecord::Migration[8.0]
2 | def change
3 | create_table :regions do |t|
4 | t.string :type
5 | t.string :code
6 | t.string :location
7 | t.float :latitude
8 | t.float :longitude
9 |
10 | t.timestamps
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20250126024112_add_locale_to_locations.rb:
--------------------------------------------------------------------------------
1 | class AddLocaleToLocations < ActiveRecord::Migration[8.0]
2 | def change
3 | add_column :locations, :locale, :string, default: "en_US"
4 | end
5 | end
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/db/migrate/20250128222542_add_strict_scoring_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddStrictScoringToEvent < ActiveRecord::Migration[8.0]
2 | def change
3 | add_column :events, :strict_scoring, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20250222014457_add_split_to_categories.rb:
--------------------------------------------------------------------------------
1 | class AddSplitToCategories < ActiveRecord::Migration[8.0]
2 | def up
3 | add_column :categories, :split, :string
4 |
5 | Category.all.where.not(heats: nil).each do |category|
6 | category.update(split: category.heats.to_s)
7 | end
8 |
9 | remove_column :categories, :heats
10 | end
11 |
12 | def down
13 | add_column :categories, :heats, :integer
14 |
15 | Category.all.where.not(split: nil).each do |category|
16 | category.update(heats: category.split.first.to_i)
17 | end
18 |
19 | remove_column :categories, :split
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/db/migrate/20250307070516_add_available_to_person.rb:
--------------------------------------------------------------------------------
1 | class AddAvailableToPerson < ActiveRecord::Migration[8.0]
2 | def change
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/db/migrate/20250307070551_add_available_to_person_again.rb:
--------------------------------------------------------------------------------
1 | class AddAvailableToPersonAgain < ActiveRecord::Migration[8.0]
2 | def change
3 | add_column :people, :available, :string, null: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20250329010216_create_feedbacks.rb:
--------------------------------------------------------------------------------
1 | class CreateFeedbacks < ActiveRecord::Migration[8.0]
2 | def change
3 | create_table :feedbacks do |t|
4 | t.integer :order
5 | t.string :value
6 | t.string :abbr
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20250407144301_add_pro_am_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddProAmToEvents < ActiveRecord::Migration[8.0]
2 | def change
3 | add_column :events, :pro_am, :string, default: "G"
4 | add_column :events, :solo_scoring, :string, default: "1"
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | require_relative 'seeds/generic.rb'
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3.8"
2 |
3 | services:
4 | web:
5 | build: .
6 | volumes:
7 | - ./db:/home/app/showcase/db
8 | - ./log:/home/app/showcase/log
9 | secrets:
10 | - source: master_key
11 | target: /home/app/showcase/config/master.key
12 | ports:
13 | - "9999:9999"
14 |
15 | secrets:
16 | master_key:
17 | file: ./config/master.key
18 |
19 |
--------------------------------------------------------------------------------
/fly/applications/logger/.dockerignore:
--------------------------------------------------------------------------------
1 | logs
2 | node_modules
3 | .kamal
4 |
--------------------------------------------------------------------------------
/fly/applications/logger/.gitignore:
--------------------------------------------------------------------------------
1 | logs
2 | .kamal
3 |
--------------------------------------------------------------------------------
/fly/applications/logger/README.md:
--------------------------------------------------------------------------------
1 | # logger
2 |
3 | To install dependencies:
4 |
5 | ```bash
6 | bun install
7 | ```
8 |
9 | To run:
10 |
11 | ```bash
12 | bun run index.ts
13 | ```
14 |
15 | To deploy:
16 |
17 | ```
18 | fly launch
19 | fly secrets set ACCESS_TOKEN=$(fly auth token)
20 | fly deploy --ha=false
21 | ```
22 |
23 | This project was created using `bun init` in bun v0.6.13. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
24 |
--------------------------------------------------------------------------------
/fly/applications/logger/bin/sync.ts:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bun
2 | import { execSync } from 'child_process'
3 | import { dirname } from 'path'
4 | import { chdir } from 'process'
5 |
6 | chdir(dirname(import.meta.dirname))
7 |
8 | execSync(
9 | 'rsync -avz --delete --exclude=lost+found --exclude=.ssh log.smooth:/logs .',
10 | { stdio: 'inherit' }
11 | )
--------------------------------------------------------------------------------
/fly/applications/logger/fly.toml:
--------------------------------------------------------------------------------
1 | # fly.toml app configuration file generated for smooth-logger on 2023-07-15T09:42:32-04:00
2 | #
3 | # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4 | #
5 |
6 | app = "smooth-logger"
7 | primary_region = "iad"
8 | swap_size_mb = 2048
9 |
10 | [processes]
11 | app = 'bun run start'
12 |
13 | [[mounts]]
14 | source = "log"
15 | destination = "/logs"
16 | auto_extend_size_threshold = 80
17 | auto_extend_size_increment = "1GB"
18 |
19 | [http_service]
20 | internal_port = 3000
21 | force_https = true
22 | auto_stop_machines = false
23 | auto_start_machines = true
24 | min_machines_running = 1
25 | processes = ["app"]
26 |
27 | [[services]]
28 | internal_port = 2222
29 | protocol = "tcp"
30 | processes = ["app"]
31 | [[services.ports]]
32 | port = 2222
33 |
--------------------------------------------------------------------------------
/fly/applications/logger/sentry.ts:
--------------------------------------------------------------------------------
1 | import * as Sentry from '@sentry/node'
2 |
3 | Sentry.init()
4 |
5 | export function alert(message: string) {
6 | Sentry.captureMessage(message)
7 | }
--------------------------------------------------------------------------------
/fly/applications/logger/server.ts:
--------------------------------------------------------------------------------
1 | // start web server
2 | import "./index.ts"
3 |
4 | // start logfiler
5 | import "./logfiler.ts"
6 |
7 | // start monitor
8 | import "./monitor.ts"
--------------------------------------------------------------------------------
/fly/applications/logger/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["ESNext"],
4 | "module": "esnext",
5 | "target": "esnext",
6 | "moduleResolution": "bundler",
7 | "moduleDetection": "force",
8 | "allowImportingTsExtensions": true,
9 | "strict": true,
10 | "downlevelIteration": true,
11 | "skipLibCheck": true,
12 | "jsx": "preserve",
13 | "allowSyntheticDefaultImports": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "allowJs": true,
16 | "noEmit": true,
17 | "types": [
18 | "bun-types" // add Bun global
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/fly/applications/printer/.dockerignore:
--------------------------------------------------------------------------------
1 | fly.toml
2 | Dockerfile
3 | .kamal
4 | .dockerignore
5 | node_modules
6 | .git
7 |
--------------------------------------------------------------------------------
/fly/applications/printer/.gitignore:
--------------------------------------------------------------------------------
1 | .kamal
2 |
--------------------------------------------------------------------------------
/fly/applications/printer/fly.toml:
--------------------------------------------------------------------------------
1 | # fly.toml app configuration file generated for smooth-pdf on 2023-11-23T14:36:43-05:00
2 | #
3 | # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4 | #
5 |
6 | app = "smooth-pdf"
7 | primary_region = "iad"
8 | swap_size_mb = 2048
9 |
10 | [processes]
11 | app = "bun server.ts --colors"
12 |
13 | [env]
14 | HOSTNAME = "smooth.fly.dev"
15 | # PORT = 3000
16 | TIMEOUT = 15
17 | FORMAT = "letter"
18 |
19 | [http_service]
20 | internal_port = 3000
21 | force_https = true
22 | auto_stop_machines = false
23 | auto_start_machines = true
24 | min_machines_running = 0
25 | processes = ["app"]
26 |
27 | [http_service.concurrency]
28 | type = "requests"
29 | soft_limit = 1
30 | hard_limit = 1
31 |
32 | [[vm]]
33 | cpu_kind = "performance"
34 | cpus = 1
35 | memory_mb = 2048
36 |
--------------------------------------------------------------------------------
/fly/applications/printer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "printer",
3 | "dependencies": {
4 | "chalk": "^5.4.0",
5 | "puppeteer-core": "^24.8.0",
6 | "xlsx": "^0.18.5"
7 | },
8 | "devDependencies": {
9 | "bun-types": "^1.0.14"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/fly/applications/printer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "lib": ["ESNext"],
4 | "module": "esnext",
5 | "target": "esnext",
6 | "moduleResolution": "bundler",
7 | "moduleDetection": "force",
8 | "allowImportingTsExtensions": true,
9 | "strict": true,
10 | "downlevelIteration": true,
11 | "skipLibCheck": true,
12 | "jsx": "preserve",
13 | "allowSyntheticDefaultImports": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "allowJs": true,
16 | "noEmit": true,
17 | "types": [
18 | "bun-types" // add Bun global
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/fly/applications/proxy/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG GO_VERSION=1
2 | FROM golang:${GO_VERSION}-bookworm as builder
3 |
4 | WORKDIR /usr/src/app
5 | COPY go.mod ./
6 | RUN go mod download && go mod verify
7 | COPY . .
8 | RUN go build -v -o /smooth-proxy .
9 |
10 |
11 | FROM debian:bookworm
12 |
13 | # Install packages needed for deployment
14 | RUN apt-get update -qq && \
15 | apt-get install --no-install-recommends -y ca-certificates && \
16 | rm -rf /var/lib/apt/lists /var/cache/apt/archives
17 |
18 | COPY --from=builder /smooth-proxy /usr/local/bin/
19 | CMD ["smooth-proxy"]
20 |
--------------------------------------------------------------------------------
/fly/applications/proxy/fly.toml:
--------------------------------------------------------------------------------
1 | # fly.toml app configuration file generated for smooth-proxy on 2025-02-09T09:01:18-05:00
2 | #
3 | # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4 | #
5 |
6 | app = 'smooth-proxy'
7 | primary_region = 'iad'
8 |
9 | [build]
10 | [build.args]
11 | GO_VERSION = '1.23.6'
12 |
13 | [http_service]
14 | internal_port = 8080
15 | force_https = true
16 | auto_stop_machines = 'suspend'
17 | auto_start_machines = true
18 | min_machines_running = 0
19 | processes = ['app']
20 |
21 | [[vm]]
22 | memory = '1gb'
23 | cpu_kind = 'shared'
24 | cpus = 1
25 |
--------------------------------------------------------------------------------
/fly/applications/proxy/go.mod:
--------------------------------------------------------------------------------
1 | module proxy
2 |
3 | go 1.23.6
4 |
--------------------------------------------------------------------------------
/fly/applications/publish/public/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/fly/applications/publish/public/.keep
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/lib/tasks/.keep
--------------------------------------------------------------------------------
/lib/tasks/esbuild.rake:
--------------------------------------------------------------------------------
1 | # minify js controllers and target older browsers
2 | Rake::Task['assets:precompile'].enhance do
3 | Dir.chdir 'public/assets/controllers' do
4 | files = Dir['*.js'] -
5 | Dir['*.js.map'].map {|file| File.basename(file, '.map')}
6 |
7 | unless files.empty?
8 | sh "esbuild", *files,
9 | *%w(--outdir=. --allow-overwrite --minify --target=es2020 --sourcemap)
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/lib/tasks/eslint.rake:
--------------------------------------------------------------------------------
1 | task :eslint do
2 | sh "eslint app/javascript/controllers/*_controller.js"
3 | end
4 |
5 | namespace :eslint do
6 | task :fix do
7 | sh "eslint --fix app/javascript/controllers/*_controller.js"
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/lib/tasks/mapper.rake:
--------------------------------------------------------------------------------
1 | task :map do
2 | Dir.chdir 'utils/mapper' do
3 | sh 'node makemaps.js'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/log/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/log/.keep
--------------------------------------------------------------------------------
/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/public/arthur-murray-logo-wide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/arthur-murray-logo-wide.png
--------------------------------------------------------------------------------
/public/arthur-murray-logo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/arthur-murray-logo.gif
--------------------------------------------------------------------------------
/public/carolina-dance-works.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/carolina-dance-works.jpg
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/favicon.ico
--------------------------------------------------------------------------------
/public/fonts/Algerian Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/fonts/Algerian Regular.ttf
--------------------------------------------------------------------------------
/public/fonts/Berlin Sans FB Demi Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/fonts/Berlin Sans FB Demi Bold.ttf
--------------------------------------------------------------------------------
/public/fonts/Bevan-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/fonts/Bevan-Italic.ttf
--------------------------------------------------------------------------------
/public/fonts/Bevan-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/fonts/Bevan-Regular.ttf
--------------------------------------------------------------------------------
/public/fred-astaire-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/fred-astaire-logo.jpg
--------------------------------------------------------------------------------
/public/intertwingly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/intertwingly.png
--------------------------------------------------------------------------------
/public/mdballroom.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/mdballroom.webp
--------------------------------------------------------------------------------
/public/ras.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/public/ras.jpg
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/script/import_compmngr.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | if ARGV.empty?
4 | database = "db/2025-boston-april.sqlite3"
5 | else
6 | database = ARGV.first
7 | end
8 |
9 | if !defined? Rails
10 | exec "bin/run", database, $0, *ARGV
11 | end
12 |
13 | require 'csv'
14 | include Compmngr
15 |
16 | if ARGV[1].ends_with?(".csv")
17 | input = CSV.read(ARGV[1])
18 | elsif ARGV[1].ends_with?(".txt")
19 | input = CSV.read(ARGV[1], col_sep: "\t")
20 | elsif ARGV[1].ends_with?(".xls") || ARGV[1].ends_with?(".xlsx")
21 | dest = File.join(Rails.root, "tmp", File.basename(ARGV[1], ".*") + ".csv")
22 | system "ssconvert", ARGV[1], dest
23 | input = CSV.read(dest)
24 | else
25 | STDERR.puts "Unknown file type: #{ARGV[1]}"
26 | exit 1
27 | end
28 |
29 | import_from_compmngr input
--------------------------------------------------------------------------------
/script/s3-download.rb:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env ruby
2 |
3 | exit unless ENV['FLY_REGION']
4 |
5 | if ENV['FLY_REGION'] == ENV['PRIMARY_REGION']
6 | Dir.chdir "/data" do
7 | if not Dir.exist? 'tigris'
8 | FileUtils.rm_rf 'storage'
9 | end
10 |
11 | system "rclone sync --progress tigris:showcase ./tigris"
12 |
13 | files = Dir.chdir('tigris') {Dir["*"]}
14 | files.each do |file|
15 | dest = file.sub(/(..)(..)/, 'storage/\1/\2/\1\2')
16 | if not File.exist? dest
17 | FileUtils.mkdir_p File.dirname(dest)
18 | File.link "tigris/#{file}", dest
19 | end
20 | end
21 | end
22 | else
23 | FileUtils.rm_rf '/data/storage'
24 | end
25 |
--------------------------------------------------------------------------------
/script/zones.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/evn ruby
2 |
3 | require 'json'
4 |
5 | volumes = JSON.parse(`fly volumes list --json`)
6 |
7 | volumes.sort_by { |v| [v['region'], v['zone']] }.each do |volume|
8 | next unless volume['attached_machine_id']
9 | puts "#{volume['region']} #{volume['zone']} #{volume['attached_machine_id']}"
10 | end
--------------------------------------------------------------------------------
/storage/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/storage/.keep
--------------------------------------------------------------------------------
/test/application_system_test_case.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5 | end
6 |
--------------------------------------------------------------------------------
/test/channels/application_cable/connection_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase
4 | # test "connects with cookies" do
5 | # cookies.signed[:user_id] = 42
6 | #
7 | # connect
8 | #
9 | # assert_equal connection.user_id, "42"
10 | # end
11 | end
12 |
--------------------------------------------------------------------------------
/test/channels/current_heat_channel_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class CurrentHeatChannelTest < ActionCable::Channel::TestCase
4 | # test "subscribes" do
5 | # subscribe
6 | # assert subscription.confirmed?
7 | # end
8 | end
9 |
--------------------------------------------------------------------------------
/test/channels/output_channel_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class OutputChannelTest < ActionCable::Channel::TestCase
4 | # test "subscribes" do
5 | # subscribe
6 | # assert subscription.confirmed?
7 | # end
8 | end
9 |
--------------------------------------------------------------------------------
/test/channels/scores_channel_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ScoresChannelTest < ActionCable::Channel::TestCase
4 | # test "subscribes" do
5 | # subscribe
6 | # assert subscription.confirmed?
7 | # end
8 | end
9 |
--------------------------------------------------------------------------------
/test/controllers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/test/controllers/.keep
--------------------------------------------------------------------------------
/test/controllers/admin_controller_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class AdminControllerTest < ActionDispatch::IntegrationTest
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/controllers/docs_controller_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class DocsControllerTest < ActionDispatch::IntegrationTest
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/fixtures/action_text/rich_texts.yml:
--------------------------------------------------------------------------------
1 | # one:
2 | # record: name_of_fixture (ClassOfFixture)
3 | # name: content
4 | # body: In a million stars!
5 |
--------------------------------------------------------------------------------
/test/fixtures/age_costs.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | age: J
5 | heat_cost: 9.99
6 | solo_cost: 9.99
7 | multi_cost: 9.99
8 |
9 | two:
10 | age: A
11 | heat_cost: 9.99
12 | solo_cost: 9.99
13 | multi_cost: 9.99
14 |
--------------------------------------------------------------------------------
/test/fixtures/ages.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | J:
4 | category: J
5 | description: "< 17"
6 |
7 | A:
8 | category: A
9 | description: "18-35"
10 |
11 | A1:
12 | category: A1
13 | description: "36-45"
14 |
15 | B:
16 | category: B
17 | description: "46-54"
18 |
19 | B1:
20 | category: B
21 | description: "55-65"
22 |
23 | C:
24 | category: C
25 | description: "66-75"
26 |
27 | C1:
28 | category: C1
29 | description: "76-85"
30 |
31 | D:
32 | category: D
33 | description: "86+"
34 |
--------------------------------------------------------------------------------
/test/fixtures/billables.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | type: Student
5 | name: Full Package
6 | price: 9.99
7 | order: 1
8 |
9 | two:
10 | type: Option
11 | name: Lunch
12 | price: 4.99
13 | order: 2
14 |
--------------------------------------------------------------------------------
/test/fixtures/cat_extensions.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | category: one
5 | part: 1
6 | order: 1
7 | day: MyString
8 | time: MyString
9 |
10 | two:
11 | category: two
12 | part: 1
13 | order: 1
14 | day: MyString
15 | time: MyString
16 |
--------------------------------------------------------------------------------
/test/fixtures/categories.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | name: Closed American Smooth
5 | order: 1
6 | day: Friday
7 | time: 10 a.m.
8 |
9 | two:
10 | name: Open American Smooth
11 | order: 4
12 | day: Saturday
13 | time: 10 a.m.
14 |
15 | three:
16 | name: Closed American Rhythm
17 | order: 2
18 | day: Friday
19 | time: 1 p.m.
20 |
21 | four:
22 | name: Open American Rhythm
23 | order: 5
24 | day: Saturday
25 | time: 1 p.m.
26 |
27 | five:
28 | name: All Arounds
29 | order: 3
30 | day: Saturday
31 | time: 4 p.m.
--------------------------------------------------------------------------------
/test/fixtures/dances.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | waltz:
4 | name: Waltz
5 | closed_category: one
6 | open_category: two
7 | solo_category: one
8 | order: 1
9 |
10 | tango:
11 | name: Tango
12 | closed_category: one
13 | open_category: two
14 | solo_category: one
15 | order: 2
16 |
17 | rumba:
18 | name: Rumba
19 | closed_category: three
20 | open_category: four
21 | solo_category: three
22 | order: 3
23 |
24 | chacha:
25 | name: Cha Cha
26 | closed_category: three
27 | open_category: four
28 | solo_category: three
29 | order: 4
30 |
31 | aa_smooth:
32 | name: All Around Smooth
33 | heat_length: 2
34 | multi_category: five
35 | order: 5
36 |
--------------------------------------------------------------------------------
/test/fixtures/entries.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | age: B
5 | level: AS
6 | lead: Arthur
7 | follow: Kathryn
8 |
9 | two:
10 | age: B1
11 | level: FS
12 | lead: Arthur
13 | follow: Kathryn
14 |
--------------------------------------------------------------------------------
/test/fixtures/events.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | name: Showcase
5 | location: Ballroom
6 | date: 3rd wednesday in November
7 | heat_range_cat: 0
8 | heat_range_level: 6
9 | heat_range_age: 7
10 | intermix: true
11 | track_ages: true
12 | open_scoring: G
13 |
--------------------------------------------------------------------------------
/test/fixtures/feedbacks.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | order: 1
5 | value: MyString
6 | abbr: MyString
7 |
8 | two:
9 | order: 1
10 | value: MyString
11 | abbr: MyString
12 |
--------------------------------------------------------------------------------
/test/fixtures/files/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/test/fixtures/files/.keep
--------------------------------------------------------------------------------
/test/fixtures/formations.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | person: instructor1
5 | solo: two
6 |
--------------------------------------------------------------------------------
/test/fixtures/heats.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | number: 1
5 | entry: one
6 | category: Closed
7 | dance: waltz
8 |
9 | two:
10 | number: 5
11 | entry: two
12 | category: Open
13 | dance: tango
14 |
15 | three:
16 | number: 2
17 | entry: one
18 | category: Solo
19 | dance: waltz
20 |
21 | four:
22 | number: 3
23 | entry: two
24 | category: Solo
25 | dance: tango
26 |
27 | five:
28 | number: 4
29 | entry: two
30 | category: Multi
31 | dance: aa_smooth
32 |
33 | zero:
34 | number: 0
35 | entry: two
36 | category: Open
37 | dance: waltz
38 |
39 |
--------------------------------------------------------------------------------
/test/fixtures/judges.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | Judy:
4 | person: Judy
5 | sort: back
6 |
--------------------------------------------------------------------------------
/test/fixtures/levels.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | FG:
4 | name: Full Gold
5 |
6 | AG:
7 | name: Assoc. Gold
8 |
9 | FS:
10 | name: Full Silver
11 |
12 | AS:
13 | name: Assoc. Silver
14 |
15 | FB:
16 | name: Full Bronze
17 |
18 | AB:
19 | name: Assoc. Bronze
20 |
21 | N:
22 | name: Newcomer
23 |
--------------------------------------------------------------------------------
/test/fixtures/locations.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | key: florida
5 | name: Florida
6 | latitude: 1.5
7 | longitude: 1.5
8 | user: two
9 | locale: en_US
10 |
11 | two:
12 | key: texas
13 | name: Texas
14 | latitude: 1.5
15 | longitude: 1.5
16 | user: two
17 | locale: en_US
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/test/fixtures/multis.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | parent: aa_smooth
5 | dance: waltz
6 |
7 | two:
8 | parent: aa_smooth
9 | dance: tango
--------------------------------------------------------------------------------
/test/fixtures/package_includes.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | package: one
5 | option: two
6 |
--------------------------------------------------------------------------------
/test/fixtures/people.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | Arthur:
4 | name: Murray, Arthur
5 | studio: one
6 | type: Professional
7 | back: 1
8 | role: Leader
9 |
10 | Kathryn:
11 | name: Murray, Kathryn
12 | studio: two
13 | type: Student
14 | level: FS
15 | age: C
16 | role: Follower
17 |
18 | Judy:
19 | name: Sheindlin, Judy
20 | studio_id: 0
21 | type: Judge
22 | level: FS
23 |
24 | instructor1:
25 | name: One, instructor
26 | studio: one
27 | type: Professional
28 | back: 2
29 | role: Leader
30 |
31 | instructor2:
32 | name: Two, instructor
33 | studio: one
34 | type: Professional
35 | back: 3
36 | role: Leader
37 |
38 | guest:
39 | name: Guest
40 | studio: one
41 | type: Guest
42 |
--------------------------------------------------------------------------------
/test/fixtures/person_options.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | person: Kathryn
5 | option: two
6 |
--------------------------------------------------------------------------------
/test/fixtures/regions.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | type:
5 | code: MyString
6 | location: MyString
7 | latitude: 1.5
8 | longitude: 1.5
9 |
10 | two:
11 | type:
12 | code: MyString
13 | location: MyString
14 | latitude: 1.5
15 | longitude: 1.5
16 |
--------------------------------------------------------------------------------
/test/fixtures/scores.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | judge: Judy
5 | heat: one
6 | value: G
7 |
8 | two:
9 | judge: Judy
10 | heat: two
11 | value: "2"
12 |
--------------------------------------------------------------------------------
/test/fixtures/showcases.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | year: 2022
5 | key: MyString
6 | name: MyString
7 | location: one
8 |
9 | two:
10 | year: 2023
11 | key: MyString
12 | name: MyString
13 | location: two
14 |
--------------------------------------------------------------------------------
/test/fixtures/solos.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | heat: three
5 | combo_dance: tango
6 | order: 1
7 |
8 | two:
9 | heat: four
10 | order: 2
--------------------------------------------------------------------------------
/test/fixtures/songs.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | dance: waltz
5 | order: 1
6 | title: MyString
7 | artist: MyString
8 |
9 | two:
10 | dance: tango
11 | order: 2
12 | title: MyString2
13 | artist: MyString
14 |
--------------------------------------------------------------------------------
/test/fixtures/studio_pairs.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | studio1: one
5 | studio2: two
6 |
--------------------------------------------------------------------------------
/test/fixtures/studios.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | zero:
4 | id: 0
5 | name: 'Event Staff'
6 |
7 | one:
8 | name: One
9 | tables: 1
10 |
11 | two:
12 | name: Two
13 | tables: 2
14 |
15 | three:
16 | name: Three
17 | tables: 3
18 |
--------------------------------------------------------------------------------
/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | one:
4 | userid: joe
5 | password: MyString
6 | email: MyString1@example.com
7 | name1: Joe
8 | name2: MyString
9 | link: http://example.comf/MyString
10 | sites: Two
11 |
12 | two:
13 | userid: jane
14 | password: MyString
15 | email: MyString2@example.com
16 | name1: Jane
17 | name2: MyString
18 | token: MyString
19 | link: http://example.comf/MyString
20 | sites: Two
21 |
--------------------------------------------------------------------------------
/test/helpers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/test/helpers/.keep
--------------------------------------------------------------------------------
/test/integration/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/test/integration/.keep
--------------------------------------------------------------------------------
/test/jobs/send_invoice_job_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class SendInvoiceJobTest < ActiveJob::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/test/mailers/.keep
--------------------------------------------------------------------------------
/test/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/test/models/.keep
--------------------------------------------------------------------------------
/test/models/age_cost_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class AgeCostTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/age_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class AgeTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/billable_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class BillableTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/cat_extension_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class CatExtensionTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/category_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class CategoryTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/dance_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class DanceTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/entry_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class EntryTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/event_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class EventTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/feedback_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class FeedbackTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/formation_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class FormationTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/judge_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class JudgeTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/level_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class LevelTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/location_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class LocationTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/multi_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class MultiTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/package_include_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class PackageIncludeTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/person_option_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class PersonOptionTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/person_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class PersonTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/region_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class RegionTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/score_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ScoreTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/showcase_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class ShowcaseTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/solo_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class SoloTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/song_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class SongTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/studio_pair_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class StudioPairTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/studio_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class StudioTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/user_test.rb:
--------------------------------------------------------------------------------
1 | require "test_helper"
2 |
3 | class UserTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/system/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/test/system/.keep
--------------------------------------------------------------------------------
/test/system/heats_test.rb:
--------------------------------------------------------------------------------
1 | require "application_system_test_case"
2 |
3 | class HeatsTest < ApplicationSystemTestCase
4 | setup do
5 | @heat = heats(:one)
6 | end
7 |
8 | test "visiting the index" do
9 | visit heats_url
10 | assert_selector "h1", text: "Agenda"
11 | end
12 |
13 | test "should update Heat" do
14 | visit person_url(people(:Kathryn))
15 | page.all('td', text: 'Open').last.hover
16 | click_on "Edit"
17 |
18 | select "Full Gold", from: "heat_level"
19 | click_on "Update Heat"
20 |
21 | assert_text "Heat was successfully updated"
22 | click_on "Back"
23 | end
24 |
25 | test "should scratch Heat" do
26 | visit person_url(people(:Kathryn))
27 | page.find('td', text: 'Closed').hover
28 | click_on "Edit"
29 |
30 | click_on "Scratch this heat"
31 |
32 | assert_text "Heat was successfully scratched"
33 | end
34 | end
35 |
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] ||= "test"
2 | require_relative "../config/environment"
3 | require "rails/test_help"
4 |
5 | class ActiveSupport::TestCase
6 | # Run tests in parallel with specified workers
7 | parallelize(workers: :number_of_processors)
8 |
9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
10 | fixtures :all
11 |
12 | # Add more helper methods to be used by all tests here...
13 | end
14 |
--------------------------------------------------------------------------------
/tmp/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/tmp/.keep
--------------------------------------------------------------------------------
/tmp/pids/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/tmp/pids/.keep
--------------------------------------------------------------------------------
/tmp/storage/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/tmp/storage/.keep
--------------------------------------------------------------------------------
/utils/mapper/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mapper",
3 | "type": "module",
4 | "dependencies": {
5 | "d3-geo": "^3.1.0",
6 | "shapefile": "^0.6.6",
7 | "yaml": "^2.3.2",
8 | "yauzl-promise": "^4.0.0"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/vendor/.keep
--------------------------------------------------------------------------------
/vendor/javascript/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubys/showcase/48f124a05fba08907b045e4568db123fdb93a113/vendor/javascript/.keep
--------------------------------------------------------------------------------