whitespace 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/whitespace +10 -4
- metadata +6 -6
data/bin/whitespace
CHANGED
@@ -29,10 +29,16 @@ class WhitespaceProcessor
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
`git
|
34
|
-
|
35
|
-
|
32
|
+
if ARGV.include?('--all')
|
33
|
+
files = `find . -type file | grep -v .git | grep -v ./vendor | grep -v ./tmp | egrep ".(rb|js|haml|html|css|sass)"`.split(/\n/)
|
34
|
+
puts "* Stripping whitespace from all project files"
|
35
|
+
else
|
36
|
+
files = `git status | egrep ".(rb|js|haml|html|css|sass)"`.split("\n").select { |file| file =~ /^#\t(modified|new file|renamed):/ }
|
37
|
+
puts "* Stripping whitespace from modified files."
|
38
|
+
end
|
39
|
+
|
40
|
+
files.each do |line|
|
41
|
+
line = line.split(/[\t\s]+/).last
|
36
42
|
puts " processing #{line}..."
|
37
43
|
code = File.read(line)
|
38
44
|
File.open(line, 'w+') { |f| f << (WhitespaceProcessor.process(code)) }
|
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: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
9
|
- 0
|
10
|
-
version:
|
10
|
+
version: 2.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Nakajima
|
@@ -16,13 +16,13 @@ bindir: bin
|
|
16
16
|
cert_chain: []
|
17
17
|
|
18
18
|
date: 2011-01-19 00:00:00 -05:00
|
19
|
-
default_executable:
|
19
|
+
default_executable: whitespace
|
20
20
|
dependencies: []
|
21
21
|
|
22
22
|
description:
|
23
23
|
email: patnakajima@gmail.com
|
24
|
-
executables:
|
25
|
-
|
24
|
+
executables:
|
25
|
+
- whitespace
|
26
26
|
extensions: []
|
27
27
|
|
28
28
|
extra_rdoc_files: []
|