freelancing-god-riddle 0.9.8.1371.2 → 0.9.8.1533.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -0
- data/lib/riddle/client.rb +1 -25
- data/lib/riddle.rb +2 -2
- data/lib/tabtab_definitions.rb +15 -0
- data/spec/unit/riddle_spec.rb +17 -0
- metadata +13 -2
data/README
CHANGED
data/lib/riddle/client.rb
CHANGED
@@ -110,31 +110,7 @@ module Riddle
|
|
110
110
|
@server = server || "localhost"
|
111
111
|
@port = port || 3312
|
112
112
|
|
113
|
-
|
114
|
-
@offset = 0
|
115
|
-
@limit = 20
|
116
|
-
@max_matches = 1000
|
117
|
-
@match_mode = :all
|
118
|
-
@sort_mode = :relevance
|
119
|
-
@sort_by = ''
|
120
|
-
@weights = []
|
121
|
-
@id_range = 0..0
|
122
|
-
@filters = []
|
123
|
-
@group_by = ''
|
124
|
-
@group_function = :day
|
125
|
-
@group_clause = '@group desc'
|
126
|
-
@group_distinct = ''
|
127
|
-
@cut_off = 0
|
128
|
-
@retry_count = 0
|
129
|
-
@retry_delay = 0
|
130
|
-
@anchor = {}
|
131
|
-
# string keys are index names, integer values are weightings
|
132
|
-
@index_weights = {}
|
133
|
-
@rank_mode = :proximity_bm25
|
134
|
-
@max_query_time = 0
|
135
|
-
# string keys are field names, integer values are weightings
|
136
|
-
@field_weights = {}
|
137
|
-
@timeout = 0
|
113
|
+
reset
|
138
114
|
|
139
115
|
@queue = []
|
140
116
|
end
|
data/lib/riddle.rb
CHANGED
@@ -15,10 +15,10 @@ module Riddle #:nodoc:
|
|
15
15
|
Tiny = 8
|
16
16
|
# Revision number for RubyForge's sake, taken from what Sphinx
|
17
17
|
# outputs to the command line.
|
18
|
-
Rev =
|
18
|
+
Rev = 1533
|
19
19
|
# Release number to mark my own fixes, beyond feature parity with
|
20
20
|
# Sphinx itself.
|
21
|
-
Release =
|
21
|
+
Release = 1
|
22
22
|
|
23
23
|
String = [Major, Minor, Tiny].join('.')
|
24
24
|
GemVersion = [Major, Minor, Tiny, Rev, Release].join('.')
|
@@ -0,0 +1,15 @@
|
|
1
|
+
TabTab::Definition.register("searchd") do |c|
|
2
|
+
c.flag :help, :h
|
3
|
+
c.flag :config, :c
|
4
|
+
c.flag :stop
|
5
|
+
c.flag :iostats
|
6
|
+
c.flag :console
|
7
|
+
c.flag :port, :p
|
8
|
+
c.flag :index, :i
|
9
|
+
end
|
10
|
+
|
11
|
+
TabTab::Definition.register("indexer") do |c|
|
12
|
+
c.flag :config, :c
|
13
|
+
c.flag :all
|
14
|
+
c.flag :rotate
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec/spec_helper'
|
2
|
+
|
3
|
+
describe "Riddle" do
|
4
|
+
it "should escape characters correctly" do
|
5
|
+
invalid_chars = ['(', ')', '|', '-', '!', '@', '~', '"', '/']
|
6
|
+
invalid_chars.each do |char|
|
7
|
+
base = "string with '#{char}' character"
|
8
|
+
Riddle.escape(base).should == base.gsub(char, "\\#{char}")
|
9
|
+
end
|
10
|
+
|
11
|
+
# Not sure why this doesn't work within the loop...
|
12
|
+
Riddle.escape("string with & character").should == "string with \\& character"
|
13
|
+
|
14
|
+
all_chars = invalid_chars.join('') + '&'
|
15
|
+
Riddle.escape(all_chars).should == "\\(\\)\\|\\-\\!\\@\\~\\\"\\/\\&"
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freelancing-god-riddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.8.
|
4
|
+
version: 0.9.8.1533.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Allan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-23 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -27,8 +27,18 @@ files:
|
|
27
27
|
- lib/riddle/client/response.rb
|
28
28
|
- lib/riddle/client.rb
|
29
29
|
- lib/riddle.rb
|
30
|
+
- lib/tabtab_definitions.rb
|
30
31
|
- MIT-LICENCE
|
31
32
|
- README
|
33
|
+
- spec/functional/excerpt_spec.rb
|
34
|
+
- spec/functional/keywords_spec.rb
|
35
|
+
- spec/functional/search_spec.rb
|
36
|
+
- spec/functional/update_spec.rb
|
37
|
+
- spec/unit/client_spec.rb
|
38
|
+
- spec/unit/filter_spec.rb
|
39
|
+
- spec/unit/message_spec.rb
|
40
|
+
- spec/unit/response_spec.rb
|
41
|
+
- spec/unit/riddle_spec.rb
|
32
42
|
has_rdoc: true
|
33
43
|
homepage: http://riddle.freelancing-gods.com
|
34
44
|
post_install_message:
|
@@ -68,3 +78,4 @@ test_files:
|
|
68
78
|
- spec/unit/filter_spec.rb
|
69
79
|
- spec/unit/message_spec.rb
|
70
80
|
- spec/unit/response_spec.rb
|
81
|
+
- spec/unit/riddle_spec.rb
|