rubyc 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/rubyc +12 -8
- data/lib/rubyc/version.rb +1 -1
- data/rubyc.gemspec +0 -1
- metadata +6 -20
data/bin/rubyc
CHANGED
@@ -77,14 +77,18 @@ class Rubyc < Thor
|
|
77
77
|
end
|
78
78
|
|
79
79
|
desc :grep, "Grep"
|
80
|
-
def grep(
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
80
|
+
def grep(pattern, code = nil)
|
81
|
+
pattern = eval(pattern)
|
82
|
+
proc = code ? eval( "Proc.new{|line| l = line; #{code}}" ) : nil
|
83
|
+
puts STDIN.grep(pattern, &proc)
|
84
|
+
end
|
85
|
+
|
86
|
+
desc :scan, "Scan"
|
87
|
+
def scan(pattern, code = nil)
|
88
|
+
pattern = eval(pattern)
|
89
|
+
proc = code ? eval( "Proc.new{|*match| m = match; #{code}}" ) : nil
|
90
|
+
str = STDIN.read
|
91
|
+
str.scan(pattern, &proc)
|
88
92
|
end
|
89
93
|
|
90
94
|
desc :uniq, "uniq"
|
data/lib/rubyc/version.rb
CHANGED
data/rubyc.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Martin Chabot
|
@@ -43,25 +43,11 @@ dependencies:
|
|
43
43
|
- 0
|
44
44
|
version: "0"
|
45
45
|
prerelease: false
|
46
|
-
type: :runtime
|
47
|
-
requirement: *id002
|
48
|
-
name: minitar
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
hash: 3
|
56
|
-
segments:
|
57
|
-
- 0
|
58
|
-
version: "0"
|
59
|
-
prerelease: false
|
60
46
|
type: :development
|
61
|
-
requirement: *
|
47
|
+
requirement: *id002
|
62
48
|
name: rake
|
63
49
|
- !ruby/object:Gem::Dependency
|
64
|
-
version_requirements: &
|
50
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
65
51
|
none: false
|
66
52
|
requirements:
|
67
53
|
- - ~>
|
@@ -73,7 +59,7 @@ dependencies:
|
|
73
59
|
version: "1.0"
|
74
60
|
prerelease: false
|
75
61
|
type: :development
|
76
|
-
requirement: *
|
62
|
+
requirement: *id003
|
77
63
|
name: bundler
|
78
64
|
description: Adds Ruby's powers to the command line
|
79
65
|
email:
|