css_parser 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/css_parser/parser.rb +4 -3
- data/lib/css_parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd50ddcbc6c5575dae65ea7aa39bb9572f94c895
|
4
|
+
data.tar.gz: 208a7389b8e4191cceb13fc5f3a740020ec46881
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6227b12349191b220553e9ea1f501548aa18155ceff220d008d047e3f46dc0cac28d24d9f756a6552016eeeb863ccd596e34c7c7547a8596610ef2af9f94429
|
7
|
+
data.tar.gz: a2108f1f1f3944297e5665f1859a6a0be1a46401c4e86f342e61f5171f967fb840e9277f239cae8e190cb8fcb9f9d8e0183275454525eb12ade957a2446ec862
|
data/lib/css_parser/parser.rb
CHANGED
@@ -41,6 +41,7 @@ module CssParser
|
|
41
41
|
# array of RuleSets
|
42
42
|
@rules = []
|
43
43
|
|
44
|
+
@redirect_count = nil
|
44
45
|
|
45
46
|
@loaded_uris = []
|
46
47
|
|
@@ -188,8 +189,8 @@ module CssParser
|
|
188
189
|
#
|
189
190
|
# +media_types+ can be a symbol or an array of symbols.
|
190
191
|
# See RuleSet#each_selector for +options+.
|
191
|
-
def each_selector(
|
192
|
-
each_rule_set(
|
192
|
+
def each_selector(all_media_types = :all, options = {}) # :yields: selectors, declarations, specificity, media_types
|
193
|
+
each_rule_set(all_media_types) do |rule_set, media_types|
|
193
194
|
rule_set.each_selector(options) do |selectors, declarations, specificity|
|
194
195
|
yield selectors, declarations, specificity, media_types
|
195
196
|
end
|
@@ -487,7 +488,7 @@ module CssParser
|
|
487
488
|
return '', nil
|
488
489
|
elsif res.code.to_i >= 300 and res.code.to_i < 400
|
489
490
|
if res.response['Location'] != nil
|
490
|
-
return read_remote_file Addressable::URI.parse(URI
|
491
|
+
return read_remote_file Addressable::URI.parse(URI.escape(res.response['Location']))
|
491
492
|
end
|
492
493
|
end
|
493
494
|
|
data/lib/css_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Dunae
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|