autoprefixer-rails 7.0.0 → 7.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: fc6db0fa7828899a7e943a190da5fea42f36adef
4
- data.tar.gz: 0536dbab373e4843dce0262759964606341ad18f
3
+ metadata.gz: 82d7dccc4f8109bbc831adcd05280be34a4644cd
4
+ data.tar.gz: 8d968aa6f0e01ffa032ed1c3e544f9c705f1d66a
5
5
  SHA512:
6
- metadata.gz: e0f26b26e4eb2069ea9016b25c201b2dbcba8fb0631826e665e6c17ad88601afe1c80a564c031392360ad3963c0cf9ecb76c07b9bf1ec375477553f04cc8eb5d
7
- data.tar.gz: 555953c04283d4c2520d6ea738a7a2da9bc88e950dab374dcb2203baee958a12f6333860749f38df6831e7ac5baad803dbae46a7a09133e2bcec6c4faf798c95
6
+ metadata.gz: c67b047f6d9985a509240b02a0959d338614851509e202f05c8027b2e586fc43a48d51d96f3f6b0c0ad3b1f76c54f0bc26f85597be3edf5235912a43ab37a1bb
7
+ data.tar.gz: 36b4fe08e204a1ab1d00a69c54b80e71d8f0f527f41ef202053204cda7a2dbe8b27deb619a3ed8af484d3eafeebf4c5594f051416ad38af2fa300ed1fec16f12
data/.travis.yml CHANGED
@@ -1,22 +1,52 @@
1
1
  sudo: false
2
+ dist: trusty
2
3
  language: ruby
3
4
  rvm:
4
- - "2.1.8"
5
- - "2.2.4"
6
- - "2.3.0"
5
+ - "2.1.9"
6
+ - "2.2.7"
7
+ - "2.3.4"
8
+ - "2.4.1"
7
9
  cache: bundler
8
10
  gemfile:
9
11
  - sprockets2.gemfile
10
12
  - sprockets3.gemfile
11
13
  - sprockets4.gemfile
14
+ - mini_racer.gemfile
12
15
  before_install:
13
16
  - nvm install stable
14
17
  env:
15
18
  - EXECJS_RUNTIME=Node
16
- - EXECJS_RUNTIME= # Rubyracer or rubyrhino depending on platform
19
+ # mini_racer / rubyracer or rubyrhino depending on platform:
20
+ - EXECJS_RUNTIME=
17
21
  matrix:
18
22
  exclude:
19
- - rvm: "2.1.8"
23
+ - rvm: "2.1.9"
20
24
  gemfile: sprockets4.gemfile
21
- - rvm: "2.1.8"
25
+ - rvm: "2.1.9"
22
26
  gemfile: sprockets3.gemfile
27
+ - rvm: "2.1.9"
28
+ gemfile: mini_racer.gemfile
29
+ - rvm: "2.1.9"
30
+ env: "EXECJS_RUNTIME=Node"
31
+
32
+ - rvm: "2.2.7"
33
+ gemfile: sprockets2.gemfile
34
+ - rvm: "2.2.7"
35
+ env: "EXECJS_RUNTIME=Node"
36
+ - rvm: "2.2.7"
37
+ gemfile: mini_racer.gemfile
38
+
39
+ - rvm: "2.3.4"
40
+ gemfile: sprockets2.gemfile
41
+ - rvm: "2.3.4"
42
+ env: "EXECJS_RUNTIME=Node"
43
+ - rvm: "2.3.4"
44
+ gemfile: mini_racer.gemfile
45
+
46
+ - rvm: "2.4.1"
47
+ gemfile: sprockets2.gemfile
48
+ - rvm: "2.4.1"
49
+ gemfile: sprockets3.gemfile
50
+
51
+ - env: "EXECJS_RUNTIME=Node"
52
+ gemfile: mini_racer.gemfile
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## 7.0.1
4
+ * Fix `therubyracer` support.
5
+
3
6
  ## 7.0 “Coelestem adspicit lucem”
4
7
  * Remove node.js 0.12 support.
5
8
  * Use PostCSS 6.0.
@@ -1,3 +1,3 @@
1
1
  module AutoprefixerRails
2
- VERSION = '7.0.0'.freeze unless defined? AutoprefixerRails::VERSION
2
+ VERSION = '7.0.1'.freeze unless defined? AutoprefixerRails::VERSION
3
3
  end
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'execjs'
6
+ gem 'rails', '>= 5.0.2'
7
+ gem 'sprockets', '>= 4.0.0.beta4'
8
+
9
+ # Cannot use shared.gemfile, because therubyracer requires an older version
10
+ # of libv8 than mini_racer
11
+ gem 'mini_racer', platforms: [:mri, :rbx]
12
+
13
+ gem 'racc', platforms: :rbx
14
+ gem 'rubysl', platforms: :rbx
15
+
16
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
@@ -19,6 +19,13 @@ describe AutoprefixerRails do
19
19
  "}"
20
20
  end
21
21
 
22
+ it "process @supports" do
23
+ css = "@supports (display: flex) { }"
24
+ result = AutoprefixerRails.process(css, browsers: ['chrome 28'])
25
+ expect(result.css).to eq(
26
+ '@supports ((display: -webkit-flex) or (display: flex)) { }')
27
+ end
28
+
22
29
  it "generates source map" do
23
30
  result = AutoprefixerRails.process(@css, map: true)
24
31
  expect(result.css).to include('/*# sourceMappingURL=data:')
data/spec/spec_helper.rb CHANGED
@@ -5,6 +5,8 @@ require_relative '../lib/autoprefixer-rails'
5
5
 
6
6
  require 'rspec/rails'
7
7
 
8
+ STDERR.puts "ExecJS runtime is #{ExecJS.runtime.class}"
9
+
8
10
  RSpec.configure do |c|
9
11
  c.filter_run_excluding not_jruby: RUBY_PLATFORM == 'java'
10
12
  end
@@ -880,20 +880,8 @@ var brackets = {
880
880
  var current = [''];
881
881
  var stack = [current];
882
882
 
883
- for (var _iterator = str, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
884
- var _ref;
885
-
886
- if (_isArray) {
887
- if (_i >= _iterator.length) break;
888
- _ref = _iterator[_i++];
889
- } else {
890
- _i = _iterator.next();
891
- if (_i.done) break;
892
- _ref = _i.value;
893
- }
894
-
895
- var sym = _ref;
896
-
883
+ for (var i = 0; i < str.length; i++) {
884
+ var sym = str[i];
897
885
  if (sym === '(') {
898
886
  current = [''];
899
887
  last(stack).push(current);
@@ -916,19 +904,19 @@ var brackets = {
916
904
  */
917
905
  stringify: function stringify(ast) {
918
906
  var result = '';
919
- for (var _iterator2 = ast, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
920
- var _ref2;
907
+ for (var _iterator = ast, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
908
+ var _ref;
921
909
 
922
- if (_isArray2) {
923
- if (_i2 >= _iterator2.length) break;
924
- _ref2 = _iterator2[_i2++];
910
+ if (_isArray) {
911
+ if (_i >= _iterator.length) break;
912
+ _ref = _iterator[_i++];
925
913
  } else {
926
- _i2 = _iterator2.next();
927
- if (_i2.done) break;
928
- _ref2 = _i2.value;
914
+ _i = _iterator.next();
915
+ if (_i.done) break;
916
+ _ref = _i.value;
929
917
  }
930
918
 
931
- var i = _ref2;
919
+ var i = _ref;
932
920
 
933
921
  if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object') {
934
922
  result += '(' + brackets.stringify(i) + ')';
@@ -6371,9 +6359,7 @@ var Supports = function () {
6371
6359
  prop = _str$split[0],
6372
6360
  value = _str$split[1];
6373
6361
 
6374
- if (!value) {
6375
- value = '';
6376
- }
6362
+ if (!value) value = '';
6377
6363
  return [prop.trim(), value.trim()];
6378
6364
  };
6379
6365
 
@@ -15613,11 +15599,14 @@ var Parser = function () {
15613
15599
  this.spaces = '';
15614
15600
  this.semicolon = false;
15615
15601
 
15616
- this.tokenizer = (0, _tokenize2.default)(this.input);
15617
-
15602
+ this.createTokenizer();
15618
15603
  this.root.source = { input: input, start: { line: 1, column: 1 } };
15619
15604
  }
15620
15605
 
15606
+ Parser.prototype.createTokenizer = function createTokenizer() {
15607
+ this.tokenizer = (0, _tokenize2.default)(this.input);
15608
+ };
15609
+
15621
15610
  Parser.prototype.parse = function parse() {
15622
15611
  var token = void 0;
15623
15612
  while (!this.tokenizer.endOfFile()) {
@@ -15737,7 +15726,7 @@ var Parser = function () {
15737
15726
  this.decl(tokens);
15738
15727
  return;
15739
15728
  } else {
15740
- this.unknownWord(start);
15729
+ this.unknownWord(tokens);
15741
15730
  }
15742
15731
  };
15743
15732
 
@@ -15768,7 +15757,7 @@ var Parser = function () {
15768
15757
  }
15769
15758
 
15770
15759
  while (tokens[0][0] !== 'word') {
15771
- if (tokens.length === 1) this.unknownWord(tokens[0]);
15760
+ if (tokens.length === 1) this.unknownWord(tokens);
15772
15761
  node.raws.before += tokens.shift()[1];
15773
15762
  }
15774
15763
  node.source.start = { line: tokens[0][2], column: tokens[0][3] };
@@ -16041,8 +16030,8 @@ var Parser = function () {
16041
16030
  throw this.input.error('Unclosed bracket', bracket[2], bracket[3]);
16042
16031
  };
16043
16032
 
16044
- Parser.prototype.unknownWord = function unknownWord(token) {
16045
- throw this.input.error('Unknown word', token[2], token[3]);
16033
+ Parser.prototype.unknownWord = function unknownWord(tokens) {
16034
+ throw this.input.error('Unknown word', tokens[0][2], tokens[0][3]);
16046
16035
  };
16047
16036
 
16048
16037
  Parser.prototype.unexpectedClose = function unexpectedClose(token) {
@@ -16588,7 +16577,7 @@ var Processor = function () {
16588
16577
  * throw new Error('This plugin works only with PostCSS 5');
16589
16578
  * }
16590
16579
  */
16591
- this.version = '6.0.0';
16580
+ this.version = '6.0.1';
16592
16581
  /**
16593
16582
  * @member {pluginFunction[]} - Plugins added to this processor.
16594
16583
  *
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: 7.0.0
4
+ version: 7.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: 2017-05-06 00:00:00.000000000 Z
11
+ date: 2017-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs
@@ -105,6 +105,7 @@ files:
105
105
  - lib/autoprefixer-rails/sprockets.rb
106
106
  - lib/autoprefixer-rails/version.rb
107
107
  - lib/rake/autoprefixer_tasks.rb
108
+ - mini_racer.gemfile
108
109
  - shared.gemfile
109
110
  - spec/app/.gitignore
110
111
  - spec/app/Rakefile