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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0041dce1e0fc1dc9f5166d4095a8d39dadf26be5b5b7892f1b8005b60a471a1f
4
- data.tar.gz: 4356cf2e9093a066e28ff7fab036af94294eb4515137d0f802f001093b2d477f
3
+ metadata.gz: ba2c61b94c146d06e1ae964a44adfe0e9ea735aba61cc08a4f143a9aa996e644
4
+ data.tar.gz: 76741f9fb56cb30271eb7662d5ee45cafb76d5c08d29307fa21fd459f6021b03
5
5
  SHA512:
6
- metadata.gz: 3420a656e1d4ef615a665743190b593a46a5ea13f778bf65a2b1d32746a30fb2ed08adde9d6651aeaacfa7fc8e815cc0cf51a510fd7c2b83e8a20c8b3cb34391
7
- data.tar.gz: 864f0bfc57d6e06112eb410870bd88d6a7aa81a1b8f71bbb88206a6b768fcc1346635d76c2ffa059469911baed7e911e4f96e3cb6793192794511719e31dba99
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
@@ -19,7 +19,7 @@ gem install mailgun-ruby
19
19
  Gemfile:
20
20
 
21
21
  ```ruby
22
- gem 'mailgun-ruby', '~>1.3.7'
22
+ gem 'mailgun-ruby', '~>1.3.8'
23
23
  ```
24
24
 
25
25
  Usage
@@ -46,11 +46,11 @@ module Mailgun
46
46
  @status = if response.nil?
47
47
  NOCODE
48
48
  else
49
- response.status
49
+ response[:status]
50
50
  end
51
51
 
52
52
  begin
53
- json = JSON.parse(response.body)
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
@@ -1,4 +1,4 @@
1
1
  # It's the version. Yeay!
2
2
  module Mailgun
3
- VERSION = '1.3.7'
3
+ VERSION = '1.3.8'
4
4
  end
@@ -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!', Mailgun::Response.from_hash({ status: 401, body: '{}' }))
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!', Mailgun::Response.from_hash({ status: 401, body: '{"Error":"unauthorized"}' }))
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!', Mailgun::Response.from_hash({ status: 401, body: '{"error":"not found"}' }))
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.7
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-06-29 00:00:00.000000000 Z
11
+ date: 2025-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler