RegexpBench 0.5.1 → 0.5.2
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/doc/Specifications +4 -0
- data/lib/regexp-bench/regexp-bench.rb +9 -8
- metadata +6 -5
data/doc/Specifications
ADDED
@@ -10,6 +10,7 @@ module RegexpBench
|
|
10
10
|
end
|
11
11
|
|
12
12
|
class MatchString
|
13
|
+
include Command::DSL::Formatting
|
13
14
|
def initialize(string)
|
14
15
|
@string = string
|
15
16
|
end
|
@@ -35,16 +36,16 @@ module RegexpBench
|
|
35
36
|
end
|
36
37
|
|
37
38
|
def null_match
|
38
|
-
|
39
|
+
item "ERROR: Null match", {:color => :red}
|
39
40
|
end
|
40
41
|
|
41
42
|
def matched(match)
|
42
|
-
|
43
|
-
|
43
|
+
item "Successful match:", {:color => :green}
|
44
|
+
item "Before: " + match.pre_match, {:color => :blue}
|
44
45
|
match.to_a.each_index do |idx|
|
45
46
|
puts "m[#{idx}]: #{match[idx]}"
|
46
47
|
end
|
47
|
-
|
48
|
+
item "After: " + match.post_match, {:color => :blue}
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
@@ -54,16 +55,16 @@ module RegexpBench
|
|
54
55
|
end
|
55
56
|
|
56
57
|
def null_match
|
57
|
-
|
58
|
+
item "Successful null match", {:color => :green}
|
58
59
|
end
|
59
60
|
|
60
61
|
def matched(match)
|
61
|
-
|
62
|
-
|
62
|
+
item "ERROR: match:", {:color => :red}
|
63
|
+
item "Before: " + match.pre_match, {:color => :magenta}
|
63
64
|
match.to_a.each_index do |idx|
|
64
65
|
puts "m[#{idx}]: #{match[idx]}"
|
65
66
|
end
|
66
|
-
|
67
|
+
item "After: " + match.post_match, {:color => :magenta}
|
67
68
|
end
|
68
69
|
end
|
69
70
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: RegexpBench
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date:
|
6
|
+
version: 0.5.2
|
7
|
+
date: 2008-01-15 00:00:00 -08:00
|
8
8
|
summary: Regular expression experimental user app.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -36,17 +36,18 @@ files:
|
|
36
36
|
- lib/regexp-bench/regex-test.rb
|
37
37
|
- bin/regexp-bench
|
38
38
|
- doc/README
|
39
|
+
- doc/Specifications
|
39
40
|
test_files: []
|
40
41
|
|
41
42
|
rdoc_options:
|
42
|
-
- --diagram
|
43
43
|
- --inline-source
|
44
44
|
- --main
|
45
45
|
- doc/README
|
46
46
|
- --title
|
47
|
-
- RegexpBench-0.5.
|
47
|
+
- RegexpBench-0.5.2 RDoc
|
48
48
|
extra_rdoc_files:
|
49
49
|
- doc/README
|
50
|
+
- doc/Specifications
|
50
51
|
executables:
|
51
52
|
- regexp-bench
|
52
53
|
extensions: []
|
@@ -61,5 +62,5 @@ dependencies:
|
|
61
62
|
requirements:
|
62
63
|
- - ">="
|
63
64
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
65
|
+
version: 0.9.2
|
65
66
|
version:
|