mailgunner 3.3.0 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 710f8d7a57375739abe0a86b8593fce280d816db9b4714e88c3d72813674314e
4
- data.tar.gz: 26dc907da5afb3955fccf1c0973d116fa7a899a87f933fea96b9f7833c908c64
3
+ metadata.gz: 5c903842be521d78a211f0b5e96d0b18f99847867e1563667d04f22e780e0bba
4
+ data.tar.gz: '04286f2ed6322da324ec180e72d616d50341947e0433505044b045236802a10c'
5
5
  SHA512:
6
- metadata.gz: 9775c97eaa7562e235a289bb3017e7712edb0f4ac921fdd0479e0bfc34df98313721d6b77de3988c8d52f42396d043ecf2ed6f828da3c959274e401ecf0b3a1b
7
- data.tar.gz: 526a146c51827c7cdcf5d792073fd200ed0515eb576e71b4bb76146758f60bfc862fd9bf282644261fd63ac6efb0a2d39667a07ab84afe980a22e1bad6fe334b
6
+ metadata.gz: 7eedab7a0b027ddcf7444f42769e45c9fd0183bd405850c5ae57d02098b3d3bd124d38e95f52c80f880d96198c885a7ecd6eca97fa05bfe5cb438bc9294cabac
7
+ data.tar.gz: ef1e0b321141f92b6df7dd50f940e57eb619f747e24d3a5fede6f603c6aee9101dde79e9b0c463cec7b5d5140493b89179dab5a80f4bb2c978ff20904e9430d3
data/CHANGES.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 3.4.0
2
+
3
+ * Added delete_unsubscribes method (#26)
4
+
5
+ * Added delete_complaints method (#26)
6
+
7
+ * Changed from cgi to uri for encoding query parameters
8
+
9
+ * Added dependencies on net/http, json, and uri gems
10
+
1
11
  # 3.3.0
2
12
 
3
13
  * Fixed compatibility with rails/actionmailer 7.1 (#24)
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-2023 TIMCRAFT
1
+ Copyright (c) 2012-2024 TIMCRAFT
2
2
 
3
3
  This is an Open Source project licensed under the terms of the LGPLv3 license.
4
4
  Please see <http://www.gnu.org/licenses/lgpl-3.0.html> for license text.
@@ -34,6 +34,10 @@ module Mailgunner
34
34
  delete("/v3/#{escape @domain}/unsubscribes/#{escape address_or_id}")
35
35
  end
36
36
 
37
+ def delete_unsubscribes
38
+ delete("/v3/#{escape @domain}/unsubscribes")
39
+ end
40
+
37
41
  def add_unsubscribe(attributes = ATTRIBUTES)
38
42
  post("/v3/#{escape @domain}/unsubscribes", attributes)
39
43
  end
@@ -54,6 +58,10 @@ module Mailgunner
54
58
  delete("/v3/#{escape @domain}/complaints/#{escape address}")
55
59
  end
56
60
 
61
+ def delete_complaints
62
+ delete("/v3/#{escape @domain}/complaints")
63
+ end
64
+
57
65
  def get_whitelists(params = PARAMS)
58
66
  get("/v3/#{escape @domain}/whitelists", query: params)
59
67
  end
@@ -5,7 +5,6 @@ rescue LoadError
5
5
  end
6
6
 
7
7
  module Mailgunner
8
- # @private
9
8
  class DeliveryMethod
10
9
  attr_accessor :settings
11
10
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  module Mailgunner
4
4
  class Error < StandardError
5
- # @private
6
5
  def self.parse(response)
7
6
  exception_class = case response
8
7
  when Net::HTTPUnauthorized
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- require 'cgi'
2
+ require 'uri'
3
3
 
4
4
  module Mailgunner
5
5
  module Params
@@ -7,10 +7,8 @@ module Mailgunner
7
7
  params.flat_map { |k, vs| Array(vs).map { |v| "#{escape(k)}=#{escape(v)}" } }.join('&')
8
8
  end
9
9
 
10
- def self.escape(component)
11
- CGI.escape(component.to_s)
10
+ def self.escape(value)
11
+ URI.encode_uri_component(value)
12
12
  end
13
13
  end
14
-
15
- private_constant :Params
16
14
  end
@@ -1,5 +1,4 @@
1
1
  module Mailgunner
2
- # @private
3
2
  class Railtie < Rails::Railtie
4
3
  initializer 'mailgunner', before: 'action_mailer.set_configs' do
5
4
  require 'mailgunner/delivery_method'
@@ -1,3 +1,3 @@
1
1
  module Mailgunner
2
- VERSION = '3.3.0'
2
+ VERSION = '3.4.0'
3
3
  end
data/mailgunner.gemspec CHANGED
@@ -19,4 +19,7 @@ Gem::Specification.new do |s|
19
19
  'bug_tracker_uri' => 'https://github.com/readysteady/mailgunner/issues',
20
20
  'changelog_uri' => 'https://github.com/readysteady/mailgunner/blob/main/CHANGES.md'
21
21
  }
22
+ s.add_dependency 'net-http'
23
+ s.add_dependency 'json', '~> 2'
24
+ s.add_dependency 'uri', '~> 1'
22
25
  end
metadata CHANGED
@@ -1,15 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailgunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Craft
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-01 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2024-11-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: net-http
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: uri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1'
13
55
  description: Ruby client for the Mailgun API
14
56
  email:
15
57
  - mail@timcraft.com
@@ -64,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
106
  - !ruby/object:Gem::Version
65
107
  version: '0'
66
108
  requirements: []
67
- rubygems_version: 3.4.10
109
+ rubygems_version: 3.5.22
68
110
  signing_key:
69
111
  specification_version: 4
70
112
  summary: Ruby client for the Mailgun API