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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 065c49384162db5e523569eb8d67aad78b059609e5dd6eb52e7f2009b9248145
4
- data.tar.gz: f02ab8ede7024673111277880807e37a36c6461d184ff9fd4a8571f15a61e9ce
3
+ metadata.gz: 1eb08ccec4a958c5903965f49ccdc00e471d03b15761a734f708b79623c89094
4
+ data.tar.gz: 1aad9cecbd126a220548ea42f2ad54da1408f20932157b9c4a0e492fd9e2a416
5
5
  SHA512:
6
- metadata.gz: 8f9131621bda1e9cd13bbf5f9167b886d19e354ecc275dc4dc7fe0951f023d3ac154903e9fb7e6d0cb74eeeddf97752e8e7ad8b55246fd810b9ccc3a18bfd57a
7
- data.tar.gz: 729aed70eac72ca311bc89761f20f745d3d700597268247b3065c48266191de8bbc0cc591dde844973313d2fb2fe0258bcd004570162a370a1c4eb03f58882d0
6
+ metadata.gz: 38363da05ae9d48942de425f531656113991f73d9b891c910519433e1eadedc50a434235613d62ca7710f21a7b31290201742f32b8f06705f3730b2491eebf3f
7
+ data.tar.gz: 0f507e36fb432847f82d71af9553d6c8b7773157f31e68a626dc5444c5d0aa9337102372c921a121614fded6af392f24451ab6497dcec86dfa34886ed181d1cb
@@ -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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cucumber
4
4
  module UnusedCss
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
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.0
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-17 00:00:00.000000000 Z
11
+ date: 2020-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara