picky 2.4.1 → 2.4.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.
@@ -141,22 +141,31 @@ module Interfaces
|
|
141
141
|
# TODO Move to Interface object.
|
142
142
|
#
|
143
143
|
def querying_removes_characters
|
144
|
-
Tokenizers::Query.default.instance_variable_get
|
144
|
+
regexp = Internals::Tokenizers::Query.default.instance_variable_get :@removes_characters_regexp
|
145
|
+
regexp && regexp.source
|
145
146
|
end
|
146
147
|
def querying_removes_characters= new_value
|
147
|
-
Tokenizers::Query.default.instance_variable_set(:@removes_characters_regexp, %r{#{new_value}})
|
148
|
+
Internals::Tokenizers::Query.default.instance_variable_set(:@removes_characters_regexp, %r{#{new_value}})
|
148
149
|
end
|
149
150
|
def querying_stopwords
|
150
|
-
Tokenizers::Query.default.instance_variable_get
|
151
|
+
regexp = Internals::Tokenizers::Query.default.instance_variable_get :@remove_stopwords_regexp
|
152
|
+
regexp && regexp.source
|
151
153
|
end
|
152
154
|
def querying_stopwords= new_value
|
153
|
-
Tokenizers::Query.default.instance_variable_set(:@remove_stopwords_regexp, %r{#{new_value}})
|
155
|
+
Internals::Tokenizers::Query.default.instance_variable_set(:@remove_stopwords_regexp, %r{#{new_value}})
|
154
156
|
end
|
155
157
|
def querying_splits_text_on
|
156
|
-
Tokenizers::Query.default.instance_variable_get
|
158
|
+
splits = Internals::Tokenizers::Query.default.instance_variable_get :@splits_text_on
|
159
|
+
puts splits
|
160
|
+
splits && splits.respond_to?(:source) ? splits.source : splits
|
157
161
|
end
|
158
162
|
def querying_splits_text_on= new_value
|
159
|
-
Tokenizers::Query.default.
|
163
|
+
splits = Internals::Tokenizers::Query.default.instance_variable_get :@splits_text_on
|
164
|
+
if splits.respond_to?(:source)
|
165
|
+
Internals::Tokenizers::Query.default.instance_variable_set(:@splits_text_on, %r{#{new_value}})
|
166
|
+
else
|
167
|
+
Internals::Tokenizers::Query.default.instance_variable_set(:@splits_text_on, new_value)
|
168
|
+
end
|
160
169
|
end
|
161
170
|
|
162
171
|
#
|
@@ -18,6 +18,28 @@ describe LiveParameters do
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
describe 'querying_removes_characters' do
|
22
|
+
it 'works' do
|
23
|
+
expect do
|
24
|
+
@parameters.querying_removes_characters
|
25
|
+
end.to_not raise_error
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'querying_stopwords' do
|
29
|
+
it 'works' do
|
30
|
+
expect do
|
31
|
+
@parameters.querying_stopwords
|
32
|
+
end.to_not raise_error
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'querying_splits_text_on' do
|
36
|
+
it 'works' do
|
37
|
+
expect do
|
38
|
+
@parameters.querying_splits_text_on
|
39
|
+
end.to_not raise_error
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
21
43
|
describe 'parameters' do
|
22
44
|
context 'all goes well' do
|
23
45
|
it 'does a few things in order' do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: picky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.4.
|
5
|
+
version: 2.4.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Florian Hanke
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-26 00:00:00 +10:00
|
14
14
|
default_executable: picky
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 2.4.
|
35
|
+
version: 2.4.2
|
36
36
|
type: :development
|
37
37
|
version_requirements: *id002
|
38
38
|
description: Fast Ruby semantic text search engine with comfortable single field interface.
|