mailgun-ruby 1.2.9 → 1.2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +0 -0
  3. data/.rubocop_todo.yml +0 -0
  4. data/.ruby-env.yml.example +0 -0
  5. data/README.md +3 -2
  6. data/lib/mailgun/chains.rb +0 -0
  7. data/lib/mailgun/client.rb +3 -3
  8. data/lib/mailgun/domains/domains.rb +0 -0
  9. data/lib/mailgun/response.rb +0 -0
  10. data/lib/mailgun/version.rb +1 -1
  11. data/lib/mailgun/webhooks/webhooks.rb +2 -2
  12. data/spec/integration/bounces_spec.rb +0 -0
  13. data/spec/integration/campaign_spec.rb +0 -0
  14. data/spec/integration/complaints_spec.rb +0 -0
  15. data/spec/integration/domains_spec.rb +0 -0
  16. data/spec/integration/email_validation_spec.rb +0 -0
  17. data/spec/integration/events_spec.rb +0 -0
  18. data/spec/integration/list_members_spec.rb +0 -0
  19. data/spec/integration/list_spec.rb +0 -0
  20. data/spec/integration/mailgun_spec.rb +0 -0
  21. data/spec/integration/routes_spec.rb +0 -0
  22. data/spec/integration/stats_spec.rb +0 -0
  23. data/spec/integration/suppressions_spec.rb +0 -0
  24. data/spec/integration/unsubscribes_spec.rb +0 -0
  25. data/spec/integration/webhook_spec.rb +0 -0
  26. data/spec/unit/connection/test_client.rb +2 -2
  27. data/vcr_cassettes/bounces.yml +0 -0
  28. data/vcr_cassettes/complaints.yml +0 -0
  29. data/vcr_cassettes/domains.todo.yml +0 -0
  30. data/vcr_cassettes/domains.yml +0 -0
  31. data/vcr_cassettes/events.yml +0 -0
  32. data/vcr_cassettes/list_members.yml +0 -0
  33. data/vcr_cassettes/mailing_list.todo.yml +0 -0
  34. data/vcr_cassettes/mailing_list.yml +0 -0
  35. data/vcr_cassettes/routes.yml +0 -0
  36. data/vcr_cassettes/send_message.yml +0 -0
  37. data/vcr_cassettes/stats.yml +0 -0
  38. data/vcr_cassettes/unsubscribes.yml +0 -0
  39. data/vcr_cassettes/webhooks.yml +0 -0
  40. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f43539594603950ec212832426bd7755d2b61a466aa9a028eb54f1246687fa3d
4
- data.tar.gz: 7c02110bf7e1aae3d6f18ad228e50954a058a36fc2e87b97bfc542ef71bb1a28
3
+ metadata.gz: 17aa99cf0b68c595bdc9a923368c206da53c5eb2798d4a4faf9def78d9216129
4
+ data.tar.gz: ede5046e9ddb743b5eadff56da85a7b32049c6c6451895442f4356675c946cc9
5
5
  SHA512:
6
- metadata.gz: 96a39b566bd9b58ad0d799e22742f30b35d6e5d20af43f867fb4412c11408aece5eada65e6bd4153d11028553a2275b0317243eab52c1159b572e508a5192918
7
- data.tar.gz: d1ab619f72f158253a353e53416d03730c0d37f957757a8294580ddaa98cdf912aa0d384a69e55702658450d12922b43c0ef780be6a044edf73248246a253bb5
6
+ metadata.gz: a9b57eb3df8f031b360871555f05681f4f585df44973844369f54f4acc0331e34977813275a36dab485d3b3c3268ce2a56d456c4b292bfd90399d226da1c66f5
7
+ data.tar.gz: 99d18ff767e314c436891d4a56aa05e7037618c7aa03f3fc28d6be69ad41e49a58744f02024f94376ab9e69f0250ae3455e54d41f9b939da80cba64550ec71ea
data/.rubocop.yml CHANGED
File without changes
data/.rubocop_todo.yml CHANGED
File without changes
File without changes
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.2.9'
22
+ gem 'mailgun-ruby', '~>1.2.11'
23
23
  ```
24
24
 
25
25
  Usage
@@ -81,6 +81,7 @@ and replace `api-myapikey` and `mydomain.com` with your secret API key and domai
81
81
  api_key: 'api-myapikey',
82
82
  domain: 'mydomain.com',
83
83
  # api_host: 'api.eu.mailgun.net' # Uncomment this line for EU region domains
84
+ # timeout: 20 # Default depends on rest-client, whose default is 60s. Added in 1.2.3.
84
85
  }
85
86
  ```
86
87
 
@@ -96,7 +97,7 @@ class UserMailer < ApplicationMailer
96
97
  }
97
98
  end
98
99
  end
99
- end
100
+ end
100
101
  ```
101
102
 
102
103
  To get the Mailgun `message_id` after ActionMailer has successfully delivered the email:
File without changes
@@ -205,7 +205,7 @@ module Mailgun
205
205
  #
206
206
  # @param [StandardException] e upstream exception object
207
207
  def communication_error(e)
208
- if e.respond_to?(:response)
208
+ if e.respond_to?(:response) && e.response
209
209
  return case e.response.code
210
210
  when Unauthorized::CODE
211
211
  Unauthorized.new(e.message, e.response)
@@ -222,11 +222,11 @@ module Mailgun
222
222
  message = data.respond_to?(:message) ? data.message : data
223
223
  fail ParameterError.new('Missing working domain', working_domain) unless working_domain
224
224
  fail ParameterError.new(
225
- 'Missing `to` recipient, message should containg at least 1 recipient',
225
+ 'Missing `to` recipient, message should contain at least 1 recipient',
226
226
  working_domain
227
227
  ) if message.fetch('to', []).empty? && message.fetch(:to, []).empty?
228
228
  fail ParameterError.new(
229
- 'Missing a `from` sender, message should containg at least 1 `from` sender',
229
+ 'Missing a `from` sender, message should contain at least 1 `from` sender',
230
230
  working_domain
231
231
  ) if message.fetch('from', []).empty? && message.fetch(:from, []).empty?
232
232
  end
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  # It's the version. Yeay!
2
2
  module Mailgun
3
- VERSION = '1.2.9'
3
+ VERSION = '1.2.11'
4
4
  end
@@ -58,7 +58,7 @@ module Mailgun
58
58
  #
59
59
  # Returns true or false
60
60
  def create_all(domain, url = '')
61
- %w(bounce click deliver drop open spam unsubscribe).each do |action|
61
+ %w(accepted clicked complained delivered opened permanent_fail temporary_fail unsubscribed).each do |action|
62
62
  add_webhook domain, action, url
63
63
  end
64
64
  true
@@ -90,7 +90,7 @@ module Mailgun
90
90
  # Returns a Boolean on the success
91
91
  def remove_all(domain)
92
92
  fail Mailgun::ParameterError('Domain not provided to remove webhooks from') unless domain
93
- %w(bounce click deliver drop open spam unsubscribe).each do |action|
93
+ %w(accepted clicked complained delivered opened permanent_fail temporary_fail unsubscribed).each do |action|
94
94
  delete_webhook domain, action
95
95
  end
96
96
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -83,11 +83,11 @@ module Mailgun
83
83
  message = data.respond_to?(:message) ? data.message : data
84
84
 
85
85
  fail ParameterError.new(
86
- 'Missing `to` recipient, message should containg at least 1 recipient',
86
+ 'Missing `to` recipient, message should contain at least 1 recipient',
87
87
  working_domain
88
88
  ) if message.fetch('to', []).empty? && message.fetch(:to, []).empty?
89
89
  fail ParameterError.new(
90
- 'Missing a `from` sender, message should containg at least 1 `from` sender',
90
+ 'Missing a `from` sender, message should contain at least 1 `from` sender',
91
91
  working_domain
92
92
  ) if message.fetch('from', []).empty? && message.fetch(:from, []).empty?
93
93
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailgun-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mailgun
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-06-18 00:00:00.000000000 Z
12
+ date: 2023-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -254,8 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  - !ruby/object:Gem::Version
255
255
  version: '0'
256
256
  requirements: []
257
- rubyforge_project:
258
- rubygems_version: 2.7.6
257
+ rubygems_version: 3.0.3
259
258
  signing_key:
260
259
  specification_version: 4
261
260
  summary: Mailgun's Official Ruby SDK