picky 3.5.4 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/lib/picky/backends/backend.rb +1 -1
  2. data/lib/picky/backends/file/basic.rb +0 -36
  3. data/lib/picky/backends/file/json.rb +1 -1
  4. data/lib/picky/backends/file.rb +4 -4
  5. data/lib/picky/backends/helpers/file.rb +0 -26
  6. data/lib/picky/backends/memory/basic.rb +0 -35
  7. data/lib/picky/backends/memory.rb +4 -4
  8. data/lib/picky/backends/redis/basic.rb +0 -33
  9. data/lib/picky/backends/redis.rb +4 -4
  10. data/lib/picky/backends/sqlite/db.rb +84 -0
  11. data/lib/picky/backends/sqlite.rb +75 -0
  12. data/lib/picky/bundle.rb +15 -87
  13. data/lib/picky/bundle_realtime.rb +1 -1
  14. data/lib/picky/categories.rb +1 -0
  15. data/lib/picky/categories_indexed.rb +1 -1
  16. data/lib/picky/categories_indexing.rb +1 -3
  17. data/lib/picky/category.rb +16 -2
  18. data/lib/picky/category_indexed.rb +5 -3
  19. data/lib/picky/category_indexing.rb +0 -26
  20. data/lib/picky/category_realtime.rb +2 -0
  21. data/lib/picky/extensions/string.rb +20 -0
  22. data/lib/picky/extensions/symbol.rb +22 -0
  23. data/lib/picky/generators/similarity/double_metaphone.rb +1 -2
  24. data/lib/picky/generators/similarity/metaphone.rb +1 -2
  25. data/lib/picky/generators/similarity/phonetic.rb +0 -10
  26. data/lib/picky/generators/similarity/soundex.rb +1 -2
  27. data/lib/picky/index.rb +9 -2
  28. data/lib/picky/index_indexed.rb +4 -4
  29. data/lib/picky/index_indexing.rb +1 -5
  30. data/lib/picky/indexes_indexed.rb +7 -6
  31. data/lib/picky/indexes_indexing.rb +1 -7
  32. data/lib/picky/loader.rb +4 -1
  33. data/lib/picky/sources/couch.rb +1 -1
  34. data/lib/picky/sources/mongo.rb +1 -1
  35. data/lib/picky/wrappers/bundle/calculation.rb +1 -1
  36. data/lib/picky/wrappers/bundle/exact_partial.rb +3 -12
  37. data/lib/picky/wrappers/bundle/location.rb +1 -0
  38. data/lib/tasks/index.rake +0 -4
  39. data/spec/lib/backends/file/basic_spec.rb +5 -17
  40. data/spec/lib/backends/memory/basic_spec.rb +5 -17
  41. data/spec/lib/backends/redis/basic_spec.rb +5 -52
  42. data/spec/lib/backends/sqlite/db_spec.rb +80 -0
  43. data/spec/lib/backends/sqlite_spec.rb +131 -0
  44. data/spec/lib/category_indexed_spec.rb +2 -2
  45. data/spec/lib/category_indexing_spec.rb +0 -24
  46. data/spec/lib/extensions/string_spec.rb +16 -0
  47. data/spec/lib/extensions/symbol_spec.rb +16 -0
  48. data/spec/lib/index_indexed_spec.rb +16 -16
  49. data/spec/lib/indexes_indexed_spec.rb +13 -7
  50. data/spec/lib/indexes_indexing_spec.rb +3 -6
  51. data/spec/lib/indexing/bundle_spec.rb +6 -125
  52. data/spec/lib/sources/couch_spec.rb +8 -8
  53. data/spec/lib/sources/mongo_spec.rb +5 -5
  54. data/spec/specific/realtime_spec.rb +397 -173
  55. metadata +44 -29
  56. data/lib/picky/bundling.rb +0 -10
  57. data/lib/tasks/checks.rake +0 -13
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.4
4
+ version: 3.6.0
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-13 00:00:00.000000000 Z
12
+ date: 2011-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70194764507240 !ruby/object:Gem::Requirement
16
+ requirement: &70260908859720 !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: *70194764507240
24
+ version_requirements: *70260908859720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: picky-client
27
- requirement: &70194764520160 !ruby/object:Gem::Requirement
27
+ requirement: &70260908859220 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 3.5.4
32
+ version: 3.6.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70194764520160
35
+ version_requirements: *70260908859220
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rack
38
- requirement: &70194764515800 !ruby/object:Gem::Requirement
38
+ requirement: &70260908858800 !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: *70194764515800
46
+ version_requirements: *70260908858800
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rack_fast_escape
49
- requirement: &70194764527800 !ruby/object:Gem::Requirement
49
+ requirement: &70260908858340 !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: *70194764527800
57
+ version_requirements: *70260908858340
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: text
60
- requirement: &70194764523720 !ruby/object:Gem::Requirement
60
+ requirement: &70260908857920 !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: *70194764523720
68
+ version_requirements: *70260908857920
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yajl-ruby
71
- requirement: &70194764538580 !ruby/object:Gem::Requirement
71
+ requirement: &70260908857500 !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: *70194764538580
79
+ version_requirements: *70260908857500
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: activesupport
82
- requirement: &70194764536640 !ruby/object:Gem::Requirement
82
+ requirement: &70260908857000 !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: *70194764536640
90
+ version_requirements: *70260908857000
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: activerecord
93
- requirement: &70194764534940 !ruby/object:Gem::Requirement
93
+ requirement: &70260908856500 !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: *70194764534940
101
+ version_requirements: *70260908856500
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: unicorn
104
- requirement: &70194764534200 !ruby/object:Gem::Requirement
104
+ requirement: &70260908856120 !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: *70194764534200
112
+ version_requirements: *70260908856120
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: sinatra
115
- requirement: &70194764533260 !ruby/object:Gem::Requirement
115
+ requirement: &70260908872020 !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: *70194764533260
123
+ version_requirements: *70260908872020
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: redis
126
- requirement: &70194764532140 !ruby/object:Gem::Requirement
126
+ requirement: &70260908871600 !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: *70194764532140
134
+ version_requirements: *70260908871600
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: mysql
137
- requirement: &70194764544080 !ruby/object:Gem::Requirement
137
+ requirement: &70260908871180 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,7 +142,18 @@ dependencies:
142
142
  version: '0'
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *70194764544080
145
+ version_requirements: *70260908871180
146
+ - !ruby/object:Gem::Dependency
147
+ name: sqlite3
148
+ requirement: &70260908870760 !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ type: :runtime
155
+ prerelease: false
156
+ version_requirements: *70260908870760
146
157
  description: Fast Ruby semantic text search engine with comfortable single field interface.
147
158
  email: florian.hanke+picky@gmail.com
148
159
  executables:
@@ -174,11 +185,12 @@ files:
174
185
  - lib/picky/backends/redis/list.rb
175
186
  - lib/picky/backends/redis/string.rb
176
187
  - lib/picky/backends/redis.rb
188
+ - lib/picky/backends/sqlite/db.rb
189
+ - lib/picky/backends/sqlite.rb
177
190
  - lib/picky/bundle.rb
178
191
  - lib/picky/bundle_indexed.rb
179
192
  - lib/picky/bundle_indexing.rb
180
193
  - lib/picky/bundle_realtime.rb
181
- - lib/picky/bundling.rb
182
194
  - lib/picky/calculations/location.rb
183
195
  - lib/picky/categories.rb
184
196
  - lib/picky/categories_indexed.rb
@@ -272,7 +284,6 @@ files:
272
284
  - lib/picky.rb
273
285
  - lib/tasks/try.rb
274
286
  - lib/tasks/application.rake
275
- - lib/tasks/checks.rake
276
287
  - lib/tasks/framework.rake
277
288
  - lib/tasks/index.rake
278
289
  - lib/tasks/routes.rake
@@ -301,6 +312,8 @@ files:
301
312
  - spec/lib/backends/redis/list_spec.rb
302
313
  - spec/lib/backends/redis/string_spec.rb
303
314
  - spec/lib/backends/redis_spec.rb
315
+ - spec/lib/backends/sqlite/db_spec.rb
316
+ - spec/lib/backends/sqlite_spec.rb
304
317
  - spec/lib/bundle_spec.rb
305
318
  - spec/lib/bundling_spec.rb
306
319
  - spec/lib/calculations/location_spec.rb
@@ -427,6 +440,8 @@ test_files:
427
440
  - spec/lib/backends/redis/list_spec.rb
428
441
  - spec/lib/backends/redis/string_spec.rb
429
442
  - spec/lib/backends/redis_spec.rb
443
+ - spec/lib/backends/sqlite/db_spec.rb
444
+ - spec/lib/backends/sqlite_spec.rb
430
445
  - spec/lib/bundle_spec.rb
431
446
  - spec/lib/bundling_spec.rb
432
447
  - spec/lib/calculations/location_spec.rb
@@ -1,10 +0,0 @@
1
- # Note: Here for easy access.
2
- #
3
- # begin
4
- # require 'bundler'
5
- # rescue LoadError => e
6
- # require 'rubygems'
7
- # require 'bundler'
8
- # end
9
- # Bundler.setup PICKY_ENVIRONMENT
10
- # Bundler.require
@@ -1,13 +0,0 @@
1
- # Checks to help the user.
2
- #
3
- desc 'Checks if index files are small/missing (index, category optional).'
4
- task :check, [:index, :category] => :application do |_, options|
5
- index, category = options.index, options.category
6
-
7
- specific = Picky::Indexes
8
- specific = specific[index] if index
9
- specific = specific[category] if category
10
- specific.check
11
-
12
- puts "All checked indexes look ok."
13
- end