├── .dockerignore ├── .env.local.example ├── .env.test.local.example ├── .envrc ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .rubocop.yml ├── .ruby-version ├── .vscode ├── launch.json └── settings.json ├── .well-known └── apple-app-site-association ├── Dockerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── LICENSE-CC-BY-SA ├── Procfile ├── README.md ├── Rakefile ├── app.json ├── app ├── assets │ ├── config │ │ └── manifest.js │ ├── images │ │ ├── App_Store.svg │ │ ├── GitHub-Mark-32px.png │ │ ├── Insider_Connected_Dark_Horizontal.png │ │ ├── Insider_Connected_Light_Horizontal.png │ │ ├── PPM-Splash-200.png │ │ ├── PPM-SplashTile-BW-Inverted-blue.png │ │ ├── PPM-SplashTile-BW-Inverted.png │ │ ├── PPM-SplashTile-BW-Simple.png │ │ ├── Stern-Logo-sm.png │ │ ├── bayarea │ │ │ ├── bayarea_PPE.jpg │ │ │ ├── bayarea_nes.jpg │ │ │ ├── bayarea_pinball.png │ │ │ └── bayarea_playland.jpg │ │ ├── bc │ │ │ ├── bc-about-2.jpg │ │ │ ├── bc-about.jpg │ │ │ ├── bc-links-2.jpg │ │ │ ├── bc-links.jpg │ │ │ └── vrpa-logo.jpg │ │ ├── beanie-three-500.jpg │ │ ├── become_a_patron_button@2x.png │ │ ├── champaign │ │ │ └── ipa-logo.jpg │ │ ├── chicago │ │ │ └── Pinball-Chicago-Logo.png │ │ ├── cleo.png │ │ ├── comment-sprites.png │ │ ├── confirm-sprites.png │ │ ├── contact-sprites.png │ │ ├── danny-pouch.jpg │ │ ├── donate-sprites.png │ │ ├── feed-icon-10x10.png │ │ ├── feed-icon-14x14.png │ │ ├── fonts │ │ │ ├── nunito-v25-latin-500.woff2 │ │ │ ├── nunito-v25-latin-600.woff2 │ │ │ ├── nunito-v25-latin-700.woff2 │ │ │ ├── nunito-v25-latin-800.woff2 │ │ │ ├── nunito-v25-latin-900.woff2 │ │ │ ├── nunito-v25-latin-italic.woff2 │ │ │ └── nunito-v25-latin-regular.woff2 │ │ ├── google-play-badge.png │ │ ├── iOS-icon-11.png │ │ ├── icon-bw.svg │ │ ├── icon-color-noBGsvg.svg │ │ ├── icons │ │ │ ├── airport.svg │ │ │ ├── bank.svg │ │ │ ├── beach.svg │ │ │ ├── bed.svg │ │ │ ├── beer.svg │ │ │ ├── billiards.svg │ │ │ ├── bowling.svg │ │ │ ├── castle.svg │ │ │ ├── clock-time-four-outline.svg │ │ │ ├── comment-quote.svg │ │ │ ├── comment-text.svg │ │ │ ├── confirm-location.svg │ │ │ ├── confirm_location.svg │ │ │ ├── details.svg │ │ │ ├── dice-5.svg │ │ │ ├── dice-d20.svg │ │ │ ├── family-restroom.svg │ │ │ ├── fast-food-sharp.svg │ │ │ ├── ferris-wheel.svg │ │ │ ├── food.svg │ │ │ ├── golf.svg │ │ │ ├── handball.svg │ │ │ ├── heart-empty.svg │ │ │ ├── heart-filled.svg │ │ │ ├── ic_no.svg │ │ │ ├── ic_unknown.svg │ │ │ ├── ic_yes.svg │ │ │ ├── ice-cream.svg │ │ │ ├── image.svg │ │ │ ├── lead-pencil.svg │ │ │ ├── link-variant.svg │ │ │ ├── local-bar.svg │ │ │ ├── music.svg │ │ │ ├── new_condition.svg │ │ │ ├── new_lmx.svg │ │ │ ├── new_msx.svg │ │ │ ├── newspaper-variant-multiple-outline.svg │ │ │ ├── newspaper-variant-outline.svg │ │ │ ├── notebook-outline.svg │ │ │ ├── numeric.svg │ │ │ ├── pasta.svg │ │ │ ├── phone.svg │ │ │ ├── pizza.svg │ │ │ ├── plus.svg │ │ │ ├── remove_machine.svg │ │ │ ├── roller-skate.svg │ │ │ ├── space-invaders.svg │ │ │ ├── star.svg │ │ │ ├── store.svg │ │ │ ├── tent.svg │ │ │ ├── theater.svg │ │ │ ├── ticket-confirmation.svg │ │ │ ├── trash-can-outline.svg │ │ │ ├── tshirt-crew.svg │ │ │ ├── web.svg │ │ │ ├── wine-bottle.svg │ │ │ └── wrench-outline.svg │ │ ├── iowa │ │ │ └── iowa-pinball-club-logo.png │ │ ├── kineticist.png │ │ ├── la │ │ │ └── la_pinball.jpg │ │ ├── launcher.png │ │ ├── lightbox │ │ │ ├── close.png │ │ │ ├── loading.gif │ │ │ ├── next.png │ │ │ └── prev.png │ │ ├── lpurple-machine.png │ │ ├── machine-pink.png │ │ ├── map_loading.gif │ │ ├── mappin-logo-600.orig.png │ │ ├── marker-1.png │ │ ├── marker-10-sel.png │ │ ├── marker-10.png │ │ ├── marker-2-1-sel.png │ │ ├── marker-2.png │ │ ├── marker-z-1-noShadow.png │ │ ├── marker-z-1.png │ │ ├── marker-z-10-noShadow.png │ │ ├── marker-z-10.png │ │ ├── marker-z-2-noShadow.png │ │ ├── marker-z-2.png │ │ ├── marker-z-sel.png │ │ ├── meta-sprites.png │ │ ├── my-location.svg │ │ ├── new-mexico │ │ │ └── dukecitypinball-logo.png │ │ ├── oldgraphic.png │ │ ├── open-in-new-black.png │ │ ├── open-in-new.png │ │ ├── pbm-both-stickers.png │ │ ├── pbm-gold-sticker.jpg │ │ ├── pbm-og-image.jpg │ │ ├── pbm-og-image.png │ │ ├── pbm-pink-sticker.jpg │ │ ├── pbm-play-store-2.png │ │ ├── pbm-shirt-web.jpg │ │ ├── pinball.png │ │ ├── pinballmap-logo-base4.png │ │ ├── pinballmap-logo.png │ │ ├── pinballmap-qr.png │ │ ├── pinballmapcom.jpg │ │ ├── pinballmapcom_nocom.png │ │ ├── pinballmapcom_nodot.png │ │ ├── playing.jpg │ │ ├── portland │ │ │ ├── app_logo-350.jpg │ │ │ └── sassy.jpg │ │ ├── purple-machine.png │ │ ├── rank │ │ │ ├── GlobalAdministrator.png │ │ │ ├── GrandChampMapper.png │ │ │ ├── LegendaryMapper.png │ │ │ ├── RegionalAdministrator.png │ │ │ └── SuperMapper.png │ │ ├── sacramento │ │ │ └── sacramento-isspecial.jpg │ │ ├── sassy.jpg │ │ ├── search_icon.png │ │ ├── sol-icon.jpeg │ │ ├── splash-icon-128.png │ │ ├── stack-dokku-logo.svg │ │ ├── stack-expo-logo.png │ │ ├── stack-scout-logo.png │ │ ├── sticker.jpg │ │ ├── stickers.jpg │ │ ├── teardrop.png │ │ ├── teardrop200.png │ │ ├── treasure-map-opacity.png │ │ ├── treasure-map.png │ │ ├── tshirt-pbm-back-500.jpg │ │ ├── tshirt-pbm-front-500.jpg │ │ ├── tshirt-portland-500.jpg │ │ └── user.png │ ├── javascripts │ │ ├── .gitkeep │ │ ├── application.js.erb │ │ ├── lightbox.min.js │ │ ├── map_style.js.erb │ │ └── map_style_dark.js.erb │ └── stylesheets │ │ ├── actiontext.css │ │ ├── application.scss.erb │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── lightbox.css.erb │ │ ├── mediaqueries.css │ │ ├── mobile-application.scss.erb │ │ ├── normalize.css │ │ └── rails_admin │ │ └── custom │ │ └── theming.scss ├── controllers │ ├── api │ │ └── v1 │ │ │ ├── location_machine_xrefs_controller.rb │ │ │ ├── location_picture_xrefs_controller.rb │ │ │ ├── location_types_controller.rb │ │ │ ├── locations_controller.rb │ │ │ ├── machine_conditions_controller.rb │ │ │ ├── machine_groups_controller.rb │ │ │ ├── machine_score_xrefs_controller.rb │ │ │ ├── machines_controller.rb │ │ │ ├── operators_controller.rb │ │ │ ├── region_link_xrefs_controller.rb │ │ │ ├── regions_controller.rb │ │ │ ├── statuses_controller.rb │ │ │ ├── user_submissions_controller.rb │ │ │ ├── users_controller.rb │ │ │ └── zones_controller.rb │ ├── application_controller.rb │ ├── banned_ips_controller.rb │ ├── events_controller.rb │ ├── location_machine_xrefs_controller.rb │ ├── location_picture_xrefs_controller.rb │ ├── location_types_controller.rb │ ├── locations_controller.rb │ ├── machine_conditions_controller.rb │ ├── machine_groups_controller.rb │ ├── machine_score_xrefs_controller.rb │ ├── machines_controller.rb │ ├── maps_controller.rb │ ├── operators_controller.rb │ ├── pages_controller.rb │ ├── passwords_controller.rb │ ├── region_link_xrefs_controller.rb │ ├── registrations_controller.rb │ ├── sessions_controller.rb │ ├── statuses_controller.rb │ ├── suggested_locations_controller.rb │ ├── user_submissions_controller.rb │ ├── users_controller.rb │ └── zones_controller.rb ├── helpers │ ├── application_helper.rb │ ├── locations_helper.rb │ └── pages_helper.rb ├── jobs │ └── application_job.rb ├── mailboxes │ └── application_mailbox.rb ├── mailers │ ├── admin_mailer.rb │ ├── application_mailer.rb │ ├── error_mailer.rb │ └── operator_mailer.rb ├── models │ ├── ability.rb │ ├── application_record.rb │ ├── banned_ip.rb │ ├── country.rb │ ├── event.rb │ ├── location.rb │ ├── location_machine_xref.rb │ ├── location_picture_xref.rb │ ├── location_type.rb │ ├── machine.rb │ ├── machine_condition.rb │ ├── machine_group.rb │ ├── machine_score_xref.rb │ ├── operator.rb │ ├── region.rb │ ├── region_link_xref.rb │ ├── status.rb │ ├── suggested_location.rb │ ├── user.rb │ ├── user_fave_location.rb │ ├── user_submission.rb │ └── zone.rb └── views │ ├── active_storage │ └── blobs │ │ └── _blob.html.erb │ ├── admin_mailer │ ├── send_admin_notification.html.haml │ ├── send_admin_notification.txt.haml │ ├── send_daily_digest_global_machine_condition_email.html.haml │ ├── send_daily_digest_global_machine_condition_email.txt.haml │ ├── send_daily_digest_global_machine_removal_email.html.haml │ ├── send_daily_digest_global_machine_removal_email.txt.haml │ ├── send_daily_digest_global_picture_added_email.html.haml │ ├── send_daily_digest_global_picture_added_email.txt.haml │ ├── send_daily_digest_machine_condition_email.html.haml │ ├── send_daily_digest_machine_condition_email.txt.haml │ ├── send_daily_digest_machine_removal_email.html.haml │ ├── send_daily_digest_machine_removal_email.txt.haml │ ├── send_daily_digest_picture_added_email.html.haml │ ├── send_daily_digest_picture_added_email.txt.haml │ ├── send_new_location_notification.html.haml │ ├── send_new_location_notification.txt.haml │ ├── send_weekly_admin_digest.html.haml │ ├── send_weekly_admin_digest.txt.haml │ ├── send_weekly_admin_digest_global.html.haml │ └── send_weekly_admin_digest_global.text.haml │ ├── devise │ ├── confirmations │ │ └── new.html.erb │ ├── mailer │ │ ├── confirmation_instructions.html.erb │ │ ├── email_changed.html.erb │ │ ├── password_change.html.erb │ │ ├── reset_password_instructions.html.erb │ │ └── unlock_instructions.html.erb │ ├── passwords │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── registrations │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── sessions │ │ └── new.html.erb │ ├── shared │ │ ├── _error_messages.html.erb │ │ └── _links.erb │ └── unlocks │ │ └── new.html.erb │ ├── error_mailer │ ├── rake_task_error.html.haml │ └── rake_task_error.txt.haml │ ├── events │ └── index.html.haml │ ├── layouts │ ├── action_text │ │ └── contents │ │ │ └── _content.html.erb │ ├── application.html.haml │ ├── mailer.html.haml │ └── mailer.text.haml │ ├── location_machine_xrefs │ ├── _backglass.html.haml │ ├── _ic_button.html.haml │ ├── _kineticist.html.haml │ ├── _list_machine.html.haml │ ├── _machine_tools.html.haml │ ├── _pintips.html.haml │ ├── _remove_machine.html.haml │ ├── _render_machine_tools.html.haml │ ├── _update_machine_condition.html.haml │ ├── create.html.haml │ └── index.rss.builder │ ├── location_picture_xrefs │ ├── _add_picture.html.haml │ ├── _form.html.haml │ ├── _remove_picture.html.haml │ └── _show_thumbs.html.haml │ ├── locations │ ├── _add_machine.html.haml │ ├── _form.html.haml │ ├── _former_machines.html.haml │ ├── _locations.html.haml │ ├── _recent_activity.html.haml │ ├── _render_add_machine.html.haml │ ├── _render_former_machines.html.haml │ ├── _render_last_updated.html.haml │ ├── _render_location_detail.html.haml │ ├── _render_locations.html.haml │ ├── _render_machine_conditions.html.haml │ ├── _render_machines.html.haml │ ├── _render_machines_count.html.haml │ ├── _render_recent_activity.html.haml │ ├── _render_scores.html.haml │ ├── _render_update_metadata.html.haml │ ├── _show_machines.html.haml │ ├── confirm.html.haml │ ├── mobile.html.haml │ └── unknown_route.html.haml │ ├── machine_conditions │ └── _show_machine_conditions.html.haml │ ├── machine_score_xrefs │ ├── _add_high_score.html.haml │ ├── _show_high_scores.html.haml │ └── index.rss.builder │ ├── maps │ ├── _nearby_activity.html.haml │ ├── albuquerque │ │ └── region.html.haml │ ├── bayarea │ │ └── region.html.haml │ ├── iowa │ │ └── region.html.haml │ ├── jacksonville │ │ └── region.html.haml │ ├── la │ │ └── region.html.haml │ ├── map.html.haml │ ├── minnesota │ │ └── region.html.haml │ ├── operators.html.haml │ ├── portland │ │ └── region.html.haml │ ├── region.html.haml │ └── sacramento │ │ └── region.html.haml │ ├── operator_mailer │ ├── send_daily_digest_operator_email.html.haml │ └── send_daily_digest_operator_email.txt.haml │ ├── pages │ ├── _footer.html.haml │ ├── _header.html.haml │ ├── _intro.html.haml │ ├── _menu.html.haml │ ├── _render_activity.html.haml │ ├── about.html.haml │ ├── activity.html.haml │ ├── app.html.haml │ ├── contact.html.haml │ ├── contact_sent.html.haml │ ├── donate.html.haml │ ├── faq.html.haml │ ├── flier.html.haml │ ├── high_rollers.html.haml │ ├── home.html.haml │ ├── inspire_profile.html.haml │ ├── links.html.haml │ ├── privacy.html.haml │ ├── stats.html.haml │ ├── store.html.haml │ ├── submitted_new_location.html.haml │ └── suggest_new_location.html.haml │ ├── rails_admin │ └── main │ │ ├── _convert_suggested_location_to_location.html.haml │ │ ├── _country_select.html.haml │ │ ├── _location_select.html.haml │ │ ├── _location_type_select.html.haml │ │ ├── _operator_select.html.haml │ │ ├── _region_edit.html.haml │ │ ├── _region_name_edit.html.haml │ │ ├── _region_user.html.haml │ │ └── _zone_select.html.haml │ └── users │ ├── _render_user_flag.html.haml │ └── profile.html.haml ├── bin ├── brakeman ├── bundle ├── bundle-audit ├── bundler-audit ├── debug ├── dev ├── jobs ├── rails ├── rake ├── rspec ├── rubocop ├── setup ├── update └── yarn ├── config.ru ├── config ├── application.rb ├── authorization_rules.rb ├── boot.rb ├── brakeman.ignore ├── cable.yml ├── cache.yml ├── credentials.yml.enc ├── database.yml ├── database.yml.docker ├── database.yml.example ├── database.yml.non_docker ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ ├── staging.rb │ └── test.rb ├── initializers │ ├── apipie.rb │ ├── application_controller_renderer.rb │ ├── assets.rb │ ├── backtrace_silencers.rb │ ├── content_security_policy.rb │ ├── cookies_serializer.rb │ ├── countries.rb │ ├── devise.rb │ ├── filter_parameter_logging.rb │ ├── geocoder.rb │ ├── inflections.rb │ ├── kaminari_config.rb │ ├── mime_types.rb │ ├── pagy.rb │ ├── paper_trail.rb │ ├── permissions_policy.rb │ ├── phonelib.rb │ ├── rack_attack.rb │ ├── rails_admin.rb │ ├── rails_admin.rb.example │ ├── rails_admin_paper_trail.rb │ ├── session_store.rb │ ├── simple_token_authentication.rb │ └── wrap_parameters.rb ├── locales │ ├── devise.bg.yml │ ├── devise.de.yml │ ├── devise.en.yml │ ├── devise.es.yml │ ├── devise.fi.yml │ ├── devise.lt.yml │ ├── devise.mn.yml │ ├── devise.pt-BR.yml │ ├── devise.pt-PT.yml │ ├── devise.ru.yml │ ├── devise.sv.yml │ ├── devise.tr.yml │ ├── devise.uk.yml │ ├── devise.zh_cn.yml │ ├── en.yml │ ├── rails_admin.bg.yml │ ├── rails_admin.da.yml │ ├── rails_admin.de.yml │ ├── rails_admin.en.yml │ ├── rails_admin.es.yml │ ├── rails_admin.fi.yml │ ├── rails_admin.fr.yml │ ├── rails_admin.lt.yml │ ├── rails_admin.lv.yml │ ├── rails_admin.mn.yml │ ├── rails_admin.pl.yml │ ├── rails_admin.pt-BR.yml │ ├── rails_admin.pt-PT.yml │ ├── rails_admin.ru.yml │ ├── rails_admin.sv.yml │ ├── rails_admin.tr.yml │ ├── rails_admin.uk.yml │ └── rails_admin.zh_cn.yml ├── puma.rb ├── queue.yml ├── recurring.yml ├── robots.production.txt ├── robots.staging.txt ├── routes.rb ├── scout_apm.yml ├── spring.rb └── storage.yml ├── db ├── cache_migrate │ └── 20250421030130_create_cache_table.rb ├── cache_schema.rb ├── migrate │ ├── 20101029034449_devise_create_users.rb │ ├── 20101029051956_create_locations.rb │ ├── 20101107193735_create_machines.rb │ ├── 20101217210700_create_location_machine_xrefs.rb │ ├── 20101218055651_location_machine_xref_has_one_location.rb │ ├── 20110104033947_add_zone_id_to_location.rb │ ├── 20110104034353_create_zones.rb │ ├── 20110106015040_add_condition_and_condition_date_to_location_machine_xrefs.rb │ ├── 20110108190631_add_model_machine_score_xref.rb │ ├── 20110109031830_add_rank_to_machine_score_xrefs.rb │ ├── 20110109033611_change_machine_score_xref_rank_to_integer.rb │ ├── 20110109061136_create_region.rb │ ├── 20110109202100_add_region_id_to_location.rb │ ├── 20110109233904_add_full_name_to_region.rb │ ├── 20110112031846_create_histories_table.rb │ ├── 20110113014924_add_motd_to_region.rb │ ├── 20110113015641_add_region_id_to_user.rb │ ├── 20110212001944_create_events.rb │ ├── 20110217044158_create_location_picture_xrefs.rb │ ├── 20110218024542_add_photo_to_location_picture_xrefs.rb │ ├── 20110221234445_add_lat_to_region.rb │ ├── 20110221234515_add_lon_to_region.rb │ ├── 20110221234608_add_n_search_no_to_region.rb │ ├── 20110222000458_create_operators.rb │ ├── 20110222001631_add_short_name_to_zone.rb │ ├── 20110222001739_add_is_primary_to_zone.rb │ ├── 20110222002318_add_ip_to_machine_score_xref.rb │ ├── 20110222053847_add_operator_id_to_location_machine_xref.rb │ ├── 20110222054539_add_ip_to_location_machine_xref.rb │ ├── 20110222060400_change_description_from_string_to_text.rb │ ├── 20110222061738_change_score_from_int_to_bigint.rb │ ├── 20110223052335_add_description_to_location_picture_xref.rb │ ├── 20110324054350_add_index_to_location_id_and_machine_id_on_location_machine_xrefs.rb │ ├── 20110325055510_add_location_machine_xref_index_on_machine_score_xrefs.rb │ ├── 20110325061757_location_id_indx_on_location_picture_xrefs.rb │ ├── 20110331234837_add_user_id_to_machine_score_xref.rb │ ├── 20110331235611_remove_initals_from_machine_score_xrefs.rb │ ├── 20110401001017_add_initials_to_users.rb │ ├── 20110416203328_add_approved_to_location_picture_xref.rb │ ├── 20110416204407_add_user_id_to_location_picture_xref.rb │ ├── 20110416205031_remove_location_picture_xref_no_from_location_picture_xref.rb │ ├── 20110416231605_create_region_links_xref_table.rb │ ├── 20110416232037_add_category_and_region_id_to_region_link_xref.rb │ ├── 20110419023435_add_sort_order_to_region_link_xref.rb │ ├── 20110428031156_add_user_id_to_location_machine_xref.rb │ ├── 20110428052920_create_location_types.rb │ ├── 20110428053024_add_name_to_location_type.rb │ ├── 20110428054244_add_location_type_id_to_locations.rb │ ├── 20110429005401_add_category_to_events.rb │ ├── 20110505231652_add_desc_to_locations.rb │ ├── 20110509032221_add_machine_score_xrefs_count_to_location_machine_xrefs.rb │ ├── 20110512032510_add_initials_to_machine_score_xrefs.rb │ ├── 20110520155736_add_operator_id_to_locations.rb │ ├── 20110520160215_remove_operator_id_from_location_machine_xrefs.rb │ ├── 20110527230812_rename_histories_to_rails_admin_histories.rb │ ├── 20110528183055_rename_location_desc_to_location_description.rb │ ├── 20110528184008_rename_link_on_events_to_external_link.rb │ ├── 20120121231029_add_default_search_type_to_region.rb │ ├── 20120331225504_add_should_email_machine_removal_to_regions.rb │ ├── 20120407204619_remove_remember_token_from_users.rb │ ├── 20120407205003_add_reset_password_sent_at_to_users.rb │ ├── 20120520190325_add_attachment_photo_to_location_picture_xrefs.rb │ ├── 20120520190845_remove_photo_from_location_picture_xref.rb │ ├── 20130303070120_add_ipdb_link_to_machines.rb │ ├── 20130303070426_add_year_to_machines.rb │ ├── 20130303070529_add_manufacturer_to_machines.rb │ ├── 20130413173205_add_is_machine_admin_to_users.rb │ ├── 20130510024658_add_is_primary_email_contact_to_user.rb │ ├── 20130713014626_add_is_super_admin_to_user.rb │ ├── 20131019021843_add_external_location_name_to_events.rb │ ├── 20140329173540_create_banned_ips.rb │ ├── 20140329174930_add_ip_address_to_banned_i_ps.rb │ ├── 20140612173934_change_region_lat_lon_to_numerics.rb │ ├── 20140816200939_add_ifpa_calendar_id_to_events.rb │ ├── 20140816200950_add_ifpa_tournament_id_to_events.rb │ ├── 20140913204019_createmachinegroup.rb │ ├── 20140913204322_add_machine_group_id_to_machines.rb │ ├── 20150128151820_create_machine_comments.rb │ ├── 20150128155902_rename_machine_comment_to_machine_condition.rb │ ├── 20150926235940_add_date_last_updated_to_locations.rb │ ├── 20150928221835_add_ipdb_id_to_machines.rb │ ├── 20151016185205_add_user_submission.rb │ ├── 20151017212853_add_should_auto_delete_empty_locations_to_region.rb │ ├── 20151102053730_add_indexes.rb │ ├── 20151230222502_add_user_id_to_user_submissions.rb │ ├── 20160102205629_add_username_to_users.rb │ ├── 20160403220735_add_confirmable_to_user.rb │ ├── 20160425025650_add_is_disabled_to_users.rb │ ├── 20160428022137_add_user_id_to_machine_condition.rb │ ├── 20160428033749_add_last_updated_by_user_id_to_location.rb │ ├── 20160521200326_add_authentication_token_to_users.rb │ ├── 20160828174541_remove_initials_from_machine_score_xref.rb │ ├── 20160828192015_remove_rank_from_machine_score_xrefs.rb │ ├── 20160911181659_add_meta_fields_to_user_submissions.rb │ ├── 20160912054027_remove_location_machine_xref_id_from_user_submissions.rb │ ├── 20170306034705_re_add_rank_to_machine_score_xrefs.rb │ ├── 20170325210202_addsend_digest_comment_emails.rb │ ├── 20170325210403_addsend_digest_removal_emails.rb │ ├── 20170418033559_add_table_suggested_location.rb │ ├── 20170625051130_add_default_value_to_region_motd.rb │ ├── 20170813032145_add_timestamps_to_suggested_location.rb │ ├── 20180214052824_add_zone_id_to_suggested_locations.rb │ ├── 20180322035017_add_is_stern_army_to_locations.rb │ ├── 20180412042101_add_state_to_region.rb │ ├── 20180501030619_updateall_rails_admin_history_chars_to_be_text.rb │ ├── 20180527033929_add_county_to_locations.rb │ ├── 20180528154913_add_county_to_suggested_locations.rb │ ├── 20180713045044_add_opdb_id_to_machine.rb │ ├── 20180803024507_add_user_id_index_to_machine_condition.rb │ ├── 20180803024743_add_user_id_index_to_locations.rb │ ├── 20180826144303_remove_approved_from_location_picture_xref.rb │ ├── 20180921032336_add_index_to_locations_is_stern_army.rb │ ├── 20181108041556_create_table_user_fave_location.rb │ ├── 20190302181011_add_effective_radius_to_region.rb │ ├── 20190405035609_add_devise_recoverable_to_user.rb │ ├── 20200902061504_add_security_test_to_user.rb │ ├── 20210112043456_change_location_description_from_string_to_text.rb │ ├── 20210413230424_add_icon_to_location_type.rb │ ├── 20211004024618_add_opdb_img_to_machine.rb │ ├── 20220214041241_add_opdb_img_height_to_machine.rb │ ├── 20220214041302_add_opdb_img_width_to_machine.rb │ ├── 20220513054325_drop_banned_ip_table.rb │ ├── 20220526191634_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb │ ├── 20220602214055_create_active_storage_tables.active_storage.rb │ ├── 20220603045549_set_precision_and_scale_to_location_lat_lon.rb │ ├── 20230117183500_add_machine_type_to_machines.rb │ ├── 20230117183514_add_machine_display_to_machines.rb │ ├── 20230121051546_add_fields_to_user_submissions.rb │ ├── 20230207174539_add_ic_eligible_to_machines.rb │ ├── 20230207174826_add_ic_enabled_to_location_machine_xrefs.rb │ ├── 20230207174904_add_ic_active_to_location.rb │ ├── 20230220182301_add_city_to_user_submissions.rb │ ├── 20230406181953_add_service_name_to_active_storage_blobs.active_storage.rb │ ├── 20230406181954_create_active_storage_variant_records.active_storage.rb │ ├── 20230406181955_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb │ ├── 20230406195153_create_versions.rb │ ├── 20230406195154_add_object_changes_to_versions.rb │ ├── 20230406195207_create_version_associations.rb │ ├── 20230406195208_add_transaction_id_column_to_versions.rb │ ├── 20230504162149_create_status.rb │ ├── 20230518001533_add_user_submissions_count_to_users.rb │ ├── 20230702162416_create_banned_ips_again.rb │ ├── 20231025185948_add_columns_to_user_submissions.rb │ ├── 20240403171756_add_kineticist_url_to_machines.rb │ ├── 20240520232037_remove_ip_from_machine_score_xrefs.rb │ ├── 20240521020441_remove_ip_from_location_machine_xrefs.rb │ ├── 20240521021315_remove_condition_from_location_machine_xrefs.rb │ ├── 20240521021328_remove_condition_date_from_location_machine_xrefs.rb │ ├── 20240703041704_add_user_id_to_suggested_locations.rb │ ├── 20240812034312_add_unaccent_to_locations.rb │ ├── 20240817222440_add_fast_search_indexes.rb │ ├── 20240909234323_drop_ssw_tmp_weird_empty_lmxes_table.rb │ ├── 20240910004435_sequences_start_at_one.rb │ ├── 20241112193702_create_cache.rb │ ├── 20241117183403_add_flag_to_users.rb │ ├── 20241126054618_add_submission_counts_to_users.rb │ ├── 20241127051246_add_contributor_rank_to_users.rb │ ├── 20241127054132_add_admin_rank_to_users.rb │ ├── 20241127215612_fix_admin_rank_column_name.rb │ ├── 20241128052830_fix_users_table_defaults.rb │ ├── 20241128060236_fix_users_table_defaults_again.rb │ ├── 20250129200229_create_action_text_tables.action_text.rb │ ├── 20250129200703_create_action_mailbox_tables.action_mailbox.rb │ ├── 20250211002039_add_machines_count_to_locations.rb │ ├── 20250319234408_remove_security_test_from_users.rb │ ├── 20250320222320_create_queue.rb │ ├── 20250601172559_add_notes_to_users.rb │ └── 20250816041323_add_counts_to_locations.rb ├── queue_migrate │ └── 20250320222320_create_queue.rb ├── seeds.rb └── structure.sql ├── docker-compose.postgres.yml ├── docker-compose.yml ├── lib ├── database │ └── scrub_db.sql ├── middleware │ └── semicolon_handling.rb ├── tasks │ ├── .gitkeep │ ├── delete_expired_events.rake │ ├── delete_opted_in_empty_locations.rake │ ├── dump_scrubbed_db.rake │ ├── import_ifpa_tournaments.rake │ ├── migrate_paperclip.rake │ ├── notify_admins.rake │ ├── notify_operators.rake │ ├── notify_super_admins.rake │ ├── rubocop.rake │ ├── tag_opdb_changelog.rake │ ├── tag_opdb_image.rake │ └── tag_opdb_type.rake └── templates │ └── erb │ └── scaffold │ └── _form.html.erb ├── nginx.conf.sigil ├── public ├── .well-known │ ├── acme-challenge │ │ ├── 2ClWWNiufoSau_5Wi8pEW_jvpmE-5L_yCWL3B7_npJM │ │ ├── RVf89qr5-7C5-Kzj7lzCjWhOabbCZ9EvJQXbOwPJOmA │ │ ├── Zg8qDnKQKAKe6bSlWYEgG-VlLTUYCDiVdXUmVI9qmVk │ │ ├── dQtx7qOyGj_D-OsTCW9dYWcAI0gO3FDwehI5cWjrSRc │ │ └── wF4vlQfRne9FRNwaEooLuqhosUiP-yscNQh500YDugg │ ├── apple-app-site-association │ └── assetlinks.json ├── 400.html ├── 404.html ├── 406-unsupported-browser.html ├── 422.html ├── 500.html ├── apple-touch-icon-120x120-precomposed.png ├── apple-touch-icon-120x120.png ├── apple-touch-icon-152x152-precomposed.png ├── apple-touch-icon-152x152.png ├── apple-touch-icon-precomposed.png ├── apple-touch-icon.png ├── favicon.ico ├── icon-192.png ├── icon-512.png ├── icon.png ├── icon.svg └── manifest.webmanifest ├── spec ├── controllers │ ├── application_controller_spec.rb │ ├── location_machine_xrefs_controller_spec.rb │ ├── location_picture_xrefs_controller_spec.rb │ ├── locations_controller_spec.rb │ ├── machine_conditions_controller_spec.rb │ ├── pages_controller_spec.rb │ └── suggested_locations_controller_spec.rb ├── factories.rb ├── features │ ├── location_machine_conditions_cache_spec.rb │ ├── location_machine_xrefs_controller_spec.rb │ ├── locations_controller_spec.rb │ ├── machine_score_xrefs_controller_spec.rb │ ├── maps_controller_spec.rb │ ├── pages_controller_spec.rb │ └── users_spec.rb ├── fixtures │ └── files │ │ └── PPM-Splash-200.png ├── helpers │ ├── locations_helper_spec.rb │ └── pages_helper_spec.rb ├── mailers │ ├── admin_spec.rb │ ├── operator_spec.rb │ └── previews │ │ ├── admin_preview.rb │ │ └── operator_preview.rb ├── models │ ├── event_spec.rb │ ├── location_machine_xref_spec.rb │ ├── location_spec.rb │ ├── location_type_spec.rb │ ├── machine_condition_spec.rb │ ├── machine_score_xref_spec.rb │ ├── machine_spec.rb │ ├── operator_spec.rb │ ├── region_spec.rb │ ├── suggested_location.rb │ └── user_spec.rb ├── requests │ └── api │ │ └── v1 │ │ ├── location_machine_xrefs_controller_spec.rb │ │ ├── location_picture_xrefs_controller_spec.rb │ │ ├── locations_controller_spec.rb │ │ ├── machine_conditions_controller_spec.rb │ │ ├── machine_groups_controller_spec.rb │ │ ├── machine_score_xrefs_controller_spec.rb │ │ ├── machines_controller_spec.rb │ │ ├── operators_controller_spec.rb │ │ ├── regions_controller_spec.rb │ │ ├── statuses_controller_spec.rb │ │ ├── user_submissions_controller_spec.rb │ │ └── users_controller_spec.rb ├── spec_helper.rb └── support │ ├── controller_helpers.rb │ └── feature_helpers.rb └── test └── fixtures └── action_text └── rich_texts.yml /.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git 3 | logs/ 4 | tmp/.dockerignore 5 | -------------------------------------------------------------------------------- /.env.local.example: -------------------------------------------------------------------------------- 1 | # Database URL for docker-compose use. Keep commented if using locally installed postgres. 2 | # DATABASE_URL=postgres://postgres:postgres@localhost:5432/pbm 3 | 4 | # Override default Rails Port optionally 5 | PORT=3000 6 | MAPBOX_KEY=placeholder 7 | WEB_CONCURRENCY=0 # run in solo mode instead of clustering for development 8 | AWS_SECRET_ACCESS_KEY= 9 | AWS_ACCESS_KEY_ID= 10 | AWS_REGION= 11 | AWS_BUCKET_NAME= 12 | GOOGLE_MAPS_API_KEY= 13 | HERE_MAPS_API_KEY= 14 | MAPBOX_DEV_API_KEY= 15 | PMTILES_GLYPHS= 16 | PMTILES_SPRITE= 17 | PMTILES_URL= 18 | -------------------------------------------------------------------------------- /.env.test.local.example: -------------------------------------------------------------------------------- 1 | # Set this to true if you want to see the chrome instance during testing 2 | NO_HEADLESS_CHROME=false 3 | 4 | # Use if you need a special chrome path during testing 5 | # CHROME_SERVICE_PATH= 6 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | # Load .env variables automatically with direnv 2 | # http://direnv.net/ 3 | 4 | # if [ -e ./.env ] 5 | # then 6 | # dotenv 7 | # fi 8 | 9 | if [ -e ./.env.local ] 10 | then 11 | dotenv .env.local 12 | fi 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swo 2 | *.swp 3 | *.bundle 4 | db/*.sqlite3 5 | log/*.log 6 | tmp/**/* 7 | public/uploads/ 8 | .DS_Store 9 | coverage 10 | vendor/ruby 11 | *.directory 12 | logfile 13 | 14 | # local env vars 15 | .env.local 16 | 17 | /config/master.key 18 | .vscode/extensions.json 19 | /.env.test.local 20 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.4.4 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "workbench.editor.wrapTabs": false, 3 | "editor.guides.indentation": false, 4 | "editor.guides.highlightActiveIndentation": true, 5 | "editor.renderLineHighlight": "gutter" 6 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:3.4.3-alpine3.19 2 | 3 | WORKDIR /pbm 4 | 5 | RUN apk update && apk add build-base postgresql-dev nodejs 6 | 7 | COPY Gemfile Gemfile.lock ./ 8 | RUN bundle install 9 | 10 | COPY . . 11 | 12 | CMD bundle exec rails s 13 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec puma -p $PORT 2 | release: rake db:migrate 3 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css 4 | -------------------------------------------------------------------------------- /app/assets/images/GitHub-Mark-32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/GitHub-Mark-32px.png -------------------------------------------------------------------------------- /app/assets/images/Insider_Connected_Dark_Horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/Insider_Connected_Dark_Horizontal.png -------------------------------------------------------------------------------- /app/assets/images/Insider_Connected_Light_Horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/Insider_Connected_Light_Horizontal.png -------------------------------------------------------------------------------- /app/assets/images/PPM-Splash-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/PPM-Splash-200.png -------------------------------------------------------------------------------- /app/assets/images/PPM-SplashTile-BW-Inverted-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/PPM-SplashTile-BW-Inverted-blue.png -------------------------------------------------------------------------------- /app/assets/images/PPM-SplashTile-BW-Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/PPM-SplashTile-BW-Inverted.png -------------------------------------------------------------------------------- /app/assets/images/PPM-SplashTile-BW-Simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/PPM-SplashTile-BW-Simple.png -------------------------------------------------------------------------------- /app/assets/images/Stern-Logo-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/Stern-Logo-sm.png -------------------------------------------------------------------------------- /app/assets/images/bayarea/bayarea_PPE.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bayarea/bayarea_PPE.jpg -------------------------------------------------------------------------------- /app/assets/images/bayarea/bayarea_nes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bayarea/bayarea_nes.jpg -------------------------------------------------------------------------------- /app/assets/images/bayarea/bayarea_pinball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bayarea/bayarea_pinball.png -------------------------------------------------------------------------------- /app/assets/images/bayarea/bayarea_playland.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bayarea/bayarea_playland.jpg -------------------------------------------------------------------------------- /app/assets/images/bc/bc-about-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bc/bc-about-2.jpg -------------------------------------------------------------------------------- /app/assets/images/bc/bc-about.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bc/bc-about.jpg -------------------------------------------------------------------------------- /app/assets/images/bc/bc-links-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bc/bc-links-2.jpg -------------------------------------------------------------------------------- /app/assets/images/bc/bc-links.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bc/bc-links.jpg -------------------------------------------------------------------------------- /app/assets/images/bc/vrpa-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/bc/vrpa-logo.jpg -------------------------------------------------------------------------------- /app/assets/images/beanie-three-500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/beanie-three-500.jpg -------------------------------------------------------------------------------- /app/assets/images/become_a_patron_button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/become_a_patron_button@2x.png -------------------------------------------------------------------------------- /app/assets/images/champaign/ipa-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/champaign/ipa-logo.jpg -------------------------------------------------------------------------------- /app/assets/images/chicago/Pinball-Chicago-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/chicago/Pinball-Chicago-Logo.png -------------------------------------------------------------------------------- /app/assets/images/cleo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/cleo.png -------------------------------------------------------------------------------- /app/assets/images/comment-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/comment-sprites.png -------------------------------------------------------------------------------- /app/assets/images/confirm-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/confirm-sprites.png -------------------------------------------------------------------------------- /app/assets/images/contact-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/contact-sprites.png -------------------------------------------------------------------------------- /app/assets/images/danny-pouch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/danny-pouch.jpg -------------------------------------------------------------------------------- /app/assets/images/donate-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/donate-sprites.png -------------------------------------------------------------------------------- /app/assets/images/feed-icon-10x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/feed-icon-10x10.png -------------------------------------------------------------------------------- /app/assets/images/feed-icon-14x14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/feed-icon-14x14.png -------------------------------------------------------------------------------- /app/assets/images/fonts/nunito-v25-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/fonts/nunito-v25-latin-500.woff2 -------------------------------------------------------------------------------- /app/assets/images/fonts/nunito-v25-latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/fonts/nunito-v25-latin-600.woff2 -------------------------------------------------------------------------------- /app/assets/images/fonts/nunito-v25-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/fonts/nunito-v25-latin-700.woff2 -------------------------------------------------------------------------------- /app/assets/images/fonts/nunito-v25-latin-800.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/fonts/nunito-v25-latin-800.woff2 -------------------------------------------------------------------------------- /app/assets/images/fonts/nunito-v25-latin-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/fonts/nunito-v25-latin-900.woff2 -------------------------------------------------------------------------------- /app/assets/images/fonts/nunito-v25-latin-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/fonts/nunito-v25-latin-italic.woff2 -------------------------------------------------------------------------------- /app/assets/images/fonts/nunito-v25-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/fonts/nunito-v25-latin-regular.woff2 -------------------------------------------------------------------------------- /app/assets/images/google-play-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/google-play-badge.png -------------------------------------------------------------------------------- /app/assets/images/iOS-icon-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/iOS-icon-11.png -------------------------------------------------------------------------------- /app/assets/images/icons/airport.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/bank.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/beach.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/bed.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/billiards.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/bowling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/castle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/clock-time-four-outline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/comment-quote.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/comment-text.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/details.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/dice-5.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/dice-d20.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/family-restroom.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/food.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/golf.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/handball.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/heart-empty.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/ice-cream.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/lead-pencil.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/link-variant.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/local-bar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/music.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/newspaper-variant-multiple-outline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/newspaper-variant-outline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/notebook-outline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/numeric.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/pasta.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/phone.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/pizza.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/roller-skate.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/space-invaders.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/star.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/store.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/tent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/theater.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/ticket-confirmation.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/tshirt-crew.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/wine-bottle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/icons/wrench-outline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/iowa/iowa-pinball-club-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/iowa/iowa-pinball-club-logo.png -------------------------------------------------------------------------------- /app/assets/images/kineticist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/kineticist.png -------------------------------------------------------------------------------- /app/assets/images/la/la_pinball.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/la/la_pinball.jpg -------------------------------------------------------------------------------- /app/assets/images/launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/launcher.png -------------------------------------------------------------------------------- /app/assets/images/lightbox/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/lightbox/close.png -------------------------------------------------------------------------------- /app/assets/images/lightbox/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/lightbox/loading.gif -------------------------------------------------------------------------------- /app/assets/images/lightbox/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/lightbox/next.png -------------------------------------------------------------------------------- /app/assets/images/lightbox/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/lightbox/prev.png -------------------------------------------------------------------------------- /app/assets/images/lpurple-machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/lpurple-machine.png -------------------------------------------------------------------------------- /app/assets/images/machine-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/machine-pink.png -------------------------------------------------------------------------------- /app/assets/images/map_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/map_loading.gif -------------------------------------------------------------------------------- /app/assets/images/mappin-logo-600.orig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/mappin-logo-600.orig.png -------------------------------------------------------------------------------- /app/assets/images/marker-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-1.png -------------------------------------------------------------------------------- /app/assets/images/marker-10-sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-10-sel.png -------------------------------------------------------------------------------- /app/assets/images/marker-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-10.png -------------------------------------------------------------------------------- /app/assets/images/marker-2-1-sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-2-1-sel.png -------------------------------------------------------------------------------- /app/assets/images/marker-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-2.png -------------------------------------------------------------------------------- /app/assets/images/marker-z-1-noShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-z-1-noShadow.png -------------------------------------------------------------------------------- /app/assets/images/marker-z-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-z-1.png -------------------------------------------------------------------------------- /app/assets/images/marker-z-10-noShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-z-10-noShadow.png -------------------------------------------------------------------------------- /app/assets/images/marker-z-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-z-10.png -------------------------------------------------------------------------------- /app/assets/images/marker-z-2-noShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-z-2-noShadow.png -------------------------------------------------------------------------------- /app/assets/images/marker-z-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-z-2.png -------------------------------------------------------------------------------- /app/assets/images/marker-z-sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/marker-z-sel.png -------------------------------------------------------------------------------- /app/assets/images/meta-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/meta-sprites.png -------------------------------------------------------------------------------- /app/assets/images/new-mexico/dukecitypinball-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/new-mexico/dukecitypinball-logo.png -------------------------------------------------------------------------------- /app/assets/images/oldgraphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/oldgraphic.png -------------------------------------------------------------------------------- /app/assets/images/open-in-new-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/open-in-new-black.png -------------------------------------------------------------------------------- /app/assets/images/open-in-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/open-in-new.png -------------------------------------------------------------------------------- /app/assets/images/pbm-both-stickers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pbm-both-stickers.png -------------------------------------------------------------------------------- /app/assets/images/pbm-gold-sticker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pbm-gold-sticker.jpg -------------------------------------------------------------------------------- /app/assets/images/pbm-og-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pbm-og-image.jpg -------------------------------------------------------------------------------- /app/assets/images/pbm-og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pbm-og-image.png -------------------------------------------------------------------------------- /app/assets/images/pbm-pink-sticker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pbm-pink-sticker.jpg -------------------------------------------------------------------------------- /app/assets/images/pbm-play-store-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pbm-play-store-2.png -------------------------------------------------------------------------------- /app/assets/images/pbm-shirt-web.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pbm-shirt-web.jpg -------------------------------------------------------------------------------- /app/assets/images/pinball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pinball.png -------------------------------------------------------------------------------- /app/assets/images/pinballmap-logo-base4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pinballmap-logo-base4.png -------------------------------------------------------------------------------- /app/assets/images/pinballmap-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pinballmap-logo.png -------------------------------------------------------------------------------- /app/assets/images/pinballmap-qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pinballmap-qr.png -------------------------------------------------------------------------------- /app/assets/images/pinballmapcom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pinballmapcom.jpg -------------------------------------------------------------------------------- /app/assets/images/pinballmapcom_nocom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pinballmapcom_nocom.png -------------------------------------------------------------------------------- /app/assets/images/pinballmapcom_nodot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/pinballmapcom_nodot.png -------------------------------------------------------------------------------- /app/assets/images/playing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/playing.jpg -------------------------------------------------------------------------------- /app/assets/images/portland/app_logo-350.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/portland/app_logo-350.jpg -------------------------------------------------------------------------------- /app/assets/images/portland/sassy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/portland/sassy.jpg -------------------------------------------------------------------------------- /app/assets/images/purple-machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/purple-machine.png -------------------------------------------------------------------------------- /app/assets/images/rank/GlobalAdministrator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/rank/GlobalAdministrator.png -------------------------------------------------------------------------------- /app/assets/images/rank/GrandChampMapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/rank/GrandChampMapper.png -------------------------------------------------------------------------------- /app/assets/images/rank/LegendaryMapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/rank/LegendaryMapper.png -------------------------------------------------------------------------------- /app/assets/images/rank/RegionalAdministrator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/rank/RegionalAdministrator.png -------------------------------------------------------------------------------- /app/assets/images/rank/SuperMapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/rank/SuperMapper.png -------------------------------------------------------------------------------- /app/assets/images/sacramento/sacramento-isspecial.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/sacramento/sacramento-isspecial.jpg -------------------------------------------------------------------------------- /app/assets/images/sassy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/sassy.jpg -------------------------------------------------------------------------------- /app/assets/images/search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/search_icon.png -------------------------------------------------------------------------------- /app/assets/images/sol-icon.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/sol-icon.jpeg -------------------------------------------------------------------------------- /app/assets/images/splash-icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/splash-icon-128.png -------------------------------------------------------------------------------- /app/assets/images/stack-expo-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/stack-expo-logo.png -------------------------------------------------------------------------------- /app/assets/images/stack-scout-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/stack-scout-logo.png -------------------------------------------------------------------------------- /app/assets/images/sticker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/sticker.jpg -------------------------------------------------------------------------------- /app/assets/images/stickers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/stickers.jpg -------------------------------------------------------------------------------- /app/assets/images/teardrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/teardrop.png -------------------------------------------------------------------------------- /app/assets/images/teardrop200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/teardrop200.png -------------------------------------------------------------------------------- /app/assets/images/treasure-map-opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/treasure-map-opacity.png -------------------------------------------------------------------------------- /app/assets/images/treasure-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/treasure-map.png -------------------------------------------------------------------------------- /app/assets/images/tshirt-pbm-back-500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/tshirt-pbm-back-500.jpg -------------------------------------------------------------------------------- /app/assets/images/tshirt-pbm-front-500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/tshirt-pbm-front-500.jpg -------------------------------------------------------------------------------- /app/assets/images/tshirt-portland-500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/tshirt-portland-500.jpg -------------------------------------------------------------------------------- /app/assets/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/images/user.png -------------------------------------------------------------------------------- /app/assets/javascripts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/javascripts/.gitkeep -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/assets/stylesheets/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/rails_admin/custom/theming.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Customize RailsAdmin theme here. 3 | Copy this file to your app/assets/stylesheets/rails_admin/custom/theming.css.scss, leave this one untouched 4 | Don't require it in your application.rb 5 | Look at the markup in RailsAdmin and go there to get inspiration from: 6 | 7 | http://getbootstrap.com/2.3.2/ 8 | Test me: (actual color should be the one defined in variables.css.scss if you did) 9 | 10 | body{ background-color: $linkColor; } 11 | */ 12 | -------------------------------------------------------------------------------- /app/controllers/api/v1/location_types_controller.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | module V1 3 | class LocationTypesController < ApplicationController 4 | skip_before_action :verify_authenticity_token 5 | 6 | before_action :allow_cors 7 | 8 | api :GET, "/api/v1/location_types.json", "Fetch all location types" 9 | formats [ "json" ] 10 | def index 11 | location_types = LocationType.all 12 | except = %i[created_at updated_at] 13 | return_response(location_types, "location_types", [], [], 200, except) 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/controllers/api/v1/machine_groups_controller.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | module V1 3 | class MachineGroupsController < ApplicationController 4 | skip_before_action :verify_authenticity_token 5 | 6 | before_action :allow_cors 7 | 8 | api :GET, "/api/v1/machine_groups.json", "Fetch all machine groups" 9 | description "Machine group IDs" 10 | formats [ "json" ] 11 | def index 12 | return_response(MachineGroup.all, "machine_groups", nil, nil, 200) 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/controllers/api/v1/region_link_xrefs_controller.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | module V1 3 | class RegionLinkXrefsController < ApplicationController 4 | skip_before_action :verify_authenticity_token 5 | 6 | before_action :allow_cors 7 | has_scope :region 8 | 9 | api :GET, "/api/v1/region/:region/region_link_xrefs.json", "Fetch all region-centric web sites" 10 | param :region, String, desc: "Name of the Region you want to see links for", required: true 11 | def index 12 | return_response(apply_scopes(RegionLinkXref), "regionlinks") 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/controllers/api/v1/statuses_controller.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | module V1 3 | class StatusesController < ApplicationController 4 | skip_before_action :verify_authenticity_token 5 | 6 | before_action :allow_cors 7 | 8 | api :GET, "/api/v1/statuses.json", "Fetch table statuses" 9 | formats [ "json" ] 10 | def index 11 | return_response(Status.all, "statuses") 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/controllers/api/v1/zones_controller.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | module V1 3 | class ZonesController < ApplicationController 4 | skip_before_action :verify_authenticity_token 5 | 6 | before_action :allow_cors 7 | has_scope :region 8 | 9 | api :GET, "/api/v1/region/:region/zones.json", "Fetch zones for a single region" 10 | param :region, String, desc: "Name of the Region you want to see zones for", required: true 11 | def index 12 | zones = apply_scopes(Zone) 13 | return_response(zones, "zones") 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/controllers/banned_ips_controller.rb: -------------------------------------------------------------------------------- 1 | class BannedIpsController < ApplicationController 2 | has_scope :region 3 | end 4 | -------------------------------------------------------------------------------- /app/controllers/events_controller.rb: -------------------------------------------------------------------------------- 1 | class EventsController < ApplicationController 2 | respond_to :xml, :json, :rss, only: %i[index] 3 | has_scope :region 4 | def index 5 | @events = apply_scopes(Event) 6 | @events.select!(&:active?) 7 | 8 | respond_to do |format| 9 | format.html do 10 | @sorted_events = {} 11 | @events.each do |e| 12 | category = e.category.blank? ? "General" : e.category 13 | (@sorted_events[category] ||= []) << e 14 | end 15 | 16 | render "#{@region.name}/events" if lookup_context.find_all("#{@region.name}/events").any? 17 | end 18 | format.xml { respond_with @events } 19 | format.json { respond_with @events } 20 | format.rss { respond_with @events } 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /app/controllers/location_types_controller.rb: -------------------------------------------------------------------------------- 1 | class LocationTypesController < ApplicationController 2 | has_scope :region 3 | end 4 | -------------------------------------------------------------------------------- /app/controllers/machine_conditions_controller.rb: -------------------------------------------------------------------------------- 1 | class MachineConditionsController < ApplicationController 2 | before_action :authenticate_user! 3 | rate_limit to: 50, within: 10.minutes, only: :update 4 | 5 | def destroy 6 | user = current_user.nil? ? nil : current_user 7 | mcx = MachineCondition.find(params[:id]) 8 | 9 | mcx.destroy if user && (user.id == mcx.user_id) 10 | 11 | render nothing: true 12 | end 13 | 14 | def update 15 | user = current_user.nil? ? nil : current_user 16 | mcx = MachineCondition.find(params[:id]) 17 | 18 | mcx.update(condition_params) if user && (user.id == mcx.user_id) 19 | 20 | render nothing: true 21 | end 22 | 23 | private 24 | 25 | def condition_params 26 | params.permit(:comment) 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /app/controllers/machine_groups_controller.rb: -------------------------------------------------------------------------------- 1 | class MachineGroupsController < ApplicationController 2 | has_scope :region 3 | end 4 | -------------------------------------------------------------------------------- /app/controllers/operators_controller.rb: -------------------------------------------------------------------------------- 1 | class OperatorsController < ApplicationController 2 | has_scope :region 3 | 4 | def autocomplete 5 | operators = Operator.all 6 | 7 | render json: operators.select { |o| o.name =~ /#{Regexp.escape params[:term] || ''}/i }.sort_by(&:name).map { |o| { label: o.name, value: o.name, id: o.id } } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/controllers/passwords_controller.rb: -------------------------------------------------------------------------------- 1 | class PasswordsController < Devise::PasswordsController 2 | respond_to :json 3 | rate_limit to: 10, within: 20.minutes, only: :create 4 | 5 | def create 6 | if params[:security_question] =~ /pinball/i && !is_bot? 7 | super 8 | else 9 | self.resource = resource_class.new 10 | flash.now[:alert] = "You failed the security test. Please go back and try again." 11 | respond_with_navigational(resource) { render :new } 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/region_link_xrefs_controller.rb: -------------------------------------------------------------------------------- 1 | class RegionLinkXrefsController < ApplicationController 2 | has_scope :region 3 | end 4 | -------------------------------------------------------------------------------- /app/controllers/sessions_controller.rb: -------------------------------------------------------------------------------- 1 | class SessionsController < Devise::SessionsController 2 | respond_to :json 3 | rate_limit to: 10, within: 20.minutes, only: :create 4 | end 5 | -------------------------------------------------------------------------------- /app/controllers/statuses_controller.rb: -------------------------------------------------------------------------------- 1 | class StatusesController < ApplicationController 2 | respond_to :json 3 | end 4 | -------------------------------------------------------------------------------- /app/controllers/suggested_locations_controller.rb: -------------------------------------------------------------------------------- 1 | class SuggestedLocationsController < ApplicationController 2 | before_action :authenticate_user! 3 | 4 | def convert_to_location 5 | sl = SuggestedLocation.find(params[:id]) 6 | sl.convert_to_location(params[:user_email]) 7 | 8 | if sl.errors.any? 9 | redirect_to "/admin/suggested_location/#{sl.id}", flash: { error: sl.errors.full_messages.join(", ") } 10 | else 11 | redirect_to rails_admin_path 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/user_submissions_controller.rb: -------------------------------------------------------------------------------- 1 | class UserSubmissionsController < ApplicationController 2 | has_scope :region 3 | 4 | def list_within_range 5 | user_submissions = UserSubmission.where.not(lat: nil) 6 | .where(submission_type: %w[new_lmx remove_machine new_condition confirm_location], created_at: "2019-05-03T07:00:00.00-07:00"..Date.today.end_of_day) 7 | .near([ params[:lat], params[:lon] ], 100, order: false).limit(200) 8 | sorted_submissions = user_submissions.order("created_at DESC") 9 | render partial: "maps/nearby_activity", locals: { sorted_submissions: sorted_submissions } 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/controllers/zones_controller.rb: -------------------------------------------------------------------------------- 1 | class ZonesController < ApplicationController 2 | has_scope :region 3 | end 4 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | include Pagy::Frontend 3 | def sortable(column, title = nil) 4 | title ||= column.titleize 5 | css_class = column == sort_column ? "current #{sort_direction}" : nil 6 | direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc" 7 | link_to title, params.merge(sort: column, direction: direction, page: nil), class: css_class 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/mailboxes/application_mailbox.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailbox < ActionMailbox::Base 2 | # routing /something/i => :somewhere 3 | end 4 | -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "Pinball Map " 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /app/mailers/error_mailer.rb: -------------------------------------------------------------------------------- 1 | class ErrorMailer < ApplicationMailer 2 | def rake_task_error 3 | @error_subject = params[:error_subject] 4 | @error = params[:error] 5 | mail(to: "admin@pinballmap.com", subject: "Pinball Map - #{@error_subject} - #{Date.today.strftime('%m/%d/%Y')}") 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/mailers/operator_mailer.rb: -------------------------------------------------------------------------------- 1 | class OperatorMailer < ApplicationMailer 2 | def send_daily_digest_operator_email 3 | @machine_comments = params[:machine_comments] 4 | @machines_added = params[:machines_added] 5 | @machines_removed = params[:machines_removed] 6 | 7 | mail(to: params[:email_to], subject: "Pinball Map - Daily digest of edits to your locations - #{Date.today.strftime('%m/%d/%Y')}") 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end 4 | -------------------------------------------------------------------------------- /app/models/banned_ip.rb: -------------------------------------------------------------------------------- 1 | class BannedIp < ApplicationRecord 2 | has_paper_trail 3 | end 4 | -------------------------------------------------------------------------------- /app/models/event.rb: -------------------------------------------------------------------------------- 1 | class Event < ApplicationRecord 2 | belongs_to :region, optional: true 3 | belongs_to :location, optional: true 4 | 5 | default_scope { order :id } 6 | 7 | scope :region, ->(name) { where(region_id: Region.find_by_name(name.downcase).id).to_a } 8 | 9 | def active? 10 | if start_date && !end_date 11 | (start_date >= Date.today - 1.week) 12 | elsif end_date 13 | (end_date >= Date.today - 1.week) 14 | else 15 | 1 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/models/location_type.rb: -------------------------------------------------------------------------------- 1 | class LocationType < ApplicationRecord 2 | has_paper_trail 3 | has_many :locations 4 | has_many :suggested_locations 5 | 6 | default_scope { order "name" } 7 | 8 | before_save do 9 | Status.where(status_type: "location_types").update({ updated_at: Time.current }) 10 | end 11 | 12 | before_destroy do 13 | Status.where(status_type: "location_types").update({ updated_at: Time.current }) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/models/machine_group.rb: -------------------------------------------------------------------------------- 1 | class MachineGroup < ApplicationRecord 2 | belongs_to :machine, optional: true 3 | 4 | validates_presence_of :name 5 | end 6 | -------------------------------------------------------------------------------- /app/models/region_link_xref.rb: -------------------------------------------------------------------------------- 1 | class RegionLinkXref < ApplicationRecord 2 | has_paper_trail 3 | belongs_to :region, optional: true 4 | 5 | scope :region, ->(name) { where(region_id: Region.find_by_name(name.downcase).id) } 6 | end 7 | -------------------------------------------------------------------------------- /app/models/status.rb: -------------------------------------------------------------------------------- 1 | class Status < ApplicationRecord 2 | end 3 | -------------------------------------------------------------------------------- /app/models/user_fave_location.rb: -------------------------------------------------------------------------------- 1 | class UserFaveLocation < ApplicationRecord 2 | belongs_to :location 3 | belongs_to :user 4 | 5 | def rails_admin_default_object_label_method; end 6 | end 7 | -------------------------------------------------------------------------------- /app/models/zone.rb: -------------------------------------------------------------------------------- 1 | class Zone < ApplicationRecord 2 | has_paper_trail 3 | validates_presence_of :name 4 | belongs_to :region, optional: true 5 | has_many :locations 6 | has_many :suggested_locations 7 | 8 | default_scope { order "name" } 9 | 10 | scope :region, ->(name) { where(region_id: Region.find_by_name(name.downcase).id) } 11 | end 12 | -------------------------------------------------------------------------------- /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_mailer/send_admin_notification.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | = simple_format(@message) 8 | - if ( @email.present? ) 9 | %p 10 | Name: #{@name} 11 | %p 12 | Email: #{@email} 13 | - else 14 | %p 15 | Username: #{@user_name} 16 | %p 17 | Email: #{@user_email} 18 | %p 19 | (entered from #{@remote_ip} via #{@headers} #{@user_agent}) 20 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_admin_notification.txt.haml: -------------------------------------------------------------------------------- 1 | = simple_format(@message) 2 | 3 | - if ( @email.present? ) 4 | Name: #{@name} 5 | 6 | Email: #{@email} 7 | 8 | - else 9 | Username: #{@user_name} 10 | 11 | Email: #{@user_email} 12 | 13 | (entered from #{@remote_ip} via #{@headers} #{@user_agent}) 14 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_global_machine_condition_email.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | Here are the comments left in global locations on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 8 | %h3 9 | Global Daily Comments 10 | - @submissions.each do |subs| 11 | %p 12 | = subs 13 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_global_machine_condition_email.txt.haml: -------------------------------------------------------------------------------- 1 | Here are the comments left in global locations on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 2 | 3 | Global Daily Comments 4 | 5 | - @submissions.each do |subs| 6 | = subs 7 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_global_machine_removal_email.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | Here are the machines removed from global locations on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 8 | %h3 9 | Global Daily Machine Removals 10 | - @submissions.each do |subs| 11 | %p 12 | = subs 13 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_global_machine_removal_email.txt.haml: -------------------------------------------------------------------------------- 1 | Here are the machines removed from global locations on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 2 | 3 | Global Daily Machine Removals 4 | 5 | - @submissions.each do |subs| 6 | = subs 7 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_global_picture_added_email.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | Here are pictures added on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 8 | %h3 9 | Daily Pictures Added 10 | - @submissions.each do |subs| 11 | %p 12 | = subs 13 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_global_picture_added_email.txt.haml: -------------------------------------------------------------------------------- 1 | Here are pictures added on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 2 | 3 | Daily Pictures Added 4 | 5 | - @submissions.each do |subs| 6 | = subs -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_machine_condition_email.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | Here are the comments left in your region on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 8 | %h3 9 | #{@region_name} Daily Machine Comments 10 | - @submissions.each do |subs| 11 | %p 12 | = subs -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_machine_condition_email.txt.haml: -------------------------------------------------------------------------------- 1 | Here are the comments left in your region on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 2 | 3 | #{@region_name} Daily Machine Comments 4 | 5 | - @submissions.each do |subs| 6 | = subs -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_machine_removal_email.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | Here are the machines removed from your region on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 8 | %h3 9 | #{@region_name} Daily Machine Removals 10 | - @submissions.each do |subs| 11 | %p 12 | = subs 13 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_machine_removal_email.txt.haml: -------------------------------------------------------------------------------- 1 | Here are the machines removed from your region on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 2 | 3 | #{@region_name} Daily Machine Removals 4 | 5 | - @submissions.each do |subs| 6 | = subs -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_picture_added_email.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | Here are pictures added to your region on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 8 | %h3 9 | #{@region_name} Daily Pictures Added 10 | - @submissions.each do |subs| 11 | %p 12 | = subs 13 | -------------------------------------------------------------------------------- /app/views/admin_mailer/send_daily_digest_picture_added_email.txt.haml: -------------------------------------------------------------------------------- 1 | Here are pictures added to your region on #{(Time.now - 1.day).strftime('%m/%d/%Y')}. 2 | 3 | #{@region_name} Daily Pictures Added 4 | 5 | - @submissions.each do |subs| 6 | = subs -------------------------------------------------------------------------------- /app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome to Pinball Map, <%= @resource.username %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %>

6 | 7 |

8 | ----
9 | <%= link_to 'Blog', 'http://blog.pinballmap.com/' %>
10 | <%= link_to 'Support Pinball Map on Ko-fi', 'https://ko-fi.com/pinballmap' %> 11 |

12 | -------------------------------------------------------------------------------- /app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %>

6 | 7 |

If the above link is... not a link, then your mail provider (such as gmail) has stripped it out! You can still find the link by clicking a three-dot "more" menu and choosing "Show original". Then scroll down to the bottom and you'll see the link.

8 | 9 |

If you didn't request this, please ignore this email.

10 |

Your password won't change until you access the link above and create a new one.

11 | -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %>

8 | -------------------------------------------------------------------------------- /app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |

4 | <%= I18n.t("errors.messages.not_saved", 5 | count: resource.errors.count, 6 | resource: resource.class.model_name.human.downcase) 7 | %> 8 |

9 | 14 |
15 | <% end %> 16 | -------------------------------------------------------------------------------- /app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Resend unlock instructions

4 | 5 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 6 | <%= render "devise/shared/error_messages", resource: resource %> 7 | 8 |
9 |

<%= f.label :email %>

10 |

<%= f.email_field :email, autofocus: true, autocomplete: "email" %>

11 |
12 | 13 |
14 | <%= f.submit "Resend unlock instructions" %> 15 |
16 | <% end %> 17 | 18 | <%= render "devise/shared/links", class: "button" %> 19 |
20 |
21 | -------------------------------------------------------------------------------- /app/views/error_mailer/rake_task_error.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | #{@error_subject} 8 | %p 9 | #{@error} 10 | -------------------------------------------------------------------------------- /app/views/error_mailer/rake_task_error.txt.haml: -------------------------------------------------------------------------------- 1 | #{@error_subject} 2 | 3 | #{@error} -------------------------------------------------------------------------------- /app/views/events/index.html.haml: -------------------------------------------------------------------------------- 1 | #page_body 2 | .column_container 3 | .column.bg_vlightpurple.w_400 4 | %p.red.bold.p1 Upcoming Events 5 | %p== In the early days Pinball Map managed our own events database. But with the rise of the #{link_to "International Flipper Pinball Association", "https://www.ifpapinball.com/calendar/", :target => '_blank'}, we then largely relied on importing IFPA calendar data. For the sake of simplicity, it's now better to simply link to the IFPA calendar. 6 | %p.font18.bold.pink 7 | Visit the 8 | =link_to "IFPA Calendar", "https://www.ifpapinball.com/calendar/", :target => '_blank' 9 | to find pinball events near you! 10 | -------------------------------------------------------------------------------- /app/views/layouts/action_text/contents/_content.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= yield -%> 3 |
4 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/ 5 | :css 6 | /* Email styles need to be inline */ 7 | %body 8 | = yield 9 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.haml: -------------------------------------------------------------------------------- 1 | = yield 2 | -------------------------------------------------------------------------------- /app/views/location_machine_xrefs/_backglass.html.haml: -------------------------------------------------------------------------------- 1 | - if (!lmx.machine.opdb_img.blank?) 2 | %div{:class => 'backglass_container'} 3 | =image_tag( "#{lmx.machine.opdb_img}", :alt => "#{lmx.machine.name} backglass image", :class => 'backglass_img') 4 | -------------------------------------------------------------------------------- /app/views/location_machine_xrefs/_kineticist.html.haml: -------------------------------------------------------------------------------- 1 | - if (!lmx.machine.kineticist_url.blank?) 2 | .external_machine_link 3 | = link_to "Kineticist", "#{lmx.machine.kineticist_url}", :target => '_blank' 4 | =link_to image_tag( 'kineticist.png', :alt => 'Kineticist Logo', :class => 'kineticist_icon'), "#{lmx.machine.kineticist_url}", :target => '_blank' 5 | -------------------------------------------------------------------------------- /app/views/location_machine_xrefs/_list_machine.html.haml: -------------------------------------------------------------------------------- 1 | %div.machine_name_container 2 | %div{:class => "machine_name"} 3 | #{lmx.machine.name} 4 | %span.machine_year_man #{lmx.machine.year_and_manufacturer} 5 | = render :partial => 'location_machine_xrefs/remove_machine', :locals => {:lmx => lmx} 6 | -------------------------------------------------------------------------------- /app/views/location_machine_xrefs/_machine_tools.html.haml: -------------------------------------------------------------------------------- 1 | - icon_path = image_tag('icons/details.svg', :alt => 'Machine Details', :class => 'banner_icon') 2 | = banner('machine_tools_lmx', 'Machine details', icon_path, lmx) 3 | %div[lmx, :machine_tools]{:style => 'display:none'} 4 | %hr/ 5 | 6 | :javascript 7 | $(function() { 8 | $('#machine_tools_lmx_banner_#{lmx.id}').click(function () { 9 | $('#machine_tools_lmx_#{lmx.id}').html(loadingHTML()); 10 | $('#machine_tools_lmx_#{lmx.id}').load('/location_machine_xrefs/#{lmx.id}/render_machine_tools'); 11 | }); 12 | }); -------------------------------------------------------------------------------- /app/views/location_machine_xrefs/_pintips.html.haml: -------------------------------------------------------------------------------- 1 | - if (!lmx.machine.opdb_id.blank?) 2 | .external_machine_link 3 | = link_to "PinTips", "http://pintips.net/opdb/#{lmx.machine.opdb_id}", :target => '_blank' 4 | =link_to image_tag( 'open-in-new-black.png', :alt => 'open in new window', :class => 'external_machine_link_icon'), "http://pintips.net/opdb/#{lmx.machine.opdb_id}", :target => '_blank' 5 | -------------------------------------------------------------------------------- /app/views/location_machine_xrefs/create.html.haml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/views/location_machine_xrefs/create.html.haml -------------------------------------------------------------------------------- /app/views/location_picture_xrefs/_add_picture.html.haml: -------------------------------------------------------------------------------- 1 | %div[location, :add_picture]{:style => 'display:none;'} 2 | 3 | :javascript 4 | $(function() { 5 | $('#add_picture_location_banner_#{location.id}').click(function () { 6 | $('#add_picture_location_#{location.id}').html(loadingHTML()); 7 | $('#add_picture_location_#{location.id}').load('/location_picture_xrefs/#{location.id}/form'); 8 | }); 9 | }); 10 | 11 | -------------------------------------------------------------------------------- /app/views/location_picture_xrefs/_remove_picture.html.haml: -------------------------------------------------------------------------------- 1 | - if !user_signed_in? 2 | =link_to new_user_session_path, :class => "no_underline" do 3 | %div.remove_picture_button.inline 4 | x 5 | - else 6 | = button_to "x", location_picture_xref_path(:id => lpx.id), :id => "remove_picture_#{lpx.id}", :method => 'delete', :remote => true, :class => "remove_picture_button" 7 | 8 | :javascript 9 | $('#remove_picture_#{lpx.id}').click(function () { 10 | if (confirm("Remove this picture?")) { 11 | $('.location_picture_xref_#{lpx.id},#remove_picture_#{lpx.id}').fadeOut('slow'); 12 | $(this).callRemote(); 13 | } 14 | return false; 15 | }); 16 | 17 | -------------------------------------------------------------------------------- /app/views/location_picture_xrefs/_show_thumbs.html.haml: -------------------------------------------------------------------------------- 1 | - location_picture_xrefs.includes([:photo_attachment]).each do |lpx| 2 | - if lpx.photo.attached? 3 | = link_to image_tag(lpx.photo.variant(resize_to_limit: [100,100])), lpx.photo.variant(resize_to_limit: [800,800]), :class => "location_thumb location_picture_xref_#{lpx.id}", :"data-lightbox" => "location_thumb" 4 | = render :partial => 'location_picture_xrefs/remove_picture', :locals => {:lpx => lpx} 5 | -------------------------------------------------------------------------------- /app/views/locations/_add_machine.html.haml: -------------------------------------------------------------------------------- 1 | %div[location, :add_machine]{:style => 'display:none'} 2 | 3 | :javascript 4 | $(function() { 5 | $('#add_machine_location_banner_#{location.id}').click(function () { 6 | $('#add_machine_location_#{location.id}').html(loadingHTML()); 7 | $('#add_machine_location_#{location.id}').load('/locations/#{location.id}/render_add_machine'); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /app/views/locations/_former_machines.html.haml: -------------------------------------------------------------------------------- 1 | %div[location, :former_machines]{:style => 'display:none;'} 2 | 3 | :javascript 4 | $(function() { 5 | $('#former_machines_location_banner_#{location.id}').click(function () { 6 | $('#former_machines_location_#{location.id}').html(loadingHTML()); 7 | $('#former_machines_location_#{location.id}').load('/locations/#{location.id}/render_former_machines'); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /app/views/locations/_recent_activity.html.haml: -------------------------------------------------------------------------------- 1 | %div[location, :recent_location_activity]{:style => 'display:none'} 2 | 3 | :javascript 4 | $(function() { 5 | $('#recent_location_activity_location_banner_#{location.id}').click(function () { 6 | $('#recent_location_activity_location_#{location.id}').html(loadingHTML()); 7 | $('#recent_location_activity_location_#{location.id}').load('/locations/#{location.id}/render_recent_activity'); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /app/views/locations/_render_former_machines.html.haml: -------------------------------------------------------------------------------- 1 | %div.quick_button_content_header Former Machines (max of 30) 2 | - l.former_machines.each do |former_machines| 3 | %div.recent_activity_container{:style => 'padding-left: 20px;'} 4 | %div.recent_activity_submission.font16.bold #{former_machines.machine_name} 5 | %div.former_machines_date.font14 6 | Removed on 7 | %br/ 8 | #{former_machines.created_at.strftime("%b %d, %Y")} 9 | -------------------------------------------------------------------------------- /app/views/locations/_render_machines.html.haml: -------------------------------------------------------------------------------- 1 | - location_machine_xrefs.each do |lmx| 2 | %div[lmx, :machine] 3 | = render :partial => 'location_machine_xrefs/list_machine', :locals => {:lmx => lmx} 4 | .clear 5 | = render :partial => 'location_machine_xrefs/machine_tools', :locals => {:lmx => lmx} -------------------------------------------------------------------------------- /app/views/locations/_render_machines_count.html.haml: -------------------------------------------------------------------------------- 1 | = pluralize(location.machine_names.size, ' machine') 2 | -------------------------------------------------------------------------------- /app/views/locations/_show_machines.html.haml: -------------------------------------------------------------------------------- 1 | %div[location, :show_machines] 2 | 3 | :javascript 4 | $(function() { 5 | $('#show_machines_location_#{location.id}').html(loadingHTML()); 6 | $.get('/locations/#{location.id}/render_machines', function(data) { 7 | $('#show_machines_location_#{location.id}').html(data); 8 | }); 9 | }); 10 | 11 | -------------------------------------------------------------------------------- /app/views/locations/confirm.html.haml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/views/locations/confirm.html.haml -------------------------------------------------------------------------------- /app/views/locations/mobile.html.haml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/views/locations/mobile.html.haml -------------------------------------------------------------------------------- /app/views/locations/unknown_route.html.haml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/views/locations/unknown_route.html.haml -------------------------------------------------------------------------------- /app/views/machine_conditions/_show_machine_conditions.html.haml: -------------------------------------------------------------------------------- 1 | %div.bold.font20.center.p_10.brightpurple 2 | Machine Comments 3 | %div[lmx, :machineconditions_container] 4 | %div[lmx, :show_conditions] 5 | - if lmx.sorted_machine_conditions.empty? 6 | %div.grey.center No machine comments yet 7 | - else 8 | = render :partial => 'locations/render_machine_conditions', :locals => {:conditions => lmx.sorted_machine_conditions, :lmx => lmx} 9 | -------------------------------------------------------------------------------- /app/views/machine_score_xrefs/_show_high_scores.html.haml: -------------------------------------------------------------------------------- 1 | %div.bold.font20.center.p_10.brightpurple 2 | High Scores 3 | %div[lmx, :score_container] 4 | %div[lmx, :show_scores] 5 | - if lmx.machine_score_xrefs.empty? 6 | %div.grey.center No scores yet 7 | - else 8 | = render :partial => 'locations/render_scores', :locals => {:lmx => lmx} 9 | -------------------------------------------------------------------------------- /app/views/maps/albuquerque/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p.local_logo 3 | =link_to image_tag('new-mexico/dukecitypinball-logo.png'), 'http://www.dukecitypinball.blogspot.com/', :target => '_blank' 4 | %br/ 5 | %br/ 6 | The New Mexico Pinball Map is maintained with the help of 7 | =link_to 'Duke City Pinball', 'http://www.dukecitypinball.blogspot.com/', :target => '_blank' 8 | = render :template => 'pages/region' 9 | -------------------------------------------------------------------------------- /app/views/maps/bayarea/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p.local_logo 3 | = image_tag 'bayarea/bayarea_pinball.png' 4 | %br/ 5 | %br/ 6 | = link_to 'Check out the official blog of the Bay Area Pinball Map!', "http://pinballbayarea.wordpress.com/", :target => '_blank' 7 | = render :template => 'pages/region' 8 | -------------------------------------------------------------------------------- /app/views/maps/iowa/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p.local_logo 3 | =link_to image_tag('iowa/iowa-pinball-club-logo.png'),'http://iowapinballclub.com/', :target => '_blank' 4 | %br/ 5 | %br/ 6 | The 7 | =link_to 'Iowa Pinball Club', 'http://iowapinballclub.com/', :target => '_blank' 8 | supports and maintains this map. 9 | = render :template => 'pages/region' 10 | -------------------------------------------------------------------------------- /app/views/maps/jacksonville/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p 3 | = link_to 'Connect to other players in town through the 904 Pinball Zine', 'http://www.facebook.com/groups/204737299539297/', :target => '_blank' 4 | = render :template => 'pages/region' 5 | -------------------------------------------------------------------------------- /app/views/maps/la/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p.local_logo 3 | =image_tag 'la/la_pinball.jpg' 4 | = render :template => 'pages/region' 5 | -------------------------------------------------------------------------------- /app/views/maps/minnesota/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p 3 | To keep up on all the current Minnesota Pinball news, locations, events, upcoming games and more, please join our public Facebook group, 4 | =link_to 'Minnesota Pinball - The "Pin Cities"', 'https://www.facebook.com/groups/minnesotapinball/', :target => '_blank' 5 | = render :template => 'pages/region' 6 | -------------------------------------------------------------------------------- /app/views/maps/portland/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p.local_logo 3 | = image_tag 'portland/app_logo-350.jpg' 4 | = render :template => 'pages/region' 5 | -------------------------------------------------------------------------------- /app/views/maps/sacramento/region.html.haml: -------------------------------------------------------------------------------- 1 | - content_for :presearch_sidebar do 2 | %p.local_logo 3 | = image_tag 'sacramento/sacramento-isspecial.jpg' 4 | = render :template => 'pages/region' 5 | -------------------------------------------------------------------------------- /app/views/operator_mailer/send_daily_digest_operator_email.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ 5 | %body 6 | %p 7 | Here are the edits made to your pinball machines yesterday on Pinball Map. We hope this helps you identify and fix problems. 8 | %p 9 | You opted in to receive these emails, but if you don't want them anymore, reply to this message and tell us! Also, see our FAQ: https://pinballmap.com/faq#operators 10 | %h3 11 | Machine Comments 12 | - @machine_comments.each do |subs| 13 | %p 14 | = subs 15 | %h3 16 | Machines Added 17 | - @machines_added.each do |subs| 18 | %p 19 | = subs 20 | %h3 21 | Machines Removed 22 | - @machines_removed.each do |subs| 23 | %p 24 | = subs 25 | 26 | -------------------------------------------------------------------------------- /app/views/operator_mailer/send_daily_digest_operator_email.txt.haml: -------------------------------------------------------------------------------- 1 | Here are the edits made to your pinball machines yesterday on Pinball Map. We hope this helps you identify and fix problems. 2 | 3 | You opted in to receive these emails, but if you don't want them anymore, reply to this message and tell us! Also, see our FAQ: https://pinballmap.com/faq#operators 4 | 5 | Machine Comments 6 | - @machine_comments.each do |subs| 7 | = subs 8 | 9 | Machines Added 10 | - @machines_added.each do |subs| 11 | = subs 12 | 13 | Machines Removed 14 | - @machines_removed.each do |subs| 15 | = subs 16 | -------------------------------------------------------------------------------- /app/views/pages/_footer.html.haml: -------------------------------------------------------------------------------- 1 | #footer{:class => "#{current_page?(saved_path) || current_page?(map_path) || current_page?(operators_path) || ((defined? @region) and current_page?(region_homepage_path)) ? 'footer_fixed' : '' } #{current_page?(map_flier_path) ? 'flier_print_hide' : ''}"} 2 | - if (@region) 3 | =link_to 'Contact', about_path, :class => 'footer_contact' 4 | - else 5 | =link_to 'Contact', about_path('portland'), :class => 'footer_contact' 6 | =link_to 'Donate', donate_path, :class => 'footer_donate' 7 | =link_to 'Github', 'https://github.com/pinballmap/pbm/', :target => '_blank', :class => 'footer_github' 8 | =link_to 'API', apipie_apipie_path, :target => '_blank', :class => 'footer_api' 9 | -------------------------------------------------------------------------------- /app/views/pages/_intro.html.haml: -------------------------------------------------------------------------------- 1 | = yield :intro_extra 2 | #intro 3 | %p.font28.red.bold 4 | Welcome to #{@region_fullname} Pinball Map! 5 | %p 6 | %span.red.font16.bold This map is best maintained with your help! 7 | Please 8 | %span.red.font16.bold add 9 | and 10 | %span.red.font16.bold remove 11 | machines to/from locations to keep things up to date. And 12 | %span 13 | =link_to 'submit new locations', (defined? @region) ? suggest_path : map_location_suggest_path 14 | that aren’t on the map. 15 | %p== Check out our #{link_to 'mobile app', app_path}. 16 | -------------------------------------------------------------------------------- /app/views/pages/contact.html.haml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/app/views/pages/contact.html.haml -------------------------------------------------------------------------------- /app/views/pages/contact_sent.html.haml: -------------------------------------------------------------------------------- 1 | #page_body.notbold 2 | .column_container 3 | .column.w_560 4 | %p.alert= @contact_thanks 5 | %p.center 6 | =image_tag 'PPM-Splash-200.png', :alt => 'Thanks' 7 | %p.center 8 | In 3 seconds we'll take you back to the 9 | =link_to "#{@region.full_name} Pinball Map", region_homepage_path 10 | 11 | :javascript 12 | window.setTimeout(function(){ window.location.href = './' },3000); -------------------------------------------------------------------------------- /app/views/pages/links.html.haml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/views/pages/submitted_new_location.html.haml: -------------------------------------------------------------------------------- 1 | #page_body.notbold 2 | .column_container 3 | .column.w_560 4 | %p.alert= @submit_thanks 5 | %p.center 6 | =image_tag 'PPM-Splash-200.png', :alt => 'Thanks' 7 | %p.center 8 | In 5 seconds we'll take you back to the 9 | =link_to "#{@region ? @region.full_name : ''} Pinball Map", @region ? region_homepage_path : map_path 10 | 11 | :javascript 12 | window.setTimeout(function(){ window.location.href = './' },5000); 13 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_convert_suggested_location_to_location.html.haml: -------------------------------------------------------------------------------- 1 | = form_tag "/suggested_locations/#{suggested_location.id}/convert_to_location" do 2 | = hidden_field_tag "user_email", current_user.email 3 | = submit_tag 'APPROVE LOCATION' 4 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_country_select.html.haml: -------------------------------------------------------------------------------- 1 | = country_select('suggested_location', 'location_country', {include_blank: true, selected: country}, {name: "#{object_type}[country]"}) 2 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_location_select.html.haml: -------------------------------------------------------------------------------- 1 | %select{:name => "#{object_type}[location_id]"} 2 | 3 | - Location.where('region_id = ?', current_user.region_id).order('name').each do |l| 4 | 5 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_location_type_select.html.haml: -------------------------------------------------------------------------------- 1 | %select{:name => "#{object_type}[location_type_id]"} 2 | 3 | - LocationType.all.each do |lt| 4 | 5 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_operator_select.html.haml: -------------------------------------------------------------------------------- 1 | %select{:name => "#{object_type}[operator_id]"} 2 | 3 | - Operator.all.sort_by(&:name).each do |o| 4 | 5 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_region_edit.html.haml: -------------------------------------------------------------------------------- 1 | %select{:name => "#{object_type}[region_id]", :id => "#{object_type}_region_id"} 2 | 3 | - Region.all.sort_by(&:full_name).each do |r| 4 | 5 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_region_name_edit.html.haml: -------------------------------------------------------------------------------- 1 | - if current_user.region.name.eql? 'portland' 2 | 3 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_region_user.html.haml: -------------------------------------------------------------------------------- 1 | - if current_user.is_super_admin 2 | %select{:name => "user[region_id]"} 3 | 4 | - Region.all.each do |r| 5 | 6 | -------------------------------------------------------------------------------- /app/views/rails_admin/main/_zone_select.html.haml: -------------------------------------------------------------------------------- 1 | - if current_user.is_super_admin 2 | %select{:name => "#{object_type}[zone_id]"} 3 | 4 | - Zone.includes(:region).all.sort {|a, b| a.region.full_name <=> b.region.full_name }.each do |z| 5 | 6 | - else 7 | %select{:name => "#{object_type}[zone_id]"} 8 | 9 | - Zone.includes(:region).all.select {|z| z.region_id == current_user.region_id}.each do |z| 10 | 11 | -------------------------------------------------------------------------------- /app/views/users/_render_user_flag.html.haml: -------------------------------------------------------------------------------- 1 | - if !user.flag.blank? 2 | %span{:class => "user_flag_container"} 3 | =image_tag("https://flagcdn.com/28x21/#{user.flag}.png", :class => "user_flag_profile", :alt => "#{user.flag} flag") 4 | -------------------------------------------------------------------------------- /bin/brakeman: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require "rubygems" 3 | require "bundler/setup" 4 | 5 | ARGV.unshift("--ensure-latest") 6 | 7 | load Gem.bin_path("brakeman", "brakeman") 8 | -------------------------------------------------------------------------------- /bin/bundle-audit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'bundle-audit' 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("bundler-audit", "bundle-audit") 28 | -------------------------------------------------------------------------------- /bin/debug: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env sh 2 | 3 | WEB_CONCURRENCY=0 bundle exec rdbg --open --nonstop bin/rails s -------------------------------------------------------------------------------- /bin/dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | exec "./bin/rails", "server", *ARGV 3 | -------------------------------------------------------------------------------- /bin/jobs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require_relative "../config/environment" 4 | require "solid_queue/cli" 5 | 6 | SolidQueue::Cli.start(ARGV) 7 | -------------------------------------------------------------------------------- /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/rspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'rspec' 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("rspec-core", "rspec") 28 | -------------------------------------------------------------------------------- /bin/rubocop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require "rubygems" 3 | require "bundler/setup" 4 | 5 | # explicit rubocop config increases performance slightly while avoiding config confusion. 6 | ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) 7 | 8 | load Gem.bin_path("rubocop", "rubocop") 9 | -------------------------------------------------------------------------------- /bin/yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path('..', __dir__) 3 | Dir.chdir(APP_ROOT) do 4 | yarn = ENV["PATH"].split(File::PATH_SEPARATOR). 5 | select { |dir| File.expand_path(dir) != __dir__ }. 6 | product(["yarn", "yarn.cmd", "yarn.ps1"]). 7 | map { |dir, file| File.expand_path(file, dir) }. 8 | find { |file| File.executable?(file) } 9 | 10 | if yarn 11 | exec yarn, *ARGV 12 | else 13 | $stderr.puts "Yarn executable was not detected in the system." 14 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" 15 | exit 1 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative 'config/environment' 4 | 5 | run Rails.application 6 | Rails.application.load_server 7 | -------------------------------------------------------------------------------- /config/authorization_rules.rb: -------------------------------------------------------------------------------- 1 | authorization do 2 | role :admin do 3 | has_permission_on [:locations, :machines, :zones, :regions], :to => [:index, :show, :new, :create, :edit, :update, :destroy] 4 | has_permission_on :rails_admin_history, :to => :list 5 | has_permission_on :rails_admin_main, :to => [:index, :show, :new, :edit, :create, :update, :destroy, :list, :delete, :get_pages, :show_history] 6 | end 7 | 8 | role :site_admin do 9 | includes :admin 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: pbm_production 11 | -------------------------------------------------------------------------------- /config/cache.yml: -------------------------------------------------------------------------------- 1 | default: &default 2 | store_options: &default_store_options 3 | max_age: <%= 60.days.to_i %> 4 | namespace: <%= Rails.env %> 5 | size_estimate_samples: 1000 6 | 7 | development: 8 | <<: *default 9 | 10 | staging: 11 | <<: *default 12 | 13 | test: 14 | <<: *default 15 | 16 | production: 17 | database: cache 18 | store_options: 19 | <<: *default_store_options 20 | max_size: <%= 256.megabytes %> 21 | -------------------------------------------------------------------------------- /config/credentials.yml.enc: -------------------------------------------------------------------------------- 1 | +L8hlHAeglr/Yz7UoYmVEAmjp5CiAiQb08wipg1uCpO2Ol9Bn9WSkSu9g+8LNYea6BkNG5NLI4ebRqxxuFKBrC5VOyqNZBz5L34ATPjAAlyRry2SCkdwMraB7RUjcDtqcJ/Bs/jh6zo6GgpZZHXV7r3NgDwjIsUSW/hRNrJ+A0colGUUjGeEZJRKSf0XETHOnNmqnWi1DVb06Xjkkzx+1cWi53K5RcO5VCRHOIXvrl/dE4fSiTwYDvDAUlvGjexuMYRAonc1j0LaSwbV5yB+/C8+GRdGM/2qwwKCVWgBZaMX6A0FVcAl8sz51/fZa6aZHDPdLmTRq1IgCumWYkG0TKtlahK9PSo1/eDvbe+BO8OcPKQyz55DtkLJ9xtVXJokj2WLxdRYmQbHj/pETQ3ii2brR7NuDS5XwLrB--h8cG+Ze13R5dPWUe--i1XW3+A3o4y6ftIw60kAVw== -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | default: &default 2 | adapter: postgresql 3 | encoding: utf8 4 | template: template0 5 | 6 | development: 7 | <<: *default 8 | database: <%= ENV.fetch("DATABASE", 'pbm_dev') %> 9 | host: localhost 10 | 11 | test: 12 | <<: *default 13 | database: <%= ENV.fetch("DATABASE", 'pbm_test') %> 14 | 15 | staging: 16 | url: <%= ENV["DATABASE_URL"] %> 17 | 18 | production: 19 | primary: 20 | <<: *default 21 | url: <%= ENV["DATABASE_URL"] %> 22 | cache: 23 | <<: *default 24 | url: <%= ENV["DOKKU_POSTGRES_BLACK_URL"] %> 25 | migrations_paths: db/cache_migrate 26 | queue: 27 | <<: *default 28 | url: <%= ENV["DOKKU_POSTGRES_AQUA_URL"] %> 29 | migrations_paths: db/queue_migrate 30 | -------------------------------------------------------------------------------- /config/database.yml.docker: -------------------------------------------------------------------------------- 1 | default: &default 2 | adapter: postgresql 3 | encoding: unicode 4 | host: db 5 | username: postgres 6 | password: 7 | pool: 5 8 | 9 | development: 10 | <<: *default 11 | database: pbm_dev 12 | 13 | 14 | test: 15 | <<: *default 16 | database: pbm_test 17 | -------------------------------------------------------------------------------- /config/database.yml.example: -------------------------------------------------------------------------------- 1 | default: &default 2 | adapter: postgresql 3 | encoding: utf8 4 | database: pbm_dev 5 | template: template0 6 | 7 | development: 8 | <<: *default 9 | database: pbm_dev 10 | host: localhost 11 | 12 | test: 13 | <<: *default 14 | database: pbm_test 15 | -------------------------------------------------------------------------------- /config/database.yml.non_docker: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: postgresql 3 | encoding: utf8 4 | database: pbm_dev 5 | template: template0 6 | 7 | test: &test 8 | adapter: postgresql 9 | encoding: utf8 10 | database: pbm_test 11 | template: template0 12 | 13 | production: 14 | adapter: postgresql 15 | encoding: utf8 16 | database: pbm_dev 17 | password: 18 | template: template0 19 | 20 | cucumber: 21 | <<: *test 22 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative "application" 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /config/initializers/apipie.rb: -------------------------------------------------------------------------------- 1 | Apipie.configure do |config| 2 | config.app_name = "pinballmap.com API" 3 | config.api_base_url = "" 4 | config.doc_base_url = "/api/v1/docs" 5 | config.api_controllers_matcher = "#{Rails.root}/app/controllers/api/v1/*.rb" 6 | config.validate = false 7 | config.translate = false 8 | config.api_routes = Rails.application.routes 9 | config.app_info = " 10 | If you use this API for something cool, please let us know, we like looking at interesting uses of the data. 11 | If you have any suggestions/requests for endpoints, please email: admin@pinballmap.com. 12 | If you have any patches that you'd like to submit to the API, please check out: https://github.com/pinballmap/pbm. 13 | If you use this data, please include attribution. 14 | " 15 | end 16 | -------------------------------------------------------------------------------- /config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /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 | if Rails.env.development? 10 | Sprockets.export_concurrent = false 11 | end 12 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code 7 | # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". 8 | # Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] 9 | # Rails.backtrace_cleaner.add_silencer {|line| /vendor/.match?(line)} -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /config/initializers/countries.rb: -------------------------------------------------------------------------------- 1 | ISO3166::Data.register( 2 | alpha2: "XK", 3 | alpha3: "XKX", 4 | name: "Kosovo", 5 | currency: "EUR", 6 | translations: { 7 | "en" => "Kosovo", 8 | }, 9 | ) 10 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. 4 | # Use this to limit dissemination of sensitive information. 5 | # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. 6 | Rails.application.config.filter_parameters += [ 7 | :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc 8 | ] 9 | -------------------------------------------------------------------------------- /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/kaminari_config.rb: -------------------------------------------------------------------------------- 1 | Kaminari.configure do |config| 2 | # config.default_per_page = 25 3 | # config.window = 4 4 | # config.outer_window = 0 5 | # config.left = 0 6 | # config.right = 0 7 | # config.page_method_name = :page 8 | # config.param_name = :page 9 | end 10 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | Mime::Type.register "application/geo+json", :geojson 6 | -------------------------------------------------------------------------------- /config/initializers/paper_trail.rb: -------------------------------------------------------------------------------- 1 | PaperTrail.config.track_associations = true 2 | -------------------------------------------------------------------------------- /config/initializers/permissions_policy.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Define an application-wide HTTP permissions policy. For further 4 | # information see: https://developers.google.com/web/updates/2018/06/feature-policy 5 | 6 | # Rails.application.config.permissions_policy do |policy| 7 | # policy.camera :none 8 | # policy.gyroscope :none 9 | # policy.microphone :none 10 | # policy.usb :none 11 | # policy.fullscreen :self 12 | # policy.payment :self, "https://secure.example.com" 13 | # end 14 | -------------------------------------------------------------------------------- /config/initializers/phonelib.rb: -------------------------------------------------------------------------------- 1 | Phonelib.default_country = "US" 2 | -------------------------------------------------------------------------------- /config/initializers/rails_admin_paper_trail.rb: -------------------------------------------------------------------------------- 1 | RailsAdmin::Extensions::PaperTrail::VersionProxy.module_eval do 2 | def message 3 | if @version.event == "update" 4 | @message = @version.object_changes 5 | else 6 | @message = @version.event 7 | end 8 | @version.respond_to?(:changeset) && @version.changeset.present? ? @message + ' [' + @version.changeset.to_a.collect { |c| "#{c[0]} = #{c[1][1]}" }.join(', ') + ']' : @message 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Pbm::Application.config.session_store :cookie_store, :key => '_pbm_session' 4 | 5 | # Use the database for sessions instead of the cookie-based default, 6 | # which shouldn't be used to store highly confidential information 7 | # (create the session table with "rake db:sessions:create") 8 | # Pbm::Application.config.session_store :active_record_store 9 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /config/queue.yml: -------------------------------------------------------------------------------- 1 | default: &default 2 | dispatchers: 3 | - polling_interval: 1 4 | batch_size: 500 5 | workers: 6 | - queues: "*" 7 | threads: 3 8 | processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> 9 | polling_interval: 0.1 10 | 11 | development: 12 | <<: *default 13 | 14 | test: 15 | <<: *default 16 | 17 | production: 18 | database: queue 19 | <<: *default 20 | -------------------------------------------------------------------------------- /config/recurring.yml: -------------------------------------------------------------------------------- 1 | # production: 2 | # periodic_cleanup: 3 | # class: CleanSoftDeletedRecordsJob 4 | # queue: background 5 | # args: [ 1000, { batch_size: 500 } ] 6 | # schedule: every hour 7 | # periodic_command: 8 | # command: "SoftDeletedRecord.due.delete_all" 9 | # priority: 2 10 | # schedule: at 5am every day 11 | -------------------------------------------------------------------------------- /config/robots.staging.txt: -------------------------------------------------------------------------------- 1 | User-Agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /config/spring.rb: -------------------------------------------------------------------------------- 1 | Spring.watch( 2 | ".ruby-version", 3 | ".rbenv-vars", 4 | "tmp/restart.txt", 5 | "tmp/caching-dev.txt" 6 | ) 7 | -------------------------------------------------------------------------------- /db/cache_migrate/20250421030130_create_cache_table.rb: -------------------------------------------------------------------------------- 1 | class CreateCacheTable < ActiveRecord::Migration[7.2] 2 | def change 3 | create_table "solid_cache_entries", force: :cascade do |t| 4 | t.binary "key", limit: 1024, null: false 5 | t.binary "value", limit: 536870912, null: false 6 | t.datetime "created_at", null: false 7 | t.integer "key_hash", limit: 8, null: false 8 | t.integer "byte_size", limit: 4, null: false 9 | t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" 10 | t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" 11 | t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/cache_schema.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ActiveRecord::Schema[7.2].define(version: 1) do 4 | create_table "solid_cache_entries", force: :cascade do |t| 5 | t.binary "key", limit: 1024, null: false 6 | t.binary "value", limit: 536870912, null: false 7 | t.datetime "created_at", null: false 8 | t.integer "key_hash", limit: 8, null: false 9 | t.integer "byte_size", limit: 4, null: false 10 | t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" 11 | t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" 12 | t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20101029051956_create_locations.rb: -------------------------------------------------------------------------------- 1 | class CreateLocations < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :locations do |t| 4 | t.string :name 5 | t.string :street 6 | t.string :city 7 | t.string :state 8 | t.string :zip 9 | t.string :phone 10 | t.float :lat 11 | t.float :lon 12 | t.string :website 13 | 14 | t.timestamps 15 | end 16 | end 17 | 18 | def self.down 19 | drop_table :locations 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /db/migrate/20101107193735_create_machines.rb: -------------------------------------------------------------------------------- 1 | class CreateMachines < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :machines do |t| 4 | t.string :name 5 | t.boolean :is_active 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :machines 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20101217210700_create_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class CreateLocationMachineXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :location_machine_xrefs do |t| 4 | 5 | t.timestamps 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :location_machine_xrefs 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20101218055651_location_machine_xref_has_one_location.rb: -------------------------------------------------------------------------------- 1 | class LocationMachineXrefHasOneLocation < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_machine_xrefs, :location_id, :integer 4 | add_column :location_machine_xrefs, :machine_id, :integer 5 | end 6 | 7 | def self.down 8 | remove_column :location_machine_xrefs, :location_id, :integer 9 | remove_column :location_machine_xrefs, :machine_id, :integer 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110104033947_add_zone_id_to_location.rb: -------------------------------------------------------------------------------- 1 | class AddZoneIdToLocation < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :locations, :zone_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :locations, :zone_id, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110104034353_create_zones.rb: -------------------------------------------------------------------------------- 1 | class CreateZones < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :zones do |t| 4 | t.string :name 5 | t.integer :region_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :zones 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20110106015040_add_condition_and_condition_date_to_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddConditionAndConditionDateToLocationMachineXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_machine_xrefs, :condition, :string 4 | add_column :location_machine_xrefs, :condition_date, :date 5 | end 6 | 7 | def self.down 8 | remove_column :location_machine_xrefs, :condition, :string 9 | remove_column :location_machine_xrefs, :condition_date, :date 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110108190631_add_model_machine_score_xref.rb: -------------------------------------------------------------------------------- 1 | class AddModelMachineScoreXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :machine_score_xrefs do |t| 4 | t.integer :location_machine_xref_id 5 | t.integer :score 6 | t.string :initials 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :machine_score_xrefs 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20110109031830_add_rank_to_machine_score_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddRankToMachineScoreXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :machine_score_xrefs, :rank, :string 4 | end 5 | 6 | def self.down 7 | remove_column :machine_score_xrefs, :rank 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110109033611_change_machine_score_xref_rank_to_integer.rb: -------------------------------------------------------------------------------- 1 | class ChangeMachineScoreXrefRankToInteger < ActiveRecord::Migration[4.2] 2 | def self.up 3 | remove_column :machine_score_xrefs, :rank 4 | add_column :machine_score_xrefs, :rank, :integer 5 | end 6 | 7 | def self.down 8 | remove_column :machine_score_xrefs, :rank 9 | add_column :machine_score_xrefs, :rank, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110109061136_create_region.rb: -------------------------------------------------------------------------------- 1 | class CreateRegion < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :regions do |t| 4 | t.string :name 5 | 6 | t.timestamps 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :regions 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20110109202100_add_region_id_to_location.rb: -------------------------------------------------------------------------------- 1 | class AddRegionIdToLocation < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :locations, :region_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :locations, :region_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110109233904_add_full_name_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddFullNameToRegion < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :regions, :full_name, :string 4 | end 5 | 6 | def self.down 7 | remove_column :regions, :full_name 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110112031846_create_histories_table.rb: -------------------------------------------------------------------------------- 1 | class CreateHistoriesTable < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :histories do |t| 4 | t.string :message # title, name, or object_id 5 | t.string :username 6 | t.integer :item 7 | t.string :table 8 | t.integer :month, :limit => 2 9 | t.integer :year, :limit => 5 10 | t.timestamps 11 | end 12 | add_index(:histories, [:item, :table, :month, :year], :name => 'index_rails_admin_histories' ) 13 | end 14 | 15 | def self.down 16 | drop_table :histories 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /db/migrate/20110113014924_add_motd_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddMotdToRegion < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :regions, :motd, :string 4 | end 5 | 6 | def self.down 7 | remove_column :regions, :motd 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110113015641_add_region_id_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddRegionIdToUser < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :users, :region_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :users, :region_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110212001944_create_events.rb: -------------------------------------------------------------------------------- 1 | class CreateEvents < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :events do |t| 4 | t.integer :region_id 5 | t.string :name 6 | t.text :long_desc 7 | t.string :link 8 | t.integer :category_no 9 | t.date :start_date 10 | t.date :end_date 11 | t.integer :location_id 12 | 13 | t.timestamps 14 | end 15 | end 16 | 17 | def self.down 18 | drop_table :events 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /db/migrate/20110217044158_create_location_picture_xrefs.rb: -------------------------------------------------------------------------------- 1 | class CreateLocationPictureXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :location_picture_xrefs do |t| 4 | t.integer :location_picture_xref_no 5 | t.integer :location_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :location_picture_xrefs 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20110218024542_add_photo_to_location_picture_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddPhotoToLocationPictureXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_picture_xrefs, :photo, :string 4 | end 5 | 6 | def self.down 7 | remove_column :location_picture_xrefs, :photo 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110221234445_add_lat_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddLatToRegion < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :regions, :lat, :float 4 | end 5 | 6 | def self.down 7 | remove_column :regions, :lat 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110221234515_add_lon_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddLonToRegion < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :regions, :lon, :float 4 | end 5 | 6 | def self.down 7 | remove_column :regions, :lon 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110221234608_add_n_search_no_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddNSearchNoToRegion < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :regions, :n_search_no, :int 4 | end 5 | 6 | def self.down 7 | remove_column :regions, :n_search_no 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110222000458_create_operators.rb: -------------------------------------------------------------------------------- 1 | class CreateOperators < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :operators do |t| 4 | t.string :name 5 | t.integer :region_id 6 | t.string :email 7 | t.string :website 8 | t.string :phone 9 | 10 | t.timestamps 11 | end 12 | end 13 | 14 | def self.down 15 | drop_table :operators 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20110222001631_add_short_name_to_zone.rb: -------------------------------------------------------------------------------- 1 | class AddShortNameToZone < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :zones, :short_name, :string 4 | end 5 | 6 | def self.down 7 | remove_column :zones, :short_name 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110222001739_add_is_primary_to_zone.rb: -------------------------------------------------------------------------------- 1 | class AddIsPrimaryToZone < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :zones, :is_primary, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :zones, :is_primary 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110222002318_add_ip_to_machine_score_xref.rb: -------------------------------------------------------------------------------- 1 | class AddIpToMachineScoreXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :machine_score_xrefs, :ip, :string 4 | end 5 | 6 | def self.down 7 | remove_column :machine_score_xrefs, :ip 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110222053847_add_operator_id_to_location_machine_xref.rb: -------------------------------------------------------------------------------- 1 | class AddOperatorIdToLocationMachineXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_machine_xrefs, :operator_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :location_machine_xrefs, :operator_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110222054539_add_ip_to_location_machine_xref.rb: -------------------------------------------------------------------------------- 1 | class AddIpToLocationMachineXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_machine_xrefs, :ip, :string 4 | end 5 | 6 | def self.down 7 | remove_column :location_machine_xrefs, :ip 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110222060400_change_description_from_string_to_text.rb: -------------------------------------------------------------------------------- 1 | class ChangeDescriptionFromStringToText < ActiveRecord::Migration[4.2] 2 | def self.up 3 | change_column :location_machine_xrefs, :condition, :text 4 | end 5 | 6 | def self.down 7 | change_column :location_machine_xrefs, :condition, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110222061738_change_score_from_int_to_bigint.rb: -------------------------------------------------------------------------------- 1 | class ChangeScoreFromIntToBigint < ActiveRecord::Migration[4.2] 2 | def self.up 3 | change_column :machine_score_xrefs, :score, :bigint 4 | end 5 | 6 | def self.down 7 | change_column :machine_score_xrefs, :score, :int 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110223052335_add_description_to_location_picture_xref.rb: -------------------------------------------------------------------------------- 1 | class AddDescriptionToLocationPictureXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_picture_xrefs, :description, :text 4 | end 5 | 6 | def self.down 7 | remove_column :location_picture_xrefs, :description 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110324054350_add_index_to_location_id_and_machine_id_on_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToLocationIdAndMachineIdOnLocationMachineXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_index :location_machine_xrefs, :location_id 4 | add_index :location_machine_xrefs, :machine_id 5 | end 6 | 7 | def self.down 8 | remove_index :location_machine_xrefs, :location_id 9 | remove_index :location_machine_xrefs, :machine_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110325055510_add_location_machine_xref_index_on_machine_score_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddLocationMachineXrefIndexOnMachineScoreXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_index :machine_score_xrefs, :location_machine_xref_id 4 | end 5 | 6 | def self.down 7 | remove_index :machine_score_xrefs, :location_machine_xref_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110325061757_location_id_indx_on_location_picture_xrefs.rb: -------------------------------------------------------------------------------- 1 | class LocationIdIndxOnLocationPictureXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | end 4 | 5 | def self.down 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20110331234837_add_user_id_to_machine_score_xref.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToMachineScoreXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :machine_score_xrefs, :user_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :machine_score_xrefs, :user_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110331235611_remove_initals_from_machine_score_xrefs.rb: -------------------------------------------------------------------------------- 1 | class RemoveInitalsFromMachineScoreXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | remove_column :machine_score_xrefs, :initials 4 | end 5 | 6 | def self.down 7 | add_column :machine_score_xrefs, :initials, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110401001017_add_initials_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddInitialsToUsers < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :users, :initials, :string 4 | end 5 | 6 | def self.down 7 | remove_column :users, :initials 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110416203328_add_approved_to_location_picture_xref.rb: -------------------------------------------------------------------------------- 1 | class AddApprovedToLocationPictureXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_picture_xrefs, :approved, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :location_picture_xrefs, :approved 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110416204407_add_user_id_to_location_picture_xref.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToLocationPictureXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_picture_xrefs, :user_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :location_picture_xrefs, :user_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110416205031_remove_location_picture_xref_no_from_location_picture_xref.rb: -------------------------------------------------------------------------------- 1 | class RemoveLocationPictureXrefNoFromLocationPictureXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | remove_column :location_picture_xrefs, :location_picture_xref_no 4 | end 5 | 6 | def self.down 7 | add_column :location_picture_xrefs, :location_picture_xref_no, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110416231605_create_region_links_xref_table.rb: -------------------------------------------------------------------------------- 1 | class CreateRegionLinksXrefTable < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :region_link_xrefs do |t| 4 | t.string :name 5 | t.string :url 6 | t.string :description 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :region_link_xrefs 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20110416232037_add_category_and_region_id_to_region_link_xref.rb: -------------------------------------------------------------------------------- 1 | class AddCategoryAndRegionIdToRegionLinkXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :region_link_xrefs, :category, :string 4 | add_column :region_link_xrefs, :region_id, :integer 5 | end 6 | 7 | def self.down 8 | remove_column :region_link_xrefs, :category 9 | remove_column :region_link_xrefs, :region_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110419023435_add_sort_order_to_region_link_xref.rb: -------------------------------------------------------------------------------- 1 | class AddSortOrderToRegionLinkXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :region_link_xrefs, :sort_order, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :region_link_xrefs, :sort_order 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110428031156_add_user_id_to_location_machine_xref.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToLocationMachineXref < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_machine_xrefs, :user_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :location_machine_xrefs, :user_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110428052920_create_location_types.rb: -------------------------------------------------------------------------------- 1 | class CreateLocationTypes < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :location_types do |t| 4 | 5 | t.timestamps 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :location_types 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20110428053024_add_name_to_location_type.rb: -------------------------------------------------------------------------------- 1 | class AddNameToLocationType < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_types, :name, :string 4 | end 5 | 6 | def self.down 7 | remove_column :location_types, :name 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110428054244_add_location_type_id_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddLocationTypeIdToLocations < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :locations, :location_type_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :locations, :location_type_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110429005401_add_category_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddCategoryToEvents < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :events, :category, :string 4 | end 5 | 6 | def self.down 7 | remove_column :events, :category 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110505231652_add_desc_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddDescToLocations < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :locations, :desc, :string 4 | end 5 | 6 | def self.down 7 | remove_column :locations, :desc 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110509032221_add_machine_score_xrefs_count_to_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddMachineScoreXrefsCountToLocationMachineXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_machine_xrefs, :machine_score_xrefs_count, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :location_machine_xrefs, :machine_score_xrefs_count 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110512032510_add_initials_to_machine_score_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddInitialsToMachineScoreXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :machine_score_xrefs, :initials, :string 4 | end 5 | 6 | def self.down 7 | remove_column :machine_score_xrefs, :initials 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110520155736_add_operator_id_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddOperatorIdToLocations < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :locations, :operator_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :locations, :operator_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110520160215_remove_operator_id_from_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class RemoveOperatorIdFromLocationMachineXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | remove_column :location_machine_xrefs, :operator_id 4 | end 5 | 6 | def self.down 7 | add_column :location_machine_xrefs, :operator_id, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110527230812_rename_histories_to_rails_admin_histories.rb: -------------------------------------------------------------------------------- 1 | class RenameHistoriesToRailsAdminHistories < ActiveRecord::Migration[4.2] 2 | def self.up 3 | rename_table :histories, :rails_admin_histories 4 | end 5 | 6 | def self.down 7 | rename_table :rails_admin_histories, :histories 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110528183055_rename_location_desc_to_location_description.rb: -------------------------------------------------------------------------------- 1 | class RenameLocationDescToLocationDescription < ActiveRecord::Migration[4.2] 2 | def self.up 3 | rename_column :locations, :desc, :description 4 | end 5 | 6 | def self.down 7 | rename_column :locations, :description, :desc 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110528184008_rename_link_on_events_to_external_link.rb: -------------------------------------------------------------------------------- 1 | class RenameLinkOnEventsToExternalLink < ActiveRecord::Migration[4.2] 2 | def self.up 3 | rename_column :events, :link, :external_link 4 | end 5 | 6 | def self.down 7 | rename_column :events, :external_link, :link 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120121231029_add_default_search_type_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultSearchTypeToRegion < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :regions, :default_search_type, :string 4 | end 5 | 6 | def self.down 7 | remove_column :regions, :default_search_type 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120331225504_add_should_email_machine_removal_to_regions.rb: -------------------------------------------------------------------------------- 1 | class AddShouldEmailMachineRemovalToRegions < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :regions, :should_email_machine_removal, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :regions, :should_email_machine_removal, :boolean 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120407204619_remove_remember_token_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemoveRememberTokenFromUsers < ActiveRecord::Migration[4.2] 2 | def up 3 | # remove_column :users, :remember_token 4 | end 5 | 6 | def down 7 | # add_column :users, :remember_token, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120407205003_add_reset_password_sent_at_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddResetPasswordSentAtToUsers < ActiveRecord::Migration[4.2] 2 | def up 3 | add_column :users, :reset_password_sent_at, :datetime 4 | end 5 | 6 | def down 7 | remove_column :users, :reset_password_sent_at 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120520190325_add_attachment_photo_to_location_picture_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddAttachmentPhotoToLocationPictureXrefs < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :location_picture_xrefs, :photo_file_name, :string 4 | add_column :location_picture_xrefs, :photo_content_type, :string 5 | add_column :location_picture_xrefs, :photo_file_size, :integer 6 | add_column :location_picture_xrefs, :photo_updated_at, :datetime 7 | end 8 | 9 | def self.down 10 | remove_column :location_picture_xrefs, :photo_file_name 11 | remove_column :location_picture_xrefs, :photo_content_type 12 | remove_column :location_picture_xrefs, :photo_file_size 13 | remove_column :location_picture_xrefs, :photo_updated_at 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20120520190845_remove_photo_from_location_picture_xref.rb: -------------------------------------------------------------------------------- 1 | class RemovePhotoFromLocationPictureXref < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :location_picture_xrefs, :photo 4 | end 5 | 6 | def down 7 | add_column :location_picture_xrefs, :photo 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130303070120_add_ipdb_link_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddIpdbLinkToMachines < ActiveRecord::Migration[4.2] 2 | def up 3 | add_column :machines, :ipdb_link, :string 4 | end 5 | def down 6 | remove_column :machines, :ipdb_link 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20130303070426_add_year_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddYearToMachines < ActiveRecord::Migration[4.2] 2 | def up 3 | add_column :machines, :year, :integer 4 | end 5 | 6 | def down 7 | remove_column :machines, :year 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130303070529_add_manufacturer_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddManufacturerToMachines < ActiveRecord::Migration[4.2] 2 | def up 3 | add_column :machines, :manufacturer, :string 4 | end 5 | def down 6 | remove_column :machines, :manufacturer 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20130413173205_add_is_machine_admin_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddIsMachineAdminToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :is_machine_admin, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130510024658_add_is_primary_email_contact_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddIsPrimaryEmailContactToUser < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :is_primary_email_contact, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130713014626_add_is_super_admin_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddIsSuperAdminToUser < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :is_super_admin, :bool 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20131019021843_add_external_location_name_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddExternalLocationNameToEvents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :events, :external_location_name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140329173540_create_banned_ips.rb: -------------------------------------------------------------------------------- 1 | class CreateBannedIps < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :banned_ips do |t| 4 | 5 | t.timestamps 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20140329174930_add_ip_address_to_banned_i_ps.rb: -------------------------------------------------------------------------------- 1 | class AddIpAddressToBannedIPs < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :banned_ips, :ip_address, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140612173934_change_region_lat_lon_to_numerics.rb: -------------------------------------------------------------------------------- 1 | class ChangeRegionLatLonToNumerics < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :regions, :lat, :decimal, :precision => 18, :scale => 12 4 | change_column :regions, :lon, :decimal, :precision => 18, :scale => 12 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20140816200939_add_ifpa_calendar_id_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddIfpaCalendarIdToEvents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :events, :ifpa_calendar_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140816200950_add_ifpa_tournament_id_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddIfpaTournamentIdToEvents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :events, :ifpa_tournament_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140913204019_createmachinegroup.rb: -------------------------------------------------------------------------------- 1 | class Createmachinegroup < ActiveRecord::Migration[4.2] 2 | def up 3 | create_table :machine_groups do |t| 4 | t.string :name, :null => false 5 | t.timestamps 6 | end 7 | end 8 | 9 | def down 10 | drop_table :machine_groups 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20140913204322_add_machine_group_id_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddMachineGroupIdToMachines < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :machines, :machine_group_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150128151820_create_machine_comments.rb: -------------------------------------------------------------------------------- 1 | class CreateMachineComments < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :machine_comments do |t| 4 | t.text :comment 5 | 6 | t.references :location_machine_xref, index: true 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20150128155902_rename_machine_comment_to_machine_condition.rb: -------------------------------------------------------------------------------- 1 | class RenameMachineCommentToMachineCondition < ActiveRecord::Migration[4.2] 2 | def self.up 3 | rename_table :machine_comments, :machine_conditions 4 | end 5 | 6 | def self.down 7 | rename_table :machine_comments, :machine_conditions 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20150926235940_add_date_last_updated_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddDateLastUpdatedToLocations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :locations, :date_last_updated, :date 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150928221835_add_ipdb_id_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddIpdbIdToMachines < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :machines, :ipdb_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20151016185205_add_user_submission.rb: -------------------------------------------------------------------------------- 1 | class AddUserSubmission < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :user_submissions do |t| 4 | t.text :submission_type 5 | t.text :submission 6 | 7 | t.references :region, index: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20151017212853_add_should_auto_delete_empty_locations_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddShouldAutoDeleteEmptyLocationsToRegion < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :regions, :should_auto_delete_empty_locations, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20151230222502_add_user_id_to_user_submissions.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToUserSubmissions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :user_submissions, :user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160102205629_add_username_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddUsernameToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :username, :text 4 | add_index :users, :username, unique: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160403220735_add_confirmable_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddConfirmableToUser < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :users, :confirmation_token, :string 4 | add_column :users, :confirmed_at, :datetime 5 | add_column :users, :confirmation_sent_at, :datetime 6 | end 7 | 8 | def self.down 9 | remove_column :users, :confirmation_token 10 | remove_column :users, :confirmed_at 11 | remove_column :users, :confirmation_sent_at 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20160425025650_add_is_disabled_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddIsDisabledToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :is_disabled, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160428022137_add_user_id_to_machine_condition.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToMachineCondition < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :machine_conditions, :user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160428033749_add_last_updated_by_user_id_to_location.rb: -------------------------------------------------------------------------------- 1 | class AddLastUpdatedByUserIdToLocation < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :locations, :last_updated_by_user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160521200326_add_authentication_token_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddAuthenticationTokenToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :authentication_token, :string, limit: 30 4 | add_index :users, :authentication_token, unique: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160828174541_remove_initials_from_machine_score_xref.rb: -------------------------------------------------------------------------------- 1 | class RemoveInitialsFromMachineScoreXref < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :machine_score_xrefs, :initials 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160828192015_remove_rank_from_machine_score_xrefs.rb: -------------------------------------------------------------------------------- 1 | class RemoveRankFromMachineScoreXrefs < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :machine_score_xrefs, :rank 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160911181659_add_meta_fields_to_user_submissions.rb: -------------------------------------------------------------------------------- 1 | class AddMetaFieldsToUserSubmissions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :user_submissions, :location_id, :integer 4 | add_column :user_submissions, :machine_id, :integer 5 | add_column :user_submissions, :location_machine_xref_id, :integer 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20160912054027_remove_location_machine_xref_id_from_user_submissions.rb: -------------------------------------------------------------------------------- 1 | class RemoveLocationMachineXrefIdFromUserSubmissions < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :user_submissions, :location_machine_xref_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170306034705_re_add_rank_to_machine_score_xrefs.rb: -------------------------------------------------------------------------------- 1 | class ReAddRankToMachineScoreXrefs < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :machine_score_xrefs, :rank, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170325210202_addsend_digest_comment_emails.rb: -------------------------------------------------------------------------------- 1 | class AddsendDigestCommentEmails < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :regions, :send_digest_comment_emails, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170325210403_addsend_digest_removal_emails.rb: -------------------------------------------------------------------------------- 1 | class AddsendDigestRemovalEmails < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :regions, :send_digest_removal_emails, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170418033559_add_table_suggested_location.rb: -------------------------------------------------------------------------------- 1 | class AddTableSuggestedLocation < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :suggested_locations do |t| 4 | t.text :name 5 | t.text :street 6 | t.text :city 7 | t.text :state 8 | t.text :zip 9 | t.text :phone 10 | t.text :website 11 | t.integer :location_type_id 12 | t.integer :operator_id 13 | t.integer :region_id 14 | t.text :comments 15 | t.text :machines 16 | t.text :user_inputted_address 17 | t.decimal :lat, :scale => 12, :precision => 18 18 | t.decimal :lon, :scale => 12, :precision => 18 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /db/migrate/20170625051130_add_default_value_to_region_motd.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultValueToRegionMotd < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column_default :regions, :motd, 'To help keep Pinball Map running, consider a donation! https://pinballmap.com/donate' 4 | end 5 | 6 | def down 7 | change_column_default :regions, :motd, nil 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20170813032145_add_timestamps_to_suggested_location.rb: -------------------------------------------------------------------------------- 1 | class AddTimestampsToSuggestedLocation < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :suggested_locations, :created_at, :datetime 4 | add_column :suggested_locations, :updated_at, :datetime 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20180214052824_add_zone_id_to_suggested_locations.rb: -------------------------------------------------------------------------------- 1 | class AddZoneIdToSuggestedLocations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :suggested_locations, :zone_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180322035017_add_is_stern_army_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddIsSternArmyToLocations < ActiveRecord::Migration[5.1] 2 | def change 3 | add_column :locations, :is_stern_army, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180412042101_add_state_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddStateToRegion < ActiveRecord::Migration[5.1] 2 | def change 3 | add_column :regions, :state, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180501030619_updateall_rails_admin_history_chars_to_be_text.rb: -------------------------------------------------------------------------------- 1 | class UpdateallRailsAdminHistoryCharsToBeText < ActiveRecord::Migration[5.1] 2 | def change 3 | change_column :rails_admin_histories, :message, :text 4 | change_column :rails_admin_histories, :username, :text 5 | change_column :rails_admin_histories, :table, :text 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20180527033929_add_county_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddCountyToLocations < ActiveRecord::Migration[5.1] 2 | def change 3 | add_column :locations, :country, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180528154913_add_county_to_suggested_locations.rb: -------------------------------------------------------------------------------- 1 | class AddCountyToSuggestedLocations < ActiveRecord::Migration[5.1] 2 | def change 3 | add_column :suggested_locations, :country, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180713045044_add_opdb_id_to_machine.rb: -------------------------------------------------------------------------------- 1 | class AddOpdbIdToMachine < ActiveRecord::Migration[5.1] 2 | def change 3 | add_column :machines, :opdb_id, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180803024507_add_user_id_index_to_machine_condition.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdIndexToMachineCondition < ActiveRecord::Migration[5.2] 2 | def change 3 | add_index :machine_conditions, :user_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180803024743_add_user_id_index_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdIndexToLocations < ActiveRecord::Migration[5.2] 2 | def change 3 | add_index :locations, :last_updated_by_user_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180826144303_remove_approved_from_location_picture_xref.rb: -------------------------------------------------------------------------------- 1 | class RemoveApprovedFromLocationPictureXref < ActiveRecord::Migration[5.2] 2 | def change 3 | remove_column :location_picture_xrefs, :approved 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180921032336_add_index_to_locations_is_stern_army.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToLocationsIsSternArmy < ActiveRecord::Migration[5.2] 2 | def change 3 | add_index :locations, :is_stern_army 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20181108041556_create_table_user_fave_location.rb: -------------------------------------------------------------------------------- 1 | class CreateTableUserFaveLocation < ActiveRecord::Migration[5.2] 2 | def change 3 | create_table :user_fave_locations do |t| 4 | t.integer :user_id 5 | t.integer :location_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20190302181011_add_effective_radius_to_region.rb: -------------------------------------------------------------------------------- 1 | class AddEffectiveRadiusToRegion < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :regions, :effective_radius, :float, default: 200.0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190405035609_add_devise_recoverable_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddDeviseRecoverableToUser < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column(:users, :reset_password_token, :string) unless column_exists?(:users, :reset_password_token) 4 | add_column(:users, :reset_password_sent_at, :datetime) unless column_exists?(:users, :reset_password_sent_at) 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20200902061504_add_security_test_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddSecurityTestToUser < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :users, :security_test, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210112043456_change_location_description_from_string_to_text.rb: -------------------------------------------------------------------------------- 1 | class ChangeLocationDescriptionFromStringToText < ActiveRecord::Migration[5.2] 2 | def self.up 3 | change_column :locations, :description, :text 4 | end 5 | 6 | def self.down 7 | change_column :locations, :description, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20210413230424_add_icon_to_location_type.rb: -------------------------------------------------------------------------------- 1 | class AddIconToLocationType < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :location_types, :icon, :string 4 | add_column :location_types, :library, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20211004024618_add_opdb_img_to_machine.rb: -------------------------------------------------------------------------------- 1 | class AddOpdbImgToMachine < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :machines, :opdb_img, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220214041241_add_opdb_img_height_to_machine.rb: -------------------------------------------------------------------------------- 1 | class AddOpdbImgHeightToMachine < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :machines, :opdb_img_height, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220214041302_add_opdb_img_width_to_machine.rb: -------------------------------------------------------------------------------- 1 | class AddOpdbImgWidthToMachine < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :machines, :opdb_img_width, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220513054325_drop_banned_ip_table.rb: -------------------------------------------------------------------------------- 1 | class DropBannedIpTable < ActiveRecord::Migration[5.2] 2 | def up 3 | drop_table :banned_ips 4 | end 5 | 6 | def down 7 | raise ActiveRecord::IrreversibleMigration 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20220526191634_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb: -------------------------------------------------------------------------------- 1 | # This migration comes from active_storage (originally 20180723000244) 2 | class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0] 3 | def up 4 | return if foreign_key_exists?(:active_storage_attachments, column: :blob_id) 5 | 6 | if table_exists?(:active_storage_blobs) 7 | add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20220603045549_set_precision_and_scale_to_location_lat_lon.rb: -------------------------------------------------------------------------------- 1 | class SetPrecisionAndScaleToLocationLatLon < ActiveRecord::Migration[6.1] 2 | def up 3 | change_column :locations, :lat, :decimal, :scale => 12, :precision => 18 4 | change_column :locations, :lon, :decimal, :scale => 12, :precision => 18 5 | end 6 | 7 | def down 8 | change_column :locations, :lat, :float 9 | change_column :locations, :lon, :float 10 | end 11 | end 12 | 13 | -------------------------------------------------------------------------------- /db/migrate/20230117183500_add_machine_type_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddMachineTypeToMachines < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :machines, :machine_type, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230117183514_add_machine_display_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddMachineDisplayToMachines < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :machines, :machine_display, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230121051546_add_fields_to_user_submissions.rb: -------------------------------------------------------------------------------- 1 | class AddFieldsToUserSubmissions < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :user_submissions, :comment, :string 4 | add_column :user_submissions, :user_name, :string 5 | add_column :user_submissions, :location_name, :string 6 | add_column :user_submissions, :machine_name, :string 7 | add_column :user_submissions, :high_score, :bigint 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20230207174539_add_ic_eligible_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddIcEligibleToMachines < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :machines, :ic_eligible, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230207174826_add_ic_enabled_to_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class AddIcEnabledToLocationMachineXrefs < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :location_machine_xrefs, :ic_enabled, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230207174904_add_ic_active_to_location.rb: -------------------------------------------------------------------------------- 1 | class AddIcActiveToLocation < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :locations, :ic_active, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230220182301_add_city_to_user_submissions.rb: -------------------------------------------------------------------------------- 1 | class AddCityToUserSubmissions < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :user_submissions, :city_name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230406181953_add_service_name_to_active_storage_blobs.active_storage.rb: -------------------------------------------------------------------------------- 1 | # This migration comes from active_storage (originally 20190112182829) 2 | class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] 3 | def up 4 | return unless table_exists?(:active_storage_blobs) 5 | 6 | unless column_exists?(:active_storage_blobs, :service_name) 7 | add_column :active_storage_blobs, :service_name, :string 8 | 9 | if configured_service = ActiveStorage::Blob.service.name 10 | ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) 11 | end 12 | 13 | change_column :active_storage_blobs, :service_name, :string, null: false 14 | end 15 | end 16 | 17 | def down 18 | return unless table_exists?(:active_storage_blobs) 19 | 20 | remove_column :active_storage_blobs, :service_name 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /db/migrate/20230406181955_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb: -------------------------------------------------------------------------------- 1 | # This migration comes from active_storage (originally 20211119233751) 2 | class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] 3 | def change 4 | return unless table_exists?(:active_storage_blobs) 5 | 6 | change_column_null(:active_storage_blobs, :checksum, true) 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20230406195154_add_object_changes_to_versions.rb: -------------------------------------------------------------------------------- 1 | # This migration adds the optional `object_changes` column, in which PaperTrail 2 | # will store the `changes` diff for each update event. See the readme for 3 | # details. 4 | class AddObjectChangesToVersions < ActiveRecord::Migration[7.0] 5 | # The largest text column available in all supported RDBMS. 6 | # See `create_versions.rb` for details. 7 | TEXT_BYTES = 1_073_741_823 8 | 9 | def change 10 | add_column :versions, :object_changes, :text, limit: TEXT_BYTES 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20230406195208_add_transaction_id_column_to_versions.rb: -------------------------------------------------------------------------------- 1 | # This migration and CreateVersionAssociations provide the necessary 2 | # schema for tracking associations. 3 | class AddTransactionIdColumnToVersions < ActiveRecord::Migration[7.0] 4 | def self.up 5 | add_column :versions, :transaction_id, :integer 6 | add_index :versions, [:transaction_id] 7 | end 8 | 9 | def self.down 10 | remove_index :versions, [:transaction_id] 11 | remove_column :versions, :transaction_id 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20230504162149_create_status.rb: -------------------------------------------------------------------------------- 1 | class CreateStatus < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :statuses, if_not_exists: true do |t| 4 | t.string :status_type 5 | t.timestamps 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20230518001533_add_user_submissions_count_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddUserSubmissionsCountToUsers < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :user_submissions_count, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230702162416_create_banned_ips_again.rb: -------------------------------------------------------------------------------- 1 | class CreateBannedIpsAgain < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :banned_ips, if_not_exists: true do |t| 4 | t.string :ip_address 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20231025185948_add_columns_to_user_submissions.rb: -------------------------------------------------------------------------------- 1 | class AddColumnsToUserSubmissions < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :user_submissions, :lat, :float 4 | add_column :user_submissions, :lon, :float 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20240403171756_add_kineticist_url_to_machines.rb: -------------------------------------------------------------------------------- 1 | class AddKineticistUrlToMachines < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :machines, :kineticist_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240520232037_remove_ip_from_machine_score_xrefs.rb: -------------------------------------------------------------------------------- 1 | class RemoveIpFromMachineScoreXrefs < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :machine_score_xrefs, :ip, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240521020441_remove_ip_from_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class RemoveIpFromLocationMachineXrefs < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :location_machine_xrefs, :ip, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240521021315_remove_condition_from_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class RemoveConditionFromLocationMachineXrefs < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :location_machine_xrefs, :condition, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240521021328_remove_condition_date_from_location_machine_xrefs.rb: -------------------------------------------------------------------------------- 1 | class RemoveConditionDateFromLocationMachineXrefs < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :location_machine_xrefs, :condition_date, :date 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240703041704_add_user_id_to_suggested_locations.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToSuggestedLocations < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :suggested_locations, :user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240909234323_drop_ssw_tmp_weird_empty_lmxes_table.rb: -------------------------------------------------------------------------------- 1 | class DropSswTmpWeirdEmptyLmxesTable < ActiveRecord::Migration[7.1] 2 | def change 3 | drop_table :ssw_tmp_weird_empty_lmxes, if_exists: true 4 | drop_table :ssw_lpx_backup, if_exists: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20241112193702_create_cache.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | class CreateCache < ActiveRecord::Migration[7.2] 3 | def change 4 | create_table "solid_cache_entries", force: :cascade do |t| 5 | t.binary "key", limit: 1024, null: false 6 | t.binary "value", limit: 536870912, null: false 7 | t.datetime "created_at", null: false 8 | t.integer "key_hash", limit: 8, null: false 9 | t.integer "byte_size", limit: 4, null: false 10 | t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" 11 | t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" 12 | t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20241117183403_add_flag_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddFlagToUsers < ActiveRecord::Migration[7.2] 2 | def change 3 | add_column :users, :flag, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20241126054618_add_submission_counts_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddSubmissionCountsToUsers < ActiveRecord::Migration[7.2] 2 | def change 3 | add_column :users, :num_machines_added, :integer, default: 0 4 | add_column :users, :num_machines_removed, :integer, default: 0 5 | add_column :users, :num_locations_suggested, :integer, default: 0 6 | add_column :users, :num_lmx_comments_left, :integer, default: 0 7 | add_column :users, :num_msx_scores_added, :integer, default: 0 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20241127051246_add_contributor_rank_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddContributorRankToUsers < ActiveRecord::Migration[7.2] 2 | def change 3 | add_column :users, :contributor_rank, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20241127054132_add_admin_rank_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddAdminRankToUsers < ActiveRecord::Migration[7.2] 2 | def change 3 | add_column :users, :admin_rank, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20241127215612_fix_admin_rank_column_name.rb: -------------------------------------------------------------------------------- 1 | class FixAdminRankColumnName < ActiveRecord::Migration[7.2] 2 | def change 3 | rename_column :users, :admin_rank, :admin_title 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20241128052830_fix_users_table_defaults.rb: -------------------------------------------------------------------------------- 1 | class FixUsersTableDefaults < ActiveRecord::Migration[7.2] 2 | def change 3 | change_column_default :users, :num_machines_added, from: nil, to: 0 4 | change_column_default :users, :num_machines_removed, from: nil, to: 0 5 | change_column_default :users, :num_locations_suggested, from: nil, to: 0 6 | change_column_default :users, :num_lmx_comments_left, from: nil, to: 0 7 | change_column_default :users, :num_msx_scores_added, from: nil, to: 0 8 | change_column_default :users, :user_submissions_count, from: nil, to: 0 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20250129200703_create_action_mailbox_tables.action_mailbox.rb: -------------------------------------------------------------------------------- 1 | # This migration comes from action_mailbox (originally 20180917164000) 2 | class CreateActionMailboxTables < ActiveRecord::Migration[6.0] 3 | def change 4 | create_table :action_mailbox_inbound_emails, id: primary_key_type do |t| 5 | t.integer :status, default: 0, null: false 6 | t.string :message_id, null: false 7 | t.string :message_checksum, null: false 8 | 9 | t.timestamps 10 | 11 | t.index [ :message_id, :message_checksum ], name: "index_action_mailbox_inbound_emails_uniqueness", unique: true 12 | end 13 | end 14 | 15 | private 16 | def primary_key_type 17 | config = Rails.configuration.generators 18 | config.options[config.orm][:primary_key_type] || :primary_key 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /db/migrate/20250211002039_add_machines_count_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddMachinesCountToLocations < ActiveRecord::Migration[7.2] 2 | def change 3 | add_column :locations, :machine_count, :integer, default: 0, null: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20250319234408_remove_security_test_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemoveSecurityTestFromUsers < ActiveRecord::Migration[7.2] 2 | def change 3 | remove_column :users, :security_test, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20250601172559_add_notes_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddNotesToUsers < ActiveRecord::Migration[8.0] 2 | def change 3 | add_column :users, :notes, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20250816041323_add_counts_to_locations.rb: -------------------------------------------------------------------------------- 1 | class AddCountsToLocations < ActiveRecord::Migration[8.0] 2 | def change 3 | add_column :locations, :users_count, :integer, default: 1, null: false 4 | add_column :locations, :user_submissions_count, :integer, default: 1, null: false 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /docker-compose.postgres.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | 5 | db: 6 | image: postgres 7 | environment: 8 | - POSTGRES_PASSWORD=postgres 9 | - POSTGRES_USER=postgres 10 | volumes: 11 | - pbm-psql:/var/lib/postgresql/data 12 | ports: 13 | - 5432:5432 14 | 15 | volumes: 16 | pbm-psql: 17 | -------------------------------------------------------------------------------- /lib/middleware/semicolon_handling.rb: -------------------------------------------------------------------------------- 1 | module Middleware 2 | class SemicolonHandling 3 | def initialize(app) 4 | @app = app 5 | end 6 | 7 | def call(env) 8 | if env["QUERY_STRING"] 9 | # Modify query string if it exists 10 | env["QUERY_STRING"] = env["QUERY_STRING"].gsub(";", "&") 11 | end 12 | 13 | # Continue the request cycle 14 | @app.call(env) 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/tasks/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/lib/tasks/.gitkeep -------------------------------------------------------------------------------- /lib/tasks/delete_expired_events.rake: -------------------------------------------------------------------------------- 1 | desc "Deletes events from the database that are more than a week expired" 2 | task delete_expired_events: :environment do 3 | puts("Deleting all expired events") 4 | Region.all.each(&:delete_all_expired_events) 5 | 6 | puts("Deleting all regionless events") 7 | Region.delete_all_regionless_events 8 | rescue StandardError => e 9 | error_subject = "Delete expired events rake task error" 10 | error = e.to_s 11 | ErrorMailer.with(error: error, error_subject: error_subject).rake_task_error.deliver_later 12 | end 13 | -------------------------------------------------------------------------------- /lib/tasks/delete_opted_in_empty_locations.rake: -------------------------------------------------------------------------------- 1 | desc "Deletes empty locations from regions that have opted-in to this functionality" 2 | task delete_opted_in_empty_locations: :environment do 3 | puts("Deleting opted-in regions with empty locations") 4 | Region.all.each(&:delete_all_empty_locations) 5 | 6 | puts("Deleting empty_regionless locations") 7 | Region.delete_empty_regionless_locations 8 | rescue StandardError => e 9 | error_subject = "Delete empty locations rake task error" 10 | error = e.to_s 11 | ErrorMailer.with(error: error, error_subject: error_subject).rake_task_error.deliver_later 12 | end 13 | -------------------------------------------------------------------------------- /lib/tasks/dump_scrubbed_db.rake: -------------------------------------------------------------------------------- 1 | desc "Makes a database backup that is scrubbed" 2 | task dump_scrubbed_db: :environment do 3 | puts "Run the following commands:" 4 | puts "" 5 | puts "# Obtain a server backup via:" 6 | puts "pg_dump [pbm db name/url] > pbm_dump.sql" 7 | puts 8 | puts "# Drop and create the scrubdb if it is there:" 9 | puts "dropdb pbm_scrubbed" 10 | puts "createdb pbm_scrubbed" 11 | puts "psql -d pbm_scrubbed < pbm_dump.sql" 12 | puts "psql -d pbm_scrubbed < ./lib/database/scrub_db.sql" 13 | puts "pg_dump pbm_scrubbed > pbm_scrubbed.sql" 14 | puts "rm pbm_dump.sql # if you want to delete the original backup" 15 | end 16 | -------------------------------------------------------------------------------- /lib/tasks/rubocop.rake: -------------------------------------------------------------------------------- 1 | namespace :rubocop do 2 | task :run do 3 | require "rubocop/rake_task" 4 | 5 | RuboCop::RakeTask.new 6 | end 7 | end 8 | 9 | desc "Run RuboCop to check style guide compliance" 10 | task rubocop: "rubocop:run" 11 | 12 | task default: :rubocop 13 | -------------------------------------------------------------------------------- /lib/tasks/tag_opdb_changelog.rake: -------------------------------------------------------------------------------- 1 | desc "Tags machines with opdb changelog data" 2 | task tag_opdb_changelog: :environment do 3 | response = Net::HTTP.get_response(URI("https://opdb.org/api/changelog")) 4 | Machine.tag_with_opdb_changelog_json(response.body) 5 | rescue StandardError => e 6 | error_subject = "Tag OPDB changelog rake task error" 7 | error = e.to_s 8 | ErrorMailer.with(error: error, error_subject: error_subject).rake_task_error.deliver_later 9 | end 10 | -------------------------------------------------------------------------------- /lib/tasks/tag_opdb_image.rake: -------------------------------------------------------------------------------- 1 | desc "Tags machines with opdb data" 2 | task tag_opdb_image: :environment do 3 | response = Net::HTTP.get_response(URI("https://mp-data.sfo3.cdn.digitaloceanspaces.com/latest-opdb.json")) 4 | Machine.tag_with_opdb_image_json(response.body) 5 | rescue StandardError => e 6 | error_subject = "Tag OPDB image rake task error" 7 | error = e.to_s 8 | ErrorMailer.with(error: error, error_subject: error_subject).rake_task_error.deliver_later 9 | end 10 | -------------------------------------------------------------------------------- /lib/tasks/tag_opdb_type.rake: -------------------------------------------------------------------------------- 1 | desc "Tags machines with opdb type and display data" 2 | task tag_opdb_type: :environment do 3 | response = Net::HTTP.get_response(URI("https://mp-data.sfo3.cdn.digitaloceanspaces.com/latest-opdb.json")) 4 | Machine.tag_with_opdb_type_json(response.body) 5 | end 6 | -------------------------------------------------------------------------------- /lib/templates/erb/scaffold/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%%= simple_form_for(@<%= singular_name %>) do |f| %> 2 | <%% if @<%= singular_name %>.errors.any? %> 3 |
4 |

<%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:

5 | 6 | 11 |
12 | <%% end %> 13 | 14 |
15 | <%- attributes.each do |attribute| -%> 16 | <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> 17 | <%- end -%> 18 |
19 | 20 |
21 | <%%= f.button :submit %> 22 |
23 | <%% end %> 24 | -------------------------------------------------------------------------------- /public/.well-known/acme-challenge/2ClWWNiufoSau_5Wi8pEW_jvpmE-5L_yCWL3B7_npJM: -------------------------------------------------------------------------------- 1 | 2 | 2ClWWNiufoSau_5Wi8pEW_jvpmE-5L_yCWL3B7_npJM.lVnmXXRLAFfhzkcpSTs8X89vkGiRN6NNNKNCtXNinJg 3 | 4 | -------------------------------------------------------------------------------- /public/.well-known/acme-challenge/RVf89qr5-7C5-Kzj7lzCjWhOabbCZ9EvJQXbOwPJOmA: -------------------------------------------------------------------------------- 1 | RVf89qr5-7C5-Kzj7lzCjWhOabbCZ9EvJQXbOwPJOmA.lVnmXXRLAFfhzkcpSTs8X89vkGiRN6NNNKNCtXNinJg 2 | -------------------------------------------------------------------------------- /public/.well-known/acme-challenge/Zg8qDnKQKAKe6bSlWYEgG-VlLTUYCDiVdXUmVI9qmVk: -------------------------------------------------------------------------------- 1 | Zg8qDnKQKAKe6bSlWYEgG-VlLTUYCDiVdXUmVI9qmVk.lVnmXXRLAFfhzkcpSTs8X89vkGiRN6NNNKNCtXNinJg 2 | -------------------------------------------------------------------------------- /public/.well-known/acme-challenge/dQtx7qOyGj_D-OsTCW9dYWcAI0gO3FDwehI5cWjrSRc: -------------------------------------------------------------------------------- 1 | dQtx7qOyGj_D-OsTCW9dYWcAI0gO3FDwehI5cWjrSRc.lVnmXXRLAFfhzkcpSTs8X89vkGiRN6NNNKNCtXNinJg 2 | -------------------------------------------------------------------------------- /public/.well-known/acme-challenge/wF4vlQfRne9FRNwaEooLuqhosUiP-yscNQh500YDugg: -------------------------------------------------------------------------------- 1 | wF4vlQfRne9FRNwaEooLuqhosUiP-yscNQh500YDugg.lVnmXXRLAFfhzkcpSTs8X89vkGiRN6NNNKNCtXNinJg 2 | -------------------------------------------------------------------------------- /public/.well-known/assetlinks.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "relation": [ 4 | "delegate_permission/common.handle_all_urls" 5 | ], 6 | "target": { 7 | "namespace": "android_app", 8 | "package_name": "com.pbm", 9 | "sha256_cert_fingerprints": [ 10 | "48:30:1E:F4:4A:E4:70:BF:B8:93:5E:D4:49:E4:F1:EA:B0:80:21:35:15:98:66:50:BF:74:FA:9D:35:5B:22:7F" 11 | ] 12 | } 13 | } 14 | ] -------------------------------------------------------------------------------- /public/apple-touch-icon-120x120-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/apple-touch-icon-120x120-precomposed.png -------------------------------------------------------------------------------- /public/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /public/apple-touch-icon-152x152-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/apple-touch-icon-152x152-precomposed.png -------------------------------------------------------------------------------- /public/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/favicon.ico -------------------------------------------------------------------------------- /public/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/icon-192.png -------------------------------------------------------------------------------- /public/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/icon-512.png -------------------------------------------------------------------------------- /public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/public/icon.png -------------------------------------------------------------------------------- /public/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Pinball Map", 3 | "short_name": "Pinball Map", 4 | "icons": [ 5 | { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" }, 6 | { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" } 7 | ], 8 | "theme_color": "#ffffff", 9 | "background_color": "#ffffff", 10 | "display": "standalone" 11 | } 12 | -------------------------------------------------------------------------------- /spec/controllers/location_machine_xrefs_controller_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe LocationMachineXrefsController, type: :controller do 4 | before(:each) do 5 | @region = FactoryBot.create(:region, name: 'portland') 6 | @location = FactoryBot.create(:location, id: 1) 7 | @user = FactoryBot.create(:user, username: 'ssw', email: 'ssw@yeah.com') 8 | FactoryBot.create(:user, email: 'foo@bar.com', region: @region) 9 | end 10 | 11 | describe 'create' do 12 | it "should return undef if you don't supply a machine name or id" do 13 | login(@user) 14 | 15 | post 'create', params: { region: 'portland', add_machine_by_id_1: '', add_machine_by_name_1: '', location_id: @location.id } 16 | expect(LocationMachineXref.all.size).to eq(0) 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/fixtures/files/PPM-Splash-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinballmap/pbm/fc63dc685b075906382d824b86963a43c2ef976b/spec/fixtures/files/PPM-Splash-200.png -------------------------------------------------------------------------------- /spec/helpers/locations_helper_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe LocationsHelper, type: :helper do 4 | describe '#search_banner' do 5 | it 'should give me a banner' do 6 | FactoryBot.create(:location) 7 | expect(helper.search_banner('by_cool_type', 'This is a cool type, bro')).to eq(< 9 | This is a cool type, bro 10 | 11 | HERE 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /spec/mailers/operator_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | RSpec.describe OperatorMailer, type: :mailer do 4 | describe 'send_daily_digest_operator_email' do 5 | it 'should send email digest with location edits' do 6 | email = OperatorMailer.with(email_to: 'foo@bar.com', machine_comments: [ 'foo' ], machines_added: [ 'Pirates of the Pacific' ], machines_removed: [ 'Battle of Midway' ]).send_daily_digest_operator_email 7 | 8 | assert_emails 1 do 9 | email.deliver_later 10 | end 11 | 12 | assert_equal [ 'foo@bar.com' ], email.to 13 | assert_equal [ 'admin@pinballmap.com' ], email.from 14 | assert_equal "Pinball Map - Daily digest of edits to your locations - #{Date.today.strftime('%m/%d/%Y')}", email.subject 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/mailers/previews/admin_preview.rb: -------------------------------------------------------------------------------- 1 | # Preview all emails at http://localhost:3000/rails/mailers/admin 2 | class AdminPreview < ActionMailer::Preview 3 | end 4 | -------------------------------------------------------------------------------- /spec/mailers/previews/operator_preview.rb: -------------------------------------------------------------------------------- 1 | # Preview all emails at http://localhost:3000/rails/mailers/operator 2 | class OperatorPreview < ActionMailer::Preview 3 | end 4 | -------------------------------------------------------------------------------- /spec/requests/api/v1/machine_groups_controller_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Api::V1::MachineGroupsController, type: :request do 4 | describe '#index' do 5 | before(:each) do 6 | FactoryBot.create(:machine_group, id: 66, name: 'Cleo Group') 7 | FactoryBot.create(:machine_group, id: 67, name: 'Bawb Group') 8 | end 9 | 10 | it 'returns all machine groups in the database' do 11 | get '/api/v1/machine_groups.json' 12 | 13 | expect(response.body).to include('Cleo Group') 14 | expect(response.body).to include('Bawb Group') 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/support/controller_helpers.rb: -------------------------------------------------------------------------------- 1 | module ControllerHelpers 2 | include Warden::Test::Helpers 3 | 4 | def login(user = double('user')) 5 | allow_message_expectations_on_nil 6 | if user.nil? 7 | allow(request.env['warden']).to receive(:authenticate!).and_throw(:warden, scope: :user) 8 | allow(controller).to receive(:current_user).and_return(nil) 9 | else 10 | allow(request.env['warden']).to receive(:authenticate!).and_return(user) 11 | allow(controller).to receive(:current_user).and_return(user) 12 | login_as(user, scope: :user) 13 | end 14 | end 15 | 16 | def logout 17 | @current_user = nil 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/support/feature_helpers.rb: -------------------------------------------------------------------------------- 1 | module FeatureHelpers 2 | include Warden::Test::Helpers 3 | 4 | def login(user = FactoryBot.create(:user)) 5 | login_as(user, scope: :user) 6 | user 7 | end 8 | 9 | def logout(user) 10 | logout(user) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------