textpow 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/lib/textpow/score_manager.rb +11 -6
- data/mm/manual.mm +1 -0
- metadata +9 -6
data/History.txt
CHANGED
@@ -12,15 +12,20 @@ module Textpow
|
|
12
12
|
def score search_scope, reference_scope
|
13
13
|
max = 0
|
14
14
|
search_scope.split( ',' ).each do |scope|
|
15
|
-
arrays = scope.split(/\B
|
15
|
+
arrays = scope.split(/\B-/)
|
16
16
|
if arrays.size == 1
|
17
17
|
max = [max, score_term( arrays[0], reference_scope )].max
|
18
|
-
elsif arrays.size
|
19
|
-
|
20
|
-
|
18
|
+
elsif arrays.size > 1
|
19
|
+
excluded = false
|
20
|
+
arrays[1..-1].each do |a|
|
21
|
+
if score_term( arrays[1], reference_scope ) > 0
|
22
|
+
excluded = true
|
23
|
+
break
|
24
|
+
end
|
21
25
|
end
|
26
|
+
max = [max, score_term( arrays[0], reference_scope )].max unless excluded
|
22
27
|
else
|
23
|
-
raise ParsingError, "Error in scope string: '#{search_scope}'
|
28
|
+
raise ParsingError, "Error in scope string: '#{search_scope}' #{arrays.size} is not a valid number of operands" if arrays.size < 1
|
24
29
|
end
|
25
30
|
end
|
26
31
|
max
|
@@ -57,4 +62,4 @@ module Textpow
|
|
57
62
|
result
|
58
63
|
end
|
59
64
|
end
|
60
|
-
end
|
65
|
+
end
|
data/mm/manual.mm
CHANGED
@@ -256,6 +256,7 @@ having `name="text.string", position=10` and the second having
|
|
256
256
|
|
257
257
|
* [Oniguruma http://www.geocities.jp/kosako3/oniguruma/].
|
258
258
|
* [Oniguruma for ruby http://rubyforge.org/projects/oniguruma/].
|
259
|
+
* [Ruby plist parsing library http://rubyforge.org/projects/plist].
|
259
260
|
|
260
261
|
= Projects using Textpow =
|
261
262
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: textpow
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.9.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.9.1
|
7
|
+
date: 2007-06-14 00:00:00 +02:00
|
8
8
|
summary: An engine for parsing Textmate bundles
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -44,10 +44,13 @@ files:
|
|
44
44
|
- README.txt
|
45
45
|
test_files:
|
46
46
|
- test/test_textpow.rb
|
47
|
-
rdoc_options:
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
rdoc_options:
|
48
|
+
- --main
|
49
|
+
- README.txt
|
50
|
+
extra_rdoc_files:
|
51
|
+
- History.txt
|
52
|
+
- Manifest.txt
|
53
|
+
- README.txt
|
51
54
|
executables:
|
52
55
|
- plist2yaml
|
53
56
|
- plist2syntax
|