whitespace 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/whitespace +3 -1
- metadata +4 -4
data/bin/whitespace
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
# Also:
|
7
7
|
# - converts tabs to spaces
|
8
8
|
# - ensures a single newline at the end
|
9
|
+
FILE_TYPES = "rb|js|haml|html|css|sass|coffee"
|
10
|
+
|
9
11
|
class WhitespaceProcessor
|
10
12
|
def self.process(code)
|
11
13
|
result = []
|
@@ -33,7 +35,7 @@ if ARGV.include?('--all')
|
|
33
35
|
files = `find . -type file | grep -v .git | grep -v ./vendor | grep -v ./tmp | egrep ".(rb|js|haml|html|css|sass)"`.split(/\n/)
|
34
36
|
puts "* Stripping whitespace from all project files"
|
35
37
|
else
|
36
|
-
files = `git status | egrep ".(
|
38
|
+
files = `git status | egrep ".(#{FILE_TYPES})"`.split("\n").select { |file| file =~ /^#\t(modified|new file|renamed):/ }
|
37
39
|
puts "* Stripping whitespace from modified files."
|
38
40
|
end
|
39
41
|
|
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:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 3
|
10
|
+
version: 2.0.3
|
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.
|
61
|
+
rubygems_version: 1.8.6
|
62
62
|
signing_key:
|
63
63
|
specification_version: 3
|
64
64
|
summary: Strips whitespace from files modified by git
|