stylesheet 0.1.7 → 0.1.8

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: bc5eb1cd967796c26fa522311f64ba8663d917b97a2107fe54ff46b4bc4b0cfc
4
- data.tar.gz: 59910caf94fa181675c0ea35bca624d9895334a40706a3690ce359983de30f2d
3
+ metadata.gz: bb5d18ee1118e1d272c96ec33ecc6b3a2fc834a3b1c922a3505f1efbabedabaa
4
+ data.tar.gz: b5825b6322c79a693a8c182cf2915c888abfe5ebbf526831b443832cbc9b7979
5
5
  SHA512:
6
- metadata.gz: 634effa1d81245401ec054e7a30748111fa65480900773a5a12e9aff0cc13390cbb1d93392de11a9eecd946c51c5093360c40b717465182490742a704cd96774
7
- data.tar.gz: c48fdfec84a35d17f07e5fe7877e0eb7b46dcba1fa7471b93ce7c1df240345486aaca9cc4d1dd6f0bb5a62cc37406629e6ac80127fa23d6da13f280d10a2905c
6
+ metadata.gz: 1d283ae915974d1238de25e13f99c15668f38783d1b21f2bdd6d2927ef0c0cbe3f6d6a0b29019975b6dd3624e9ceacbc149e29cf45568df32b493ab5a4c641d5
7
+ data.tar.gz: 10460aeec21ea54e9b01e6793d715b402d9f9b1e69d19e54933e405d4b5c5a3afc283a46ece2e0d6cdaf56b31282adf4d9fe887fd86f42a44fb8f20c3c4e7fb8
@@ -106,6 +106,7 @@ module Stylesheet
106
106
  end
107
107
 
108
108
  def request_content
109
+ return "" if inline_css?
109
110
  raise InvalidLocationError unless location && location.valid?
110
111
  request.get(location.href)
111
112
  end
@@ -1,3 +1,3 @@
1
1
  module Stylesheet
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -137,6 +137,14 @@ describe CssStyleSheet do
137
137
  }.not_to raise_error
138
138
  end
139
139
 
140
+ it "doesn't fetch for nil inline styles" do
141
+ sheet = CssStyleSheet.new(content: nil)
142
+
143
+ expect {
144
+ sheet.css_rules.map {|r| r.content }
145
+ }.not_to raise_error
146
+ end
147
+
140
148
  end
141
149
 
142
150
  describe "#css_rules" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stylesheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek DeVries