diff --git a/Gemfile b/Gemfile index 7e510e2fb..bcccaa6aa 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem "acts-as-taggable-on", "~> 10.0" # A tagging plugin for Rails applications t gem "acts_as_follower", github: "forem/acts_as_follower", branch: "master" # Allow any model to follow any other model gem "addressable", "~> 2.8" # A replacement for the URI implementation that is part of Ruby's standard library gem "ahoy_email", "~> 2.2.0" # Email analytics for Rails -gem "ahoy_matey", "~> 4.1" # Tracking analytics for Rails +gem "ahoy_matey", "~> 5.0.2" # Tracking analytics for Rails gem "ancestry", "~> 4.2" # Ancestry allows the records of a ActiveRecord model to be organized in a tree structure gem "blazer", "~> 2.6" # Allows admins to query data gem "bootsnap", ">= 1.1.0", require: false # Boot large ruby/rails apps faster diff --git a/Gemfile.lock b/Gemfile.lock index 49b336fe1..72bb65a53 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,10 +85,10 @@ GEM addressable (>= 2.3.2) nokogiri safely_block (>= 0.4) - ahoy_matey (4.2.1) - activesupport (>= 5.2) - device_detector - safely_block (>= 0.2.1) + ahoy_matey (5.0.2) + activesupport (>= 6.1) + device_detector (>= 1) + safely_block (>= 0.4) amazing_print (1.5.0) ancestry (4.3.3) activerecord (>= 5.2.6) @@ -213,7 +213,7 @@ GEM rake (> 10, < 14) ruby-statistics (>= 2.1) thor (>= 0.19, < 2) - device_detector (1.1.0) + device_detector (1.1.1) devise (4.9.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -974,7 +974,7 @@ DEPENDENCIES acts_as_follower! addressable (~> 2.8) ahoy_email (~> 2.2.0) - ahoy_matey (~> 4.1) + ahoy_matey (~> 5.0.2) amazing_print (~> 1.4) ancestry (~> 4.2) better_errors (~> 2.9) diff --git a/config/initializers/ahoy.rb b/config/initializers/ahoy.rb index d06d402f2..1a615c74d 100644 --- a/config/initializers/ahoy.rb +++ b/config/initializers/ahoy.rb @@ -6,8 +6,8 @@ end # set to true to mask ip addresses Ahoy.mask_ips = true -# set to false to switch from cookies to anonymity sets -Ahoy.cookies = false +# set to :none to switch from cookies to anonymity sets +Ahoy.cookies = :none # set to false to disable geocode tracking Ahoy.geocode = false diff --git a/db/migrate/20231129135338_add_index_to_ahoy_visits_for_upgrade.rb b/db/migrate/20231129135338_add_index_to_ahoy_visits_for_upgrade.rb new file mode 100644 index 000000000..dfdb1bd71 --- /dev/null +++ b/db/migrate/20231129135338_add_index_to_ahoy_visits_for_upgrade.rb @@ -0,0 +1,6 @@ +class AddIndexToAhoyVisitsForUpgrade < ActiveRecord::Migration[7.0] + disable_ddl_transaction! + def change + add_index :ahoy_visits, [:visitor_token, :started_at], algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index d150cee65..52ccf714d 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.0].define(version: 2023_11_21_140731) do +ActiveRecord::Schema[7.0].define(version: 2023_11_29_135338) do # These are extensions that must be enabled in order to support this database enable_extension "citext" enable_extension "ltree" @@ -63,6 +63,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_11_21_140731) do t.index ["user_id"], name: "index_ahoy_visits_on_user_id" t.index ["user_visit_context_id"], name: "index_ahoy_visits_on_user_visit_context_id" t.index ["visit_token"], name: "index_ahoy_visits_on_visit_token", unique: true + t.index ["visitor_token", "started_at"], name: "index_ahoy_visits_on_visitor_token_and_started_at" end create_table "announcements", force: :cascade do |t| diff --git a/vendor/cache/ahoy_matey-4.2.1.gem b/vendor/cache/ahoy_matey-4.2.1.gem deleted file mode 100644 index 394c011b2..000000000 Binary files a/vendor/cache/ahoy_matey-4.2.1.gem and /dev/null differ diff --git a/vendor/cache/ahoy_matey-5.0.2.gem b/vendor/cache/ahoy_matey-5.0.2.gem new file mode 100644 index 000000000..39a936392 Binary files /dev/null and b/vendor/cache/ahoy_matey-5.0.2.gem differ diff --git a/vendor/cache/device_detector-1.1.0.gem b/vendor/cache/device_detector-1.1.0.gem deleted file mode 100644 index f30dea789..000000000 Binary files a/vendor/cache/device_detector-1.1.0.gem and /dev/null differ diff --git a/vendor/cache/device_detector-1.1.1.gem b/vendor/cache/device_detector-1.1.1.gem new file mode 100644 index 000000000..9dd2452fe Binary files /dev/null and b/vendor/cache/device_detector-1.1.1.gem differ