tagen 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tagen/core/kernel.rb +11 -8
- data/lib/tagen/version.rb +1 -1
- metadata +5 -4
data/lib/tagen/core/kernel.rb
CHANGED
@@ -8,7 +8,7 @@ private
|
|
8
8
|
# @param [Symbol, Hash] o support {Array#extract_extend_options}
|
9
9
|
# @option o [Boolean] :verbose print cmd if verbose
|
10
10
|
# @return [String] result
|
11
|
-
def sh
|
11
|
+
def sh(cmd, *args)
|
12
12
|
o = args.extract_extend_options!
|
13
13
|
puts cmd if o[:verbose]
|
14
14
|
`#{cmd}`
|
@@ -23,7 +23,7 @@ private
|
|
23
23
|
# @param [Symbol, Hash] o support {Array#extract_extend_options}
|
24
24
|
# @option o [Boolean] :verbose print cmd if verbose
|
25
25
|
# @return [Boolean,nil] true false nil
|
26
|
-
def system
|
26
|
+
def system(*cmds)
|
27
27
|
o = cmds.extract_extend_options!
|
28
28
|
cmd = cmds.join(" ")
|
29
29
|
puts cmd if o[:verbose]
|
@@ -38,10 +38,10 @@ private
|
|
38
38
|
# instance_eval(&blk)
|
39
39
|
# blk2method(&blk).call *args
|
40
40
|
#
|
41
|
-
def blk2method
|
42
|
-
self.class.class_eval
|
41
|
+
def blk2method(&blk)
|
42
|
+
self.class.class_eval {
|
43
43
|
define_method(:__blk2method, &blk)
|
44
|
-
|
44
|
+
}
|
45
45
|
method(:__blk2method)
|
46
46
|
end
|
47
47
|
|
@@ -50,12 +50,15 @@ private
|
|
50
50
|
# RUBY_PLATFORM is "i686-linux" "i386-migw32"
|
51
51
|
#
|
52
52
|
# @return [Boolean]
|
53
|
-
def linux
|
53
|
+
def linux?()
|
54
|
+
RUBY_PLATFORM =~ /linux/
|
55
|
+
end
|
54
56
|
|
55
57
|
# detect PLatform information.
|
56
58
|
#
|
57
59
|
# @return [Boolean]
|
58
60
|
# @see {#linux?}
|
59
|
-
def win32
|
60
|
-
|
61
|
+
def win32?()
|
62
|
+
RUBY_PLATFORM =~ /mingw32|mswin/
|
63
|
+
end
|
61
64
|
end # module Kernel
|
data/lib/tagen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tagen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &21116640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 3.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *21116640
|
25
25
|
description: ! "a core and extra extension to ruby library. \n"
|
26
26
|
email: ywzhaifei@gmail.com
|
27
27
|
executables: []
|
@@ -116,3 +116,4 @@ signing_key:
|
|
116
116
|
specification_version: 3
|
117
117
|
summary: a core and extra extension to ruby library
|
118
118
|
test_files: []
|
119
|
+
has_rdoc:
|