From 06c16cf308424561927ba30577b32dacfa6fb1fa Mon Sep 17 00:00:00 2001 From: shyvla Date: Tue, 24 Mar 2026 16:14:08 -0400 Subject: [PATCH 1/9] Chrome -> Chromium in Dockerfile --- docker/Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3389d47..9480331 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -30,9 +30,11 @@ RUN apt-get update && apt-get install -y \ tzdata git build-essential patch ruby-dev zlib1g-dev liblzma-dev default-jre \ sudo vim nano tmux wget -# Install Chrome -RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ - && apt-get install -y ./google-chrome-stable_current_amd64.deb; +# Install Chromium (ARM-compatible) +RUN apt-get update && apt-get install -y \ + chromium \ + chromium-driver \ + && rm -rf /var/lib/apt/lists/* WORKDIR /app @@ -45,6 +47,9 @@ RUN if [ "$BUILD_IMAGE" = "true" ]; then \ && rm ${APP_VERSION}.tar.gz; \ fi +# Root context +RUN npm install --global yarn + # Create a user RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ @@ -56,7 +61,6 @@ USER $USERNAME RUN sudo chown -R $USERNAME:$USERNAME /app # Install node modules -RUN npm install --global yarn COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile From 933fd2cf6e4e3493cb147d3992b451bfc83530e0 Mon Sep 17 00:00:00 2001 From: shyvla Date: Tue, 24 Mar 2026 16:26:38 -0400 Subject: [PATCH 2/9] Update rails_helper.rb to use Chromium (Selenium + Capybara) --- spec/rails_helper.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index d450506..2747156 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -15,9 +15,22 @@ require 'rubygems' require 'rspec/rails' require 'rspec/mocks' -require 'webdrivers' require 'webmock/rspec' +Selenium::WebDriver::Chrome::Service.driver_path = '/usr/bin/chromedriver' + +Capybara.register_driver :selenium_chrome do |app| + options = Selenium::WebDriver::Chrome::Options.new + options.binary = '/usr/bin/chromium' + options.add_argument('--headless=new') + options.add_argument('--no-sandbox') + options.add_argument('--disable-dev-shm-usage') + + Capybara::Selenium::Driver.new(app, browser: :chrome, options: options) +end + +Capybara.javascript_driver = :selenium_chrome + Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } RSpec.configure do |config| From 95c23226df467cbee79b89daf7132db75915e211 Mon Sep 17 00:00:00 2001 From: shyvla Date: Tue, 7 Apr 2026 13:19:12 -0400 Subject: [PATCH 3/9] ruby version updated -> 3.4.9 --- .ruby-version | 2 +- config/puma.rb | 34 ++++++++++++++++++++++++++++++++++ docker/Dockerfile | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 config/puma.rb diff --git a/.ruby-version b/.ruby-version index 86fb650..7bcbb38 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.7 +3.4.9 diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 0000000..03c166f --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,34 @@ +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. + +# Puma starts a configurable number of processes (workers) and each process +# serves each request in a thread from an internal thread pool. +# +# The ideal number of threads per worker depends both on how much time the +# application spends waiting for IO operations and on how much you wish to +# to prioritize throughput over latency. +# +# As a rule of thumb, increasing the number of threads will increase how much +# traffic a given process can handle (throughput), but due to CRuby's +# Global VM Lock (GVL) it has diminishing returns and will degrade the +# response time (latency) of the application. +# +# The default is set to 3 threads as it's deemed a decent compromise between +# throughput and latency for the average Rails application. +# +# Any libraries that use a connection pool or another resource pool should +# be configured to provide at least as many connections as the number of +# threads. This includes Active Record's `pool` parameter in `database.yml`. +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +port ENV.fetch("PORT", 3000) + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart + +# Specify the PID file. Defaults to tmp/pids/server.pid in development. +# In other environments, only set the PID file if requested. +pidfile ENV["PIDFILE"] if ENV["PIDFILE"] diff --git a/docker/Dockerfile b/docker/Dockerfile index 9480331..db7f045 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ # This Dockerfile supports multiple environments -ARG RUBY_VERSION=3.3.7 +ARG RUBY_VERSION=3.4.9 FROM ruby:${RUBY_VERSION} From 960a549a9fd8babb376b157f5b9269b55cd9b745 Mon Sep 17 00:00:00 2001 From: shyvla Date: Tue, 7 Apr 2026 17:25:34 -0400 Subject: [PATCH 4/9] rails update -> 7.2.3.1 --- Gemfile | 2 +- Gemfile.lock | 122 +++++++++++++++++++++++++++------------------------ 2 files changed, 65 insertions(+), 59 deletions(-) diff --git a/Gemfile b/Gemfile index d1fa95a..2b39f42 100644 --- a/Gemfile +++ b/Gemfile @@ -19,7 +19,7 @@ gem 'netrc' gem 'pg' gem 'rack' gem 'rack-cors' -gem 'rails', '~> 7.1' +gem 'rails', '~> 7.2', '>= 7.2.3.1' gem 'rake' gem 'rest-client' gem 'ruby-net-ldap' diff --git a/Gemfile.lock b/Gemfile.lock index 76b38ca..554d8a7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,58 +9,60 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.2.2.2) - actionpack (= 7.2.2.2) - activesupport (= 7.2.2.2) + actioncable (7.2.3.1) + actionpack (= 7.2.3.1) + activesupport (= 7.2.3.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.2.2) - actionpack (= 7.2.2.2) - activejob (= 7.2.2.2) - activerecord (= 7.2.2.2) - activestorage (= 7.2.2.2) - activesupport (= 7.2.2.2) + actionmailbox (7.2.3.1) + actionpack (= 7.2.3.1) + activejob (= 7.2.3.1) + activerecord (= 7.2.3.1) + activestorage (= 7.2.3.1) + activesupport (= 7.2.3.1) mail (>= 2.8.0) - actionmailer (7.2.2.2) - actionpack (= 7.2.2.2) - actionview (= 7.2.2.2) - activejob (= 7.2.2.2) - activesupport (= 7.2.2.2) + actionmailer (7.2.3.1) + actionpack (= 7.2.3.1) + actionview (= 7.2.3.1) + activejob (= 7.2.3.1) + activesupport (= 7.2.3.1) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.2.2) - actionview (= 7.2.2.2) - activesupport (= 7.2.2.2) + actionpack (7.2.3.1) + actionview (= 7.2.3.1) + activesupport (= 7.2.3.1) + cgi nokogiri (>= 1.8.5) racc - rack (>= 2.2.4, < 3.2) + rack (>= 2.2.4, < 3.3) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.2.2) - actionpack (= 7.2.2.2) - activerecord (= 7.2.2.2) - activestorage (= 7.2.2.2) - activesupport (= 7.2.2.2) + actiontext (7.2.3.1) + actionpack (= 7.2.3.1) + activerecord (= 7.2.3.1) + activestorage (= 7.2.3.1) + activesupport (= 7.2.3.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.2.2) - activesupport (= 7.2.2.2) + actionview (7.2.3.1) + activesupport (= 7.2.3.1) builder (~> 3.1) + cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.2.2) - activesupport (= 7.2.2.2) + activejob (7.2.3.1) + activesupport (= 7.2.3.1) globalid (>= 0.3.6) - activemodel (7.2.2.2) - activesupport (= 7.2.2.2) - activerecord (7.2.2.2) - activemodel (= 7.2.2.2) - activesupport (= 7.2.2.2) + activemodel (7.2.3.1) + activesupport (= 7.2.3.1) + activerecord (7.2.3.1) + activemodel (= 7.2.3.1) + activesupport (= 7.2.3.1) timeout (>= 0.4.0) activerecord-import (2.2.0) activerecord (>= 4.2) @@ -70,13 +72,13 @@ GEM cgi (>= 0.3.6) rack (>= 2.0.8, < 4) railties (>= 7.0) - activestorage (7.2.2.2) - actionpack (= 7.2.2.2) - activejob (= 7.2.2.2) - activerecord (= 7.2.2.2) - activesupport (= 7.2.2.2) + activestorage (7.2.3.1) + actionpack (= 7.2.3.1) + activejob (= 7.2.3.1) + activerecord (= 7.2.3.1) + activesupport (= 7.2.3.1) marcel (~> 1.0) - activesupport (7.2.2.2) + activesupport (7.2.3.1) base64 benchmark (>= 0.3) bigdecimal @@ -85,7 +87,7 @@ GEM drb i18n (>= 1.6, < 2) logger (>= 1.4.2) - minitest (>= 5.1) + minitest (>= 5.1, < 6) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) @@ -190,7 +192,8 @@ GEM loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.8.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) net-imap net-pop @@ -208,7 +211,7 @@ GEM msgpack (1.8.0) multi_json (1.17.0) mutex_m (0.3.0) - net-imap (0.5.11) + net-imap (0.6.3) date net-protocol net-pop (0.1.2) @@ -260,20 +263,20 @@ GEM rack (>= 1.3) rackup (2.2.1) rack (>= 3) - rails (7.2.2.2) - actioncable (= 7.2.2.2) - actionmailbox (= 7.2.2.2) - actionmailer (= 7.2.2.2) - actionpack (= 7.2.2.2) - actiontext (= 7.2.2.2) - actionview (= 7.2.2.2) - activejob (= 7.2.2.2) - activemodel (= 7.2.2.2) - activerecord (= 7.2.2.2) - activestorage (= 7.2.2.2) - activesupport (= 7.2.2.2) + rails (7.2.3.1) + actioncable (= 7.2.3.1) + actionmailbox (= 7.2.3.1) + actionmailer (= 7.2.3.1) + actionpack (= 7.2.3.1) + actiontext (= 7.2.3.1) + actionview (= 7.2.3.1) + activejob (= 7.2.3.1) + activemodel (= 7.2.3.1) + activerecord (= 7.2.3.1) + activestorage (= 7.2.3.1) + activesupport (= 7.2.3.1) bundler (>= 1.15.0) - railties (= 7.2.2.2) + railties (= 7.2.3.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -285,13 +288,15 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (7.2.2.2) - actionpack (= 7.2.2.2) - activesupport (= 7.2.2.2) + railties (7.2.3.1) + actionpack (= 7.2.3.1) + activesupport (= 7.2.3.1) + cgi irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) zeitwerk (~> 2.6) rake (13.3.0) rdoc (6.14.2) @@ -376,6 +381,7 @@ GEM tilt (2.6.1) timecop (0.9.10) timeout (0.4.3) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unf (0.2.0) @@ -438,7 +444,7 @@ DEPENDENCIES rack rack-cors rack-test - rails (~> 7.1) + rails (~> 7.2, >= 7.2.3.1) rails-controller-testing rake rest-client From 8be232ca0655e3cad9b96c2d90dee0a91c405127 Mon Sep 17 00:00:00 2001 From: shyvla Date: Tue, 7 Apr 2026 17:40:57 -0400 Subject: [PATCH 5/9] Regenerated framework update files --- config/cable.yml | 10 +++ .../initializers/content_security_policy.rb | 25 +++++++ .../initializers/filter_parameter_logging.rb | 8 ++ config/initializers/inflections.rb | 16 ++++ .../new_framework_defaults_7_2.rb | 70 ++++++++++++++++++ config/initializers/permissions_policy.rb | 13 ++++ ..._to_active_storage_blobs.active_storage.rb | 22 ++++++ ..._storage_variant_records.active_storage.rb | 27 +++++++ ...e_storage_blobs_checksum.active_storage.rb | 8 ++ public/406-unsupported-browser.html | 66 +++++++++++++++++ public/icon.png | Bin 0 -> 5599 bytes public/icon.svg | 3 + 12 files changed, 268 insertions(+) create mode 100644 config/cable.yml create mode 100644 config/initializers/content_security_policy.rb create mode 100644 config/initializers/filter_parameter_logging.rb create mode 100644 config/initializers/inflections.rb create mode 100644 config/initializers/new_framework_defaults_7_2.rb create mode 100644 config/initializers/permissions_policy.rb create mode 100644 db/migrate/20260407213703_add_service_name_to_active_storage_blobs.active_storage.rb create mode 100644 db/migrate/20260407213704_create_active_storage_variant_records.active_storage.rb create mode 100644 db/migrate/20260407213705_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb create mode 100644 public/406-unsupported-browser.html create mode 100644 public/icon.png create mode 100644 public/icon.svg diff --git a/config/cable.yml b/config/cable.yml new file mode 100644 index 0000000..8f09a90 --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: timetracker_production diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb new file mode 100644 index 0000000..b3076b3 --- /dev/null +++ b/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header + +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src style-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true +# end diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..c010b83 --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 0000000..3860f65 --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym "RESTful" +# end diff --git a/config/initializers/new_framework_defaults_7_2.rb b/config/initializers/new_framework_defaults_7_2.rb new file mode 100644 index 0000000..b549c4a --- /dev/null +++ b/config/initializers/new_framework_defaults_7_2.rb @@ -0,0 +1,70 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.2 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.2`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +### +# Controls whether Active Job's `#perform_later` and similar methods automatically defer +# the job queuing to after the current Active Record transaction is committed. +# +# Example: +# Topic.transaction do +# topic = Topic.create(...) +# NewTopicNotificationJob.perform_later(topic) +# end +# +# In this example, if the configuration is set to `:never`, the job will +# be enqueued immediately, even though the `Topic` hasn't been committed yet. +# Because of this, if the job is picked up almost immediately, or if the +# transaction doesn't succeed for some reason, the job will fail to find this +# topic in the database. +# +# If `enqueue_after_transaction_commit` is set to `:default`, the queue adapter +# will define the behaviour. +# +# Note: Active Job backends can disable this feature. This is generally done by +# backends that use the same database as Active Record as a queue, hence they +# don't need this feature. +#++ +# Rails.application.config.active_job.enqueue_after_transaction_commit = :default + +### +# Adds image/webp to the list of content types Active Storage considers as an image +# Prevents automatic conversion to a fallback PNG, and assumes clients support WebP, as they support gif, jpeg, and png. +# This is possible due to broad browser support for WebP, but older browsers and email clients may still not support +# WebP. Requires imagemagick/libvips built with WebP support. +#++ +# Rails.application.config.active_storage.web_image_content_types = %w[image/png image/jpeg image/gif image/webp] + +### +# Enable validation of migration timestamps. When set, an ActiveRecord::InvalidMigrationTimestampError +# will be raised if the timestamp prefix for a migration is more than a day ahead of the timestamp +# associated with the current time. This is done to prevent forward-dating of migration files, which can +# impact migration generation and other migration commands. +# +# Applications with existing timestamped migrations that do not adhere to the +# expected format can disable validation by setting this config to `false`. +#++ +# Rails.application.config.active_record.validate_migration_timestamps = true + +### +# Controls whether the PostgresqlAdapter should decode dates automatically with manual queries. +# +# Example: +# ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.select_value("select '2024-01-01'::date") #=> Date +# +# This query used to return a `String`. +#++ +# Rails.application.config.active_record.postgresql_adapter_decode_dates = true + +### +# Enables YJIT as of Ruby 3.3, to bring sizeable performance improvements. If you are +# deploying to a memory constrained environment you may want to set this to `false`. +#++ +# Rails.application.config.yjit = true diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb new file mode 100644 index 0000000..7db3b95 --- /dev/null +++ b/config/initializers/permissions_policy.rb @@ -0,0 +1,13 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide HTTP permissions policy. For further +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" +# end diff --git a/db/migrate/20260407213703_add_service_name_to_active_storage_blobs.active_storage.rb b/db/migrate/20260407213703_add_service_name_to_active_storage_blobs.active_storage.rb new file mode 100644 index 0000000..a15c6ce --- /dev/null +++ b/db/migrate/20260407213703_add_service_name_to_active_storage_blobs.active_storage.rb @@ -0,0 +1,22 @@ +# This migration comes from active_storage (originally 20190112182829) +class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] + def up + return unless table_exists?(:active_storage_blobs) + + unless column_exists?(:active_storage_blobs, :service_name) + add_column :active_storage_blobs, :service_name, :string + + if configured_service = ActiveStorage::Blob.service.name + ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) + end + + change_column :active_storage_blobs, :service_name, :string, null: false + end + end + + def down + return unless table_exists?(:active_storage_blobs) + + remove_column :active_storage_blobs, :service_name + end +end diff --git a/db/migrate/20260407213704_create_active_storage_variant_records.active_storage.rb b/db/migrate/20260407213704_create_active_storage_variant_records.active_storage.rb new file mode 100644 index 0000000..94ac83a --- /dev/null +++ b/db/migrate/20260407213704_create_active_storage_variant_records.active_storage.rb @@ -0,0 +1,27 @@ +# This migration comes from active_storage (originally 20191206030411) +class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + # Use Active Record's configured type for primary key + create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t| + t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type + t.string :variation_digest, null: false + + t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + end + + private + def primary_key_type + config = Rails.configuration.generators + config.options[config.orm][:primary_key_type] || :primary_key + end + + def blobs_primary_key_type + pkey_name = connection.primary_key(:active_storage_blobs) + pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name } + pkey_column.bigint? ? :bigint : pkey_column.type + end +end diff --git a/db/migrate/20260407213705_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb b/db/migrate/20260407213705_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb new file mode 100644 index 0000000..93c8b85 --- /dev/null +++ b/db/migrate/20260407213705_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb @@ -0,0 +1,8 @@ +# This migration comes from active_storage (originally 20211119233751) +class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + change_column_null(:active_storage_blobs, :checksum, true) + end +end diff --git a/public/406-unsupported-browser.html b/public/406-unsupported-browser.html new file mode 100644 index 0000000..7cf1e16 --- /dev/null +++ b/public/406-unsupported-browser.html @@ -0,0 +1,66 @@ + + + + Your browser is not supported (406) + + + + + + +
+
+

Your browser is not supported.

+

Please upgrade your browser to continue.

+
+
+ + diff --git a/public/icon.png b/public/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f3b5abcbde91cf6d7a6a26e514eb7e30f476f950 GIT binary patch literal 5599 zcmeHL-D}fO6hCR_taXJlzs3}~RuB=Iujyo=i*=1|1FN%E=zNfMTjru|Q<6v{J{U!C zBEE}?j6I3sz>fzN!6}L_BKjcuASk~1;Dg|U_@d{g?V8mM`~#9U+>>*Ezw>c(PjYWA z4(;!cgge6k5E&d$G5`S-0}!Ik>CV(0Y#1}s-v_gAHhja2=W1?nBAte9D2HG<(+)uj z!5=W4u*{VKMw#{V@^NNs4TClr!FAA%ID-*gc{R%CFKEzG<6gm*9s_uy)oMGW*=nJf zw{(Mau|2FHfXIv6C0@Wk5k)F=3jo1srV-C{pl&k&)4_&JjYrnbJiul}d0^NCSh(#7h=F;3{|>EU>h z6U8_p;^wK6mAB(1b92>5-HxJ~V}@3?G`&Qq-TbJ2(&~-HsH6F#8mFaAG(45eT3VPO zM|(Jd<+;UZs;w>0Qw}0>D%{~r{uo_Fl5_Bo3ABWi zWo^j^_T3dxG6J6fH8X)$a^%TJ#PU!=LxF=#Fd9EvKx_x>q<(KY%+y-08?kN9dXjXK z**Q=yt-FTU*13ouhCdqq-0&;Ke{T3sQU9IdzhV9LhQIpq*P{N)+}|Mh+a-VV=x?R} c>%+pvTcMWshj-umO}|qP?%A)*_KlqT3uEqhU;qFB literal 0 HcmV?d00001 diff --git a/public/icon.svg b/public/icon.svg new file mode 100644 index 0000000..78307cc --- /dev/null +++ b/public/icon.svg @@ -0,0 +1,3 @@ + + + From f1eda249720c8638461e2162ffa0ca259f5df718 Mon Sep 17 00:00:00 2001 From: shyvla Date: Thu, 9 Apr 2026 15:35:47 -0400 Subject: [PATCH 6/9] bulma dependency added to fix missing stylesheet import --- db/schema.rb | 2 +- package-lock.json | 18 ++++++++++++++++++ yarn.lock | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 package-lock.json diff --git a/db/schema.rb b/db/schema.rb index f6ea1c1..60df321 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2025_05_16_132753) do +ActiveRecord::Schema[7.2].define(version: 2026_04_07_213705) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..9beb17c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "timetracker", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "bulma": "^1.0.1" + } + }, + "node_modules/bulma": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bulma/-/bulma-1.0.1.tgz", + "integrity": "sha512-+xv/BIAEQakHkR0QVz+s+RjNqfC53Mx9ZYexyaFNFo9wx5i76HXArNdwW7bccyJxa5mgV/T5DcVGqsAB19nBJQ==", + "license": "MIT" + } + } +} diff --git a/yarn.lock b/yarn.lock index f7d5429..57672fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,5 +4,5 @@ bulma@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/bulma/-/bulma-1.0.1.tgz#e37261d6f8e1a3494c9378803d9958effb2715ce" + resolved "https://registry.npmjs.org/bulma/-/bulma-1.0.1.tgz" integrity sha512-+xv/BIAEQakHkR0QVz+s+RjNqfC53Mx9ZYexyaFNFo9wx5i76HXArNdwW7bccyJxa5mgV/T5DcVGqsAB19nBJQ== From d7cab6b39ff30ab0468aca2915928337ce89df40 Mon Sep 17 00:00:00 2001 From: shyvla Date: Thu, 9 Apr 2026 17:07:03 -0400 Subject: [PATCH 7/9] app version -> 2.4.4 in Dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index db7f045..872a5c5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,7 +5,7 @@ ARG RUBY_VERSION=3.4.9 FROM ruby:${RUBY_VERSION} ARG APP_ENV=production -ARG APP_VERSION=2.3.9 +ARG APP_VERSION=2.4.4 ARG BUILD_IMAGE ARG USERNAME=timetracker ARG USER_UID=1000 From ee6431f5420659c7a34919eb6f18f82902d50e91 Mon Sep 17 00:00:00 2001 From: shyvla Date: Thu, 11 Jun 2026 11:51:23 -0400 Subject: [PATCH 8/9] Add length validation for CustomField#access_key --- app/models/custom_field.rb | 1 + spec/models/custom_field_spec.rb | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 spec/models/custom_field_spec.rb diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 3fb3045..1b455aa 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -3,6 +3,7 @@ class CustomField < ActiveRecord::Base has_many :custom_field_data_items, dependent: :destroy validates :machine_name, presence: true, uniqueness: { scope: :customizable_id } + validates :access_key, length: { maximum: 1, message: 'can be up to one character long.' }, allow_blank: true before_validation :set_machine_name diff --git a/spec/models/custom_field_spec.rb b/spec/models/custom_field_spec.rb new file mode 100644 index 0000000..4a8727e --- /dev/null +++ b/spec/models/custom_field_spec.rb @@ -0,0 +1,7 @@ +require 'rails_helper' + +RSpec.describe CustomField, type: :model do + describe 'validations' do + it { should validate_length_of(:access_key).is_at_most(1) } + end +end \ No newline at end of file From 3cbe1ecb0ed7be837ef7728590af28ceead04bfc Mon Sep 17 00:00:00 2001 From: shyvla Date: Thu, 11 Jun 2026 15:11:27 -0400 Subject: [PATCH 9/9] Fix NoMethodError in CustomField#set_machine_name by guarding against nil title during validation --- app/models/custom_field.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 1b455aa..f3f6450 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -3,13 +3,13 @@ class CustomField < ActiveRecord::Base has_many :custom_field_data_items, dependent: :destroy validates :machine_name, presence: true, uniqueness: { scope: :customizable_id } - validates :access_key, length: { maximum: 1, message: 'can be up to one character long.' }, allow_blank: true + validates :access_key, length: { maximum: 1 }, allow_blank: true before_validation :set_machine_name private def set_machine_name - self.machine_name = self.title.parameterize.underscore if machine_name.blank? + self.machine_name = self.title.parameterize.underscore if machine_name.blank? && title.present? end end