ahoy_matey 5.3.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +1 -1
- data/README.md +1 -27
- data/app/controllers/ahoy/base_controller.rb +2 -1
- data/lib/ahoy/version.rb +1 -1
- data/lib/generators/ahoy/activerecord_generator.rb +0 -4
- data/lib/generators/ahoy/install_generator.rb +5 -5
- data/lib/generators/ahoy/templates/active_record_event_model.rb.tt +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df3e089d0f7806605ca6cb9215118d0a7791fdd9127f91dd13d0df59add4cb51
|
4
|
+
data.tar.gz: 69e7c817399a7e2488f54cbd4d4e136d383542de0194c5bc638bc191bdeae6d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb08e2f80841ef62c2ad48881912c9cb2e81b40b03b7c4dead2ce006a49726571c3b9dee235cc9450bdbc7e72def56dbf201c2bf1d72d395aec849aca6cf323a
|
7
|
+
data.tar.gz: b92e534e57a6d3874e9b623a2bb1d55dc5d7fbfbd4ad16e94cb6d1350112b7623c56e569320baf2718a436db6991d1a1d943ace871d947d502f81b21b58b2fc7
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
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
|
-
|
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
@@ -33,10 +33,6 @@ module Ahoy
|
|
33
33
|
properties_type == "text" || (properties_type == "json" && ActiveRecord::Base.connection.try(:mariadb?))
|
34
34
|
end
|
35
35
|
|
36
|
-
def serialize_options
|
37
|
-
ActiveRecord::VERSION::STRING.to_f >= 7.1 ? "coder: JSON" : "JSON"
|
38
|
-
end
|
39
|
-
|
40
36
|
# use connection_db_config instead of connection.adapter
|
41
37
|
# so database connection isn't needed
|
42
38
|
def adapter
|
@@ -11,12 +11,12 @@ module Ahoy
|
|
11
11
|
|
12
12
|
selection =
|
13
13
|
if activerecord && mongoid
|
14
|
-
puts
|
14
|
+
puts <<~MSG
|
15
15
|
|
16
|
-
Which data store would you like to use?
|
17
|
-
|
18
|
-
|
19
|
-
|
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,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ahoy_matey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activesupport
|
@@ -15,14 +15,14 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: '7'
|
18
|
+
version: '7.1'
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: '7'
|
25
|
+
version: '7.1'
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: device_detector
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,14 +102,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
102
|
requirements:
|
103
103
|
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: '3.
|
105
|
+
version: '3.2'
|
106
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
rubygems_version: 3.6.
|
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: []
|