rubyc 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/bin/rubyc +12 -8
  2. data/lib/rubyc/version.rb +1 -1
  3. data/rubyc.gemspec +0 -1
  4. 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(matcher, code = nil)
81
- matcher = eval(matcher)
82
- if code
83
- proc = eval( "Proc.new{|line| l = line; #{code}}" )
84
- else
85
- proc = nil
86
- end
87
- puts STDIN.grep(matcher, &proc)
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
@@ -1,3 +1,3 @@
1
1
  module Rubyc
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/rubyc.gemspec CHANGED
@@ -14,7 +14,6 @@ Gem::Specification.new do |s|
14
14
  s.rubyforge_project = "rubyc"
15
15
 
16
16
  s.add_dependency "thor"
17
- s.add_dependency "minitar"
18
17
  s.add_development_dependency 'rake'
19
18
  s.add_development_dependency("bundler", "~> 1.0")
20
19
 
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: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
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: *id003
47
+ requirement: *id002
62
48
  name: rake
63
49
  - !ruby/object:Gem::Dependency
64
- version_requirements: &id004 !ruby/object:Gem::Requirement
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: *id004
62
+ requirement: *id003
77
63
  name: bundler
78
64
  description: Adds Ruby's powers to the command line
79
65
  email: