utils 0.0.98 → 0.0.99
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/strip_spaces +28 -20
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67939ce99b900f52e390e0a417750092cc04877f
|
4
|
+
data.tar.gz: acfd86203297a5c4a7e2a216035d37c34c0b2457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e4fa870b13bce0fe920dea5516c57ad42b1e9a8f5ac0e27e74193c6b269d9e7e62abf3091b925348bb940a65b88b41bb6ea29d13635358fa695c6951a78efe
|
7
|
+
data.tar.gz: 090fcc6f5f80202a1225abef6f87103a67acc17b9173742a72012403d975cc69a7f6735ac743e9b3368835d596c369000e304ce80465e37b0c5b5333ce58b1bf
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.99
|
data/bin/strip_spaces
CHANGED
@@ -32,33 +32,41 @@ end
|
|
32
32
|
args = go 'I:h'
|
33
33
|
args['h'] and usage
|
34
34
|
|
35
|
-
|
36
|
-
paths =
|
35
|
+
unless ARGV.empty?
|
36
|
+
paths = ARGV.map { |p| File.expand_path(p) }
|
37
|
+
end
|
37
38
|
|
38
39
|
suffix = args['I'].ask_and_send(:split, /[\s,]+/).to_a
|
39
40
|
|
40
41
|
config = Utils::Config::ConfigFile.new
|
41
42
|
config.configure_from_paths
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
44
|
+
if paths
|
45
|
+
find(*(paths + [ { :suffix => suffix} ])) do |filename|
|
46
|
+
bn, s = File.basename(filename), File.stat(filename)
|
47
|
+
s.symlink? and next
|
48
|
+
if s.directory?
|
49
|
+
config.strip_spaces.prune?(bn) and prune
|
50
|
+
next
|
51
|
+
end
|
52
|
+
s.file? or next
|
53
|
+
config.strip_spaces.skip?(bn) and next
|
54
|
+
File.ascii?(filename) or next
|
55
|
+
STDOUT.puts "Stripping spaces from #{filename.inspect}."
|
56
|
+
secure_write(filename) do |output|
|
57
|
+
File.open(filename) do |file|
|
58
|
+
old_mode = file.stat.mode
|
59
|
+
file.each do |line|
|
60
|
+
line.gsub!(/[ \t\v]+$/, '')
|
61
|
+
output.write line
|
62
|
+
end
|
63
|
+
File.chmod old_mode, output.path
|
60
64
|
end
|
61
|
-
File.chmod old_mode, output.path
|
62
65
|
end
|
63
66
|
end
|
67
|
+
else
|
68
|
+
for line in STDIN
|
69
|
+
line.gsub!(/[ \t\v]+$/, '')
|
70
|
+
STDOUT.write line
|
71
|
+
end
|
64
72
|
end
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: utils 0.0.
|
2
|
+
# stub: utils 0.0.99 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "utils"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.99"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.authors = ["Florian Frank"]
|
10
|
-
s.date = "2013-10-
|
10
|
+
s.date = "2013-10-09"
|
11
11
|
s.description = "This ruby gem provides some useful command line utilities"
|
12
12
|
s.email = "flori@ping.de"
|
13
13
|
s.executables = ["brakeman2err", "chroot-exec", "chroot-libs", "classify", "create_tags", "discover", "edit", "edit_wait", "enum", "errf", "git-empty", "irb_connect", "myex", "number_files", "on_change", "path", "probe", "remote_copy", "same_files", "search", "sedit", "ssh-tunnel", "strip_spaces", "unquarantine_apps", "untest", "utils-install-config", "utils-utilsrc", "vacuum_firefox_sqlite", "xmp"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.99
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|