diff --git a/Gemfile.lock b/Gemfile.lock index 0444139..06f8d60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,7 +77,7 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.8.8) + addressable (2.8.9) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) autotuner (1.1.0) @@ -94,7 +94,7 @@ GEM bindex (0.8.1) bootsnap (1.23.0) msgpack (~> 1.2) - brakeman (8.0.2) + brakeman (8.0.4) racc builder (3.3.0) bullet (8.1.0) @@ -141,7 +141,7 @@ GEM drb (2.2.3) dry-cli (1.4.1) ed25519 (1.4.0) - erb (6.0.1) + erb (6.0.2) erb_lint (0.9.0) activesupport better_html (>= 2.0.1) @@ -179,14 +179,14 @@ GEM ffi (>= 1.15.5) rake flamegraph (0.9.5) - flipper (1.3.6) + flipper (1.4.0) concurrent-ruby (< 2) - flipper-active_record (1.3.6) + flipper-active_record (1.4.0) activerecord (>= 4.2, < 9) - flipper (~> 1.3.6) - flipper-ui (1.3.6) + flipper (~> 1.4.0) + flipper-ui (1.4.0) erubi (>= 1.0.0, < 2.0.0) - flipper (~> 1.3.6) + flipper (~> 1.4.0) rack (>= 1.4, < 4) rack-protection (>= 1.5.3, < 5.0.0) rack-session (>= 1.0.2, < 3.0.0) @@ -283,11 +283,14 @@ GEM net-smtp marcel (1.1.0) matrix (0.4.3) + mcp (0.7.1) + json-schema (>= 4.1) memory_profiler (1.1.0) mini_magick (5.3.1) logger mini_mime (1.1.5) - minitest (6.0.1) + minitest (6.0.2) + drb (~> 2.0) prism (~> 1.5) msgpack (1.8.0) multipart-post (2.4.1) @@ -406,8 +409,8 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) + rails-html-sanitizer (1.7.0) + loofah (~> 2.25) 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 (8.1.2) actionpack (= 8.1.2) @@ -436,7 +439,7 @@ GEM rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.7) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (8.0.3) @@ -459,10 +462,11 @@ GEM rswag-ui (2.17.0) actionpack (>= 5.2, < 8.2) railties (>= 5.2, < 8.2) - rubocop (1.84.2) + rubocop (1.85.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) @@ -504,10 +508,10 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 4.0) websocket (~> 1.0) - sentry-rails (6.3.1) + sentry-rails (6.4.0) railties (>= 5.2.0) - sentry-ruby (~> 6.3.1) - sentry-ruby (6.3.1) + sentry-ruby (~> 6.4.0) + sentry-ruby (6.4.0) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) logger @@ -530,13 +534,13 @@ GEM activejob (>= 7.2) activerecord (>= 7.2) railties (>= 7.2) - sqlite3 (2.9.0-aarch64-linux-gnu) - sqlite3 (2.9.0-aarch64-linux-musl) - sqlite3 (2.9.0-arm-linux-gnu) - sqlite3 (2.9.0-arm-linux-musl) - sqlite3 (2.9.0-arm64-darwin) - sqlite3 (2.9.0-x86_64-linux-gnu) - sqlite3 (2.9.0-x86_64-linux-musl) + sqlite3 (2.9.1-aarch64-linux-gnu) + sqlite3 (2.9.1-aarch64-linux-musl) + sqlite3 (2.9.1-arm-linux-gnu) + sqlite3 (2.9.1-arm-linux-musl) + sqlite3 (2.9.1-arm64-darwin) + sqlite3 (2.9.1-x86_64-linux-gnu) + sqlite3 (2.9.1-x86_64-linux-musl) sshkit (1.25.0) base64 logger @@ -579,17 +583,16 @@ GEM vite_rails (3.0.20) railties (>= 5.1, < 9) vite_ruby (~> 3.0, >= 3.2.2) - vite_ruby (3.9.2) + vite_ruby (3.9.3) dry-cli (>= 0.7, < 2) logger (~> 1.6) mutex_m rack-proxy (~> 0.6, >= 0.6.1) zeitwerk (~> 2.2) - web-console (4.2.1) - actionview (>= 6.0.0) - activemodel (>= 6.0.0) + web-console (4.3.0) + actionview (>= 8.0.0) bindex (>= 0.4.0) - railties (>= 6.0.0) + railties (>= 8.0.0) webmock (3.26.1) addressable (>= 2.8.0) crack (>= 0.3.2) diff --git a/app/controllers/docs_controller.rb b/app/controllers/docs_controller.rb index 5d254e2..3c0ff45 100644 --- a/app/controllers/docs_controller.rb +++ b/app/controllers/docs_controller.rb @@ -45,6 +45,9 @@ class DocsController < InertiaController # Docs are publicly accessible - no authentication required def index + @page_title = "Hackatime Docs - Setup Guides for 75+ Code Editors & IDEs" + @meta_description = "Get started with Hackatime in minutes. Step-by-step setup guides for VS Code, JetBrains, vim, Neovim, Sublime Text, and 70+ more editors and IDEs." + render inertia: "Docs/Index", props: { popular_editors: POPULAR_EDITORS, all_editors: ALL_EDITORS diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb index 835d12c..e793618 100644 --- a/app/controllers/static_pages_controller.rb +++ b/app/controllers/static_pages_controller.rb @@ -129,8 +129,8 @@ class StaticPagesController < InertiaController private def set_homepage_seo_content - @page_title = @og_title = @twitter_title = "Hackatime - See How Much You Code" - @meta_description = @og_description = @twitter_description = "Free and open source. Works with VS Code, JetBrains IDEs, vim, emacs, and 70+ other editors. Built and made free for teenagers by Hack Club." + @page_title = @og_title = @twitter_title = "Hackatime - Track How Much You Code | Free & Open Source" + @meta_description = @og_description = @twitter_description = "Free and open-source coding time tracker. Works with VS Code, JetBrains, vim, emacs, and 70+ editors. Built by Hack Club for teenage developers." @meta_keywords = "coding time tracker, programming stats, open source time tracker, hack club coding tracker, free time tracking, code statistics, high school programming, coding analytics" end diff --git a/app/jobs/weekly_summary_email_job.rb b/app/jobs/weekly_summary_email_job.rb index 8b850cd..6625c22 100644 --- a/app/jobs/weekly_summary_email_job.rb +++ b/app/jobs/weekly_summary_email_job.rb @@ -2,27 +2,29 @@ class WeeklySummaryEmailJob < ApplicationJob queue_as :literally_whenever def perform(reference_time = Time.current) - now_utc = reference_time.utc - return unless send_window?(now_utc) + # See https://hackclub.slack.com/archives/D083UR1DR7V/p1772321709715969 - User.where(weekly_summary_email_enabled: true).find_each do |user| - recipient_email = user.email_addresses.order(:id).pick(:email) - next if recipient_email.blank? + # now_utc = reference_time.utc + # return unless send_window?(now_utc) - user_timezone = ActiveSupport::TimeZone[user.timezone] || ActiveSupport::TimeZone["UTC"] - user_now = now_utc.in_time_zone(user_timezone) - ends_at_local = user_now.beginning_of_week(:monday) - starts_at_local = ends_at_local - 1.week + # User.where(weekly_summary_email_enabled: true).find_each do |user| + # recipient_email = user.email_addresses.order(:id).pick(:email) + # next if recipient_email.blank? - WeeklySummaryMailer.weekly_summary( - user, - recipient_email: recipient_email, - starts_at: starts_at_local.utc, - ends_at: ends_at_local.utc - ).deliver_now - rescue StandardError => e - Rails.logger.error("Weekly summary email failed for user #{user.id}: #{e.class} #{e.message}") - end + # user_timezone = ActiveSupport::TimeZone[user.timezone] || ActiveSupport::TimeZone["UTC"] + # user_now = now_utc.in_time_zone(user_timezone) + # ends_at_local = user_now.beginning_of_week(:monday) + # starts_at_local = ends_at_local - 1.week + + # WeeklySummaryMailer.weekly_summary( + # user, + # recipient_email: recipient_email, + # starts_at: starts_at_local.utc, + # ends_at: ends_at_local.utc + # ).deliver_now + # rescue StandardError => e + # Rails.logger.error("Weekly summary email failed for user #{user.id}: #{e.class} #{e.message}") + # end end private diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 58ce3cb..0803843 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - +
-