picky 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/lib/picky/bundle.rb +37 -4
  2. data/lib/picky/bundle_indexed.rb +12 -8
  3. data/lib/picky/bundle_indexing.rb +6 -26
  4. data/lib/picky/bundle_realtime.rb +26 -16
  5. data/lib/picky/category_indexing.rb +1 -3
  6. data/lib/picky/category_realtime.rb +1 -1
  7. data/lib/picky/character_substituters/west_european.rb +4 -4
  8. data/lib/picky/generators/partial/infix.rb +0 -47
  9. data/lib/picky/generators/partial/none.rb +0 -6
  10. data/lib/picky/generators/partial/substring.rb +0 -47
  11. data/lib/picky/generators/similarity/double_metaphone.rb +3 -3
  12. data/lib/picky/generators/similarity/metaphone.rb +3 -3
  13. data/lib/picky/generators/similarity/phonetic.rb +12 -24
  14. data/lib/picky/generators/similarity/soundex.rb +3 -3
  15. data/lib/picky/generators/weights/constant.rb +46 -0
  16. data/lib/picky/generators/weights/dynamic.rb +37 -0
  17. data/lib/picky/generators/weights/logarithmic.rb +0 -10
  18. data/lib/picky/generators/weights/runtime.rb +41 -0
  19. data/lib/picky/loader.rb +3 -3
  20. data/lib/picky/query/allocations.rb +2 -1
  21. data/lib/picky/query/tokens.rb +0 -10
  22. data/spec/lib/category_indexed_spec.rb +1 -1
  23. data/spec/lib/character_substituters/west_european_spec.rb +11 -13
  24. data/spec/lib/generators/partial/infix_spec.rb +161 -161
  25. data/spec/lib/generators/partial/none_spec.rb +3 -3
  26. data/spec/lib/generators/partial/postfix_spec.rb +109 -109
  27. data/spec/lib/generators/partial/substring_spec.rb +190 -190
  28. data/spec/lib/generators/similarity/double_metaphone_spec.rb +38 -38
  29. data/spec/lib/generators/similarity/metaphone_spec.rb +38 -38
  30. data/spec/lib/generators/similarity/soundex_spec.rb +38 -38
  31. data/spec/lib/generators/weights/constant_spec.rb +37 -0
  32. data/spec/lib/generators/weights/dynamic_spec.rb +27 -0
  33. data/spec/lib/generators/weights/logarithmic_spec.rb +10 -15
  34. data/spec/lib/indexed/bundle_spec.rb +3 -2
  35. data/spec/lib/indexed/wrappers/bundle/calculation_spec.rb +8 -8
  36. data/spec/lib/indexing/bundle_spec.rb +5 -3
  37. data/spec/specific/dynamic_weights_spec.rb +44 -0
  38. metadata +36 -28
  39. data/lib/picky/generators/base.rb +0 -19
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picky
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-11 00:00:00.000000000 Z
12
+ date: 2011-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70136161803160 !ruby/object:Gem::Requirement
16
+ requirement: &70257846980320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,21 +21,21 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70136161803160
24
+ version_requirements: *70257846980320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: picky-client
27
- requirement: &70136161800540 !ruby/object:Gem::Requirement
27
+ requirement: &70257846975920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 3.5.0
32
+ version: 3.5.1
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70136161800540
35
+ version_requirements: *70257846975920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rack
38
- requirement: &70136161797800 !ruby/object:Gem::Requirement
38
+ requirement: &70257846973960 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70136161797800
46
+ version_requirements: *70257846973960
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rack_fast_escape
49
- requirement: &70136161795300 !ruby/object:Gem::Requirement
49
+ requirement: &70257846972200 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70136161795300
57
+ version_requirements: *70257846972200
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: text
60
- requirement: &70136161794320 !ruby/object:Gem::Requirement
60
+ requirement: &70257846970600 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70136161794320
68
+ version_requirements: *70257846970600
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yajl-ruby
71
- requirement: &70136161791120 !ruby/object:Gem::Requirement
71
+ requirement: &70257846968260 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70136161791120
79
+ version_requirements: *70257846968260
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: activesupport
82
- requirement: &70136161786960 !ruby/object:Gem::Requirement
82
+ requirement: &70257846962840 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '3.0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70136161786960
90
+ version_requirements: *70257846962840
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: activerecord
93
- requirement: &70136161784620 !ruby/object:Gem::Requirement
93
+ requirement: &70257846958800 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '3.0'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70136161784620
101
+ version_requirements: *70257846958800
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: unicorn
104
- requirement: &70136161782840 !ruby/object:Gem::Requirement
104
+ requirement: &70257846955160 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70136161782840
112
+ version_requirements: *70257846955160
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: sinatra
115
- requirement: &70136161780240 !ruby/object:Gem::Requirement
115
+ requirement: &70257846951100 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70136161780240
123
+ version_requirements: *70257846951100
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: redis
126
- requirement: &70136161776800 !ruby/object:Gem::Requirement
126
+ requirement: &70257846941840 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70136161776800
134
+ version_requirements: *70257846941840
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: mysql
137
- requirement: &70136161773460 !ruby/object:Gem::Requirement
137
+ requirement: &70257846939460 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,7 +142,7 @@ dependencies:
142
142
  version: '0'
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *70136161773460
145
+ version_requirements: *70257846939460
146
146
  description: Fast Ruby semantic text search engine with comfortable single field interface.
147
147
  email: florian.hanke+picky@gmail.com
148
148
  executables:
@@ -202,7 +202,6 @@ files:
202
202
  - lib/picky/extensions/symbol.rb
203
203
  - lib/picky/frontend_adapters/rack.rb
204
204
  - lib/picky/generators/aliases.rb
205
- - lib/picky/generators/base.rb
206
205
  - lib/picky/generators/partial/default.rb
207
206
  - lib/picky/generators/partial/infix.rb
208
207
  - lib/picky/generators/partial/none.rb
@@ -217,8 +216,11 @@ files:
217
216
  - lib/picky/generators/similarity/soundex.rb
218
217
  - lib/picky/generators/similarity/strategy.rb
219
218
  - lib/picky/generators/strategy.rb
219
+ - lib/picky/generators/weights/constant.rb
220
220
  - lib/picky/generators/weights/default.rb
221
+ - lib/picky/generators/weights/dynamic.rb
221
222
  - lib/picky/generators/weights/logarithmic.rb
223
+ - lib/picky/generators/weights/runtime.rb
222
224
  - lib/picky/generators/weights/strategy.rb
223
225
  - lib/picky/helpers/measuring.rb
224
226
  - lib/picky/index.rb
@@ -326,6 +328,8 @@ files:
326
328
  - spec/lib/generators/similarity/none_spec.rb
327
329
  - spec/lib/generators/similarity/phonetic_spec.rb
328
330
  - spec/lib/generators/similarity/soundex_spec.rb
331
+ - spec/lib/generators/weights/constant_spec.rb
332
+ - spec/lib/generators/weights/dynamic_spec.rb
329
333
  - spec/lib/generators/weights/logarithmic_spec.rb
330
334
  - spec/lib/helpers/measuring_spec.rb
331
335
  - spec/lib/index_indexed_spec.rb
@@ -372,6 +376,7 @@ files:
372
376
  - spec/lib/statistics_spec.rb
373
377
  - spec/lib/tasks/try_spec.rb
374
378
  - spec/lib/tokenizer_spec.rb
379
+ - spec/specific/dynamic_weights_spec.rb
375
380
  - spec/specific/realtime_spec.rb
376
381
  - spec/specific/regression_spec.rb
377
382
  - spec/specific/speed_spec.rb
@@ -449,6 +454,8 @@ test_files:
449
454
  - spec/lib/generators/similarity/none_spec.rb
450
455
  - spec/lib/generators/similarity/phonetic_spec.rb
451
456
  - spec/lib/generators/similarity/soundex_spec.rb
457
+ - spec/lib/generators/weights/constant_spec.rb
458
+ - spec/lib/generators/weights/dynamic_spec.rb
452
459
  - spec/lib/generators/weights/logarithmic_spec.rb
453
460
  - spec/lib/helpers/measuring_spec.rb
454
461
  - spec/lib/index_indexed_spec.rb
@@ -495,6 +502,7 @@ test_files:
495
502
  - spec/lib/statistics_spec.rb
496
503
  - spec/lib/tasks/try_spec.rb
497
504
  - spec/lib/tokenizer_spec.rb
505
+ - spec/specific/dynamic_weights_spec.rb
498
506
  - spec/specific/realtime_spec.rb
499
507
  - spec/specific/regression_spec.rb
500
508
  - spec/specific/speed_spec.rb
@@ -1,19 +0,0 @@
1
- module Picky
2
-
3
- module Generators # :nodoc:all
4
-
5
- # A cache generator holds an index.
6
- #
7
- class Base
8
-
9
- attr_reader :inverted
10
-
11
- def initialize inverted
12
- @inverted = inverted
13
- end
14
-
15
- end
16
-
17
- end
18
-
19
- end