rstrip 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +34 -0
- data/lib/rstrip/rstrip.rb +2 -2
- data/lib/rstrip/version.rb +1 -1
- data/rstrip.gemspec +2 -2
- metadata +65 -64
- data/README.rdoc +0 -33
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 335626a2f1c52914985cb085fcb123023379de65
|
4
|
+
data.tar.gz: 1c43cf6e1073eea4fe2949b1cb0cdd06599374da
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6936b049dab5e71f3203bff9e2cf1177ac4efc2f206dcd3a72115b7d3a78ced8e4fafee13fb1d9cc59564bcf47c0e18b08bd0238f1f286df7e2a6c12170e652e
|
7
|
+
data.tar.gz: 16055a11b4834fe983b601856b30699395febf0e1919cdfe8f336e44ecc55fe967e599a442388ba6974dba2299b9e8559e3c32ea55d85c26d342deedad718e65
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
Introduction
|
2
|
+
------------
|
3
|
+
|
4
|
+
rstrip provides a ruby executable that removes the trailing white space in the current project directory.
|
5
|
+
|
6
|
+
It also remove empty lines at the end of a file.
|
7
|
+
|
8
|
+
It's configurable on the file types it will operate on.
|
9
|
+
|
10
|
+
Usage
|
11
|
+
-----
|
12
|
+
|
13
|
+
* Install the gem: `gem install rstrip`
|
14
|
+
* In your project folder run `rstrip config generate`, or run `rstrip config generate --global true` to generate the config file in your home directory
|
15
|
+
* Modify the list of file extensions in the .rstrip config file
|
16
|
+
* In your project folder run `rstrip process`
|
17
|
+
* Examine the changes and commit the code
|
18
|
+
|
19
|
+
Alternatives
|
20
|
+
------------
|
21
|
+
|
22
|
+
There are a lot of ways to do the similar thing:
|
23
|
+
|
24
|
+
* textmate bundle https://github.com/mocoso/code-beautifier.tmbundle
|
25
|
+
|
26
|
+
* textmate marco http://mjijackson.com/2009/01/textmate-macro-remove-trailing-space-and-save
|
27
|
+
|
28
|
+
* bash http://stackoverflow.com/questions/149057/how-to-removing-trailing-whitespace-of-all-files-recursively
|
29
|
+
|
30
|
+
* Use a git prehook http://stackoverflow.com/questions/591923/make-git-automatically-remove-trailing-whitespace-before-committing
|
31
|
+
|
32
|
+
I used the textmate marco before. The problem with textmate bundle or marco is they only modify the file if you edit and save it, which makes the commits harder to read as you will remove white spaces gradually. rstrip gets it done all in once in the folder level. Then you can use the bundle or marco with a fresh start.
|
33
|
+
|
34
|
+
rstrip also tries to make it as easy as possible so you don't need to remember the cryptic bash or perl commands.
|
data/lib/rstrip/rstrip.rb
CHANGED
data/lib/rstrip/version.rb
CHANGED
data/rstrip.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_development_dependency "rspec", "
|
23
|
-
s.add_development_dependency "aruba", "~> 0.
|
22
|
+
s.add_development_dependency "rspec", "~> 2.13.0"
|
23
|
+
s.add_development_dependency "aruba", "~> 0.5.3"
|
24
24
|
s.add_dependency "thor"
|
25
25
|
end
|
metadata
CHANGED
@@ -1,64 +1,69 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rstrip
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- zhengjia
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-06-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
17
14
|
name: rspec
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: 2.0.0
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.13.0
|
25
20
|
type: :development
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: aruba
|
29
21
|
prerelease: false
|
30
|
-
|
31
|
-
|
32
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.13.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aruba
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
33
31
|
- - ~>
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.3
|
36
34
|
type: :development
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: thor
|
40
35
|
prerelease: false
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.5.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
47
48
|
type: :runtime
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: A ruby executable that removes the trailing white space in the current
|
56
|
+
project directory. It also remove the last empty line if there is one
|
57
|
+
email:
|
51
58
|
- jiazheng@live.com
|
52
|
-
executables:
|
59
|
+
executables:
|
53
60
|
- rstrip
|
54
61
|
extensions: []
|
55
|
-
|
56
62
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
63
|
+
files:
|
59
64
|
- .gitignore
|
60
65
|
- Gemfile
|
61
|
-
- README.
|
66
|
+
- README.md
|
62
67
|
- Rakefile
|
63
68
|
- bin/rstrip
|
64
69
|
- feature/config.feature
|
@@ -70,33 +75,29 @@ files:
|
|
70
75
|
- lib/rstrip/version.rb
|
71
76
|
- rstrip.gemspec
|
72
77
|
- spec/rstrip_spec.rb
|
73
|
-
|
74
|
-
homepage: ""
|
78
|
+
homepage: ''
|
75
79
|
licenses: []
|
76
|
-
|
80
|
+
metadata: {}
|
77
81
|
post_install_message:
|
78
82
|
rdoc_options: []
|
79
|
-
|
80
|
-
require_paths:
|
83
|
+
require_paths:
|
81
84
|
- lib
|
82
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: "0"
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
94
95
|
requirements: []
|
95
|
-
|
96
96
|
rubyforge_project: rstrip
|
97
|
-
rubygems_version:
|
97
|
+
rubygems_version: 2.0.3
|
98
98
|
signing_key:
|
99
|
-
specification_version:
|
100
|
-
summary: A ruby executable that removes the trailing white space in the current project
|
101
|
-
|
99
|
+
specification_version: 4
|
100
|
+
summary: A ruby executable that removes the trailing white space in the current project
|
101
|
+
directory
|
102
|
+
test_files:
|
102
103
|
- spec/rstrip_spec.rb
|
data/README.rdoc
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
== rstrip
|
2
|
-
|
3
|
-
rstrip provides a ruby executable that removes the trailing white space in the current project directory.
|
4
|
-
|
5
|
-
It also remove the last empty line if there is one.
|
6
|
-
|
7
|
-
It's configurable on the file types it will operate on.
|
8
|
-
|
9
|
-
== Usage
|
10
|
-
* Install the gem: gem install rstrip
|
11
|
-
* In your project folder run `rstrip config generate`, or run `rstrip config generate --global true` to generate the config file in your home directory
|
12
|
-
* Modify the list of file extensions generated in the .rstrip config file
|
13
|
-
* In your project folder run `rstrip process`
|
14
|
-
* Example the change and commit the code
|
15
|
-
|
16
|
-
== Alternatives:
|
17
|
-
There are a lot of ways to do the similar thing:
|
18
|
-
|
19
|
-
* textmate bundle
|
20
|
-
https://github.com/mocoso/code-beautifier.tmbundle
|
21
|
-
|
22
|
-
* textmate marco
|
23
|
-
http://mjijackson.com/2009/01/textmate-macro-remove-trailing-space-and-save
|
24
|
-
|
25
|
-
* bash
|
26
|
-
http://stackoverflow.com/questions/149057/how-to-removing-trailing-whitespace-of-all-files-recursively
|
27
|
-
|
28
|
-
* Use a git prehook
|
29
|
-
http://stackoverflow.com/questions/591923/make-git-automatically-remove-trailing-whitespace-before-committing
|
30
|
-
|
31
|
-
I used the textmate marco before. The problem with textmate bundle or marco is they only modify the file if you edit and save it, which makes the commits harder to read as you will remove white spaces gradually. rstrip gets it done all in once in the folder level. Then you can use the bundle or marco with a fresh start.
|
32
|
-
|
33
|
-
rstrip also tries to make it as easy as possible so you don't need to remember the cryptic bash or perl commands.
|