code-cleaner 0.5 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +12 -0
- data/code-cleaner.gemspec +1 -1
- data/support/pre-commit.erb +1 -0
- metadata +2 -3
- data/code-cleaner-0.4.gem +0 -0
data/README.textile
CHANGED
@@ -72,3 +72,15 @@ end
|
|
72
72
|
</pre>
|
73
73
|
|
74
74
|
Also, if you project run in bundled environment, make sure you have your @bin@ or @script@ directory in your @$PATH@ or change the pre-commit hook to point to the right path to the @code-cleaner@. If you are using Nake or Thor, just specify @--path=bin@ resp. @--path=script@ as an option for the @hooks:whitespace:install@ If you are using Rake, you will have to do it manually.
|
75
|
+
|
76
|
+
--encoding=utf-8
|
77
|
+
--whitelist=pattern & --blacklist=pattern
|
78
|
+
|
79
|
+
<pre>
|
80
|
+
Nake::Task["hooks:whitespace:install"].tap do |task|
|
81
|
+
task.config[:path] = "bin"
|
82
|
+
task.config[:encoding] = "utf-8"
|
83
|
+
task.config[:whitelist] = '(bin/[^/]+|.+\.(rb|rake|nake|thor|task))$'
|
84
|
+
#task.config[:blacklist]
|
85
|
+
end
|
86
|
+
</pre>
|
data/code-cleaner.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "code-cleaner"
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.6"
|
7
7
|
s.authors = ["Jakub Šťastný aka Botanicus"]
|
8
8
|
s.homepage = "http://github.com/botanicus/code-cleaner"
|
9
9
|
s.summary = "Remove trailing whitespace, append missing \\n and replace tabs by two spaces"
|
data/support/pre-commit.erb
CHANGED
@@ -47,6 +47,7 @@ if which code-cleaner &> /dev/null; then
|
|
47
47
|
elif [ $exitstatus -eq 0 ] ; then
|
48
48
|
printf "[\e[33mDONE\e[0m]\n"
|
49
49
|
git add "$file" # so the changes will be committed immediately
|
50
|
+
sleep 0.1 # otherwise it might not work
|
50
51
|
else
|
51
52
|
abort "Unexpected exit status $?"
|
52
53
|
fi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code-cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "0.
|
4
|
+
version: "0.6"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Jakub \xC5\xA0\xC5\xA5astn\xC3\xBD aka Botanicus"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
|
-
date: 2009-12-
|
11
|
+
date: 2009-12-31 00:00:00 +01:00
|
12
12
|
default_executable: code-cleaner
|
13
13
|
dependencies: []
|
14
14
|
|
@@ -22,7 +22,6 @@ extra_rdoc_files: []
|
|
22
22
|
|
23
23
|
files:
|
24
24
|
- bin/code-cleaner
|
25
|
-
- code-cleaner-0.4.gem
|
26
25
|
- code-cleaner.gemspec
|
27
26
|
- LICENSE
|
28
27
|
- README.textile
|
data/code-cleaner-0.4.gem
DELETED
Binary file
|