ahoy_email 2.3.0 → 2.3.1

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: 55896391d55a0158cdf032a2d7a29860984db55a4c116b96317e8986acdef143
4
- data.tar.gz: 6c1c742d62fa0c2b2b62832dc0030fa7dad31839fc5e015f3806766c14ce9804
3
+ metadata.gz: 238e4d5f6eb74588ea6d9d628cce5b7c69fa584741280c9d766fa13c5ef8164a
4
+ data.tar.gz: 3dedf13c78c400d139bb9450fc01ceb1a56c844b463ff0cafdf12fc7f6553573
5
5
  SHA512:
6
- metadata.gz: 411579c14c08b65b59aaf34dafa6e37e0fdff00acc2232eb9962c31ce7077826aa228d3e7e7b09f657b2e6a2542b003b005e43237106b162ffd60930a13e9cf8
7
- data.tar.gz: a042562ba6f0a1ed0e342f823bd75b7960fdae2490699f02cbfd1320f81fd82cd19bdaabb437369825701656eb78f5a1663a14ccf918c28605257c3af966dbbf
6
+ metadata.gz: 4cc75f90c29e23f1c4dc5e87cfa626cbff9a6a0f3c23850f5813bb3890f1afbc72912e94bc8fb5f15f87c0f32794c7031f5559d0255d52065412e73dba793985
7
+ data.tar.gz: 559b2bec029c2d659c10799ff38453b939ff615f84a7a4041670badf3b96c8faa91d9f6037f9147d0003422197bdc430ddd2e075f391391c01905cb522abc2f6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.3.1 (2024-09-09)
2
+
3
+ - Fixed deprecation warning with Rails 7.1
4
+
1
5
  ## 2.3.0 (2024-06-01)
2
6
 
3
7
  - Added support for secret token rotation
data/README.md CHANGED
@@ -106,7 +106,7 @@ user.messages
106
106
  Add extra data to messages. Create a migration like:
107
107
 
108
108
  ```ruby
109
- class AddCouponIdToAhoyMessages < ActiveRecord::Migration[7.1]
109
+ class AddCouponIdToAhoyMessages < ActiveRecord::Migration[7.2]
110
110
  def change
111
111
  add_column :ahoy_messages, :coupon_id, :integer
112
112
  end
@@ -156,7 +156,7 @@ end
156
156
  Delete older data with:
157
157
 
158
158
  ```ruby
159
- Ahoy::Message.where("created_at < ?", 1.year.ago).in_batches.delete_all
159
+ Ahoy::Message.where("sent_at < ?", 1.year.ago).in_batches.delete_all
160
160
  ```
161
161
 
162
162
  Delete data for a specific user with:
@@ -324,54 +324,6 @@ Get stats for a campaign
324
324
  AhoyEmail.stats("my-campaign")
325
325
  ```
326
326
 
327
- ## Upgrading
328
-
329
- ### 2.0
330
-
331
- Ahoy Email 2.0 brings a number of changes. Here are a few to be aware of:
332
-
333
- - The `to` field is encrypted by default for new installations. If you’d like to encrypt an existing installation, install [Lockbox](https://github.com/ankane/lockbox) and [Blind Index](https://github.com/ankane/blind_index) and follow the Lockbox instructions for [migrating existing data](https://github.com/ankane/lockbox#migrating-existing-data).
334
-
335
- For the model, create `app/models/ahoy/message.rb` with:
336
-
337
- ```ruby
338
- class Ahoy::Message < ActiveRecord::Base
339
- self.table_name = "ahoy_messages"
340
-
341
- belongs_to :user, polymorphic: true, optional: true
342
-
343
- encrypts :to, migrating: true
344
- blind_index :to, migrating: true
345
- end
346
- ```
347
-
348
- - The `track` method has been broken into:
349
-
350
- - `has_history` for message history
351
- - `utm_params` for UTM tagging
352
- - `track_clicks` for click analytics
353
-
354
- - Message history is no longer enabled by default. Add `has_history` to individual mailers, or create an initializer with:
355
-
356
- ```ruby
357
- AhoyEmail.default_options[:message] = true
358
- ```
359
-
360
- - For privacy, open tracking has been removed.
361
-
362
- - For clicks, we encourage you to try [aggregate analytics](#click-analytics) to measure the performance of campaigns. You can use a library like [Rollup](https://github.com/ankane/rollup) to aggregate existing data, then drop the `token` and `clicked_at` columns.
363
-
364
- To keep individual analytics, use `has_history` and `track_clicks campaign: false` and create an initializer with:
365
-
366
- ```ruby
367
- AhoyEmail.save_token = true
368
- AhoyEmail.subscribers << AhoyEmail::MessageSubscriber
369
- ```
370
-
371
- If you use a custom subscriber, `:message` is no longer included in click events. You can use `:token` to query the message if needed.
372
-
373
- - Users are shown a link expired page when signature verification fails instead of being redirected to the homepage when `AhoyEmail.invalid_redirect_url` is not set
374
-
375
327
  ## History
376
328
 
377
329
  View the [changelog](https://github.com/ankane/ahoy_email/blob/master/CHANGELOG.md)
@@ -11,7 +11,7 @@ module AhoyEmail
11
11
  creds =
12
12
  if app.respond_to?(:credentials) && app.credentials.secret_key_base
13
13
  app.credentials
14
- elsif app.respond_to?(:secrets)
14
+ elsif app.respond_to?(:secrets) && (Rails::VERSION::STRING.to_f < 7.1 || app.config.paths["config/secrets"].existent.any?)
15
15
  app.secrets
16
16
  else
17
17
  app.config
@@ -1,3 +1,3 @@
1
1
  module AhoyEmail
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-01 00:00:00.000000000 Z
11
+ date: 2024-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.5.9
126
+ rubygems_version: 3.5.16
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: First-party email analytics for Rails