ahoy_matey 5.2.1 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ebbbd60be1beec66d70d5fee4922f013e61a9add9b9da33ec709fa8ca166cf7
4
- data.tar.gz: '0969a3b0711ccc95e140017fc81480c2636a819b113b5a09337f72ff19b2fb09'
3
+ metadata.gz: ba34513817526ee22ee090db462d8e11168d98ec27cbbb3a866fd8ec29a388c3
4
+ data.tar.gz: 5acf5aaf4ea4339cc097b24ee3c4cdd5c09dd3f7a1eb080917d534314f74f102
5
5
  SHA512:
6
- metadata.gz: 6ef517cd3e3eb8b612ae54aef6b9051d1533acc0562303e03e8656b04b703425b55b0d4b6b0811c4f420c46ad6f34e6c01d2fc2dd802438f5dbbee36f82b4118
7
- data.tar.gz: 228810c7e621654f88a21f864fd1400f0226fd9efb0d1902ffc98f997c9263daad675f656c59de2e28f5f641f2f70ed99e7814d071062610309a19f8724f4bc9
6
+ metadata.gz: 1e5ca2c125b06888e40b16859b3bd5d5a2f547fcd1a6eea4d53110ba8432925d1ef77b09817e2f9b4383307801ab23e9d74fc85dfef747014830d6c1b4563f2d
7
+ data.tar.gz: 030df3974b1b106e8a57eeffe9d92662b3d59b9486901342e67e3b2f352ef60be7bc85c1d8954fe6eaff0c8a51fada657b96f8b08fe2650d0f20965f7f671738
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 5.3.0 (2025-02-01)
2
+
3
+ - Dropped support for Ruby < 3.1 and Rails < 7
4
+ - Dropped support for Mongoid < 8
5
+
1
6
  ## 5.2.1 (2024-10-07)
2
7
 
3
8
  - Fixed connection leasing for Active Record 7.2+
@@ -362,3 +367,19 @@ Breaking changes
362
367
  ## 0.1.0 (2014-03-19)
363
368
 
364
369
  - First major release
370
+
371
+ ## 0.0.4 (2014-03-01)
372
+
373
+ - Added UTM parameters
374
+
375
+ ## 0.0.3 (2014-02-26)
376
+
377
+ - Renamed `ahoy_visit` method to `current_visit`
378
+
379
+ ## 0.0.2 (2014-02-26)
380
+
381
+ - Added `ahoy_visit` method to controllers
382
+
383
+ ## 0.0.1 (2014-02-26)
384
+
385
+ - First release
data/README.md CHANGED
@@ -4,8 +4,6 @@
4
4
 
5
5
  Track visits and events in Ruby, JavaScript, and native apps. Data is stored in your database by default, and you can customize it for any data store as you grow.
6
6
 
7
- **Ahoy 5.0 was recently released** - see [how to upgrade](#upgrading)
8
-
9
7
  :postbox: Check out [Ahoy Email](https://github.com/ankane/ahoy_email) for emails and [Field Test](https://github.com/ankane/field_test) for A/B testing
10
8
 
11
9
  :tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
@@ -48,7 +46,7 @@ And restart your web server.
48
46
 
49
47
  ### JavaScript
50
48
 
51
- For Importmap (Rails 7 default), add to `config/importmap.rb`:
49
+ For Importmap (Rails 7+ default), add to `config/importmap.rb`:
52
50
 
53
51
  ```ruby
54
52
  pin "ahoy", to: "ahoy.js"
@@ -60,13 +58,15 @@ And add to `app/javascript/application.js`:
60
58
  import "ahoy"
61
59
  ```
62
60
 
63
- For Webpacker (Rails 6 default), run:
61
+ For Bun, esbuild, rollup.js, or Webpack, run:
64
62
 
65
63
  ```sh
64
+ bun add ahoy.js
65
+ # or
66
66
  yarn add ahoy.js
67
67
  ```
68
68
 
69
- And add to `app/javascript/packs/application.js`:
69
+ And add to `app/javascript/application.js`:
70
70
 
71
71
  ```javascript
72
72
  import ahoy from "ahoy.js"
@@ -197,7 +197,7 @@ Order.joins(:ahoy_visit).group("device_type").count
197
197
  Here’s what the migration to add the `ahoy_visit_id` column should look like:
198
198
 
199
199
  ```ruby
200
- class AddAhoyVisitToOrders < ActiveRecord::Migration[7.2]
200
+ class AddAhoyVisitToOrders < ActiveRecord::Migration[8.0]
201
201
  def change
202
202
  add_reference :orders, :ahoy_visit
203
203
  end
@@ -765,7 +765,7 @@ Send a `POST` request to `/ahoy/events` with `Content-Type: application/json` an
765
765
  "properties": {
766
766
  "item_id": 123
767
767
  },
768
- "time": "2018-01-01T00:00:00-07:00"
768
+ "time": "2025-01-01T00:00:00-07:00"
769
769
  }
770
770
  ]
771
771
  }
data/lib/ahoy/engine.rb CHANGED
@@ -29,7 +29,7 @@ module Ahoy
29
29
 
30
30
  # for importmap
31
31
  initializer "ahoy.importmap" do |app|
32
- if defined?(Importmap)
32
+ if app.config.respond_to?(:assets) && defined?(Importmap) && defined?(Sprockets)
33
33
  app.config.assets.precompile << "ahoy.js"
34
34
  end
35
35
  end
data/lib/ahoy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ahoy
2
- VERSION = "5.2.1"
2
+ VERSION = "5.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_matey
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-08 00:00:00.000000000 Z
10
+ date: 2025-02-01 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '6.1'
18
+ version: '7'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '6.1'
25
+ version: '7'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: device_detector
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +51,6 @@ dependencies:
52
51
  - - ">="
53
52
  - !ruby/object:Gem::Version
54
53
  version: '0.4'
55
- description:
56
54
  email: andrew@ankane.org
57
55
  executables: []
58
56
  extensions: []
@@ -97,7 +95,6 @@ homepage: https://github.com/ankane/ahoy
97
95
  licenses:
98
96
  - MIT
99
97
  metadata: {}
100
- post_install_message:
101
98
  rdoc_options: []
102
99
  require_paths:
103
100
  - lib
@@ -105,15 +102,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
102
  requirements:
106
103
  - - ">="
107
104
  - !ruby/object:Gem::Version
108
- version: '3'
105
+ version: '3.1'
109
106
  required_rubygems_version: !ruby/object:Gem::Requirement
110
107
  requirements:
111
108
  - - ">="
112
109
  - !ruby/object:Gem::Version
113
110
  version: '0'
114
111
  requirements: []
115
- rubygems_version: 3.5.16
116
- signing_key:
112
+ rubygems_version: 3.6.2
117
113
  specification_version: 4
118
114
  summary: Simple, powerful, first-party analytics for Rails
119
115
  test_files: []