ahoy_matey 4.2.1 → 5.0.0
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/README.md +51 -45
- data/lib/ahoy/base_store.rb +1 -0
- data/lib/ahoy/controller.rb +9 -4
- data/lib/ahoy/database_store.rb +6 -4
- data/lib/ahoy/tracker.rb +14 -18
- data/lib/ahoy/version.rb +1 -1
- data/lib/ahoy.rb +37 -1
- data/lib/generators/ahoy/activerecord_generator.rb +4 -4
- data/lib/generators/ahoy/templates/active_record_event_model.rb.tt +1 -1
- data/lib/generators/ahoy/templates/active_record_migration.rb.tt +3 -3
- data/lib/generators/ahoy/templates/mongoid_visit_model.rb.tt +1 -0
- metadata +13 -14
- data/app/jobs/ahoy/geocode_job.rb +0 -11
- /data/{app/jobs → lib}/ahoy/geocode_v2_job.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 621c76868e3082cd139423009777a21f805b65815f099f1a9d69d08a81a2a69e
|
4
|
+
data.tar.gz: 6575071548c3d0b326a8ca10fb3b9b26a8e61fdc02db0235353beca1d3db3b59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f24ebcfd4d199cfebde1de163bcbca36f5c47115710d63260cc168bce075e629881cd61ed07babacba36fb6502fdebfcad20ada9c318e2c31d26a2b1ba9efdbc
|
7
|
+
data.tar.gz: ffa84f157d902da8f02f16d3c80bb558d7951ae51194325dee6aca5e622a651a3b681a17612788eb49399ffdc5739dbef4d41d661737c28eda164ab5c0a3462a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 5.0.0 (2023-10-01)
|
2
|
+
|
3
|
+
- Changed visits to expire with anonymity sets
|
4
|
+
- Fixed error when Active Job is not available
|
5
|
+
- Fixed deprecation warning with Rails 7.1
|
6
|
+
- Dropped support for Ruby < 3 and Rails < 6.1
|
7
|
+
- Dropped support for Mongoid 6
|
8
|
+
|
1
9
|
## 4.2.1 (2023-02-23)
|
2
10
|
|
3
11
|
- Updated Ahoy.js to 0.4.2
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ And restart your web server.
|
|
46
46
|
|
47
47
|
### JavaScript
|
48
48
|
|
49
|
-
For Rails 7
|
49
|
+
For Importmap (Rails 7 default), add to `config/importmap.rb`:
|
50
50
|
|
51
51
|
```ruby
|
52
52
|
pin "ahoy", to: "ahoy.js"
|
@@ -58,7 +58,7 @@ And add to `app/javascript/application.js`:
|
|
58
58
|
import "ahoy"
|
59
59
|
```
|
60
60
|
|
61
|
-
For Rails 6
|
61
|
+
For Webpacker (Rails 6 default), run:
|
62
62
|
|
63
63
|
```sh
|
64
64
|
yarn add ahoy.js
|
@@ -70,7 +70,7 @@ And add to `app/javascript/packs/application.js`:
|
|
70
70
|
import ahoy from "ahoy.js"
|
71
71
|
```
|
72
72
|
|
73
|
-
For
|
73
|
+
For Sprockets, add to `app/assets/javascripts/application.js`:
|
74
74
|
|
75
75
|
```javascript
|
76
76
|
//= require ahoy
|
@@ -210,7 +210,7 @@ visitable :sign_up_visit
|
|
210
210
|
|
211
211
|
### Users
|
212
212
|
|
213
|
-
Ahoy automatically attaches the `current_user` to the visit. With [Devise](https://github.com/
|
213
|
+
Ahoy automatically attaches the `current_user` to the visit. With [Devise](https://github.com/heartcombo/devise), it attaches the user even if they sign in after the visit starts.
|
214
214
|
|
215
215
|
With other authentication frameworks, add this to the end of your sign in method:
|
216
216
|
|
@@ -260,28 +260,6 @@ class ApplicationController < ActionController::Base
|
|
260
260
|
end
|
261
261
|
```
|
262
262
|
|
263
|
-
#### Knock
|
264
|
-
|
265
|
-
To attach the user with [Knock](https://github.com/nsarno/knock), either include `Knock::Authenticable`in `ApplicationController`:
|
266
|
-
|
267
|
-
```ruby
|
268
|
-
class ApplicationController < ActionController::API
|
269
|
-
include Knock::Authenticable
|
270
|
-
end
|
271
|
-
```
|
272
|
-
|
273
|
-
Or include it in Ahoy:
|
274
|
-
|
275
|
-
```ruby
|
276
|
-
Ahoy::BaseController.include Knock::Authenticable
|
277
|
-
```
|
278
|
-
|
279
|
-
And use:
|
280
|
-
|
281
|
-
```ruby
|
282
|
-
Ahoy.user_method = ->(controller) { controller.send(:authenticate_entity, "user") }
|
283
|
-
```
|
284
|
-
|
285
263
|
### Exclusions
|
286
264
|
|
287
265
|
Bots are excluded from tracking by default. To include them, use:
|
@@ -306,6 +284,14 @@ By default, a new visit is created after 4 hours of inactivity. Change this with
|
|
306
284
|
Ahoy.visit_duration = 30.minutes
|
307
285
|
```
|
308
286
|
|
287
|
+
### Visitor Duration
|
288
|
+
|
289
|
+
By default, a new `visitor_token` is generated after 2 years. Change this with:
|
290
|
+
|
291
|
+
```ruby
|
292
|
+
Ahoy.visitor_duration = 30.days
|
293
|
+
```
|
294
|
+
|
309
295
|
### Cookies
|
310
296
|
|
311
297
|
To track visits across multiple subdomains, use:
|
@@ -324,15 +310,15 @@ You can also [disable cookies](#anonymity-sets--cookies)
|
|
324
310
|
|
325
311
|
### Token Generation
|
326
312
|
|
327
|
-
Ahoy uses random UUIDs for visit and visitor tokens by default, but you can use your own generator like [
|
313
|
+
Ahoy uses random UUIDs for visit and visitor tokens by default, but you can use your own generator like [ULID](https://github.com/rafaelsales/ulid).
|
328
314
|
|
329
315
|
```ruby
|
330
|
-
Ahoy.token_generator = -> {
|
316
|
+
Ahoy.token_generator = -> { ULID.generate }
|
331
317
|
```
|
332
318
|
|
333
319
|
### Throttling
|
334
320
|
|
335
|
-
You can use [Rack::Attack](https://github.com/
|
321
|
+
You can use [Rack::Attack](https://github.com/rack/rack-attack) to throttle requests to the API.
|
336
322
|
|
337
323
|
```ruby
|
338
324
|
class Rack::Attack
|
@@ -376,13 +362,17 @@ Ahoy.job_queue = :low_priority
|
|
376
362
|
|
377
363
|
### Local Geocoding
|
378
364
|
|
379
|
-
For privacy and performance, we recommend geocoding locally.
|
365
|
+
For privacy and performance, we recommend geocoding locally.
|
366
|
+
|
367
|
+
For city-level geocoding, download the [GeoLite2 City database](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data).
|
368
|
+
|
369
|
+
Add this line to your application’s Gemfile:
|
380
370
|
|
381
371
|
```ruby
|
382
372
|
gem "maxminddb"
|
383
373
|
```
|
384
374
|
|
385
|
-
|
375
|
+
And create `config/initializers/geocoder.rb` with:
|
386
376
|
|
387
377
|
```ruby
|
388
378
|
Geocoder.configure(
|
@@ -399,6 +389,12 @@ For country-level geocoding, install the `geoip-database` package. It’s preins
|
|
399
389
|
sudo apt-get install geoip-database
|
400
390
|
```
|
401
391
|
|
392
|
+
Add this line to your application’s Gemfile:
|
393
|
+
|
394
|
+
```ruby
|
395
|
+
gem "geoip"
|
396
|
+
```
|
397
|
+
|
402
398
|
And create `config/initializers/geocoder.rb` with:
|
403
399
|
|
404
400
|
```ruby
|
@@ -448,7 +444,7 @@ class Ahoy::Store < Ahoy::DatabaseStore
|
|
448
444
|
end
|
449
445
|
|
450
446
|
Ahoy.mask_ips = true
|
451
|
-
Ahoy.cookies =
|
447
|
+
Ahoy.cookies = :none
|
452
448
|
```
|
453
449
|
|
454
450
|
This:
|
@@ -486,20 +482,20 @@ end
|
|
486
482
|
|
487
483
|
### Anonymity Sets & Cookies
|
488
484
|
|
489
|
-
Ahoy can switch from cookies to [anonymity sets](https://privacypatterns.org/patterns/Anonymity-set). Instead of cookies, visitors with the same IP mask and user agent are grouped together in an
|
485
|
+
Ahoy can switch from cookies to [anonymity sets](https://privacypatterns.org/patterns/Anonymity-set). Instead of cookies, visitors with the same IP mask and user agent are grouped together in an anonymity set.
|
490
486
|
|
491
487
|
```ruby
|
492
|
-
Ahoy.cookies =
|
488
|
+
Ahoy.cookies = :none
|
493
489
|
```
|
494
490
|
|
491
|
+
Note: If Ahoy was installed before v5, [add an index](#5-0) before making this change.
|
492
|
+
|
495
493
|
Previously set cookies are automatically deleted. If you use JavaScript tracking, also set:
|
496
494
|
|
497
495
|
```javascript
|
498
496
|
ahoy.configure({cookies: false});
|
499
497
|
```
|
500
498
|
|
501
|
-
Note: With anonymity sets, visits no longer expire after 4 hours of inactivity. A new visit is only created when the IP mask or user agent changes (for instance, when a user updates their browser). There are plans to address this in the next major version.
|
502
|
-
|
503
499
|
## Data Retention
|
504
500
|
|
505
501
|
Data should only be retained for as long as it’s needed. Delete older data with:
|
@@ -637,7 +633,7 @@ end
|
|
637
633
|
|
638
634
|
[Blazer](https://github.com/ankane/blazer) is a great tool for exploring your data.
|
639
635
|
|
640
|
-
With
|
636
|
+
With Active Record, you can do:
|
641
637
|
|
642
638
|
```ruby
|
643
639
|
Ahoy::Visit.group(:search_keyword).count
|
@@ -775,19 +771,29 @@ Send a `POST` request to `/ahoy/events` with `Content-Type: application/json` an
|
|
775
771
|
|
776
772
|
## Upgrading
|
777
773
|
|
778
|
-
###
|
774
|
+
### 5.0
|
775
|
+
|
776
|
+
Visits now expire with anonymity sets. If using `Ahoy.cookies = false`, a new index is needed.
|
777
|
+
|
778
|
+
For Active Record, create a migration with:
|
779
779
|
|
780
|
-
|
780
|
+
```ruby
|
781
|
+
add_index :ahoy_visits, [:visitor_token, :started_at]
|
782
|
+
```
|
781
783
|
|
782
|
-
|
784
|
+
For Mongoid, set:
|
783
785
|
|
784
|
-
|
786
|
+
```ruby
|
787
|
+
class Ahoy::Visit
|
788
|
+
index({visitor_token: 1, started_at: 1})
|
789
|
+
end
|
790
|
+
```
|
785
791
|
|
786
|
-
|
787
|
-
gem "geocoder"
|
788
|
-
```
|
792
|
+
Create the index before upgrading, and set:
|
789
793
|
|
790
|
-
|
794
|
+
```ruby
|
795
|
+
Ahoy.cookies = :none
|
796
|
+
```
|
791
797
|
|
792
798
|
## History
|
793
799
|
|
data/lib/ahoy/base_store.rb
CHANGED
data/lib/ahoy/controller.rb
CHANGED
@@ -5,9 +5,8 @@ module Ahoy
|
|
5
5
|
base.helper_method :current_visit
|
6
6
|
base.helper_method :ahoy
|
7
7
|
end
|
8
|
-
base.before_action :set_ahoy_cookies, unless: -> { Ahoy.api_only }
|
9
8
|
base.before_action :track_ahoy_visit, unless: -> { Ahoy.api_only }
|
10
|
-
base.around_action :set_ahoy_request_store
|
9
|
+
base.around_action :set_ahoy_request_store, unless: -> { Ahoy.api_only }
|
11
10
|
end
|
12
11
|
|
13
12
|
def ahoy
|
@@ -19,7 +18,7 @@ module Ahoy
|
|
19
18
|
end
|
20
19
|
|
21
20
|
def set_ahoy_cookies
|
22
|
-
if Ahoy.cookies
|
21
|
+
if Ahoy.cookies?
|
23
22
|
ahoy.set_visitor_cookie
|
24
23
|
ahoy.set_visit_cookie
|
25
24
|
else
|
@@ -31,11 +30,17 @@ module Ahoy
|
|
31
30
|
def track_ahoy_visit
|
32
31
|
defer = Ahoy.server_side_visits != true
|
33
32
|
|
34
|
-
if defer && !Ahoy.cookies
|
33
|
+
if defer && !Ahoy.cookies?
|
35
34
|
# avoid calling new_visit?, which triggers a database call
|
35
|
+
elsif !Ahoy.cookies? && ahoy.exclude?
|
36
|
+
# avoid calling new_visit?, which triggers a database call
|
37
|
+
# may or may not be a new visit
|
38
|
+
Ahoy.log("Request excluded")
|
36
39
|
elsif ahoy.new_visit?
|
37
40
|
ahoy.track_visit(defer: defer)
|
38
41
|
end
|
42
|
+
|
43
|
+
set_ahoy_cookies
|
39
44
|
end
|
40
45
|
|
41
46
|
def set_ahoy_request_store
|
data/lib/ahoy/database_store.rb
CHANGED
@@ -53,11 +53,13 @@ module Ahoy
|
|
53
53
|
|
54
54
|
def visit
|
55
55
|
unless defined?(@visit)
|
56
|
-
if
|
57
|
-
# find_by raises error by default when not found
|
58
|
-
@visit = visit_model.where(visit_token: ahoy.visit_token).
|
56
|
+
if ahoy.send(:existing_visit_token)
|
57
|
+
# find_by raises error by default with Mongoid when not found
|
58
|
+
@visit = visit_model.where(visit_token: ahoy.visit_token).take if ahoy.visit_token
|
59
|
+
elsif !Ahoy.cookies? && ahoy.visitor_token
|
60
|
+
@visit = visit_model.where(visitor_token: ahoy.visitor_token).where(started_at: Ahoy.visit_duration.ago..).order(started_at: :desc).first
|
59
61
|
else
|
60
|
-
@visit =
|
62
|
+
@visit = nil
|
61
63
|
end
|
62
64
|
end
|
63
65
|
@visit
|
data/lib/ahoy/tracker.rb
CHANGED
@@ -99,7 +99,7 @@ module Ahoy
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def new_visit?
|
102
|
-
Ahoy.cookies ? !existing_visit_token : visit.nil?
|
102
|
+
Ahoy.cookies? ? !existing_visit_token : visit.nil?
|
103
103
|
end
|
104
104
|
|
105
105
|
def new_visitor?
|
@@ -145,6 +145,13 @@ module Ahoy
|
|
145
145
|
delete_cookie("ahoy_track")
|
146
146
|
end
|
147
147
|
|
148
|
+
def exclude?
|
149
|
+
unless defined?(@exclude)
|
150
|
+
@exclude = @store.exclude?
|
151
|
+
end
|
152
|
+
@exclude
|
153
|
+
end
|
154
|
+
|
148
155
|
protected
|
149
156
|
|
150
157
|
def api?
|
@@ -153,7 +160,7 @@ module Ahoy
|
|
153
160
|
|
154
161
|
# private, but used by API
|
155
162
|
def missing_params?
|
156
|
-
if Ahoy.cookies && api? && Ahoy.protect_from_forgery
|
163
|
+
if Ahoy.cookies? && api? && Ahoy.protect_from_forgery
|
157
164
|
!(existing_visit_token && existing_visitor_token)
|
158
165
|
else
|
159
166
|
false
|
@@ -162,7 +169,7 @@ module Ahoy
|
|
162
169
|
|
163
170
|
def set_cookie(name, value, duration = nil, use_domain = true)
|
164
171
|
# safety net
|
165
|
-
return unless Ahoy.cookies && request
|
172
|
+
return unless Ahoy.cookies? && request
|
166
173
|
|
167
174
|
cookie = Ahoy.cookie_options.merge(value: value)
|
168
175
|
cookie[:expires] = duration.from_now if duration
|
@@ -184,13 +191,6 @@ module Ahoy
|
|
184
191
|
end
|
185
192
|
end
|
186
193
|
|
187
|
-
def exclude?
|
188
|
-
unless defined?(@exclude)
|
189
|
-
@exclude = @store.exclude?
|
190
|
-
end
|
191
|
-
@exclude
|
192
|
-
end
|
193
|
-
|
194
194
|
def report_exception(e)
|
195
195
|
if defined?(ActionDispatch::RemoteIp::IpSpoofAttackError) && e.is_a?(ActionDispatch::RemoteIp::IpSpoofAttackError)
|
196
196
|
debug "Tracking excluded due to IP spoofing"
|
@@ -207,7 +207,7 @@ module Ahoy
|
|
207
207
|
def visit_token_helper
|
208
208
|
@visit_token_helper ||= begin
|
209
209
|
token = existing_visit_token
|
210
|
-
token ||=
|
210
|
+
token ||= visit&.visit_token unless Ahoy.cookies?
|
211
211
|
token ||= generate_id unless Ahoy.api_only
|
212
212
|
token
|
213
213
|
end
|
@@ -216,7 +216,7 @@ module Ahoy
|
|
216
216
|
def visitor_token_helper
|
217
217
|
@visitor_token_helper ||= begin
|
218
218
|
token = existing_visitor_token
|
219
|
-
token ||= visitor_anonymity_set unless Ahoy.cookies
|
219
|
+
token ||= visitor_anonymity_set unless Ahoy.cookies?
|
220
220
|
token ||= generate_id unless Ahoy.api_only
|
221
221
|
token
|
222
222
|
end
|
@@ -225,7 +225,7 @@ module Ahoy
|
|
225
225
|
def existing_visit_token
|
226
226
|
@existing_visit_token ||= begin
|
227
227
|
token = visit_header
|
228
|
-
token ||= visit_cookie if Ahoy.cookies && !(api? && Ahoy.protect_from_forgery)
|
228
|
+
token ||= visit_cookie if Ahoy.cookies? && !(api? && Ahoy.protect_from_forgery)
|
229
229
|
token ||= visit_param if api?
|
230
230
|
token
|
231
231
|
end
|
@@ -234,16 +234,12 @@ module Ahoy
|
|
234
234
|
def existing_visitor_token
|
235
235
|
@existing_visitor_token ||= begin
|
236
236
|
token = visitor_header
|
237
|
-
token ||= visitor_cookie if Ahoy.cookies && !(api? && Ahoy.protect_from_forgery)
|
237
|
+
token ||= visitor_cookie if Ahoy.cookies? && !(api? && Ahoy.protect_from_forgery)
|
238
238
|
token ||= visitor_param if api?
|
239
239
|
token
|
240
240
|
end
|
241
241
|
end
|
242
242
|
|
243
|
-
def visit_anonymity_set
|
244
|
-
@visit_anonymity_set ||= Digest::UUID.uuid_v5(UUID_NAMESPACE, ["visit", Ahoy.mask_ip(request.remote_ip), request.user_agent].join("/"))
|
245
|
-
end
|
246
|
-
|
247
243
|
def visitor_anonymity_set
|
248
244
|
@visitor_anonymity_set ||= Digest::UUID.uuid_v5(UUID_NAMESPACE, ["visitor", Ahoy.mask_ip(request.remote_ip), request.user_agent].join("/"))
|
249
245
|
end
|
data/lib/ahoy/version.rb
CHANGED
data/lib/ahoy.rb
CHANGED
@@ -21,13 +21,45 @@ require_relative "ahoy/visit_properties"
|
|
21
21
|
require_relative "ahoy/engine" if defined?(Rails)
|
22
22
|
|
23
23
|
module Ahoy
|
24
|
+
# activejob optional
|
25
|
+
autoload :GeocodeV2Job, "ahoy/geocode_v2_job"
|
26
|
+
|
24
27
|
mattr_accessor :visit_duration
|
25
28
|
self.visit_duration = 4.hours
|
26
29
|
|
27
30
|
mattr_accessor :visitor_duration
|
28
31
|
self.visitor_duration = 2.years
|
29
32
|
|
30
|
-
|
33
|
+
def self.cookies=(value)
|
34
|
+
if value == false
|
35
|
+
if defined?(Mongoid::Document) && defined?(Ahoy::Visit) && Ahoy::Visit < Mongoid::Document
|
36
|
+
raise <<~EOS
|
37
|
+
This feature requires a new index in Ahoy 5. Set:
|
38
|
+
|
39
|
+
class Ahoy::Visit
|
40
|
+
index({visitor_token: 1, started_at: 1})
|
41
|
+
end
|
42
|
+
|
43
|
+
Create the index before upgrading, and set:
|
44
|
+
|
45
|
+
Ahoy.cookies = :none
|
46
|
+
EOS
|
47
|
+
else
|
48
|
+
raise <<~EOS
|
49
|
+
This feature requires a new index in Ahoy 5. Create a migration with:
|
50
|
+
|
51
|
+
add_index :ahoy_visits, [:visitor_token, :started_at]
|
52
|
+
|
53
|
+
Run it before upgrading, and set:
|
54
|
+
|
55
|
+
Ahoy.cookies = :none
|
56
|
+
EOS
|
57
|
+
end
|
58
|
+
end
|
59
|
+
@@cookies = value
|
60
|
+
end
|
61
|
+
|
62
|
+
mattr_reader :cookies
|
31
63
|
self.cookies = true
|
32
64
|
|
33
65
|
# TODO deprecate in favor of cookie_options
|
@@ -94,6 +126,10 @@ module Ahoy
|
|
94
126
|
logger.info { "[ahoy] #{message}" } if logger
|
95
127
|
end
|
96
128
|
|
129
|
+
def self.cookies?
|
130
|
+
cookies && cookies != :none
|
131
|
+
end
|
132
|
+
|
97
133
|
def self.mask_ip(ip)
|
98
134
|
addr = IPAddr.new(ip)
|
99
135
|
if addr.ipv4?
|
@@ -33,6 +33,10 @@ 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
|
+
|
36
40
|
# use connection_config instead of connection.adapter
|
37
41
|
# so database connection isn't needed
|
38
42
|
def adapter
|
@@ -43,10 +47,6 @@ module Ahoy
|
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
46
|
-
def rails52?
|
47
|
-
ActiveRecord::VERSION::STRING.to_f >= 5.2
|
48
|
-
end
|
49
|
-
|
50
50
|
def migration_version
|
51
51
|
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
52
52
|
end
|
@@ -45,6 +45,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
|
|
45
45
|
end
|
46
46
|
|
47
47
|
add_index :ahoy_visits, :visit_token, unique: true
|
48
|
+
add_index :ahoy_visits, [:visitor_token, :started_at]
|
48
49
|
|
49
50
|
create_table :ahoy_events<%= primary_key_type %> do |t|
|
50
51
|
t.references :visit<%= foreign_key_type %>
|
@@ -55,8 +56,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
|
|
55
56
|
t.datetime :time
|
56
57
|
end
|
57
58
|
|
58
|
-
add_index :ahoy_events, [:name, :time]<% if properties_type == "jsonb"
|
59
|
-
add_index :ahoy_events, :properties, using: :gin, opclass: :jsonb_path_ops<%
|
60
|
-
add_index :ahoy_events, "properties jsonb_path_ops", using: "gin"<% end %><% end %>
|
59
|
+
add_index :ahoy_events, [:name, :time]<% if properties_type == "jsonb" %>
|
60
|
+
add_index :ahoy_events, :properties, using: :gin, opclass: :jsonb_path_ops<% end %>
|
61
61
|
end
|
62
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ahoy_matey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02
|
11
|
+
date: 2023-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: device_detector
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: safely_block
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.4'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '0.4'
|
55
55
|
description:
|
56
56
|
email: andrew@ankane.org
|
57
57
|
executables: []
|
@@ -65,14 +65,13 @@ files:
|
|
65
65
|
- app/controllers/ahoy/base_controller.rb
|
66
66
|
- app/controllers/ahoy/events_controller.rb
|
67
67
|
- app/controllers/ahoy/visits_controller.rb
|
68
|
-
- app/jobs/ahoy/geocode_job.rb
|
69
|
-
- app/jobs/ahoy/geocode_v2_job.rb
|
70
68
|
- config/routes.rb
|
71
69
|
- lib/ahoy.rb
|
72
70
|
- lib/ahoy/base_store.rb
|
73
71
|
- lib/ahoy/controller.rb
|
74
72
|
- lib/ahoy/database_store.rb
|
75
73
|
- lib/ahoy/engine.rb
|
74
|
+
- lib/ahoy/geocode_v2_job.rb
|
76
75
|
- lib/ahoy/helper.rb
|
77
76
|
- lib/ahoy/model.rb
|
78
77
|
- lib/ahoy/query_methods.rb
|
@@ -106,14 +105,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
105
|
requirements:
|
107
106
|
- - ">="
|
108
107
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
108
|
+
version: '3'
|
110
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
110
|
requirements:
|
112
111
|
- - ">="
|
113
112
|
- !ruby/object:Gem::Version
|
114
113
|
version: '0'
|
115
114
|
requirements: []
|
116
|
-
rubygems_version: 3.4.
|
115
|
+
rubygems_version: 3.4.10
|
117
116
|
signing_key:
|
118
117
|
specification_version: 4
|
119
118
|
summary: Simple, powerful, first-party analytics for Rails
|
File without changes
|