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 CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.9.1 / 2007-06-14
2
+ * FIX: Score manager now handles multiple subtractions in scope definitions.
3
+
1
4
  == 0.9.0 / 2007-03-19
2
5
 
3
6
  * 1 major enhancement
@@ -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-\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 == 2
19
- unless score_term( arrays[1], reference_scope ) > 0
20
- max = [max, score_term( arrays[0], reference_scope )].max
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}'" if arrays.size < 1 || arrays.size > 2
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.0
7
- date: 2007-05-12 00:00:00 +02:00
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
- extra_rdoc_files: []
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