ahoy_matey 5.4.0 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cdf6f78b5c08e7d2783e3f8c6b21b33efba9d95949bc3dd249a77c9295c3d58
4
- data.tar.gz: 15c4e9503b7d5a5ae28037ca30516742c2eb3cc99c7bbd4fe7f626d2d7b2e02c
3
+ metadata.gz: df3e089d0f7806605ca6cb9215118d0a7791fdd9127f91dd13d0df59add4cb51
4
+ data.tar.gz: 69e7c817399a7e2488f54cbd4d4e136d383542de0194c5bc638bc191bdeae6d7
5
5
  SHA512:
6
- metadata.gz: d71d10e8ebff84650cccb1b3898e360521631e7eec0263f138f4640dcc07331e01240372527ce61ec0578a07b910c451005c7483e8f6fab2dea3030c8781a799
7
- data.tar.gz: 3aa5aea74d2e425fee7f3e2067ca2c54abd019384ec7639824e4cafff1ba3f7a94d80304a47e1b24e1fb808f073febf25f336daadbf74bcb83e1fb6b144f324a
6
+ metadata.gz: cb08e2f80841ef62c2ad48881912c9cb2e81b40b03b7c4dead2ce006a49726571c3b9dee235cc9450bdbc7e72def56dbf201c2bf1d72d395aec849aca6cf323a
7
+ data.tar.gz: b92e534e57a6d3874e9b623a2bb1d55dc5d7fbfbd4ad16e94cb6d1350112b7623c56e569320baf2718a436db6991d1a1d943ace871d947d502f81b21b58b2fc7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 5.4.1 (2025-09-30)
2
+
3
+ - Fixed deprecation warning with Rack 3.1+
4
+
1
5
  ## 5.4.0 (2025-05-04)
2
6
 
3
7
  - Dropped support for Ruby < 3.2 and Rails < 7.1
data/README.md CHANGED
@@ -490,7 +490,7 @@ Ahoy can switch from cookies to [anonymity sets](https://privacypatterns.org/pat
490
490
  Ahoy.cookies = :none
491
491
  ```
492
492
 
493
- Note: If Ahoy was installed before v5, [add an index](#50) before making this change.
493
+ Note: If Ahoy was installed before v5, [add an index](https://github.com/ankane/ahoy/tree/v5.0.0?tab=readme-ov-file#50) before making this change.
494
494
 
495
495
  Previously set cookies are automatically deleted. If you use JavaScript tracking, also set:
496
496
 
@@ -771,32 +771,6 @@ Send a `POST` request to `/ahoy/events` with `Content-Type: application/json` an
771
771
  }
772
772
  ```
773
773
 
774
- ## Upgrading
775
-
776
- ### 5.0
777
-
778
- Visits now expire with anonymity sets. If using `Ahoy.cookies = false`, a new index is needed.
779
-
780
- For Active Record, create a migration with:
781
-
782
- ```ruby
783
- add_index :ahoy_visits, [:visitor_token, :started_at]
784
- ```
785
-
786
- For Mongoid, set:
787
-
788
- ```ruby
789
- class Ahoy::Visit
790
- index({visitor_token: 1, started_at: 1})
791
- end
792
- ```
793
-
794
- Create the index before upgrading, and set:
795
-
796
- ```ruby
797
- Ahoy.cookies = :none
798
- ```
799
-
800
774
  ## History
801
775
 
802
776
  View the [changelog](https://github.com/ankane/ahoy/blob/master/CHANGELOG.md)
@@ -36,7 +36,8 @@ module Ahoy
36
36
  def verify_request_size
37
37
  if request.content_length > Ahoy.max_content_length
38
38
  logger.info "[ahoy] Payload too large"
39
- render plain: "Payload too large\n", status: :payload_too_large
39
+ status = Rack::RELEASE.to_f >= 3.1 ? :content_too_large : :payload_too_large
40
+ render plain: "Payload too large\n", status: status
40
41
  end
41
42
  end
42
43
  end
data/lib/ahoy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ahoy
2
- VERSION = "5.4.0"
2
+ VERSION = "5.4.1"
3
3
  end
@@ -11,12 +11,12 @@ module Ahoy
11
11
 
12
12
  selection =
13
13
  if activerecord && mongoid
14
- puts <<-MSG
14
+ puts <<~MSG
15
15
 
16
- Which data store would you like to use?
17
- 1. ActiveRecord (default)
18
- 2. Mongoid
19
- 3. Neither
16
+ Which data store would you like to use?
17
+ 1. ActiveRecord (default)
18
+ 2. Mongoid
19
+ 3. Neither
20
20
  MSG
21
21
 
22
22
  ask(">")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_matey
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.6.7
112
+ rubygems_version: 3.6.9
113
113
  specification_version: 4
114
114
  summary: Simple, powerful, first-party analytics for Rails
115
115
  test_files: []