heya 0.9.0 → 0.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8cc645db907bf986618b2ee1f6b21c33f55ad8d53c7f27f9c2dc1f7b05960dc
4
- data.tar.gz: 2aad3fdf5254ccbdd986161c517d6d2052e4d0ec85ab426aa940954a0d9a4008
3
+ metadata.gz: 8640e8fc2f4d593d85d4417b2f149d0afda39a88ffa3881f5558988c5ddda694
4
+ data.tar.gz: 3e4c574c46b7fad452c6a0394fafbab5730e51d3927798c30a38284f8ae35f61
5
5
  SHA512:
6
- metadata.gz: bcaa2e67bf73027e7d1c8cd813fe02d84a9bc53120c8cfbef9ecd5726537bd0a47fb93d0f711a4adff29c7a6f03592e1615d223c7cce3ee3fa944b008d600f8b
7
- data.tar.gz: f17a412448e15e95e392baedbe639300aa2f05d4288a65fae805932d2bb1494fad87586b6d13ee64e8ffee26a2e0b6957f530e7d6299797edf464d42f9a5e809
6
+ metadata.gz: 1a042f0c2280489b968c7882bcc1f850c95c67ab15cd0a2c90cc8adcacd55134628c75a2e2284eb24b2791f20ada01c4b6cd17b1d475d5a7970c9e96d06653ec
7
+ data.tar.gz: bef8ea2e36960de46f733eb12418b261a9241698d9d60f4b2277b34a2063b49f54a378f007643c54d49208f92c13612fd37310c2b71cebda720527c389a93608
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
+ ### Added
9
+ - Add lambda support for from, bcc, and reply_to campaign options (#233, @armiiller)
10
+
11
+ ### Fixed
12
+ - Fix a Rails startup bug when validating steps that use translations from locale
13
+ files. (#211)
14
+
15
+ ## [0.9.0] - 2023-10-06
16
+ ### Added
8
17
  - Rails 7.1 support
9
18
 
10
19
  ## [0.8.0] - 2023-03-28
data/README.md CHANGED
@@ -12,6 +12,9 @@ Getting started with Heya is easy:
12
12
  2. [Create a campaign](#creating-your-first-campaign)
13
13
  3. [Run the scheduler](#running-the-scheduler)
14
14
 
15
+ ### Prerequisites
16
+ Heya was built to work with PostgreSQL. Pull requests are welcome to support more databases.
17
+
15
18
  ### Installing the Heya gem
16
19
  1. Add this line to your application's Gemfile:
17
20
 
@@ -12,8 +12,13 @@ module Heya
12
12
  step_name = step.name.underscore
13
13
 
14
14
  from = step.params.fetch("from")
15
+ from = from.call(user) if from.respond_to?(:call)
16
+
15
17
  bcc = step.params.fetch("bcc", nil)
18
+ bcc = bcc.call(user) if bcc.respond_to?(:call)
19
+
16
20
  reply_to = step.params.fetch("reply_to", nil)
21
+ reply_to = reply_to.call(user) if reply_to.respond_to?(:call)
17
22
 
18
23
  subject = step.params.fetch("subject") {
19
24
  I18n.t("#{campaign_name}.#{step_name}.subject", **attributes_for(user))
@@ -1 +1 @@
1
- This is the <%= @step.downcase %> messsage.
1
+ This is the <%= @step.downcase %> message.
@@ -1 +1 @@
1
- This is the <%= @step.downcase %> messsage.
1
+ This is the <%= @step.downcase %> message.
data/lib/heya/engine.rb CHANGED
@@ -11,6 +11,18 @@ module Heya
11
11
  end
12
12
 
13
13
  config.to_prepare do
14
+ # This runs the first time *before* Rails is initialized. Because
15
+ # campaigns depend on Rails initialization, we use the `after_initialize`
16
+ # hook when Rails first starts up, and then `to_prepare` when reloading
17
+ # in development. See https://github.com/honeybadger-io/heya/issues/211
18
+ if ::Rails.application.initialized?
19
+ Dir.glob(Rails.root + "app/campaigns/*.rb").each do |c|
20
+ require_dependency(c)
21
+ end
22
+ end
23
+ end
24
+
25
+ config.after_initialize do
14
26
  Dir.glob(Rails.root + "app/campaigns/*.rb").each do |c|
15
27
  require_dependency(c)
16
28
  end
data/lib/heya/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Heya
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Wood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2024-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails