css_parser 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f4d17d702d71c21d0ed367b46cf36bea21e5c0a1
4
+ data.tar.gz: 7cf4eb9d2fde090f003a3e0535bf29586bc5265a
5
+ SHA512:
6
+ metadata.gz: d94370dd5562a7a577af9b7fca87d9ad3e029d159dc750a848301620558ada4c280367c59aef8aa6b63f48f30228a5ebb962e8069376d13e3e1eafe088b4194f
7
+ data.tar.gz: ef1b6fbfb31c7608c5f51302dad2bec17170708c0ed1fbb7ad43f780421a62031da4c476b138ea36810b2ac727a4e9fd849e3fa4aaa6967b58df64065831d4dd
@@ -119,25 +119,27 @@ module CssParser
119
119
  end
120
120
 
121
121
  # Load @imported CSS
122
- block.scan(RE_AT_IMPORT_RULE).each do |import_rule|
123
- media_types = []
124
- if media_string = import_rule[-1]
125
- media_string.split(/[,]/).each do |t|
126
- media_types << CssParser.sanitize_media_query(t) unless t.empty?
122
+ if @options[:import]
123
+ block.scan(RE_AT_IMPORT_RULE).each do |import_rule|
124
+ media_types = []
125
+ if media_string = import_rule[-1]
126
+ media_string.split(/[,]/).each do |t|
127
+ media_types << CssParser.sanitize_media_query(t) unless t.empty?
128
+ end
129
+ else
130
+ media_types = [:all]
127
131
  end
128
- else
129
- media_types = [:all]
130
- end
131
132
 
132
- next unless options[:only_media_types].include?(:all) or media_types.length < 1 or (media_types & options[:only_media_types]).length > 0
133
+ next unless options[:only_media_types].include?(:all) or media_types.length < 1 or (media_types & options[:only_media_types]).length > 0
133
134
 
134
- import_path = import_rule[0].to_s.gsub(/['"]*/, '').strip
135
+ import_path = import_rule[0].to_s.gsub(/['"]*/, '').strip
135
136
 
136
- if options[:base_uri]
137
- import_uri = Addressable::URI.parse(options[:base_uri].to_s) + Addressable::URI.parse(import_path)
138
- load_uri!(import_uri, options[:base_uri], media_types)
139
- elsif options[:base_dir]
140
- load_file!(import_path, options[:base_dir], media_types)
137
+ if options[:base_uri]
138
+ import_uri = Addressable::URI.parse(options[:base_uri].to_s) + Addressable::URI.parse(import_path)
139
+ load_uri!(import_uri, options[:base_uri], media_types)
140
+ elsif options[:base_dir]
141
+ load_file!(import_path, options[:base_dir], media_types)
142
+ end
141
143
  end
142
144
  end
143
145
 
@@ -323,7 +325,7 @@ module CssParser
323
325
 
324
326
  # reset the current media query scope
325
327
  if in_media_block
326
- current_media_queries = []
328
+ current_media_queries = [:all]
327
329
  in_media_block = false
328
330
  end
329
331
  else
@@ -1,3 +1,3 @@
1
1
  module CssParser
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6".freeze
3
3
  end
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
5
- prerelease:
4
+ version: 1.3.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alex Dunae
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-24 00:00:00.000000000 Z
11
+ date: 2015-01-29 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: addressable
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: A set of classes for parsing CSS in Ruby.
@@ -33,40 +30,33 @@ executables: []
33
30
  extensions: []
34
31
  extra_rdoc_files: []
35
32
  files:
33
+ - lib/css_parser.rb
36
34
  - lib/css_parser/parser.rb
37
35
  - lib/css_parser/regexps.rb
38
36
  - lib/css_parser/rule_set.rb
39
37
  - lib/css_parser/version.rb
40
- - lib/css_parser.rb
41
- homepage: https://github.com/alexdunae/css_parser
38
+ homepage: https://github.com/premailer/css_parser
42
39
  licenses:
43
40
  - MIT
41
+ metadata: {}
44
42
  post_install_message:
45
43
  rdoc_options: []
46
44
  require_paths:
47
45
  - lib
48
46
  required_ruby_version: !ruby/object:Gem::Requirement
49
- none: false
50
47
  requirements:
51
- - - ! '>='
48
+ - - ">="
52
49
  - !ruby/object:Gem::Version
53
50
  version: '0'
54
- segments:
55
- - 0
56
- hash: 4192577183181421877
57
51
  required_rubygems_version: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - ">="
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
- segments:
64
- - 0
65
- hash: 4192577183181421877
66
56
  requirements: []
67
57
  rubyforge_project:
68
- rubygems_version: 1.8.25
58
+ rubygems_version: 2.4.3
69
59
  signing_key:
70
- specification_version: 3
60
+ specification_version: 4
71
61
  summary: Ruby CSS parser.
72
62
  test_files: []