mailgun-ruby 1.3.7 → 1.3.8
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 +12 -0
- data/README.md +1 -1
- data/lib/mailgun/exceptions/exceptions.rb +2 -2
- data/lib/mailgun/version.rb +1 -1
- data/spec/integration/mailgun_spec.rb +2 -2
- data/spec/unit/exceptions/exceptions_spec.rb +3 -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: ba2c61b94c146d06e1ae964a44adfe0e9ea735aba61cc08a4f143a9aa996e644
|
4
|
+
data.tar.gz: 76741f9fb56cb30271eb7662d5ee45cafb76d5c08d29307fa21fd459f6021b03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6404733589f64b3544eac060e1ed18a80372fc9c2793170af47d641fc5388639caf12c3425be00ec6ae9be6d6951bbbfd4f5a0e1b220eac3ca118c5e8b885ff
|
7
|
+
data.tar.gz: c4e360f86a0256926573fa0f2f4cc2620ccbdd90fd712e794a48c08e9eba955005998cb48cfb745d683faf23b7fbff56bf6d0b4e351c3265ef97166b41f81808
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [1.3.8] - 2025-07-23
|
6
|
+
|
7
|
+
- Respond with error message for 400 Bad Request
|
8
|
+
|
9
|
+
## [1.3.7] - 2025-06-29
|
10
|
+
|
11
|
+
- Use proxy_url passed to constructor (https://github.com/mailgun/mailgun-ruby/pull/342)
|
12
|
+
- Refactor to use UserNotifier instead of UserMailer for consistency (https://github.com/mailgun/mailgun-ruby/pull/323)
|
13
|
+
- Add option to specify api key and host when initializing Address api (https://github.com/mailgun/mailgun-ruby/pull/328)
|
14
|
+
- Remove base64 dependency (https://github.com/mailgun/mailgun-ruby/pull/313)
|
15
|
+
- DE-1547: Support for the logs API (https://github.com/mailgun/mailgun-ruby/pull/356)
|
16
|
+
|
5
17
|
## [1.3.6] - 2025-05-30
|
6
18
|
|
7
19
|
### Fixed
|
data/README.md
CHANGED
@@ -46,11 +46,11 @@ module Mailgun
|
|
46
46
|
@status = if response.nil?
|
47
47
|
NOCODE
|
48
48
|
else
|
49
|
-
response
|
49
|
+
response[:status]
|
50
50
|
end
|
51
51
|
|
52
52
|
begin
|
53
|
-
json = JSON.parse(response
|
53
|
+
json = JSON.parse(response[:body])
|
54
54
|
api_message = json['message'] || json['Error'] || json['error']
|
55
55
|
rescue JSON::ParserError
|
56
56
|
api_message = response.response_body
|
data/lib/mailgun/version.rb
CHANGED
@@ -27,7 +27,7 @@ describe 'Client exceptions', vcr: vcr_opts do
|
|
27
27
|
:text => 'INTEGRATION TESTING'
|
28
28
|
})
|
29
29
|
rescue Mailgun::CommunicationError => err
|
30
|
-
expect(err.message).to eq('the server responded with status 404')
|
30
|
+
expect(err.message).to eq('the server responded with status 404: Domain not found: not-our-doma.in')
|
31
31
|
else
|
32
32
|
fail
|
33
33
|
end
|
@@ -75,7 +75,7 @@ describe 'Client exceptions', vcr: vcr_opts do
|
|
75
75
|
:text => 'INTEGRATION TESTING'
|
76
76
|
})
|
77
77
|
rescue Mailgun::BadRequest => err
|
78
|
-
expect(err.message).to eq('the server responded with status 400')
|
78
|
+
expect(err.message).to eq('the server responded with status 400: to parameter is not a valid address. please check documentation')
|
79
79
|
else
|
80
80
|
fail
|
81
81
|
end
|
@@ -5,13 +5,13 @@ RSpec.describe Mailgun::CommunicationError do
|
|
5
5
|
context "when the Response body doesn't have a `message` property" do
|
6
6
|
it "doesn't raise an error" do
|
7
7
|
expect do
|
8
|
-
described_class.new('Boom!',
|
8
|
+
described_class.new('Boom!', { status: 401, body: '{}' })
|
9
9
|
end.not_to raise_error
|
10
10
|
end
|
11
11
|
|
12
12
|
context "when the Response body has an `Error` property" do
|
13
13
|
it "uses the `Error` property as the API message" do
|
14
|
-
subject = described_class.new('Boom!',
|
14
|
+
subject = described_class.new('Boom!', { status: 401, body: '{"Error":"unauthorized"}' })
|
15
15
|
|
16
16
|
expect(subject.message).to eq("Boom!: unauthorized")
|
17
17
|
end
|
@@ -19,7 +19,7 @@ RSpec.describe Mailgun::CommunicationError do
|
|
19
19
|
|
20
20
|
context "when the Response body has an `error` property" do
|
21
21
|
it "uses the `Error` property as the API message" do
|
22
|
-
subject = described_class.new('Boom!',
|
22
|
+
subject = described_class.new('Boom!', { status: 401, body: '{"error":"not found"}' })
|
23
23
|
|
24
24
|
expect(subject.message).to eq("Boom!: not found")
|
25
25
|
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.8
|
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-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|