autoprefixer-rails 6.1.0 → 6.1.0.1

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: 3703d82a7f7b8376eb133bf0b2fe7b105712200f
4
- data.tar.gz: 4366c340fb127a6db1a4b267d585127ae9dfa0b9
3
+ metadata.gz: eb1e69157476b4a553fb1f438a244d322803d568
4
+ data.tar.gz: 0759bd6c304a12921c823b5dc7ed1be5bf3d3253
5
5
  SHA512:
6
- metadata.gz: 274dd9e422503ab3220333ba2726ed4379c67d6c53fcfb60f3b1acec85768a8df713c2b6ef0d9bc2c8729aa30c0dda9763e3ef559404b25bfb02a259f707edee
7
- data.tar.gz: 29e96050cd8a110882b03cbcc1c03908ff6106c3233518a646e7e02b502568a7a8979e25699c471cdd31b57970e6384c2166b737b5a92c29c8294bfa523d2f1f
6
+ metadata.gz: 0553ffc85e8e2c6ddae18624d0264ae3f3478a8a9cd1ccf980963e719813172d96e3ec42df39c5f9706d2cb2b43031cb115f8d5afc140ca36f28d36716572e86
7
+ data.tar.gz: 415eca2567d2476f80f00b888d4405edd008c35a1b32d586acd3ffa076338fd6be261e39399b886815c8c5e4a18209aa2e9f239c685aae6b8c2aee226888d552
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 6.1.0.1
2
+ * Return old Rails integration to fix strange issues.
3
+
1
4
  ## 6.1 “Bil-shaʿb wa lil-shaʿb”
2
5
  * Change `transition` support to output more robust CSS.
3
6
  * Add `:read-only` support.
data/README.md CHANGED
@@ -102,10 +102,10 @@ You can get what properties will be changed using a Rake task:
102
102
  rake autoprefixer:info
103
103
  ```
104
104
 
105
- To disable Autoprefixer just remove the postprocessor:
105
+ To disable Autoprefixer just remove postprocessor:
106
106
 
107
107
  ```ruby
108
- Rails.application.assets.unregister_postprocessor('text/css', ::AutoprefixerRails::Sprockets)
108
+ Rails.application.assets.unregister_postprocessor('text/css', :autoprefixer)
109
109
  ```
110
110
 
111
111
  [Browserslist docs]: https://github.com/ai/browserslist
@@ -15,8 +15,7 @@ module AutoprefixerRails
15
15
  # Add Autoprefixer for Sprockets environment in `assets`.
16
16
  # You can specify `browsers` actual in your project.
17
17
  def self.install(assets, params = { })
18
- ::AutoprefixerRails::Sprockets.processor = processor(params)
19
- assets.register_postprocessor('text/css', ::AutoprefixerRails::Sprockets)
18
+ Sprockets.new( processor(params) ).install(assets)
20
19
  end
21
20
 
22
21
  # Cache processor instances
@@ -1,17 +1,17 @@
1
1
  require 'pathname'
2
2
 
3
3
  module AutoprefixerRails
4
- # Autoprefixer Sprockets postprocessor
5
- module Sprockets
6
- module_function
7
-
8
- def processor=(processor)
4
+ # Register autoprefixer postprocessor in Sprockets and fix common issues
5
+ class Sprockets
6
+ def initialize(processor)
9
7
  @processor = processor
10
8
  end
11
9
 
12
10
  # Add prefixes for `css`
13
- def call(input)
14
- result = @processor.process(input[:data], from: input[:filename])
11
+ def process(context, css)
12
+ input = context.pathname.to_s
13
+ output = input.chomp(File.extname(input)) + '.css'
14
+ result = @processor.process(css, from: input, to: output)
15
15
 
16
16
  result.warnings.each do |warning|
17
17
  $stderr.puts "autoprefixer: #{ warning }"
@@ -19,5 +19,12 @@ module AutoprefixerRails
19
19
 
20
20
  result.css
21
21
  end
22
+
23
+ # Register postprocessor in Sprockets depend on issues with other gems
24
+ def install(assets)
25
+ assets.register_postprocessor('text/css', :autoprefixer) do |context, css|
26
+ process(context, css)
27
+ end
28
+ end
22
29
  end
23
30
  end
@@ -1,3 +1,3 @@
1
1
  module AutoprefixerRails
2
- VERSION = '6.1.0'.freeze unless defined? AutoprefixerRails::VERSION
2
+ VERSION = '6.1.0.1'.freeze unless defined? AutoprefixerRails::VERSION
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoprefixer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Sitnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs