diff --git a/.dockerignore b/.dockerignore index 5bd06a991..0f93e7af0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,13 @@ -/public/attachments +/public/packs /public/packs-test -/node_modules /tmp +/log/* +/node_modules +.git +.gitignore +.env +/spec +docker-compose.* +Dockerfile.* +/yarn-error.log +/npm-debug.log diff --git a/.github/workflows/woke.yml b/.github/workflows/woke.yml deleted file mode 100644 index f4eceaeda..000000000 --- a/.github/workflows/woke.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Woke -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - woke: - name: woke - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: woke - uses: get-woke/woke-action@v0 - with: - fail-on-error: true diff --git a/.gitignore b/.gitignore index 8c52b5074..cb74ec39c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,9 @@ .bundle .DS_Store .env -/content /coverage /log -/public/assets -/public/audio /public/sitemap -/public/attachments /tmp /public/packs /public/packs-test @@ -15,3 +11,4 @@ /yarn-error.log yarn-debug.log* .yarn-integrity +.yarn/* diff --git a/.rspec b/.rspec deleted file mode 100644 index c99d2e739..000000000 --- a/.rspec +++ /dev/null @@ -1 +0,0 @@ ---require spec_helper diff --git a/.rubocop.yml b/.rubocop.yml index 9fabee4ba..b25aae6d6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,7 +16,7 @@ AllCops: - vendor/**/* - lib/tasks/* NewCops: enable - TargetRubyVersion: 3.3.3 + TargetRubyVersion: 3.4.1 FactoryBot/ExcessiveCreateList: Enabled: false diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 619b53766..000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.3.3 diff --git a/.tool-versions b/.tool-versions index d554c9c49..041df9aa6 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 3.3.3 +ruby 3.4.1 diff --git a/.travis.yml b/.travis.yml index 755d9b73e..22c622cae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ dist: focal language: ruby rvm: - - 3.3.3 + - 3.4.1 cache: bundler notifications: email: false diff --git a/.wokeignore b/.wokeignore deleted file mode 100644 index ca073ea9e..000000000 --- a/.wokeignore +++ /dev/null @@ -1 +0,0 @@ -app/views/static_pages/api_docs.html.slim diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz deleted file mode 100644 index 934f905ee..000000000 Binary files a/.yarn/install-state.gz and /dev/null differ diff --git a/DOKKU_SCALE b/DOKKU_SCALE deleted file mode 100644 index 419955a09..000000000 --- a/DOKKU_SCALE +++ /dev/null @@ -1,2 +0,0 @@ -web=1 -worker=1 diff --git a/Dockerfile b/Dockerfile index 58aca5d14..135a0db57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3.3-slim-bullseye +FROM ruby:3.4.1-slim-bullseye ARG APP_NAME=phishin diff --git a/Gemfile b/Gemfile index 726014ca5..6a6f5eb9a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "3.3.3" +ruby "3.4.1" gem "actionpack-action_caching" gem "chronic" diff --git a/Gemfile.lock b/Gemfile.lock index 2fb7b6d20..8104f8476 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -80,7 +80,7 @@ GEM base64 (0.2.0) bcrypt (3.1.20) benchmark (0.4.0) - bigdecimal (3.1.8) + bigdecimal (3.1.9) builder (3.3.0) bullet (8.0.0) activesupport (>= 3.0.0) @@ -107,7 +107,7 @@ GEM concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) - csv (3.3.1) + csv (3.3.2) date (3.4.1) declarative (0.0.20) diff-lcs (1.5.1) @@ -153,8 +153,7 @@ GEM logger faraday-net_http (3.4.0) net-http (>= 0.5.0) - ffi (1.17.0-aarch64-linux-gnu) - ffi (1.17.0-arm64-darwin) + ffi (1.17.0) friendly_id (5.5.1) activerecord (>= 4.0.0) fugit (1.11.1) @@ -224,7 +223,7 @@ GEM rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.9.1) - jwt (2.9.3) + jwt (2.10.0) base64 language_server-protocol (3.17.0.3) launchy (3.0.1) @@ -254,18 +253,16 @@ GEM mutex_m (0.3.0) net-http (0.6.0) uri - net-imap (0.5.3) + net-imap (0.5.4) date net-protocol net-pop (0.1.2) + net-protocol net-protocol (0.2.2) timeout net-smtp (0.5.0) - net-protocol nio4r (2.7.4) - nokogiri (1.17.2-aarch64-linux) - racc (~> 1.4) - nokogiri (1.17.2-arm64-darwin) + nokogiri (1.18.0-arm64-darwin) racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) @@ -305,7 +302,7 @@ GEM rack rack-session (2.0.0) rack (>= 3.0.0) - rack-test (2.1.0) + rack-test (2.2.0) rack (>= 1.3) rackup (2.2.1) rack (>= 3) @@ -350,7 +347,7 @@ GEM rainbow (~> 3.0) redis-client (0.23.0) connection_pool - regexp_parser (2.9.3) + regexp_parser (2.10.0) reline (0.6.0) io-console (~> 0.5) representable (3.2.0) @@ -398,7 +395,7 @@ GEM rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.27.0) + rubocop-rails (2.28.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) @@ -510,8 +507,7 @@ GEM zeitwerk (2.7.1) PLATFORMS - aarch64-linux - arm64-darwin-23 + arm64-darwin-24 DEPENDENCIES actionpack-action_caching @@ -569,7 +565,7 @@ DEPENDENCIES will_paginate RUBY VERSION - ruby 3.3.3p89 + ruby 3.4.1p0 BUNDLED WITH - 2.5.21 + 2.6.2 diff --git a/MIT-LICENSE b/MIT-LICENSE index 33d1a7498..7b62872fd 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright 2013-2024 Phish.in. https://phish.in +Copyright 2013-2025 Phish.in. https://phish.in Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/Procfile.dev-static b/Procfile.dev-static deleted file mode 100644 index 68c12e84b..000000000 --- a/Procfile.dev-static +++ /dev/null @@ -1,2 +0,0 @@ -web: rails s -p 3000 -webpack: sh -c 'rm -rf public/packs/* || true && bin/shakapacker -w' diff --git a/app/api/api_v2/entities/playlist.rb b/app/api/api_v2/entities/playlist.rb index d530e4e58..fb59cae5e 100644 --- a/app/api/api_v2/entities/playlist.rb +++ b/app/api/api_v2/entities/playlist.rb @@ -27,7 +27,7 @@ class ApiV2::Entities::Playlist < ApiV2::Entities::Base desc: "The description of the playlist" } - expose(:username) { _1.user.username } + expose(:username) { it.user.username } expose \ :duration, diff --git a/app/api/api_v2/entities/show.rb b/app/api/api_v2/entities/show.rb index 37f0be7e4..a7d52cc7d 100644 --- a/app/api/api_v2/entities/show.rb +++ b/app/api/api_v2/entities/show.rb @@ -66,7 +66,7 @@ class ApiV2::Entities::Show < ApiV2::Entities::Base type: "String", desc: "Name of the tour the show belongs to" } - ) { _1.tour.name } + ) { it.tour.name } expose \ :venue_name, diff --git a/app/api/api_v2/entities/show_tag.rb b/app/api/api_v2/entities/show_tag.rb index 8bef749bd..2f4c2f831 100644 --- a/app/api/api_v2/entities/show_tag.rb +++ b/app/api/api_v2/entities/show_tag.rb @@ -5,7 +5,7 @@ class ApiV2::Entities::ShowTag < ApiV2::Entities::Base type: "String", desc: "The name of the tag" } - ) { _1.tag.name } + ) { it.tag.name } expose( :description, @@ -13,7 +13,7 @@ class ApiV2::Entities::ShowTag < ApiV2::Entities::Base type: "String", desc: "A description of the tag" } - ) { _1.tag.description } + ) { it.tag.description } expose( :color, @@ -21,7 +21,7 @@ class ApiV2::Entities::ShowTag < ApiV2::Entities::Base type: "String", desc: "The color of the tag" } - ) { _1.tag.color } + ) { it.tag.color } expose( :priority, @@ -29,7 +29,7 @@ class ApiV2::Entities::ShowTag < ApiV2::Entities::Base type: "Integer", desc: "The display priority of the tag" } - ) { _1.tag.priority } + ) { it.tag.priority } expose \ :notes, diff --git a/app/api/api_v2/entities/track.rb b/app/api/api_v2/entities/track.rb index d8edd5dfe..1801684f6 100644 --- a/app/api/api_v2/entities/track.rb +++ b/app/api/api_v2/entities/track.rb @@ -94,7 +94,7 @@ class ApiV2::Entities::Track < ApiV2::Entities::Base format: "date", desc: "Date of the show that the track belongs to" } - ) { _1.show.date } + ) { it.show.date } expose( :show_cover_art_urls, @@ -102,7 +102,7 @@ class ApiV2::Entities::Track < ApiV2::Entities::Base type: "Object", desc: "Object containing named URLs for variants of raw cover art images" } - ) { _1.show.cover_art_urls } + ) { it.show.cover_art_urls } expose( :show_album_cover_url, @@ -110,7 +110,7 @@ class ApiV2::Entities::Track < ApiV2::Entities::Base type: "Object", desc: "URL of album cover image (text overlayed on cover art)" } - ) { _1.show.album_cover_url } + ) { it.show.album_cover_url } expose( :venue_slug, @@ -118,7 +118,7 @@ class ApiV2::Entities::Track < ApiV2::Entities::Base type: "String", desc: "Unique slug of the venue where the show took place" } - ) { _1.show.venue.slug } + ) { it.show.venue.slug } expose( :venue_name, @@ -127,7 +127,7 @@ class ApiV2::Entities::Track < ApiV2::Entities::Base desc: "Name the venue where the show took place, " \ "reflecting the name used on the date of the show" } - ) { _1.show.venue_name } + ) { it.show.venue_name } expose( :venue_location, @@ -135,7 +135,7 @@ class ApiV2::Entities::Track < ApiV2::Entities::Base type: "String", desc: "City and state where the venue of the show was located" } - ) { _1.show.venue.location } + ) { it.show.venue.location } expose \ :show, diff --git a/app/api/api_v2/entities/track_tag.rb b/app/api/api_v2/entities/track_tag.rb index 85483c03b..f1295c134 100644 --- a/app/api/api_v2/entities/track_tag.rb +++ b/app/api/api_v2/entities/track_tag.rb @@ -5,7 +5,7 @@ class ApiV2::Entities::TrackTag < ApiV2::Entities::Base type: "String", desc: "The name of the tag" } - ) { _1.tag.name } + ) { it.tag.name } expose( :description, @@ -13,7 +13,7 @@ class ApiV2::Entities::TrackTag < ApiV2::Entities::Base type: "String", desc: "A description of the tag" } - ) { _1.tag.description } + ) { it.tag.description } expose( :color, @@ -21,7 +21,7 @@ class ApiV2::Entities::TrackTag < ApiV2::Entities::Base type: "String", desc: "The color of the tag" } - ) { _1.tag.color } + ) { it.tag.color } expose( :priority, @@ -29,7 +29,7 @@ class ApiV2::Entities::TrackTag < ApiV2::Entities::Base type: "Integer", desc: "The display priority of the tag" } - ) { _1.tag.priority } + ) { it.tag.priority } expose \ :notes, diff --git a/app/services/bustout_tag_service.rb b/app/services/bustout_tag_service.rb index a1ca2db3e..0479a3e41 100644 --- a/app/services/bustout_tag_service.rb +++ b/app/services/bustout_tag_service.rb @@ -17,7 +17,7 @@ def call def apply_bustout_tag(track, song, gap) ttag = track.track_tags.find do - _1.tag == bustout_tag && _1.notes&.include?(song.title) + it.tag == bustout_tag && it.notes&.include?(song.title) end || track.track_tags.build(tag: bustout_tag) ttag.notes = "First performance of #{song.title} in #{gap} shows" ttag.save! diff --git a/app/services/cover_art_prompt_service.rb b/app/services/cover_art_prompt_service.rb index 50eb3a6cb..d404c8f4b 100644 --- a/app/services/cover_art_prompt_service.rb +++ b/app/services/cover_art_prompt_service.rb @@ -122,7 +122,7 @@ def call def new_prompt return @new_prompt if defined?(@new_prompt) num = rand < 0.3 ? 1 : 2 - subjects = CATEGORIES.sample(num).map { chatgpt_response[_1.to_sym].sample }.join(" and ") + subjects = CATEGORIES.sample(num).map { chatgpt_response[it.to_sym].sample }.join(" and ") @new_prompt = "Create an image featuring #{subjects} " \ "in the style of #{style} with a #{hue} hue." @@ -137,7 +137,7 @@ def print_response_hints def song_list show.tracks.map do - "#{_1.title} by #{_1.songs.first.artist || 'Phish'}" + "#{it.title} by #{it.songs.first.artist || 'Phish'}" end.join(", ") end diff --git a/app/services/debut_tag_service.rb b/app/services/debut_tag_service.rb index 91c3ee23f..44cac69d3 100644 --- a/app/services/debut_tag_service.rb +++ b/app/services/debut_tag_service.rb @@ -13,7 +13,7 @@ def call private def apply_debut_tag(track) - ttag = track.track_tags.find { _1.tag == debut_tag } || track.track_tags.build(tag: debut_tag) + ttag = track.track_tags.find { it.tag == debut_tag } || track.track_tags.build(tag: debut_tag) ttag.save! end diff --git a/bin/bundle b/bin/bundle index 66e9889e8..fe1874509 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -load Gem.bin_path('bundler', 'bundle') +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__) +load Gem.bin_path("bundler", "bundle") diff --git a/bin/dev-static b/bin/dev-static deleted file mode 100755 index 4aba55598..000000000 --- a/bin/dev-static +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby - -def installed?(process) - IO.popen "#{process} -v" -rescue Errno::ENOENT - false -end - -def run(process) - system "#{process} start -f Procfile.dev-static" -rescue Errno::ENOENT - warn <<~MSG - ERROR: - Please ensure `Procfile.dev-static` exists in your project! - MSG - exit! -end - -if installed? "overmind" - run "overmind" -elsif installed? "foreman" - run "foreman" -else - warn <<~MSG - NOTICE: - For this script to run, you need either 'overmind' or 'foreman' installed on your machine. Please try this script after installing one of them. - MSG - exit! -end diff --git a/bin/rails b/bin/rails index 5191e6927..8b2456720 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path('../../config/application', __FILE__) -require_relative '../config/boot' -require 'rails/commands' +APP_PATH = File.expand_path("../../config/application", __FILE__) +require_relative "../config/boot" +require "rails/commands" diff --git a/bin/rake b/bin/rake index 17240489f..4fbf10b96 100755 --- a/bin/rake +++ b/bin/rake @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' +require_relative "../config/boot" +require "rake" Rake.application.run diff --git a/bin/rspec b/bin/rspec index 0c86b5c6f..64478888b 100755 --- a/bin/rspec +++ b/bin/rspec @@ -2,15 +2,15 @@ # # This file was generated by Bundler. # -# The application 'rspec' is installed as part of a gem, and +# The application "rspec" is installed as part of a gem, and # this file is here to facilitate running it. # -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath) -require 'rubygems' -require 'bundler/setup' +require "rubygems" +require "bundler/setup" -load Gem.bin_path('rspec-core', 'rspec') +load Gem.bin_path("rspec-core", "rspec") diff --git a/bin/rubocop b/bin/rubocop index 490f8089c..11af15670 100755 --- a/bin/rubocop +++ b/bin/rubocop @@ -2,7 +2,7 @@ # # This file was generated by Bundler. # -# The application 'rubocop' is installed as part of a gem, and +# The application "rubocop" is installed as part of a gem, and # this file is here to facilitate running it. # diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index db2472009..000000000 --- a/codecov.yml +++ /dev/null @@ -1 +0,0 @@ -comment: off diff --git a/config.ru b/config.ru index 47bbd4067..cb0bc694b 100644 --- a/config.ru +++ b/config.ru @@ -1,2 +1,2 @@ -require_relative 'config/environment' +require_relative "config/environment" run Rails.application diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 12a703d90..000000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/spec/features/my_tracks_spec.rb b/spec/features/my_tracks_spec.rb index c9cc1c22e..892ea5203 100644 --- a/spec/features/my_tracks_spec.rb +++ b/spec/features/my_tracks_spec.rb @@ -20,7 +20,7 @@ visit "/my-tracks" expect(page).to have_current_path("/my-tracks") expect(page).to have_content("My Tracks") - tracks.sort_by { _1.show.date }.reverse.each_with_index do |track, idx| + tracks.sort_by { it.show.date }.reverse.each_with_index do |track, idx| expect(page).to have_content(track.show.date.strftime("%b %-d, %Y")) expect(page).to have_content(track.title) end @@ -29,7 +29,7 @@ it "allows sorting by likes count" do visit "/my-tracks" select "Sort by Likes (High to Low)", from: "sort" - sorted_tracks = tracks.sort_by { _1.likes.count }.reverse + sorted_tracks = tracks.sort_by { it.likes.count }.reverse sorted_tracks.each_with_index do |track, idx| expect(page).to have_content(track.show.date.strftime("%b %-d, %Y")) expect(page).to have_content(track.title) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index d8521b7cd..65ec8618c 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,9 +1,9 @@ -require 'spec_helper' -ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../config/environment', __dir__) -abort('The Rails environment is running in production mode!') if Rails.env.production? -require 'rspec/rails' -Dir[Rails.root.join('spec/support/**/*')].each { |f| require f } +require "spec_helper" +ENV["RAILS_ENV"] ||= "test" +require File.expand_path("../config/environment", __dir__) +abort("Rails is running in production mode!") if Rails.env.production? +require "rspec/rails" +Dir[Rails.root.join("spec/support/**/*")].each { |f| require f } begin ActiveRecord::Migration.maintain_test_schema! @@ -20,7 +20,7 @@ config.use_transactional_fixtures = true config.infer_spec_type_from_file_location! config.filter_rails_from_backtrace! - config.order = 'random' + config.order = "random" config.include ActiveSupport::Testing::TimeHelpers config.include ApiHelper diff --git a/spec/requests/api/v2/playlists_spec.rb b/spec/requests/api/v2/playlists_spec.rb index 7ad5c7adc..f111392da 100644 --- a/spec/requests/api/v2/playlists_spec.rb +++ b/spec/requests/api/v2/playlists_spec.rb @@ -99,7 +99,7 @@ expect(json[:name]).to eq("Summer Jams") expect(json[:entries].size).to eq(2) - expect(json[:entries].map { _1[:track][:slug] }).to match_array([ track1.slug, track2.slug ]) + expect(json[:entries].map { it[:track][:slug] }).to match_array([ track1.slug, track2.slug ]) end end @@ -126,7 +126,7 @@ expect(json[:name]).to eq("Road Trip") expect(json[:slug]).to eq("road-trip") expect(json[:entries].size).to eq(2) - expect(json[:entries].map { _1[:track][:id] }).to match_array([ track1.id, track2.id ]) + expect(json[:entries].map { it[:track][:id] }).to match_array([ track1.id, track2.id ]) end it "returns a 422 error if the playlist is invalid" do @@ -177,8 +177,8 @@ expect(json[:slug]).to eq("winter-jams-2") expect(json[:published]).to eq(false) expect(json[:entries].size).to eq(2) - expect(json[:entries].map { _1[:track][:id] }).to eq([ track2.id, track3.id ]) - expect(json[:entries].map { _1[:starts_at_second] }).to eq([ nil, 15 ]) + expect(json[:entries].map { it[:track][:id] }).to eq([ track2.id, track3.id ]) + expect(json[:entries].map { it[:starts_at_second] }).to eq([ nil, 15 ]) end it "returns a 422 error if the update is invalid" do