inertia 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/History.md +7 -0
- data/exe/in +4 -0
- data/lib/inertia/mass.rb +10 -1
- data/lib/inertia/resistance.rb +1 -0
- data/lib/inertia/version.rb +1 -1
- data/lib/inertia.rb +12 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d11084d0cf69efbb978d231f9635222f52c2663789482da7e0e07fd461b76a8
|
4
|
+
data.tar.gz: 75a061ab877f8276266438de7f7eb1f5933534bd3d8827cdbb9956402c9a8fb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b2cffe4232da693d00d16159ced964d952cc4ac3b1f13fbbef586ac460795b8756f954e4f35edbc9df1d93cf9897f4bdf28cae22fc442b0e68ebbcdd8ea0bcb
|
7
|
+
data.tar.gz: 9165326ee8434cabfde7107c155994615530470b0e714a3dc65b3c243b16182f996fc93fe1198e5ab63b28fbd211dbfdb186b3d0a909ef0df3b1b8da5ad48981
|
data/Gemfile.lock
CHANGED
data/History.md
CHANGED
data/exe/in
CHANGED
data/lib/inertia/mass.rb
CHANGED
@@ -11,8 +11,12 @@ module Inertia
|
|
11
11
|
@text ||= `file -b --mime #{path}`.match?('text')
|
12
12
|
end
|
13
13
|
|
14
|
+
def scss?
|
15
|
+
@scss ||= File.extname(path) == 'scss'
|
16
|
+
end
|
17
|
+
|
14
18
|
def lines
|
15
|
-
return 0
|
19
|
+
return 0 if ignored?
|
16
20
|
|
17
21
|
@lines ||= `wc -l "#{path}" | awk '{print $1}'`.chomp.to_i
|
18
22
|
end
|
@@ -28,5 +32,10 @@ module Inertia
|
|
28
32
|
def to_s
|
29
33
|
sprintf("%6.2f%%\t%s", percent_overall_lines, path)
|
30
34
|
end
|
35
|
+
|
36
|
+
def ignored?
|
37
|
+
!text? ||
|
38
|
+
scss? && Inertia.config.ignore_scss
|
39
|
+
end
|
31
40
|
end
|
32
41
|
end
|
data/lib/inertia/resistance.rb
CHANGED
data/lib/inertia/version.rb
CHANGED
data/lib/inertia.rb
CHANGED
@@ -5,5 +5,16 @@ require 'inertia/grouped_mass'
|
|
5
5
|
require 'inertia/resistance'
|
6
6
|
|
7
7
|
module Inertia
|
8
|
-
|
8
|
+
class << self
|
9
|
+
attr_accessor :config
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.configure
|
13
|
+
self.config ||= Configuration.new
|
14
|
+
yield(config)
|
15
|
+
end
|
16
|
+
|
17
|
+
class Configuration
|
18
|
+
attr_accessor :ignore_scss
|
19
|
+
end
|
9
20
|
end
|