premailer 1.10.2 → 1.10.3

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: 74e7a6a6abc466e9c0e113d5231d4e4a85d84cb2
4
- data.tar.gz: 4c59b4febdbcc9f24bb02a1e97f4daac68417b35
3
+ metadata.gz: 1cf01ae1164cfaa246cf3044869ddb13b7f8faa8
4
+ data.tar.gz: 4ab25f8c3c21465fdcc8f7ed78863d382d27f02e
5
5
  SHA512:
6
- metadata.gz: 20aa057a4fb25ab0bae43093b9ba32e1dc8c64f5e37bb9b9666f57c854b971516bf2a84e2e0402d85c1ccf698a89213b3461ebab5bdfed4bd7bc68a881ed1366
7
- data.tar.gz: 60ef76babcda83da01f605c2188e15bb611b0c89b1a1de66ab01212dd2567c283fcf2328fe538215883c12670483c3f107a4625a9cf4956faf489b8294164997
6
+ metadata.gz: d1d73c8120d00c597de895fdae3bc5fd3b98ae08849ebf6b154ed790b8adcf22973abc0e5b3fdf32d7d9cce89f3c0167748b0c8f9da68f292c2f889a8f1dd95a
7
+ data.tar.gz: 980035a2805ca6704e6a2d246f056f12f78ae8cc0df6e35caa93ef03eb2844cdaf54d9502f83e2fe7052c19cf818f659458b106757b52defc17629db79f1c0ac
@@ -86,9 +86,7 @@ module HtmlToPlainText
86
86
  he = HTMLEntities.new
87
87
  txt = he.decode(txt)
88
88
 
89
- # no more than two consecutive spaces
90
- txt.gsub!(/ {2,}/, " ")
91
-
89
+ # word wrap
92
90
  txt = word_wrap(txt, line_length)
93
91
 
94
92
  # remove linefeeds (\r\n and \r -> \n)
@@ -464,11 +464,6 @@ public
464
464
  media_types && media_types.any?{|mt| mt.to_s.count('()') >= 2 }
465
465
  end
466
466
 
467
- # @private
468
- def self.escape_string(str) # :nodoc:
469
- str.gsub(/"/ , "'")
470
- end
471
-
472
467
  # @private
473
468
  def self.resolve_link(path, base_path) # :nodoc:
474
469
  path.strip!
@@ -492,9 +487,7 @@ public
492
487
  #
493
488
  # IO objects return true, as do strings that look like URLs.
494
489
  def self.local_data?(data)
495
- return true if data.is_a?(IO) || data.is_a?(StringIO)
496
- return true if data =~ /\Afile:\/\//i
497
- return false if data =~ /\A(?:(https?|ftp):)\/\//i
490
+ return false if data.kind_of?(String) && data =~ /\A(?:(https?|ftp):)\/\//i
498
491
  true
499
492
  end
500
493
 
@@ -1,4 +1,4 @@
1
1
  class Premailer
2
2
  # Premailer version.
3
- VERSION = '1.10.2'.freeze
3
+ VERSION = '1.10.3'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: premailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dunae
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: css_parser
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  version: '0'
227
227
  requirements: []
228
228
  rubyforge_project:
229
- rubygems_version: 2.6.8
229
+ rubygems_version: 2.6.11
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Preflight for HTML e-mail.