utils 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/classify +1 -20
- data/bin/path +2 -2
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +5 -5
- metadata +8 -6
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/bin/classify
CHANGED
@@ -2,26 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'spruz/go'
|
4
4
|
include Spruz::GO
|
5
|
-
|
6
|
-
class ::String
|
7
|
-
def camelize(first_letter_in_uppercase = true)
|
8
|
-
if first_letter_in_uppercase
|
9
|
-
gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
|
10
|
-
else
|
11
|
-
self[0].chr.downcase + camelize(self)[1..-1]
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def underscore
|
16
|
-
word = dup
|
17
|
-
word.gsub!(/::/, '/')
|
18
|
-
word.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
|
19
|
-
word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
|
20
|
-
word.tr!("-", "_")
|
21
|
-
word.downcase!
|
22
|
-
word
|
23
|
-
end
|
24
|
-
end
|
5
|
+
require 'spruz/xt/string'
|
25
6
|
|
26
7
|
opts = go 'bd'
|
27
8
|
|
data/bin/path
CHANGED
@@ -22,8 +22,8 @@ when 'prefix', 'postfix'
|
|
22
22
|
path.push part
|
23
23
|
end
|
24
24
|
when 'edit'
|
25
|
-
if
|
26
|
-
path =
|
25
|
+
if path_argument = ARGV.first
|
26
|
+
path = path_argument.split(path_separator)
|
27
27
|
path.map! { |part| File.expand_path(part) }
|
28
28
|
end
|
29
29
|
path_file = File.join(Dir.tmpdir, "path_temp.#$$")
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{utils}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [%q{Florian Frank}]
|
9
|
-
s.date = %q{2011-
|
9
|
+
s.date = %q{2011-07-15}
|
10
10
|
s.description = %q{This ruby gem provides some useful command line utilities}
|
11
11
|
s.email = %q{flori@ping.de}
|
12
12
|
s.executables = [%q{untest}, %q{chroot-libs}, %q{edit_wait}, %q{chroot-exec}, %q{number_files}, %q{search}, %q{path}, %q{edit}, %q{git-empty}, %q{classify}, %q{utils-install-config}, %q{xmp}, %q{discover}, %q{sshscreen}, %q{myex}, %q{errf}, %q{same_files}, %q{unquarantine_apps}, %q{vacuum_firefox_sqlite}, %q{sedit}]
|
@@ -20,14 +20,14 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.specification_version = 3
|
21
21
|
|
22
22
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
23
|
-
s.add_runtime_dependency(%q<spruz>, ["
|
23
|
+
s.add_runtime_dependency(%q<spruz>, ["~> 0.2.10"])
|
24
24
|
s.add_runtime_dependency(%q<term-ansicolor>, [">= 0"])
|
25
25
|
else
|
26
|
-
s.add_dependency(%q<spruz>, ["
|
26
|
+
s.add_dependency(%q<spruz>, ["~> 0.2.10"])
|
27
27
|
s.add_dependency(%q<term-ansicolor>, [">= 0"])
|
28
28
|
end
|
29
29
|
else
|
30
|
-
s.add_dependency(%q<spruz>, ["
|
30
|
+
s.add_dependency(%q<spruz>, ["~> 0.2.10"])
|
31
31
|
s.add_dependency(%q<term-ansicolor>, [">= 0"])
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Florian Frank
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-15 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: spruz
|
@@ -23,12 +23,14 @@ dependencies:
|
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
hash: 3
|
29
29
|
segments:
|
30
30
|
- 0
|
31
|
-
|
31
|
+
- 2
|
32
|
+
- 10
|
33
|
+
version: 0.2.10
|
32
34
|
type: :runtime
|
33
35
|
version_requirements: *id001
|
34
36
|
- !ruby/object:Gem::Dependency
|