autoprefixer-rails 9.8.6 → 9.8.6.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a689fb1db23db788c639e62f774fd8c5b0cbd0e64fd4142d6d1b085175b5f64
4
- data.tar.gz: 9f8263c6719573215524e74b75d81c1732e261278198b5ab68da07c0d2cd38b1
3
+ metadata.gz: 4773892966766ddd6848426c50d8e97b07d19d5110848cb8051d41bc2308f6eb
4
+ data.tar.gz: 7bd94adaae2a41a9e98c1eea269b03a339c546a337dddf2c79009eec005ebe5b
5
5
  SHA512:
6
- metadata.gz: 4d77d074fc4d93285ae07fd8c6b0e712f078e75e9c892e32b561e332c167af84d5f108cddb7f6f8cdcee9529a124aff8cfe380d432bae1fec64e436befe17e64
7
- data.tar.gz: 758dfc99fcd27fad5511e3e75ccc2db93459383c1c8aa0181aa26f3c267c6abe0bc63234d99eab97328994447020a5323815bf7387cd6adaf8f0c9b87a00e5d3
6
+ metadata.gz: 7109528a179d5171e996585b680fffd2fb63a428eb50f6b45e3d462be4885dbb68c884cf26ae70726bfe6b492803ca5674918557ba0856f09b6f8a317cddfff4
7
+ data.tar.gz: 8fa8e32784358ab308addd8952fd6b022d1e7cca5a2e3798a93ab5c3673f37a76f18d92592312cc3acf8e7536e72cb96a99986d8e5625ee5c5d6c61d0cbc08ae
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.8.6.5
4
+ * Fix `9.8.6.4` regression.
5
+
6
+ ## 9.8.6.4
7
+ * Remove deprecation warnings.
8
+
9
+ ## 9.8.6.3
10
+ * Fix deprecation warning for non-Rails environment.
11
+
12
+ ## 9.8.6.2
13
+ * Print deprecation warning only once.
14
+
15
+ ## 9.8.6.1
16
+ * Improve deprecated warnings.
17
+
3
18
  ## 9.8.6
4
19
  * Fixed `env` option.
5
20
  * Added deprecation warning.
data/README.md CHANGED
@@ -4,8 +4,6 @@
4
4
  src="http://postcss.github.io/autoprefixer/logo.svg"
5
5
  title="Autoprefixer logo by Anton Lovchikov">
6
6
 
7
- **DEPECATED. Use [Node.js’s Autoprefixer] with [PostCSS] instead.**
8
-
9
7
  [Autoprefixer] is a tool to parse CSS and add vendor prefixes to CSS rules
10
8
  using values from the [Can I Use] database. This gem provides Ruby
11
9
  and Ruby on Rails integration with this JavaScript tool.
@@ -14,12 +12,11 @@ and Ruby on Rails integration with this JavaScript tool.
14
12
  <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
15
13
  </a>
16
14
 
17
- [Node.js’s Autoprefixer]: https://github.com/postcss/autoprefixer
18
- [Autoprefixer]: https://github.com/postcss/autoprefixer
19
- [Can I Use]: http://caniuse.com/
20
- [PostCSS]: https://postcss.org/
21
- [ci-img]: https://travis-ci.org/ai/autoprefixer-rails.svg
22
- [ci]: https://travis-ci.org/ai/autoprefixer-rails
15
+ [Autoprefixer]: https://github.com/postcss/autoprefixer
16
+ [Can I Use]: http://caniuse.com/
17
+ [PostCSS]: https://postcss.org/
18
+ [ci-img]: https://travis-ci.org/ai/autoprefixer-rails.svg
19
+ [ci]: https://travis-ci.org/ai/autoprefixer-rails
23
20
 
24
21
  ## Differences
25
22
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Ruby integration with Autoprefixer JS library, which parse CSS and adds
2
4
  # only actual prefixed
3
5
  module AutoprefixerRails
@@ -6,9 +8,7 @@ module AutoprefixerRails
6
8
  # Add prefixes to `css`. See `Processor#process` for options.
7
9
  def self.process(css, opts = {})
8
10
  params = {}
9
- if opts.key?(:overrideBrowserslist)
10
- params[:overrideBrowserslist] = opts.delete(:overrideBrowserslist)
11
- end
11
+ params[:overrideBrowserslist] = opts.delete(:overrideBrowserslist) if opts.key?(:overrideBrowserslist)
12
12
  params[:browsers] = opts.delete(:browsers) if opts.key?(:browsers)
13
13
  params[:cascade] = opts.delete(:cascade) if opts.key?(:cascade)
14
14
  params[:remove] = opts.delete(:remove) if opts.key?(:remove)
@@ -1,10 +1,25 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pathname"
2
4
  require "execjs"
3
5
  require "json"
4
6
 
5
- IS_SECTION = /^\s*\[(.+)\]\s*$/
7
+ IS_SECTION = /^\s*\[(.+)\]\s*$/.freeze
6
8
 
7
9
  module AutoprefixerRails
10
+ def self.show_deprecation_message!
11
+ return unless defined?(ActiveSupport::Deprecation)
12
+
13
+ return if defined?(@deprecation_shown)
14
+
15
+ ActiveSupport::Deprecation.warn(
16
+ "autoprefixer-rails was deprected. Migration guide:\n" \
17
+ "https://github.com/ai/autoprefixer-rails/wiki/Deprecated"
18
+ )
19
+
20
+ @deprecation_shown = true
21
+ end
22
+
8
23
  # Ruby to JS wrapper for Autoprefixer processor instance
9
24
  class Processor
10
25
  def initialize(params = {})
@@ -18,12 +33,8 @@ module AutoprefixerRails
18
33
  # * `to` with output CSS file name.
19
34
  # * `map` with true to generate new source map or with previous map.
20
35
  def process(css, opts = {})
21
- if defined?(ActiveSupport::Deprecation)
22
- ActiveSupport::Deprecation.warn(
23
- "autoprefixer-rails was deprected. " \
24
- "Use Node.js’s Autoprefixer with PostCSS instead."
25
- )
26
- end
36
+ AutoprefixerRails.show_deprecation_message!
37
+
27
38
  opts = convert_options(opts)
28
39
 
29
40
  apply_wrapper =
@@ -35,7 +46,7 @@ module AutoprefixerRails
35
46
  process_opts = {
36
47
  from: plugin_opts.delete(:from),
37
48
  to: plugin_opts.delete(:to),
38
- map: plugin_opts.delete(:map),
49
+ map: plugin_opts.delete(:map)
39
50
  }
40
51
 
41
52
  begin
@@ -62,13 +73,13 @@ module AutoprefixerRails
62
73
 
63
74
  # Parse Browserslist config
64
75
  def parse_config(config)
65
- sections = {"defaults" => []}
76
+ sections = { "defaults" => [] }
66
77
  current = "defaults"
67
78
  config.gsub(/#[^\n]*/, "")
68
- .split(/\n/)
69
- .map(&:strip)
70
- .reject(&:empty?)
71
- .each do |line|
79
+ .split(/\n/)
80
+ .map(&:strip)
81
+ .reject(&:empty?)
82
+ .each do |line|
72
83
  if IS_SECTION =~ line
73
84
  current = line.match(IS_SECTION)[1].strip
74
85
  sections[current] ||= []
@@ -83,10 +94,10 @@ module AutoprefixerRails
83
94
 
84
95
  def params_with_browsers(from = nil)
85
96
  from ||= if defined?(Rails) && Rails.respond_to?(:root) && Rails.root
86
- Rails.root.join("app/assets/stylesheets").to_s
87
- else
88
- "."
89
- end
97
+ Rails.root.join("app/assets/stylesheets").to_s
98
+ else
99
+ "."
100
+ end
90
101
 
91
102
  params = @params
92
103
  if !params.key?(:browsers) && !params.key?(:overrideBrowserslist) && from
@@ -105,7 +116,7 @@ module AutoprefixerRails
105
116
  # Convert params to JS string and add browsers from Browserslist config
106
117
  def js_params
107
118
  "{ " +
108
- params_with_browsers.map { |k, v| "#{k}: #{v.inspect}"}.join(", ") +
119
+ params_with_browsers.map { |k, v| "#{k}: #{v.inspect}" }.join(", ") +
109
120
  " }"
110
121
  end
111
122
 
@@ -158,9 +169,7 @@ module AutoprefixerRails
158
169
  if ExecJS.runtime == ExecJS::Runtimes::Node
159
170
  version = ExecJS.runtime.eval("process.version")
160
171
  first = version.match(/^v(\d+)/)[1].to_i
161
- if first < 6
162
- raise "Autoprefixer doesn’t support Node #{version}. Update it."
163
- end
172
+ raise "Autoprefixer doesn’t support Node #{version}. Update it." if first < 6
164
173
  end
165
174
 
166
175
  ExecJS.compile(build_js)
@@ -169,7 +178,7 @@ module AutoprefixerRails
169
178
 
170
179
  # Cache autoprefixer.js content
171
180
  def read_js
172
- @@js ||= begin
181
+ @read_js ||= begin
173
182
  root = Pathname(File.dirname(__FILE__))
174
183
  path = root.join("../../vendor/autoprefixer.js")
175
184
  path.read
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "yaml"
2
4
 
3
5
  begin
4
6
  module AutoprefixedRails
5
- class Railtie < ::Rails::Railtie
7
+ class Railtie < ::Rails::Railtie # :nodoc:
6
8
  rake_tasks do |app|
7
9
  require "rake/autoprefixer_tasks"
8
10
  Rake::AutoprefixerTasks.new(config) if defined? app.assets
@@ -14,9 +16,7 @@ begin
14
16
  end
15
17
  else
16
18
  initializer :setup_autoprefixer, group: :all do |app|
17
- if defined?(app.assets) && !app.assets.nil?
18
- AutoprefixerRails.install(app.assets, config)
19
- end
19
+ AutoprefixerRails.install(app.assets, config) if defined?(app.assets) && !app.assets.nil?
20
20
  end
21
21
  end
22
22
 
@@ -27,13 +27,14 @@ begin
27
27
  roots.each do |root|
28
28
  file = File.join(root, "config/autoprefixer.yml")
29
29
 
30
- if File.exist?(file)
31
- parsed = ::YAML.load_file(file)
32
- next unless parsed
33
- params = parsed
30
+ next unless File.exist?(file)
31
+
32
+ parsed = ::YAML.load_file(file)
33
+ next unless parsed
34
+
35
+ params = parsed
34
36
 
35
- break
36
- end
37
+ break
37
38
  end
38
39
 
39
40
  params = params.symbolize_keys
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AutoprefixerRails
2
4
  # Container of prefixed CSS and source map with changes
3
5
  class Result
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pathname"
2
4
 
3
5
  module AutoprefixerRails
@@ -30,10 +32,10 @@ module AutoprefixerRails
30
32
  def self.install(env)
31
33
  if ::Sprockets::VERSION.to_f < 4
32
34
  env.register_postprocessor("text/css",
33
- ::AutoprefixerRails::Sprockets)
35
+ ::AutoprefixerRails::Sprockets)
34
36
  else
35
37
  env.register_bundle_processor("text/css",
36
- ::AutoprefixerRails::Sprockets)
38
+ ::AutoprefixerRails::Sprockets)
37
39
  end
38
40
  end
39
41
 
@@ -41,10 +43,10 @@ module AutoprefixerRails
41
43
  def self.uninstall(env)
42
44
  if ::Sprockets::VERSION.to_f < 4
43
45
  env.unregister_postprocessor("text/css",
44
- ::AutoprefixerRails::Sprockets)
46
+ ::AutoprefixerRails::Sprockets)
45
47
  else
46
48
  env.unregister_bundle_processor("text/css",
47
- ::AutoprefixerRails::Sprockets)
49
+ ::AutoprefixerRails::Sprockets)
48
50
  end
49
51
  end
50
52
 
@@ -1,3 +1,5 @@
1
- module AutoprefixerRails
2
- VERSION = "9.8.6".freeze unless defined? AutoprefixerRails::VERSION
1
+ # frozen_string_literal: true
2
+
3
+ module AutoprefixerRails # :nodoc:
4
+ VERSION = "9.8.6.5" unless defined? AutoprefixerRails::VERSION
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rake"
2
4
  require "rake/tasklib"
3
5
  require "autoprefixer-rails"
@@ -1,2 +1,4 @@
1
- require File.expand_path("../config/application", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path("config/application", __dir__)
2
4
  App::Application.load_tasks
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ApplicationController < ActionController::Base
2
4
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class CssController < ApplicationController
2
4
  def test
3
5
  file = params[:exact_file] || params[:file] + ".css"
@@ -1,2 +1,4 @@
1
- require ::File.expand_path("../config/environment", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ require ::File.expand_path("config/environment", __dir__)
2
4
  run App::Application
@@ -1,11 +1,11 @@
1
- require File.expand_path("../boot", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path("boot", __dir__)
2
4
 
3
5
  require "action_controller/railtie"
4
6
  require "sprockets/railtie"
5
7
 
6
- if defined?(Bundler)
7
- Bundler.require(*Rails.groups(assets: %w[development test]))
8
- end
8
+ Bundler.require(*Rails.groups(assets: %w[development test])) if defined?(Bundler)
9
9
 
10
10
  module App
11
11
  class Application < Rails::Application
@@ -1,2 +1,4 @@
1
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../../Gemfile", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
2
4
  require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "tzinfo"
2
- require File.expand_path("../application", __FILE__)
4
+ require File.expand_path("application", __dir__)
3
5
  App::Application.initialize!
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  App::Application.configure do
2
4
  config.cache_classes = true
3
5
  config.eager_load = false
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  App::Application.config.secret_key_base = "test"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  App::Application.routes.draw do
2
4
  root to: "css#test"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "spec_helper"
2
4
 
3
5
  describe AutoprefixerRails do
@@ -42,26 +44,26 @@ describe AutoprefixerRails do
42
44
  end
43
45
 
44
46
  it "generates separated source map" do
45
- result = AutoprefixerRails.process(@css, map: {inline: false})
47
+ result = AutoprefixerRails.process(@css, map: { inline: false })
46
48
  expect(result.map).to be_a(String)
47
49
  end
48
50
 
49
51
  it "uses file name in syntax errors", not_jruby: true do
50
- expect {
52
+ expect do
51
53
  AutoprefixerRails.process("a {", from: "a.css")
52
- }.to raise_error(/a.css:/)
54
+ end.to raise_error(/a.css:/)
53
55
  end
54
56
 
55
57
  it "includes sourcesContent by default" do
56
- map = AutoprefixerRails.process("a{}", map: {inline: false}).map
58
+ map = AutoprefixerRails.process("a{}", map: { inline: false }).map
57
59
  expect(map).to include("sourcesContent")
58
60
  end
59
61
 
60
62
  it "maps options from Ruby style" do
61
63
  map = AutoprefixerRails.process("a{}", map: {
62
- sources_content: false,
63
- inline: false,
64
- }).map
64
+ sources_content: false,
65
+ inline: false
66
+ }).map
65
67
 
66
68
  expect(map).not_to include("sourcesContent")
67
69
  end
@@ -86,9 +88,9 @@ describe AutoprefixerRails do
86
88
  end
87
89
 
88
90
  it "shows correct error on country statistics" do
89
- expect {
91
+ expect do
90
92
  AutoprefixerRails.process("", overrideBrowserslist: "> 1% in US")
91
- }.to raise_error(/Use Autoprefixer with webpack/)
93
+ end.to raise_error(/Use Autoprefixer with webpack/)
92
94
  end
93
95
 
94
96
  context "Sprockets" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "spec_helper"
2
4
 
3
5
  describe AutoprefixerRails::Processor do
@@ -5,9 +7,9 @@ describe AutoprefixerRails::Processor do
5
7
  config = "# Comment\n ie 11\n \nie 8 # sorry\n[test ]\nios 8"
6
8
  processor = AutoprefixerRails::Processor.new
7
9
  expect(processor.parse_config(config)).to eql({
8
- "defaults" => ["ie 11", "ie 8"],
9
- "test" => ["ios 8"],
10
- })
10
+ "defaults" => ["ie 11", "ie 8"],
11
+ "test" => ["ios 8"]
12
+ })
11
13
  end
12
14
 
13
15
  context "without Rails" do
@@ -17,9 +19,9 @@ describe AutoprefixerRails::Processor do
17
19
 
18
20
  it "doesn't raise error during processing" do
19
21
  processor = AutoprefixerRails::Processor.new
20
- expect {
22
+ expect do
21
23
  processor.process("")
22
- }.not_to raise_error
24
+ end.not_to raise_error
23
25
  end
24
26
  end
25
27
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "spec_helper"
2
4
 
3
5
  describe CssController, type: :controller do
@@ -8,7 +10,7 @@ describe CssController, type: :controller do
8
10
 
9
11
  def test_file(file)
10
12
  if Rails.version.split(".").first.to_i >= 5
11
- get :test, params: {file: file}
13
+ get :test, params: { file: file }
12
14
  else
13
15
  get :test, file: file
14
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "spec_helper"
2
4
 
3
5
  describe AutoprefixedRails::Railtie do
@@ -1,11 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ENV["RAILS_ENV"] ||= "test"
2
4
 
3
5
  require_relative "app/config/environment"
4
- require_relative "../lib/autoprefixer-rails"
6
+ require "autoprefixer-rails"
5
7
 
6
8
  require "rspec/rails"
7
9
 
8
- STDERR.puts "ExecJS runtime is #{ExecJS.runtime.class}"
10
+ warn "ExecJS runtime is #{ExecJS.runtime.class}"
9
11
 
10
12
  RSpec.configure do |c|
11
13
  c.filter_run_excluding not_jruby: RUBY_PLATFORM == "java"
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: 9.8.6
4
+ version: 9.8.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Sitnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-30 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rails
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.85.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.85.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-packaging
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.1.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.1.1
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: standard
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -92,8 +120,6 @@ files:
92
120
  - CHANGELOG.md
93
121
  - LICENSE
94
122
  - README.md
95
- - Rakefile
96
- - autoprefixer-rails.gemspec
97
123
  - lib/autoprefixer-rails.rb
98
124
  - lib/autoprefixer-rails/processor.rb
99
125
  - lib/autoprefixer-rails/railtie.rb
@@ -101,8 +127,6 @@ files:
101
127
  - lib/autoprefixer-rails/sprockets.rb
102
128
  - lib/autoprefixer-rails/version.rb
103
129
  - lib/rake/autoprefixer_tasks.rb
104
- - spec/app/.browserslistrc
105
- - spec/app/.gitignore
106
130
  - spec/app/Rakefile
107
131
  - spec/app/app/assets/config/manifest.js
108
132
  - spec/app/app/assets/stylesheets/evaluate.css.erb
@@ -133,8 +157,7 @@ metadata:
133
157
  changelog_uri: https://github.com/ai/autoprefixer-rails/blob/master/CHANGELOG.md
134
158
  source_code_uri: https://github.com/ai/autoprefixer-rails
135
159
  bug_tracker_uri: https://github.com/ai/autoprefixer-rails/issues
136
- post_install_message: autoprefixer-rails was deprected. Use Node.js’s Autoprefixer
137
- with PostCSS instead.
160
+ post_install_message:
138
161
  rdoc_options: []
139
162
  require_paths:
140
163
  - lib
@@ -142,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
165
  requirements:
143
166
  - - ">="
144
167
  - !ruby/object:Gem::Version
145
- version: '2.0'
168
+ version: '2.4'
146
169
  required_rubygems_version: !ruby/object:Gem::Requirement
147
170
  requirements:
148
171
  - - ">="
@@ -154,4 +177,26 @@ signing_key:
154
177
  specification_version: 4
155
178
  summary: Parse CSS and add vendor prefixes to CSS rules using values from the Can
156
179
  I Use website.
157
- test_files: []
180
+ test_files:
181
+ - spec/spec_helper.rb
182
+ - spec/processor_spec.rb
183
+ - spec/app/config.ru
184
+ - spec/app/app/assets/stylesheets/evaluate.css.erb
185
+ - spec/app/app/assets/stylesheets/test.css
186
+ - spec/app/app/assets/stylesheets/loaded.sass
187
+ - spec/app/app/assets/stylesheets/sass.sass
188
+ - spec/app/app/assets/stylesheets/wrong.css
189
+ - spec/app/app/assets/config/manifest.js
190
+ - spec/app/app/controllers/css_controller.rb
191
+ - spec/app/app/controllers/application_controller.rb
192
+ - spec/app/Rakefile
193
+ - spec/app/config/environments/test.rb
194
+ - spec/app/config/boot.rb
195
+ - spec/app/config/initializers/secret_token.rb
196
+ - spec/app/config/routes.rb
197
+ - spec/app/config/autoprefixer.yml
198
+ - spec/app/config/environment.rb
199
+ - spec/app/config/application.rb
200
+ - spec/railtie_spec.rb
201
+ - spec/autoprefixer_spec.rb
202
+ - spec/rails_spec.rb
data/Rakefile DELETED
@@ -1,53 +0,0 @@
1
- require "rubygems"
2
-
3
- require "bundler/setup"
4
- Bundler::GemHelper.install_tasks
5
-
6
- require "standard/rake"
7
-
8
- require "rspec/core/rake_task"
9
- RSpec::Core::RakeTask.new
10
- task default: [:spec, "standard:fix"]
11
-
12
- task :clobber_package do
13
- begin
14
- rm_r "pkg"
15
- rescue
16
- nil
17
- end
18
- end
19
-
20
- desc "Delete all generated files"
21
- task clobber: [:clobber_package]
22
-
23
- desc "Test all Gemfiles from spec/*.gemfile"
24
- task :test_all do
25
- require "pty"
26
- require "shellwords"
27
- cmd = "bundle update && bundle exec rake --trace"
28
- statuses = Dir.glob("./sprockets*.gemfile").map { |gemfile|
29
- Bundler.with_clean_env do
30
- env = {"BUNDLE_GEMFILE" => gemfile}
31
- warn "Testing #{File.basename(gemfile)}:"
32
- warn " export BUNDLE_GEMFILE=#{gemfile}"
33
- warn " #{cmd}"
34
- PTY.spawn(env, cmd) do |r, _w, pid|
35
- begin
36
- r.each_line { |l| puts l }
37
- rescue Errno::EIO
38
- # Errno:EIO error means that the process has finished giving output.
39
- ensure
40
- ::Process.wait pid
41
- end
42
- end
43
- [$? && $?.exitstatus == 0, gemfile]
44
- end
45
- }
46
- failed = statuses.reject(&:first).map(&:last)
47
- if failed.empty?
48
- warn "✓ Tests pass with all #{statuses.size} gemfiles"
49
- else
50
- warn "❌ FAILING #{failed * "\n"}"
51
- exit 1
52
- end
53
- end
@@ -1,36 +0,0 @@
1
- require File.expand_path("../lib/autoprefixer-rails/version", __FILE__)
2
-
3
- Gem::Specification.new do |s|
4
- s.platform = Gem::Platform::RUBY
5
- s.name = "autoprefixer-rails"
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."
10
-
11
- s.files = `git ls-files`.split("\n")
12
- s.files.reject! { |i| i =~ /^\.|build.sh|Dockerfile|Gemfile/ }
13
- s.test_files = `git ls-files -- {spec}/*`.split("\n")
14
- s.extra_rdoc_files = ["README.md", "LICENSE", "CHANGELOG.md"]
15
- s.require_path = "lib"
16
- s.required_ruby_version = ">= 2.0"
17
-
18
- s.author = "Andrey Sitnik"
19
- s.email = "andrey@sitnik.ru"
20
- s.homepage = "https://github.com/ai/autoprefixer-rails"
21
- s.license = "MIT"
22
-
23
- s.post_install_message = "autoprefixer-rails was deprected. " \
24
- "Use Node.js’s Autoprefixer with PostCSS instead."
25
-
26
- s.add_dependency "execjs", ">= 0"
27
-
28
- s.add_development_dependency "rake"
29
- s.add_development_dependency "rails"
30
- s.add_development_dependency "rspec-rails"
31
- s.add_development_dependency "standard"
32
-
33
- s.metadata["changelog_uri"] = "https://github.com/ai/autoprefixer-rails/blob/master/CHANGELOG.md"
34
- s.metadata["source_code_uri"] = "https://github.com/ai/autoprefixer-rails"
35
- s.metadata["bug_tracker_uri"] = "https://github.com/ai/autoprefixer-rails/issues"
36
- end
@@ -1,4 +0,0 @@
1
- ie 11
2
-
3
- [test]
4
- chrome 25
@@ -1,2 +0,0 @@
1
- /log
2
- /tmp