smailer 0.8.1 → 0.8.2
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/.rspec +1 -0
- data/CHANGELOG.md +15 -2
- data/lib/smailer/models/queued_mail.rb +1 -1
- data/lib/smailer/version.rb +1 -1
- data/spec/models/queued_mail_spec.rb +16 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 597184be6e340a90a5aec0c7d877ebaeae878071
|
4
|
+
data.tar.gz: be0274a57ca1f64b01398ca45b2bab0ae770aba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34a053d61e746507658a348e6f2f59a0d82a49b5e7ddae10648f5f9399f5a24fa7d9a3fc4c6e09db24beac000bcea155d8a9c62a70851d898377667c3711c779
|
7
|
+
data.tar.gz: 9747adc90ed4c575516df92f07aae7edc7a943b882d34e50d66c6cf1e0891720a252f1eeeb0cef4736501475b350936092126c12b063a086f5120f8330f8ae06
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,24 @@
|
|
1
|
+
## Version v0.8.2
|
2
|
+
|
3
|
+
- Fixes broken unsubscribe and tracking links (broken by improper unique
|
4
|
+
message key regeneration). The issue was introduced in v0.8.0.
|
5
|
+
|
6
|
+
No special actions are required to upgrade from v0.8.1.
|
7
|
+
|
1
8
|
## Version v0.8.1
|
2
9
|
|
3
10
|
- Adds support for 'reply-to'
|
4
11
|
|
5
12
|
**Major Bug Fixes:**
|
6
13
|
|
7
|
-
- `QueuedMail.new(to: …, from: …, mail_campaign: …)` will work as expected 9ff2d80
|
8
|
-
- `QueuedMail#body_text=` now works as expected
|
14
|
+
- `QueuedMail.new(to: …, from: …, mail_campaign: …)` will work as expected [9ff2d80](https://github.com/livebg/smailer/commit/9ff2d80).
|
15
|
+
- `QueuedMail#body_text=` now works as expected.
|
16
|
+
|
17
|
+
**Upgrading from v0.8.0 to v0.8.1**
|
18
|
+
|
19
|
+
To make the required changes in the database, you can use this
|
20
|
+
[smailer_v0_8_0_to_v0_8_1 migration](upgrading/migrations/smailer_v0_8_0_to_v0_8_1.rb).
|
21
|
+
You may need to alter this migration to fit your data.
|
9
22
|
|
10
23
|
## Version v0.8.0
|
11
24
|
|
@@ -94,7 +94,7 @@ module Smailer
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def initialize_message_key
|
97
|
-
self.key = Digest::MD5.hexdigest("#{mail_campaign_id}, #{to}, #{SecureRandom.hex(15)}
|
97
|
+
self.key = self[:key] || Digest::MD5.hexdigest("#{mail_campaign_id}, #{to}, #{SecureRandom.hex(15)} compose this key.")
|
98
98
|
end
|
99
99
|
|
100
100
|
def interpolate(text)
|
data/lib/smailer/version.rb
CHANGED
@@ -150,6 +150,22 @@ describe Smailer::Models::QueuedMail do
|
|
150
150
|
|
151
151
|
expect(queued_mail_1.key).to_not eq(queued_mail_2.key)
|
152
152
|
end
|
153
|
+
|
154
|
+
it 'remains the same once initialized' do
|
155
|
+
queued_mail = Smailer::Models::QueuedMail.new
|
156
|
+
queued_mail.mail_campaign_id = 42
|
157
|
+
queued_mail.to = 'test@example.com'
|
158
|
+
|
159
|
+
expect(SecureRandom).to receive(:hex).once.with(15).and_return('random-string')
|
160
|
+
expect(Digest::MD5).to receive(:hexdigest).once.with('42, test@example.com, random-string compose this key.').and_return('message-key')
|
161
|
+
|
162
|
+
expect(queued_mail.key).to eq('message-key')
|
163
|
+
|
164
|
+
queued_mail.save!
|
165
|
+
queued_mail.reload
|
166
|
+
|
167
|
+
expect(queued_mail.key).to eq('message-key')
|
168
|
+
end
|
153
169
|
end
|
154
170
|
|
155
171
|
describe '#require_uniqueness' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitar Dimitrov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -61,6 +61,7 @@ extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
63
|
- ".gitignore"
|
64
|
+
- ".rspec"
|
64
65
|
- CHANGELOG.md
|
65
66
|
- Gemfile
|
66
67
|
- Gemfile.lock
|