regru-premailer 1.7.6 → 1.7.7

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.
@@ -29,13 +29,12 @@
29
29
  # puts premailer.to_inline_css
30
30
  # ```
31
31
  #
32
+ require 'premailer/version'
33
+
32
34
  class Premailer
33
35
  include HtmlToPlainText
34
36
  include CssParser
35
37
 
36
- # Premailer version.
37
- VERSION = '1.7.6'
38
-
39
38
  CLIENT_SUPPORT_FILE = File.dirname(__FILE__) + '/../../misc/client_support.yaml'
40
39
 
41
40
  # Unmergable selectors regexp.
@@ -261,7 +260,7 @@ class Premailer
261
260
  protected
262
261
  def load_css_from_local_file!(path)
263
262
  css_block = ''
264
- path.gsub!(/\Afile:\/\//, '')
263
+ path.gsub!(/\Afile:/, '')
265
264
  begin
266
265
  File.open(path, "r") do |file|
267
266
  while line = file.gets
@@ -482,7 +481,7 @@ public
482
481
  # IO objects return true, as do strings that look like URLs.
483
482
  def self.local_data?(data)
484
483
  return true if data.is_a?(IO) || data.is_a?(StringIO)
485
- return true if data =~ /\Afile\:\/\//i
484
+ return true if data =~ /\Afile:\/\//i
486
485
  return false if data =~ /\A(?:(https?|ftp):)\/\//i
487
486
  true
488
487
  end
@@ -0,0 +1,4 @@
1
+ class Premailer
2
+ # Premailer version.
3
+ VERSION = '1.7.7'.freeze
4
+ end
@@ -1,6 +1,10 @@
1
+ $LOAD_PATH.unshift(File.expand_path('./lib', File.dirname(__FILE__)))
2
+
3
+ require 'premailer/version'
4
+
1
5
  Gem::Specification.new do |s|
2
6
  s.name = "regru-premailer"
3
- s.version = "1.7.6"
7
+ s.version = Premailer::VERSION.dup
4
8
  s.date = Time.now.strftime('%Y-%m-%d')
5
9
  s.summary = "Preflight for HTML e-mail."
6
10
  s.email = "code@dunae.ca"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regru-premailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.6
4
+ version: 1.7.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -152,6 +152,7 @@ files:
152
152
  - lib/premailer/executor.rb
153
153
  - lib/premailer/html_to_plain_text.rb
154
154
  - lib/premailer/premailer.rb
155
+ - lib/premailer/version.rb
155
156
  - local-premailer
156
157
  - misc/client_support.yaml
157
158
  - premailer.gemspec