mo 1.3.3 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mo.rb +7 -9
  3. data/lib/mo/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68a662dcd1d4a196ef77bb14d8c072563f3653c7
4
- data.tar.gz: 3e83dfe87eb21890c1d194583951782c9019b46b
3
+ metadata.gz: 8ad4499e0059621c79c2d1123b684b7f80a45e7a
4
+ data.tar.gz: ce9fe2d18a1ec29ea9ffa032cb1949a4aea2f96f
5
5
  SHA512:
6
- metadata.gz: 9040e439d76b5c3ef8e2da3808ca362bdac74add13b18181f93a8ad0d4566e713db375dd135cacc67273d50adabac694a3f9c7415f59ed475bb39ac3c5d60f9e
7
- data.tar.gz: c66f511d4d97710bb36f2752f05de02147e2b4a87bb0cce1644be142e7435447b931b49c1809ddfae9806ff6f57164f98fab8d6cd95d3eacb4f173d4643d2199
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
- begin
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}"
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
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Mo
4
- VERSION = "1.3.3"
4
+ VERSION = "1.3.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - chatgris