whitespace 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/whitespace +8 -3
  2. metadata +4 -4
data/bin/whitespace CHANGED
@@ -32,7 +32,7 @@ class WhitespaceProcessor
32
32
  end
33
33
 
34
34
  if ARGV.include?('--all')
35
- files = `find . -type file | grep -v .git | grep -v ./vendor | grep -v ./tmp | egrep ".(rb|js|haml|html|css|sass)"`.split(/\n/)
35
+ files = `find . -type file | grep -v .git | grep -v ./vendor | grep -v ./tmp | egrep ".(#{FILE_TYPES})"`.split(/\n/)
36
36
  puts "* Stripping whitespace from all project files"
37
37
  else
38
38
  files = `git status | egrep ".(#{FILE_TYPES})"`.split("\n").select { |file| file =~ /^#\t(modified|new file|renamed):/ }
@@ -42,7 +42,12 @@ end
42
42
  files.each do |line|
43
43
  line = line.split(":").last.strip
44
44
  puts " processing #{line}..."
45
- code = File.read(line)
46
- File.open(line, 'w+') { |f| f << (WhitespaceProcessor.process(code)) }
45
+ begin
46
+ code = File.read(line)
47
+ File.open(line, 'w+') { |f| f << (WhitespaceProcessor.process(code)) }
48
+ rescue Errno::ENOENT
49
+ puts " WARNING: #{line} not found"
50
+ end
47
51
  end
52
+
48
53
  puts "* DONE"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whitespace
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 3
10
- version: 2.0.3
9
+ - 4
10
+ version: 2.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Nakajima
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements: []
59
59
 
60
60
  rubyforge_project:
61
- rubygems_version: 1.8.6
61
+ rubygems_version: 1.8.11
62
62
  signing_key:
63
63
  specification_version: 3
64
64
  summary: Strips whitespace from files modified by git