cucumber-unused_css 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/cucumber/unused_css/checker.rb +3 -3
- data/lib/cucumber/unused_css/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eb08ccec4a958c5903965f49ccdc00e471d03b15761a734f708b79623c89094
|
4
|
+
data.tar.gz: 1aad9cecbd126a220548ea42f2ad54da1408f20932157b9c4a0e492fd9e2a416
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38363da05ae9d48942de425f531656113991f73d9b891c910519433e1eadedc50a434235613d62ca7710f21a7b31290201742f32b8f06705f3730b2491eebf3f
|
7
|
+
data.tar.gz: 0f507e36fb432847f82d71af9553d6c8b7773157f31e68a626dc5444c5d0aa9337102372c921a121614fded6af392f24451ab6497dcec86dfa34886ed181d1cb
|
data/CHANGELOG.md
CHANGED
@@ -16,5 +16,14 @@ All notable changes to this project will be documented in this file.
|
|
16
16
|
### Fixed
|
17
17
|
-->
|
18
18
|
|
19
|
+
## [0.1.1] - 2020-09-18
|
20
|
+
|
21
|
+
### Fixed
|
22
|
+
|
23
|
+
- Fixed ignore list duplicates
|
24
|
+
|
25
|
+
### Improved
|
26
|
+
|
27
|
+
- Small code rework for better readability
|
19
28
|
|
20
29
|
## [0.1.0] - 2020-09-17 - Initial release
|
@@ -38,6 +38,8 @@ module Cucumber
|
|
38
38
|
css_file_url = "#{uri.scheme}://#{uri.host}:#{uri.port}#{file_tag['href']}"
|
39
39
|
end
|
40
40
|
|
41
|
+
next if @css_files.include? css_file_url
|
42
|
+
|
41
43
|
load_selectors css_file_url
|
42
44
|
end
|
43
45
|
end
|
@@ -70,14 +72,12 @@ module Cucumber
|
|
70
72
|
private
|
71
73
|
|
72
74
|
def load_selectors(url)
|
73
|
-
return if @css_files.include? url
|
74
|
-
|
75
75
|
parser = CssParser::Parser.new
|
76
76
|
parser.load_uri! url
|
77
77
|
parser.each_selector do |selector|
|
78
78
|
# Ignore some CSS directive that are not selectors
|
79
79
|
if ignore? selector
|
80
|
-
@ignored_selectors.push selector
|
80
|
+
@ignored_selectors.push selector unless @ignored_selectors.include?(selector)
|
81
81
|
next
|
82
82
|
end
|
83
83
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-unused_css
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Tancoigne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|