postmail_ruby 0.1.2 → 0.1.3

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: '082b38d7e9f806d253c50216bcbcfbf4403c3d310bb1bef277f99c2de62350c3'
4
- data.tar.gz: 19957be43157502c87a60c2b8289c893a5633d8f415b3be41807c600fa9b0b62
3
+ metadata.gz: ea81ee4f6f9e98735ba4b27011efdf339809244c4ac98a341327af73a35945fb
4
+ data.tar.gz: 22269f2f1443c18229c29c23dd63b349ef3c0f19f853724ec8a03a85e2a219c3
5
5
  SHA512:
6
- metadata.gz: f734c2ea0208d4cf30a2ba049d75f35ac07b61f85ffe6503d49d1a3b5e59c3dd3c400d2076bf19997f5efadcbe657a4a6cee567a7093865ef244f4dac2a48951
7
- data.tar.gz: 274e9ceef04ab13495b31bb6ecf2872dbc600d3f02b3d17e19b07e686c516bd10fffdd473d050ae23ddd7be994dc8b63318bb7b7a8548b72f100f1c9ec28e5b8
6
+ metadata.gz: 0b9d55cf98c40f000259bdd1cf7994c902e9b4ee9d0b1d6baff7e5b63fa647ba98060d911f76538428774cc93181b2ee0aeafbfcc75a01505b80a5f8d0fa1204
7
+ data.tar.gz: af2882bbb9a491a07f4aed9f47212acf50c2098d003e2d28c0006cc4b6661981b93f067bc184884e36c9785c36c512c466260fc8fe555fa9e7c105b784f6e56c
data/README.md CHANGED
@@ -7,7 +7,7 @@ PostmailRuby est une gem Ruby qui fournit un mécanisme flexible d’envoi d’e
7
7
  Dans votre `Gemfile`, ajoutez :
8
8
 
9
9
  ```ruby
10
- gem "postmail_ruby", '~> 0.1.1'
10
+ gem "postmail_ruby", '~> 0.1.3'
11
11
  ```
12
12
 
13
13
  Puis exécutez `bundle install` pour installer la gem.
@@ -18,7 +18,7 @@ module PostmailRuby
18
18
  # Initialize the HTTP delivery method. Accepts a hash of
19
19
  # options that may override configuration defaults. Options
20
20
  # are stored but not used directly; configuration is read
21
- # from Postmail.config for each delivery to ensure the most
21
+ # from PostmailRuby.config for each delivery to ensure the most
22
22
  # current environment variables are respected.
23
23
  #
24
24
  # @param [Hash] options delivery options (currently unused)
@@ -34,7 +34,7 @@ module PostmailRuby
34
34
  #
35
35
  # @param [Mail::Message] mail the message to send
36
36
  def deliver!(mail)
37
- config = Postmail.config
37
+ config = PostmailRuby.config
38
38
  uri = URI.parse(config.api_endpoint)
39
39
 
40
40
  http = Net::HTTP.new(uri.host, uri.port)
@@ -94,10 +94,10 @@ module PostmailRuby
94
94
  Array(value).join(',')
95
95
  end
96
96
 
97
- # Extract a specific MIME part "../../postmail/delivery_method""."from the message. For
98
- # multipart messages, the first matching part "../../postmail/delivery_method""."is returned.
97
+ # Extract a specific MIME part "../../postmail_ruby/delivery_method""."from the message. For
98
+ # multipart messages, the first matching part "../../postmail_ruby/delivery_method""."is returned.
99
99
  # For non-multipart, the body is returned if the MIME type
100
- # matches. Returns nil if no matching part "../../postmail/delivery_method""."exists.
100
+ # matches. Returns nil if no matching part "../../postmail_ruby/delivery_method""."exists.
101
101
  def extract_part(mail, mime_type)
102
102
  if mail.multipart?
103
103
  mail.parts.find { |p| p.mime_type&.start_with?(mime_type) }
@@ -28,7 +28,7 @@ module PostmailRuby
28
28
  #
29
29
  # @param [Mail::Message] mail the message to send
30
30
  def deliver!(mail)
31
- config_settings = Postmail.config.smtp_settings
31
+ config_settings = PostmailRuby.config.smtp_settings
32
32
  smtp_settings = config_settings.merge(settings)
33
33
  smtp = ::Mail::SMTP.new(smtp_settings)
34
34
  smtp.deliver!(mail)
@@ -17,7 +17,7 @@ module PostmailRuby
17
17
  ActionMailer::Base.add_delivery_method :postmail_api, PostmailRuby::DeliveryMethod::HTTP
18
18
 
19
19
  # Determine which delivery method to use based on configuration
20
- delivery_method = Postmail.config.delivery_method
20
+ delivery_method = PostmailRuby.config.delivery_method
21
21
  ActionMailer::Base.delivery_method = case delivery_method
22
22
  when :api
23
23
  :postmail_api
@@ -2,5 +2,5 @@
2
2
 
3
3
  module PostmailRuby
4
4
  # Gem version constant
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
data/lib/postmail_ruby.rb CHANGED
@@ -12,7 +12,7 @@ module PostmailRuby
12
12
  class << self
13
13
  # Accessor for the configuration instance. When first called
14
14
  # a new Configuration object is created and memoized. This
15
- # object reads environment variables to determine how Postmail
15
+ # object reads environment variables to determine how PostmailRuby
16
16
  # should behave (API vs SMTP, credentials, endpoints, etc.).
17
17
  #
18
18
  # @return [PostmailRuby::Configuration]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmail_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - DAKIN Judicaël