mo 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mo.rb +7 -9
- data/lib/mo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ad4499e0059621c79c2d1123b684b7f80a45e7a
|
4
|
+
data.tar.gz: ce9fe2d18a1ec29ea9ffa032cb1949a4aea2f96f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85e8d7c86f13cc2a8a4e536cd8ffa9f1cf7f81fbaaf6eb414844bb03ba3aa8f6323f6be7716b6b7fdae769ac5e193e0d04de3c5bcd416a743f17a8bb02966bde
|
7
|
+
data.tar.gz: 279a7f36cf3fbed4234300aacc80d3b66a021d87248a4b42c8d962f971317fbe5af4774cab05ffb7deb8c54b1c9a14650d40a1fc04c60393187d54114c8f2e70
|
data/lib/mo.rb
CHANGED
@@ -13,16 +13,14 @@ module Mo
|
|
13
13
|
desc "Clean-up trailing whitespaces."
|
14
14
|
def whitespace
|
15
15
|
Dir[*ALL_FILES].each do |file|
|
16
|
+
next if File.directory?(file)
|
16
17
|
wsps = false
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
puts " * #{file}"
|
24
|
-
end
|
25
|
-
rescue Errno::EISDIR
|
18
|
+
File.open(file).each_line do |line|
|
19
|
+
break if wsps = line.match(/( |\t)*$/).captures.compact.any?
|
20
|
+
end
|
21
|
+
if wsps
|
22
|
+
system "sed -e 's/[ \t]*$//' -i #{file}"
|
23
|
+
puts " * #{file}"
|
26
24
|
end
|
27
25
|
end
|
28
26
|
end
|
data/lib/mo/version.rb
CHANGED