keyword_search 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/History.txt +1 -1
  2. data/lib/keyword_search.rb +6 -2
  3. metadata +2 -2
data/History.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  = 1.0.5 / 2007-01-29
2
2
 
3
- * Added single quoting support and nested quoting (apostrophes, etc)
3
+ * Added single quoting support and nested quotes (apostrophes, etc)
4
4
  * Added a few more punctuation marks as valid input
5
5
 
6
6
  = 1.0.4 / 2007-01-15
@@ -7,7 +7,7 @@ end
7
7
 
8
8
  module KeywordSearch
9
9
 
10
- VERSION = '1.0.5'
10
+ VERSION = '1.0.6'
11
11
 
12
12
  class << self
13
13
  def search(input_string, definition=nil, &block)
@@ -15,9 +15,13 @@ module KeywordSearch
15
15
  tokens = Tokenizer.tokenize(input_string.downcase)
16
16
  parse_result = Parser.parse(tokens)
17
17
  unless parse_result.has_error?
18
- Evaluator.new(parse_result.syntax_tree).result.each do |key, terms|
18
+ results = Evaluator.new(parse_result.syntax_tree).result
19
+ results.each do |key, terms|
19
20
  definition.handle(key, terms)
20
21
  end
22
+ results
23
+ else
24
+ {}
21
25
  end
22
26
  end
23
27
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: keyword_search
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.5
7
- date: 2007-01-29 00:00:00 -07:00
6
+ version: 1.0.6
7
+ date: 2007-02-26 00:00:00 -07:00
8
8
  summary: Generic support for extracting GMail-style search keywords/values from strings
9
9
  require_paths:
10
10
  - lib