padrino-mailer 0.13.1 → 0.13.2

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
  SHA1:
3
- metadata.gz: b6a7aefa373c9acb4e329848a922d59aa206223c
4
- data.tar.gz: 8e32434c7dd11ef4892435db8dedd2c13389134d
3
+ metadata.gz: dcadea24539f54965f30482d6ba1031e2d2c1735
4
+ data.tar.gz: 7072ecef88d36253f720ff449e4b4472548d3854
5
5
  SHA512:
6
- metadata.gz: dd454eac17e55f1bad80e48c48383801c12490b604d3dbbab1d80bbba12db4ee337a95fd69db80026355e16cf6bdcca63c7a94b9e11f39f356e35d471fd2efee
7
- data.tar.gz: 8116bb26ce0342b92ba10ec76454fc8ad4a3def790e0d880ab651f9f43223a166953de779f4a854b20c12c08e73f374db125b9db2089b96a691a5262e70dcf6e
6
+ metadata.gz: 715759f9eafb48d542337f4f42205228d6b875edc3fe4b9c26c414d6c48525abb5476dd42a4802fdf3755ce277a345762b80485876ba53f480ab148464af4691
7
+ data.tar.gz: e9509f3b64f2aa534886c746bd8747721dcdae10f5da81b0d9aa703f594a32283efb4a588f2b0a22e8c1f6def4be1ca0e00c4e9db413329e3960fdc1c066331b
@@ -23,7 +23,8 @@ module Mail # @private
23
23
 
24
24
  initialize_without_app(*args, &block)
25
25
  end
26
- alias_method_chain :initialize, :app
26
+ alias_method :initialize_without_app, :initialize
27
+ alias_method :initialize, :initialize_with_app
27
28
 
28
29
  ##
29
30
  # Setup like in Sinatra/Padrino apps content_type and template lookup.
@@ -115,10 +116,13 @@ module Mail # @private
115
116
 
116
117
  def do_delivery_with_logging
117
118
  logger.debug "Sending email to: #{destinations.join(" ")}"
118
- encoded.to_lf.split("\n").each { |line| logger << (" " + line) } if logger.debug?
119
+ encoded.each_line { |line| logger << (" " + line.strip) } if logger.debug?
119
120
  do_delivery_without_logging
120
121
  end
121
- alias_method_chain :do_delivery, :logging if Padrino.respond_to?(:logger)
122
+ if Padrino.respond_to?(:logger)
123
+ alias_method :do_delivery_without_logging, :do_delivery
124
+ alias_method :do_delivery, :do_delivery_with_logging
125
+ end
122
126
 
123
127
  ##
124
128
  # Sinatra and Padrino compatibility.
@@ -241,7 +245,8 @@ module Mail # @private
241
245
  mime = content_type_without_symbol(value)
242
246
  Padrino::Mailer::Mime.mime_type(mime)
243
247
  end
244
- alias_method_chain :content_type, :symbol
248
+ alias_method :content_type_without_symbol, :content_type
249
+ alias_method :content_type, :content_type_with_symbol
245
250
 
246
251
  private
247
252
 
@@ -137,7 +137,7 @@ module Padrino
137
137
  message = _padrino_mailer::Message.new(self)
138
138
  message.delivery_method(*delivery_settings)
139
139
  message.instance_eval(&block) if block_given?
140
- mail_attributes.reverse_merge(mailer_defaults) if respond_to?(:mailer_defaults)
140
+ mail_attributes = mailer_defaults.merge(mail_attributes) if respond_to?(:mailer_defaults)
141
141
  mail_attributes.each_pair { |k, v| message.method(k).call(v) }
142
142
  message.deliver
143
143
  end
@@ -24,5 +24,6 @@ Gem::Specification.new do |s|
24
24
  s.rdoc_options = ["--charset=UTF-8"]
25
25
 
26
26
  s.add_dependency("padrino-core", Padrino.version)
27
+ s.add_dependency("mime-types", "< 3")
27
28
  s.add_dependency("mail", "~> 2.5")
28
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-01-17 00:00:00.000000000 Z
14
+ date: 2016-05-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: padrino-core
@@ -19,26 +19,40 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.13.1
22
+ version: 0.13.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.13.1
29
+ version: 0.13.2
30
+ - !ruby/object:Gem::Dependency
31
+ name: mime-types
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '3'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "<"
42
+ - !ruby/object:Gem::Version
43
+ version: '3'
30
44
  - !ruby/object:Gem::Dependency
31
45
  name: mail
32
46
  requirement: !ruby/object:Gem::Requirement
33
47
  requirements:
34
- - - ~>
48
+ - - "~>"
35
49
  - !ruby/object:Gem::Version
36
50
  version: '2.5'
37
51
  type: :runtime
38
52
  prerelease: false
39
53
  version_requirements: !ruby/object:Gem::Requirement
40
54
  requirements:
41
- - - ~>
55
+ - - "~>"
42
56
  - !ruby/object:Gem::Version
43
57
  version: '2.5'
44
58
  description: Mailer system for padrino allowing easy delivery of application emails
@@ -48,9 +62,9 @@ extensions: []
48
62
  extra_rdoc_files:
49
63
  - README.rdoc
50
64
  files:
51
- - .document
52
- - .gitignore
53
- - .yardopts
65
+ - ".document"
66
+ - ".gitignore"
67
+ - ".yardopts"
54
68
  - LICENSE.txt
55
69
  - README.rdoc
56
70
  - Rakefile
@@ -93,17 +107,17 @@ licenses:
93
107
  metadata: {}
94
108
  post_install_message:
95
109
  rdoc_options:
96
- - --charset=UTF-8
110
+ - "--charset=UTF-8"
97
111
  require_paths:
98
112
  - lib
99
113
  required_ruby_version: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - '>='
115
+ - - ">="
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  required_rubygems_version: !ruby/object:Gem::Requirement
105
119
  requirements:
106
- - - '>='
120
+ - - ">="
107
121
  - !ruby/object:Gem::Version
108
122
  version: 1.3.6
109
123
  requirements: []