mailgun-ruby 1.3.3 → 1.3.5
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 +18 -1
- data/lib/mailgun/chains.rb +1 -1
- data/lib/mailgun/messages/message_builder.rb +5 -4
- data/lib/mailgun/version.rb +1 -1
- data/spec/unit/messages/message_builder_spec.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c3decbf9e3cc421d067f05661560a6677c8873792b2895f6ee04ef52aa81323
|
4
|
+
data.tar.gz: 86eda44ce14d19c5c52c8e48671210b36bb8b1d7989756679dad3e087a398690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2af34e19834467ba23ebaf6052a9af8ef6e8e49106128cdcd47a1dc693792af2ea4a543dde46c1f5896df4cc13579cb2c470bd788f40ecd6652bdfa9ba1a9049
|
7
|
+
data.tar.gz: de3d99329bdd5427ef09557f8b4aaac8e285fdaafc196d76be84e4a61a3d67cfbb3bd3112d2b4f2b0fa35b2233ee2f6ffa6e517bcbec0cddb0116a8b1dcdfd6e
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,24 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
## [
|
5
|
+
## [1.3.5] - 2025-04-07
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- Set attachment filename on upload IO (https://github.com/mailgun/mailgun-ruby/pull/351)
|
10
|
+
|
11
|
+
## [1.3.4] - 2025-03-28
|
12
|
+
|
13
|
+
### Added
|
14
|
+
|
15
|
+
- Increase max tag limit to 10 per message (https://github.com/mailgun/mailgun-ruby/pull/350)
|
16
|
+
|
17
|
+
## [1.3.3] - 2025-03-25
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
- Fix specs (https://github.com/mailgun/mailgun-ruby/pull/345)
|
22
|
+
- Fix sending attachments via faraday (https://github.com/mailgun/mailgun-ruby/pull/347)
|
6
23
|
|
7
24
|
## [1.3.2] - 2025-01-30
|
8
25
|
|
data/lib/mailgun/chains.rb
CHANGED
@@ -190,7 +190,7 @@ module Mailgun
|
|
190
190
|
@counters[:attributes][:campaign_id] += 1
|
191
191
|
end
|
192
192
|
|
193
|
-
# Add tags to message. Limit of
|
193
|
+
# Add tags to message. Limit of 10 per message.
|
194
194
|
#
|
195
195
|
# @param [String] tag A defined campaign ID to add to the message.
|
196
196
|
# @return [void]
|
@@ -389,10 +389,11 @@ module Mailgun
|
|
389
389
|
#
|
390
390
|
# @param [String] parameter The message object parameter name.
|
391
391
|
# @param [String] value The attachment.
|
392
|
+
# @param [String] filename Filename of the attachment.
|
392
393
|
# @return [void]
|
393
|
-
def add_faraday_attachment(parameter, attachment)
|
394
|
+
def add_faraday_attachment(parameter, attachment, filename)
|
394
395
|
content_type = attachment.respond_to?(:content_type) ? attachment.content_type : nil
|
395
|
-
@message[parameter] << Faraday::Multipart::FilePart.new(attachment, content_type)
|
396
|
+
@message[parameter] << Faraday::Multipart::FilePart.new(attachment, content_type, filename)
|
396
397
|
end
|
397
398
|
|
398
399
|
# Converts boolean type to string
|
@@ -480,7 +481,7 @@ module Mailgun
|
|
480
481
|
attachment.instance_variable_set :@original_filename, filename
|
481
482
|
attachment.instance_eval 'def original_filename; @original_filename; end'
|
482
483
|
end
|
483
|
-
add_faraday_attachment(disposition, attachment)
|
484
|
+
add_faraday_attachment(disposition, attachment, filename)
|
484
485
|
end
|
485
486
|
end
|
486
487
|
|
data/lib/mailgun/version.rb
CHANGED
@@ -262,10 +262,11 @@ describe 'The method add_attachment' do
|
|
262
262
|
io = StringIO.new
|
263
263
|
io << File.binread(File.dirname(__FILE__) + "/sample_data/mailgun_icon.png")
|
264
264
|
|
265
|
-
@mb_obj.add_attachment io, '
|
265
|
+
@mb_obj.add_attachment io, 'cool_attachment.png'
|
266
266
|
|
267
267
|
expect(@mb_obj.message[:attachment].length).to eq(1)
|
268
|
-
expect(@mb_obj.message[:attachment].first.io.original_filename).to eq '
|
268
|
+
expect(@mb_obj.message[:attachment].first.io.original_filename).to eq 'cool_attachment.png'
|
269
|
+
expect(@mb_obj.message[:attachment].first.original_filename).to eq 'cool_attachment.png'
|
269
270
|
end
|
270
271
|
|
271
272
|
context 'when attachment has unknown type' do
|
@@ -450,7 +451,7 @@ describe 'The method add_tag' do
|
|
450
451
|
end
|
451
452
|
it 'adds too many tags to the message' do
|
452
453
|
expect{
|
453
|
-
|
454
|
+
12.times do
|
454
455
|
@mb_obj.add_tag('My-Tag')
|
455
456
|
end }.to raise_error(Mailgun::ParameterError)
|
456
457
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailgun-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mailgun
|
8
8
|
- Travis Swientek
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|