middleman-autoprefixer 2.1.1 → 2.1.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: 2fd6ea73600baffa4c97afcd4035597779751fce
4
- data.tar.gz: c77fe545174a5f833a8d3547d1c696770decac64
3
+ metadata.gz: 235156f21972e797bb6ce42081031ac83a67cd05
4
+ data.tar.gz: 1baf517dbf4a649542daf8531b822e9791e53940
5
5
  SHA512:
6
- metadata.gz: 84f3e01cce1aff796d9e17ec71c26bded66fdbad27099f504e9e5f00c4cdcea1cee52cbb59d9183e4a56e428b144270494cb99658ef4ac1fa1557508efe58b07
7
- data.tar.gz: 4e91b952e5a1f3a13b8e9a34fa8ea9def61a3cc70c4b58e3496922dee016136e74a8dc5ac685f7988b2c65c4fc7176d6d934a7fb15172e0b7eaacb5618501612
6
+ metadata.gz: bc6f652932e84b784957b0314005fd4a94496149575f419888e604206982d8007027cb2032e82bae6117c255b9179ae7b8ecedde053b5764d281a8868f4e1051
7
+ data.tar.gz: 84532bff1bf4a839fc4d2d30baa7dce3b16e2e62f1da93fd63ac4f42b160e83c739934ef0bf91fb7f719a80c6247555ddc6fa60ed073c566479142f74778ae98
@@ -28,12 +28,14 @@ module Middleman
28
28
  # Init
29
29
  # @param [Class] app
30
30
  # @param [Hash] options
31
- def initialize(app, options={})
31
+ def initialize(app, options = {})
32
32
  @app = app
33
- @browsers = options[:browsers]
33
+ @browsers = Array(options[:browsers])
34
34
  @cascade = options[:cascade]
35
35
  @inline = options[:inline]
36
36
  @ignore = options[:ignore]
37
+
38
+ initialize_autoprefixer
37
39
  end
38
40
 
39
41
  # Rack interface
@@ -63,12 +65,23 @@ module Middleman
63
65
 
64
66
  private
65
67
 
66
- def process(css)
68
+ def initialize_autoprefixer
67
69
  config = {}
68
- config[:browsers] = Array(@browsers)
69
70
  config[:cascade] = @cascade unless @cascade.nil?
70
71
 
71
- ::AutoprefixerRails.process(css, config).css
72
+ @autoprefixer = ::AutoprefixerRails::Processor.new(@browsers, config)
73
+ end
74
+
75
+ def process(content)
76
+ begin
77
+ @autoprefixer.process(content).css
78
+ rescue ExecJS::ProgramError => error
79
+ if error.message =~ /Can't parse CSS/
80
+ content
81
+ else
82
+ raise error
83
+ end
84
+ end
72
85
  end
73
86
 
74
87
  def inline_html_content?(path)
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Autoprefixer
3
- VERSION = '2.1.1'.freeze
3
+ VERSION = '2.1.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-autoprefixer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Porada
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-03 00:00:00.000000000 Z
12
+ date: 2014-08-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core