ckuru-tools 0.0.3 → 0.0.5
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/lib/ckuru-tools.rb +12 -10
- metadata +17 -5
data/lib/ckuru-tools.rb
CHANGED
@@ -7,7 +7,6 @@ unless defined? CkuruTools
|
|
7
7
|
module CkuruTools
|
8
8
|
|
9
9
|
# :stopdoc:
|
10
|
-
VERSION = '1.0.0'
|
11
10
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
12
11
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
13
12
|
# :startdoc:
|
@@ -65,7 +64,7 @@ unless defined? CkuruTools
|
|
65
64
|
|
66
65
|
class HashInitializerClass
|
67
66
|
def initialize(h={})
|
68
|
-
raise "argument to #{self.class}##{current_method} must be of class Hash" unless h.is_a? Hash
|
67
|
+
raise ArgumentError.new("argument to #{self.class}##{current_method} must be of class Hash") unless h.is_a? Hash
|
69
68
|
h.keys.each do |k|
|
70
69
|
self.send("#{k}=",h[k])
|
71
70
|
end
|
@@ -79,18 +78,21 @@ unless defined? CkuruTools
|
|
79
78
|
CkuruTools.require_all_libs_relative_to __FILE__
|
80
79
|
CkuruTools.require_all_libs_relative_to CkuruTools.libpath
|
81
80
|
|
81
|
+
class Array
|
82
|
+
def to_comma_separated_string
|
83
|
+
ret = ''
|
84
|
+
self.each do |elem|
|
85
|
+
ret += ',' if ret.length > 0
|
86
|
+
ret += elem.to_s
|
87
|
+
end
|
88
|
+
ret
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
82
92
|
class Object
|
83
93
|
|
84
94
|
def _require ; each {|r| require r } ; end
|
85
95
|
|
86
|
-
# def to_hash
|
87
|
-
# ret = Hash.new
|
88
|
-
# each do |elem|
|
89
|
-
# ret[elem] = true
|
90
|
-
# end
|
91
|
-
# ret
|
92
|
-
# end
|
93
|
-
|
94
96
|
def docmd(cmd,dir=nil)
|
95
97
|
ret = docmdi(cmd,dir)
|
96
98
|
if ret.exitstatus != 0
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ckuru-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Bret Weinraub
|
@@ -9,7 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-08 00:00:00 +00:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
@@ -53,21 +59,27 @@ rdoc_options: []
|
|
53
59
|
require_paths:
|
54
60
|
- lib
|
55
61
|
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
56
63
|
requirements:
|
57
64
|
- - ">="
|
58
65
|
- !ruby/object:Gem::Version
|
66
|
+
hash: 3
|
67
|
+
segments:
|
68
|
+
- 0
|
59
69
|
version: "0"
|
60
|
-
version:
|
61
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
62
72
|
requirements:
|
63
73
|
- - ">="
|
64
74
|
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
76
|
+
segments:
|
77
|
+
- 0
|
65
78
|
version: "0"
|
66
|
-
version:
|
67
79
|
requirements: []
|
68
80
|
|
69
81
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.3.
|
82
|
+
rubygems_version: 1.3.7
|
71
83
|
signing_key:
|
72
84
|
specification_version: 3
|
73
85
|
summary: The infamous ckuru-tools gem. A miscellaneous grab bag of ruby class extensions, utility classes, etc.
|