css_counter 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c19011ae338a69b2111e23f50c19c78bc5b35f95
4
- data.tar.gz: 191c790ad2483843d49ad54c0cae50176262a80a
3
+ metadata.gz: 018bb51b60285ddd39803f1d71c1c32162e98c06
4
+ data.tar.gz: fbdb0b1371097c50306e33355feb6a964e1ec640
5
5
  SHA512:
6
- metadata.gz: 16d976c4fb1bd8e5d770f9db2f69ce38d6154684e7cbd4d1b6788d3d1b7decb9700d4aaccc05539edf239b7d12c2ed2698077a8b346666c496730857ba554f8a
7
- data.tar.gz: 6f2516df27eab8b51577d29ca48a853351987f93189304780c9a0001ffb7ea8149c99517e3546114e0046b9f64d5e4f6ea2430b607b6755d6055fbea2673c062
6
+ metadata.gz: 000ad9bf6a138565ad4952be63487affebfe92e6813b5858ddd064be4e941e626cde15d462282072c15670e88dbc0830d0965a9230f7210401c26386754050cb
7
+ data.tar.gz: 5a85983c19e0debcb241564e8949b2a0f165dd6e94f84ec9b43d8b88e7b1843ef4ad4189c85ed3930b8682a0cdd56f12b9862566342ed624b1b30372a79f8149
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.2.1 (25th May 2015)
2
+ * Skip missing CSS files without an exception
3
+
1
4
  v0.2.0 (23rd April 2015)
2
5
  * Support sprockets 2.x and 3.x
3
6
 
@@ -13,13 +13,15 @@ namespace :css_counter do
13
13
  }
14
14
  exit_non_zero = false
15
15
  css_paths.each do |path|
16
- css = sprockets[path].source
17
- selector_count = CssCounter.new(css).selectors
18
- if selector_count > IE_SELECTOR_LIMIT
19
- $stderr.puts "#{path} has #{selector_count} CSS selectors, must not exceed #{IE_SELECTOR_LIMIT}"
20
- exit_non_zero = true
21
- else
22
- puts "#{path} has #{selector_count} CSS selectors"
16
+ css = sprockets[path]
17
+ if css
18
+ selector_count = CssCounter.new(css.source).selectors
19
+ if selector_count > IE_SELECTOR_LIMIT
20
+ $stderr.puts "#{path} has #{selector_count} CSS selectors, must not exceed #{IE_SELECTOR_LIMIT}"
21
+ exit_non_zero = true
22
+ else
23
+ puts "#{path} has #{selector_count} CSS selectors"
24
+ end
23
25
  end
24
26
  end
25
27
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css_counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2015-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake