autoprefixer-rails 8.6.5 → 9.7.0

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
  SHA256:
3
- metadata.gz: d12acbba818011f4f9136de121006739c1e6de0c14b0b8b7d12a21e67213e29a
4
- data.tar.gz: 509354ceef7423952e9f21d9a711a122ca6bcd63e187ca72b2a1d4d97011af3f
3
+ metadata.gz: 914d7d63fe744b848e44a7ec70892b166015ba942ebcae195f0a07327cf952be
4
+ data.tar.gz: 4416e090e8bb4acfdc1c64ed5fa69a72a53f6c62715b68a3d4d514b814a5cbdb
5
5
  SHA512:
6
- metadata.gz: 1fc7faf08e81fdbb9c783b00da938597190176d15d632885d8f0fecc1a9e31f49bf9528af8e812552330354e85f7c87da68364ecfd72b5329c854a52264cf840
7
- data.tar.gz: e015ec0dd24df7985c8f392dc2279d5a92c487946a01b2d9f1c7d96d01b550f5f97633b1a1527882e106c7d5f8e77515c4765360c9d6ad0798413b9571614794
6
+ metadata.gz: 1ac3541ae04bb92d6a30407a6e2cbdbd7e0f8101560b14079e80977e6508e384f1fbc102f9cea4da35b58d330bdc3d669dc336b99d010c7dd5c3828e4695f1e8
7
+ data.tar.gz: eb3c6cbfa9f5b3641b7315ec1f858fbbfc97794d0d43121a2ef4edd1d439b25d0e0590cb567a610aed1cfd6d2c730be501711619102df66480df384f6c2c399b
@@ -0,0 +1 @@
1
+ tidelift: rubygems/autoprefixer-rails
data/.standard.yml ADDED
@@ -0,0 +1 @@
1
+ ruby_version: 2.3
data/.travis.yml CHANGED
@@ -1,30 +1,13 @@
1
- sudo: false
2
1
  language: ruby
3
2
  rvm:
4
- - "2.3.5"
5
- - "2.4.2"
6
- git:
7
- depth: 5
3
+ - "2.6"
4
+ - "2.5"
8
5
  cache: bundler
9
- gemfile:
10
- - sprockets3.gemfile
11
- - sprockets4.gemfile
12
- - mini_racer.gemfile
13
6
  before_install:
14
- - nvm install stable
15
- env:
16
- - EXECJS_RUNTIME=Node
17
- # mini_racer / rubyracer or rubyrhino depending on platform:
18
- -
7
+ - gem update --system
8
+ - nvm install node
9
+ env: "EXECJS_RUNTIME=MiniRacer"
19
10
  matrix:
20
- exclude:
21
- - rvm: "2.3.5"
11
+ include:
12
+ - rvm: "2.6"
22
13
  env: "EXECJS_RUNTIME=Node"
23
- - rvm: "2.3.5"
24
- gemfile: mini_racer.gemfile
25
-
26
- - rvm: "2.4.2"
27
- gemfile: sprockets3.gemfile
28
-
29
- - env: "EXECJS_RUNTIME=Node"
30
- gemfile: mini_racer.gemfile
data/CHANGELOG.md CHANGED
@@ -1,5 +1,139 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.7 “Ad Victoriam”
4
+ * Add `AUTOPREFIXER_GRID` env variable to enable Grid Layout polyfill for IE.
5
+ * Fix `Cannot read property 'grid' of undefined` error.
6
+
7
+ ## 9.6.5
8
+ * Fix selector prefixing (by Andrey Alexandrov).
9
+
10
+ ## 9.6.4
11
+ * Now the real fix for `'startsWith' of undefined` error.
12
+
13
+ ## 9.6.3
14
+ * Fix `Cannot read property 'startsWith' of undefined` error.
15
+
16
+ ## 9.6.2
17
+ * Fix false `Replace fill to stretch` warning.
18
+
19
+ ## 9.6.1.1
20
+ * Update Can I Use data.
21
+
22
+ ## 9.6.1
23
+ * Fix `-webkit-line-clamp` truncating multi-line text support.
24
+
25
+ ## 9.6 “Nunc id vides, nunc ne vides”
26
+ * Add warning-less `overrideBrowserslist` option.
27
+ * Add `text-orientation` support.
28
+ * Add `min-resolution: 2x` alias support.
29
+
30
+ ## 9.5.1.1
31
+ * Fix `register_postprocessor' for nil:NilClass` error.
32
+ * Update Can I Use data.
33
+
34
+ ## 9.5.1
35
+ * Fix `backdrop-filter` for Edge (by Oleh Aloshkin).
36
+ * Fix `min-resolution` media query support in Firefox < 16.
37
+
38
+ ## 9.5 “Draco dormiens nunquam titillandus”
39
+ * Add `mask-composite` support (by Semen Levenson).
40
+
41
+ ## 9.4.10.2
42
+ * Fix Ruby < 2.4 support (by Jack Ford).
43
+ * Update Can I Use data.
44
+
45
+ ## 9.4.10.1
46
+ * Fix non-Rails environments support (by Junya Ogura).
47
+ * Update Can I Use data.
48
+
49
+ ## 9.4.10
50
+ * Add warning for named Grid rows.
51
+
52
+ ## 9.4.9
53
+ * Fix `grid-template` and `@media` case (by Bogdan Dolin).
54
+
55
+ ## 9.4.8
56
+ * Fix `calc()` support in Grid gap.
57
+
58
+ ## 9.4.7
59
+ * Fix infinite loop on mismatched parens.
60
+
61
+ ## 9.4.6
62
+ * Fix warning text (by Albert Juhé Lluveras).
63
+
64
+ ## 9.4.5
65
+ * Fix `text-decoration-skip-ink` support.
66
+
67
+ ## 9.4.4
68
+ * Use `direction` value for `-ms-writing-mode` (by Denys Kniazevych).
69
+ * Fix warning text (by @zzzzBov).
70
+
71
+ ## 9.4.3
72
+ * Add warning to force `flex-start` instead of `start` (by Antoine du Hamel).
73
+
74
+ ## 9.4.2
75
+ * Fix Grid autoplacement warning.
76
+
77
+ ## 9.4.1
78
+ * Fix unnecessary Flexbox prefixes in Grid elements.
79
+
80
+ ## 9.4 “Advance Australia”
81
+ * Add Grid autoplacement for `-ms-` (by Bogdan Dolin).
82
+ * Improve warnings (by Daniel Tonon).
83
+ * Remove some unnecessary warnings for Grid (by Andrey Alexandrov).
84
+
85
+ ## 9.3.1
86
+ * Fix Grid prefixes with `repeat()` value (by Bogdan Dolin).
87
+
88
+ ## 9.3 “Labor omnia vincit”
89
+ * Add `place-self` support (by Bogdan Dolin).
90
+ * Fix Grid row/column span inheritance bug (by Bogdan Dolin).
91
+
92
+ ## 9.2.1
93
+ * Update Can I Use data.
94
+
95
+ ## 9.2 “Ony est glavnaya krepost”
96
+ * Add `/* autoprefixer grid: on */` control comment (by Andrey Alexandrov).
97
+ * Add duplicate `grid-area` support (by Bogdan Dolin).
98
+ * Fix `grid-gap` support for rules with different specifity (by Bogdan Dolin).
99
+ * Disable Grid in `@supports` at-rule with non-supported Grid features.
100
+ * Improve Grid warnings (by Daniel Tonon).
101
+
102
+ ## 9.1.4
103
+ * Fix `ExecJS` runtime test (by Patrice Chalin).
104
+
105
+ ## 9.1.3
106
+ * Sort properties in `rake autoprefixer` alphabetically.
107
+ * Fix old Firefox gradient prefix.
108
+
109
+ ## 9.1.2
110
+ * Fix `autoprefixer --info` in new Node.js.
111
+ * Fix ExecJS runtime warning.
112
+
113
+ ## 9.1.1
114
+ * Retain `grid-gap` through `@media` (by Bogdan Dolin).
115
+ * Fix `grid-template` and `@media` (by Bogdan Dolin).
116
+ * Fix Grid areas searching error (by Bogdan Dolin).
117
+ * Fix `span X` Grid prefix (by Bogdan Dolin).
118
+ * Fix `log2` error.
119
+
120
+ ## 9.1 “Equality before the law”
121
+ * Add `background-clip: text` support.
122
+ * Fix adding Grid span for IE (by Bogdan).
123
+
124
+ ## 9.0.2
125
+ * Show warning on Grid area names conflict (by Bogdan).
126
+ * Fix ExecJS warning (by Jan Kmet).
127
+
128
+ ## 9.0.1
129
+ * Fix nested at-rules in Grid prefixes (by Ivan Malov).
130
+
131
+ ## 9.0 “A Mari Usque Ad Mare”
132
+ * Remove Node.js 9 and Node.js 4 support.
133
+ * Remove RubyRacer and Sprockets 3 support.
134
+ * Use PostCSS 7.0.
135
+ * Use Browserslist 4.0.
136
+
3
137
  ## 8.6.5
4
138
  * Do not show Grid warnings if IE was not selected.
5
139
 
data/Gemfile CHANGED
@@ -1 +1,10 @@
1
- eval_gemfile "#{ File.dirname(__FILE__) }/sprockets4.gemfile"
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem "execjs"
6
+ gem "sassc-rails"
7
+ gem "rails", ">= 5.0.0.beta2"
8
+ gem "sprockets", ">= 4.0.0.beta1"
9
+
10
+ gem "mini_racer"
data/README.md CHANGED
@@ -28,8 +28,17 @@ Autoprefixer Rails doesn’t support these Autoprefixer features:
28
28
 
29
29
  ## Usage
30
30
 
31
- Windows users should install [node.js](http://nodejs.org/).
32
- Autoprefixer Rails doesn’t work with old JScript in Windows.
31
+ Windows users should install [Node.js]. Autoprefixer Rails doesn’t work with
32
+ old JScript in Windows.
33
+
34
+ Autoprefixer Rails uses [ExecJS] that will use the best available JavaScript
35
+ runtime. Currently this gem is tested to work with Node.js version 6 and up and
36
+ with [mini_racer], but will not work with [therubyracer].
37
+
38
+ [Node.js]: http://nodejs.org/
39
+ [ExecJS]: https://github.com/rails/execjs
40
+ [mini_racer]: https://github.com/discourse/mini_racer
41
+ [therubyracer]: https://github.com/cowboyd/therubyracer
33
42
 
34
43
  ### Ruby on Rails
35
44
 
@@ -78,26 +87,15 @@ support to add vendor prefixes automatically using the Asset Pipeline:
78
87
  }
79
88
  ```
80
89
 
81
- If you need to specify browsers for your Rails project, you can save them to
82
-
83
- * `browserslist` and place it under `app/assets/stylesheets/`
84
- or any of its ancestor directories
85
-
86
- ```
87
- > 1%
88
- last 2 versions
89
- IE > 8 # comment
90
- ```
90
+ If you need to specify browsers for your Rails project, you can save them
91
+ to `.browserslistrc` and place it under `app/assets/stylesheets/`
92
+ or any of its ancestor directories
91
93
 
92
- * Or `config/autoprefixer.yml`
93
-
94
- ```yaml
95
- flexbox: no-2009
96
- browsers:
97
- - "> 1%"
98
- - "last 2 versions"
99
- - "IE > 8"
100
- ```
94
+ ```
95
+ > 1%
96
+ last 2 versions
97
+ IE > 8 # comment
98
+ ```
101
99
 
102
100
  See [Browserslist docs] for config format. But `> 5% in US` query is not
103
101
  supported in Rails, because of ExecJS limitations. You should migrate to webpack
@@ -145,12 +143,6 @@ require "autoprefixer-rails"
145
143
  prefixed = AutoprefixerRails.process(css, from: 'main.css').css
146
144
  ```
147
145
 
148
- You can specify browsers with the `browsers` option:
149
-
150
- ```ruby
151
- AutoprefixerRails.process(css, from: 'a.css', browsers: ['> 1%', 'ie 10']).css
152
- ```
153
-
154
146
  ### Compass
155
147
 
156
148
  You should consider using Gulp instead of Compass binary,
@@ -235,3 +227,11 @@ to JS style, so you can use `map: { sources_content: false }`
235
227
  instead of camelcase `sourcesContent`.
236
228
 
237
229
  [PostCSS docs]: https://github.com/postcss/postcss#source-map-1
230
+
231
+
232
+ ## Security Contact
233
+
234
+ To report a security vulnerability, please use the [Tidelift security contact].
235
+ Tidelift will coordinate the fix and disclosure.
236
+
237
+ [Tidelift security contact]: https://tidelift.com/security
data/Rakefile CHANGED
@@ -1,31 +1,36 @@
1
- # coding: utf-8
2
- require 'rubygems'
1
+ require "rubygems"
3
2
 
4
- require 'bundler/setup'
3
+ require "bundler/setup"
5
4
  Bundler::GemHelper.install_tasks
6
5
 
7
- require 'rspec/core/rake_task'
6
+ require "standard/rake"
7
+
8
+ require "rspec/core/rake_task"
8
9
  RSpec::Core::RakeTask.new
9
- task :default => :spec
10
+ task default: [:spec, "standard:fix"]
10
11
 
11
12
  task :clobber_package do
12
- rm_r 'pkg' rescue nil
13
+ begin
14
+ rm_r "pkg"
15
+ rescue
16
+ nil
17
+ end
13
18
  end
14
19
 
15
- desc 'Delete all generated files'
16
- task :clobber => [:clobber_package]
20
+ desc "Delete all generated files"
21
+ task clobber: [:clobber_package]
17
22
 
18
- desc 'Test all Gemfiles from spec/*.gemfile'
23
+ desc "Test all Gemfiles from spec/*.gemfile"
19
24
  task :test_all do
20
- require 'pty'
21
- require 'shellwords'
22
- cmd = 'bundle update && bundle exec rake --trace'
23
- statuses = Dir.glob('./sprockets*.gemfile').map do |gemfile|
25
+ require "pty"
26
+ require "shellwords"
27
+ cmd = "bundle update && bundle exec rake --trace"
28
+ statuses = Dir.glob("./sprockets*.gemfile").map { |gemfile|
24
29
  Bundler.with_clean_env do
25
- env = { 'BUNDLE_GEMFILE' => gemfile }
26
- $stderr.puts "Testing #{ File.basename(gemfile) }:"
27
- $stderr.puts " export BUNDLE_GEMFILE=#{ gemfile }"
28
- $stderr.puts " #{ cmd }"
30
+ env = {"BUNDLE_GEMFILE" => gemfile}
31
+ warn "Testing #{File.basename(gemfile)}:"
32
+ warn " export BUNDLE_GEMFILE=#{gemfile}"
33
+ warn " #{cmd}"
29
34
  PTY.spawn(env, cmd) do |r, _w, pid|
30
35
  begin
31
36
  r.each_line { |l| puts l }
@@ -37,12 +42,12 @@ task :test_all do
37
42
  end
38
43
  [$? && $?.exitstatus == 0, gemfile]
39
44
  end
40
- end
45
+ }
41
46
  failed = statuses.reject(&:first).map(&:last)
42
47
  if failed.empty?
43
- $stderr.puts "✓ Tests pass with all #{ statuses.size } gemfiles"
48
+ warn "✓ Tests pass with all #{statuses.size} gemfiles"
44
49
  else
45
- $stderr.puts "❌ FAILING #{ failed * "\n" }"
50
+ warn "❌ FAILING #{failed * "\n"}"
46
51
  exit 1
47
52
  end
48
53
  end
@@ -1,28 +1,32 @@
1
- require File.expand_path('../lib/autoprefixer-rails/version', __FILE__)
1
+ require File.expand_path("../lib/autoprefixer-rails/version", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
- s.name = 'autoprefixer-rails'
5
+ s.name = "autoprefixer-rails"
6
6
  s.version = AutoprefixerRails::VERSION.dup
7
- s.date = Time.now.strftime('%Y-%m-%d')
8
- s.summary = 'Parse CSS and add vendor prefixes to CSS rules using ' +
9
- 'values from the Can I Use website.'
7
+ s.date = Time.now.strftime("%Y-%m-%d")
8
+ s.summary = "Parse CSS and add vendor prefixes to CSS rules using" \
9
+ "values from the Can I Use website."
10
10
 
11
11
  s.files = `git ls-files`.split("\n")
12
12
  s.test_files = `git ls-files -- {spec}/*`.split("\n")
13
- s.extra_rdoc_files = ['README.md', 'LICENSE', 'CHANGELOG.md']
14
- s.require_path = 'lib'
15
- s.required_ruby_version = '>= 2.0'
13
+ s.extra_rdoc_files = ["README.md", "LICENSE", "CHANGELOG.md"]
14
+ s.require_path = "lib"
15
+ s.required_ruby_version = ">= 2.0"
16
16
 
17
- s.author = 'Andrey Sitnik'
18
- s.email = 'andrey@sitnik.ru'
19
- s.homepage = 'https://github.com/ai/autoprefixer-rails'
20
- s.license = 'MIT'
17
+ s.author = "Andrey Sitnik"
18
+ s.email = "andrey@sitnik.ru"
19
+ s.homepage = "https://github.com/ai/autoprefixer-rails"
20
+ s.license = "MIT"
21
21
 
22
- s.add_dependency 'execjs', '>= 0'
22
+ s.add_dependency "execjs", ">= 0"
23
23
 
24
- s.add_development_dependency 'rake'
25
- s.add_development_dependency 'rails'
26
- s.add_development_dependency 'compass'
27
- s.add_development_dependency 'rspec-rails'
24
+ s.add_development_dependency "rake"
25
+ s.add_development_dependency "rails"
26
+ s.add_development_dependency "rspec-rails"
27
+ s.add_development_dependency "standard"
28
+
29
+ s.metadata["changelog_uri"] = "https://github.com/ai/autoprefixer-rails/blob/master/CHANGELOG.md"
30
+ s.metadata["source_code_uri"] = "https://github.com/ai/autoprefixer-rails"
31
+ s.metadata["bug_tracker_uri"] = "https://github.com/ai/autoprefixer-rails/issues"
28
32
  end
@@ -1,21 +1,24 @@
1
1
  # Ruby integration with Autoprefixer JS library, which parse CSS and adds
2
2
  # only actual prefixed
3
3
  module AutoprefixerRails
4
- autoload :Sprockets, 'autoprefixer-rails/sprockets'
4
+ autoload :Sprockets, "autoprefixer-rails/sprockets"
5
5
 
6
6
  # Add prefixes to `css`. See `Processor#process` for options.
7
- def self.process(css, opts = { })
8
- params = { }
9
- params[:browsers] = opts.delete(:browsers) if opts.has_key?(:browsers)
10
- params[:cascade] = opts.delete(:cascade) if opts.has_key?(:cascade)
11
- params[:remove] = opts.delete(:remove) if opts.has_key?(:remove)
12
- params[:env] = opts.delete(:env) if opts.has_key?(:env)
7
+ def self.process(css, opts = {})
8
+ params = {}
9
+ if opts.key?(:overrideBrowserslist)
10
+ params[:overrideBrowserslist] = opts.delete(:overrideBrowserslist)
11
+ end
12
+ params[:browsers] = opts.delete(:browsers) if opts.key?(:browsers)
13
+ params[:cascade] = opts.delete(:cascade) if opts.key?(:cascade)
14
+ params[:remove] = opts.delete(:remove) if opts.key?(:remove)
15
+ params[:env] = opts.delete(:env) if opts.key?(:env)
13
16
  processor(params).process(css, opts)
14
17
  end
15
18
 
16
19
  # Add Autoprefixer for Sprockets environment in `assets`.
17
20
  # You can specify `browsers` actual in your project.
18
- def self.install(assets, params = { })
21
+ def self.install(assets, params = {})
19
22
  Sprockets.register_processor(processor(params))
20
23
  Sprockets.install(assets)
21
24
  end
@@ -26,13 +29,13 @@ module AutoprefixerRails
26
29
  end
27
30
 
28
31
  # Cache processor instances
29
- def self.processor(params = { })
32
+ def self.processor(params = {})
30
33
  Processor.new(params)
31
34
  end
32
35
  end
33
36
 
34
- require_relative 'autoprefixer-rails/result'
35
- require_relative 'autoprefixer-rails/version'
36
- require_relative 'autoprefixer-rails/processor'
37
+ require_relative "autoprefixer-rails/result"
38
+ require_relative "autoprefixer-rails/version"
39
+ require_relative "autoprefixer-rails/processor"
37
40
 
38
- require_relative 'autoprefixer-rails/railtie' if defined?(Rails)
41
+ require_relative "autoprefixer-rails/railtie" if defined?(Rails)