slingshot-rb 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.markdown +276 -50
- data/examples/rails-application-template.rb +144 -0
- data/examples/slingshot-dsl.rb +272 -102
- data/lib/slingshot.rb +13 -0
- data/lib/slingshot/client.rb +10 -1
- data/lib/slingshot/dsl.rb +17 -1
- data/lib/slingshot/index.rb +109 -7
- data/lib/slingshot/model/callbacks.rb +23 -0
- data/lib/slingshot/model/import.rb +18 -0
- data/lib/slingshot/model/indexing.rb +50 -0
- data/lib/slingshot/model/naming.rb +30 -0
- data/lib/slingshot/model/persistence.rb +34 -0
- data/lib/slingshot/model/persistence/attributes.rb +60 -0
- data/lib/slingshot/model/persistence/finders.rb +61 -0
- data/lib/slingshot/model/persistence/storage.rb +75 -0
- data/lib/slingshot/model/search.rb +97 -0
- data/lib/slingshot/results/collection.rb +35 -10
- data/lib/slingshot/results/item.rb +10 -7
- data/lib/slingshot/results/pagination.rb +30 -0
- data/lib/slingshot/rubyext/symbol.rb +11 -0
- data/lib/slingshot/search.rb +3 -2
- data/lib/slingshot/search/facet.rb +8 -6
- data/lib/slingshot/search/filter.rb +7 -8
- data/lib/slingshot/search/highlight.rb +1 -3
- data/lib/slingshot/search/query.rb +4 -0
- data/lib/slingshot/search/sort.rb +5 -0
- data/lib/slingshot/tasks.rb +88 -0
- data/lib/slingshot/version.rb +1 -1
- data/slingshot.gemspec +17 -4
- data/test/integration/active_model_searchable_test.rb +80 -0
- data/test/integration/active_record_searchable_test.rb +193 -0
- data/test/integration/highlight_test.rb +1 -1
- data/test/integration/index_mapping_test.rb +1 -1
- data/test/integration/index_store_test.rb +27 -0
- data/test/integration/persistent_model_test.rb +35 -0
- data/test/integration/query_string_test.rb +3 -3
- data/test/integration/sort_test.rb +2 -2
- data/test/models/active_model_article.rb +31 -0
- data/test/models/active_model_article_with_callbacks.rb +49 -0
- data/test/models/active_model_article_with_custom_index_name.rb +5 -0
- data/test/models/active_record_article.rb +12 -0
- data/test/models/persistent_article.rb +11 -0
- data/test/models/persistent_articles_with_custom_index_name.rb +10 -0
- data/test/models/supermodel_article.rb +22 -0
- data/test/models/validated_model.rb +11 -0
- data/test/test_helper.rb +4 -0
- data/test/unit/active_model_lint_test.rb +17 -0
- data/test/unit/client_test.rb +4 -0
- data/test/unit/configuration_test.rb +4 -0
- data/test/unit/index_test.rb +240 -17
- data/test/unit/model_callbacks_test.rb +90 -0
- data/test/unit/model_import_test.rb +71 -0
- data/test/unit/model_persistence_test.rb +400 -0
- data/test/unit/model_search_test.rb +289 -0
- data/test/unit/results_collection_test.rb +69 -7
- data/test/unit/results_item_test.rb +8 -14
- data/test/unit/rubyext_hash_test.rb +19 -0
- data/test/unit/search_facet_test.rb +25 -7
- data/test/unit/search_filter_test.rb +3 -0
- data/test/unit/search_query_test.rb +11 -0
- data/test/unit/search_sort_test.rb +8 -0
- data/test/unit/search_test.rb +14 -0
- data/test/unit/slingshot_test.rb +38 -0
- metadata +133 -26
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Slingshot
|
4
|
+
|
5
|
+
class RubyCoreExtensionsTest < Test::Unit::TestCase
|
6
|
+
|
7
|
+
context "Hash" do
|
8
|
+
|
9
|
+
should "have to_indexed_json doing the same as to_json" do
|
10
|
+
[{}, { 1 => 2 }, { 3 => 4, 5 => 6 }, { nil => [7,8,9] }].each do |h|
|
11
|
+
assert_equal Yajl::Parser.parse(h.to_json), Yajl::Parser.parse(h.to_indexed_json)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -13,35 +13,53 @@ module Slingshot::Search
|
|
13
13
|
context "generally" do
|
14
14
|
|
15
15
|
should "encode facets with defaults for current query" do
|
16
|
-
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>10} } }.to_json,
|
16
|
+
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>10,:all_terms=>false} } }.to_json,
|
17
|
+
Facet.new('foo').terms(:bar).to_json )
|
17
18
|
end
|
18
19
|
|
19
20
|
should "encode facets as global" do
|
20
|
-
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>10}, :global => true } }.to_json,
|
21
|
+
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>10,:all_terms=>false}, :global => true } }.to_json,
|
21
22
|
Facet.new('foo', :global => true).terms(:bar).to_json )
|
22
23
|
end
|
23
24
|
|
24
25
|
should "encode facet options" do
|
25
|
-
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>5} } }.to_json,
|
26
|
-
Facet.new('foo').terms(:bar, 5).to_json )
|
26
|
+
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>5,:all_terms=>false} } }.to_json,
|
27
|
+
Facet.new('foo').terms(:bar, :size => 5).to_json )
|
27
28
|
end
|
28
29
|
|
29
30
|
should "encode facets when passed as a block" do
|
30
31
|
f = Facet.new('foo') do
|
31
32
|
terms :bar
|
32
33
|
end
|
33
|
-
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>10} } }.to_json, f.to_json )
|
34
|
+
assert_equal( { :foo => { :terms => {:field=>'bar',:size=>10,:all_terms=>false} } }.to_json, f.to_json )
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
context "terms facet" do
|
40
|
+
|
41
|
+
should "encode the default all_terms option" do
|
42
|
+
assert_equal false, Facet.new('foo') { terms :foo }.to_hash['foo'][:terms][:all_terms]
|
43
|
+
end
|
44
|
+
|
45
|
+
should "encode the all_terms option" do
|
46
|
+
assert_equal true, Facet.new('foo') { terms :foo, :all_terms => true }.to_hash['foo'][:terms][:all_terms]
|
34
47
|
end
|
35
48
|
|
36
49
|
end
|
37
50
|
|
38
51
|
context "date histogram" do
|
39
52
|
|
40
|
-
should "encode the JSON" do
|
41
|
-
f = Facet.new('date') { date :published_on, 'day' }
|
53
|
+
should "encode the JSON with default values" do
|
54
|
+
f = Facet.new('date') { date :published_on, :interval => 'day' }
|
42
55
|
assert_equal({ :date => { :date_histogram => { :field => 'published_on', :interval => 'day' } } }.to_json, f.to_json)
|
43
56
|
end
|
44
57
|
|
58
|
+
should "encode the JSON with custom interval" do
|
59
|
+
f = Facet.new('date') { date :published_on, :interval => 'month' }
|
60
|
+
assert_equal({ :date => { :date_histogram => { :field => 'published_on', :interval => 'month' } } }.to_json, f.to_json)
|
61
|
+
end
|
62
|
+
|
45
63
|
end
|
46
64
|
|
47
65
|
end
|
@@ -11,6 +11,9 @@ module Slingshot::Search
|
|
11
11
|
end
|
12
12
|
|
13
13
|
should "encode simple filter declarations as JSON" do
|
14
|
+
assert_equal( { :terms => {} }.to_json,
|
15
|
+
Filter.new('terms').to_json )
|
16
|
+
|
14
17
|
assert_equal( { :terms => { :tags => ['foo'] } }.to_json,
|
15
18
|
Filter.new('terms', :tags => ['foo']).to_json )
|
16
19
|
|
@@ -10,6 +10,12 @@ module Slingshot::Search
|
|
10
10
|
assert_respond_to Query.new, :to_json
|
11
11
|
end
|
12
12
|
|
13
|
+
should "allow a block to be given" do
|
14
|
+
assert_equal( { :term => { :foo => 'bar' } }.to_json, Query.new do
|
15
|
+
term(:foo, 'bar')
|
16
|
+
end.to_json)
|
17
|
+
end
|
18
|
+
|
13
19
|
should "allow search for single term" do
|
14
20
|
assert_equal( { :term => { :foo => 'bar' } }, Query.new.term(:foo, 'bar') )
|
15
21
|
end
|
@@ -37,6 +43,11 @@ module Slingshot::Search
|
|
37
43
|
assert_equal( { :match_all => { } }, Query.new.all )
|
38
44
|
end
|
39
45
|
|
46
|
+
should "search for documents by IDs" do
|
47
|
+
assert_equal( { :ids => { :values => [1, 2], :type => 'foo' } },
|
48
|
+
Query.new.ids([1, 2], 'foo') )
|
49
|
+
end
|
50
|
+
|
40
51
|
end
|
41
52
|
|
42
53
|
end
|
@@ -35,6 +35,14 @@ module Slingshot::Search
|
|
35
35
|
assert_equal [ :foo, {:bar => 'desc'}, :_score ].to_json, s.to_json
|
36
36
|
end
|
37
37
|
|
38
|
+
should "encode fields deeper in json" do
|
39
|
+
s = Sort.new { field 'author.name' }
|
40
|
+
assert_equal [ 'author.name' ].to_json, s.to_json
|
41
|
+
|
42
|
+
s = Sort.new { field 'author.name', :desc }
|
43
|
+
assert_equal [ {'author.name' => 'desc'} ].to_json, s.to_json
|
44
|
+
end
|
45
|
+
|
38
46
|
end
|
39
47
|
|
40
48
|
end
|
data/test/unit/search_test.rb
CHANGED
@@ -15,6 +15,20 @@ module Slingshot
|
|
15
15
|
assert_respond_to Search::Search.new('index'), :query
|
16
16
|
end
|
17
17
|
|
18
|
+
should "allow to pass block to query" do
|
19
|
+
Search::Query.any_instance.expects(:instance_eval)
|
20
|
+
|
21
|
+
Search::Search.new('index').query { string 'foo' }
|
22
|
+
end
|
23
|
+
|
24
|
+
should "allow to pass block with argument to query, allowing to use local variables from outer scope" do
|
25
|
+
foo = 'bar'
|
26
|
+
query_block = lambda { |query| query.string foo }
|
27
|
+
Search::Query.any_instance.expects(:instance_eval).never
|
28
|
+
|
29
|
+
Search::Search.new('index').query &query_block
|
30
|
+
end
|
31
|
+
|
18
32
|
should "store indices as an array" do
|
19
33
|
s = Search::Search.new('index1') do;end
|
20
34
|
assert_equal ['index1'], s.indices
|
data/test/unit/slingshot_test.rb
CHANGED
@@ -9,7 +9,45 @@ module Slingshot
|
|
9
9
|
should "have the DSL methods available" do
|
10
10
|
assert_respond_to Slingshot, :search
|
11
11
|
assert_respond_to Slingshot, :index
|
12
|
+
assert_respond_to Slingshot, :configure
|
12
13
|
end
|
14
|
+
|
15
|
+
context "DSL" do
|
16
|
+
|
17
|
+
should "allow searching with a block" do
|
18
|
+
Search::Search.expects(:new).returns( stub(:perform => true) )
|
19
|
+
|
20
|
+
Slingshot.search 'dummy' do
|
21
|
+
query 'foo'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
should "allow searching with a Ruby Hash" do
|
26
|
+
Slingshot::Configuration.client.expects(:post).
|
27
|
+
with('http://localhost:9200/dummy/_search','{"query":{"query_string":{"query":"foo"}}}').
|
28
|
+
returns( stub(:body => '{}') )
|
29
|
+
Slingshot::Results::Collection.expects(:new)
|
30
|
+
|
31
|
+
Slingshot.search 'dummy', :query => { :query_string => { :query => 'foo' }}
|
32
|
+
end
|
33
|
+
|
34
|
+
should "allow searching with a JSON string" do
|
35
|
+
Slingshot::Configuration.client.expects(:post).
|
36
|
+
with('http://localhost:9200/dummy/_search','{"query":{"query_string":{"query":"foo"}}}').
|
37
|
+
returns( stub(:body => '{}') )
|
38
|
+
Slingshot::Results::Collection.expects(:new)
|
39
|
+
|
40
|
+
Slingshot.search 'dummy', '{"query":{"query_string":{"query":"foo"}}}'
|
41
|
+
end
|
42
|
+
|
43
|
+
should "raise an error when passed incorrect payload" do
|
44
|
+
assert_raise(ArgumentError) do
|
45
|
+
Slingshot.search 'dummy', 1
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
13
51
|
end
|
14
52
|
|
15
53
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slingshot-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Karel Minarik
|
@@ -15,13 +15,29 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-01 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: rake
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 63
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 8
|
33
|
+
- 0
|
34
|
+
version: 0.8.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bundler
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
25
41
|
none: false
|
26
42
|
requirements:
|
27
43
|
- - ~>
|
@@ -33,11 +49,11 @@ dependencies:
|
|
33
49
|
- 0
|
34
50
|
version: 1.0.0
|
35
51
|
type: :runtime
|
36
|
-
version_requirements: *
|
52
|
+
version_requirements: *id002
|
37
53
|
- !ruby/object:Gem::Dependency
|
38
54
|
name: rest-client
|
39
55
|
prerelease: false
|
40
|
-
requirement: &
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
57
|
none: false
|
42
58
|
requirements:
|
43
59
|
- - ~>
|
@@ -49,27 +65,43 @@ dependencies:
|
|
49
65
|
- 0
|
50
66
|
version: 1.6.0
|
51
67
|
type: :runtime
|
52
|
-
version_requirements: *
|
68
|
+
version_requirements: *id003
|
53
69
|
- !ruby/object:Gem::Dependency
|
54
70
|
name: yajl-ruby
|
55
71
|
prerelease: false
|
56
|
-
requirement: &
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
57
73
|
none: false
|
58
74
|
requirements:
|
59
75
|
- - ">"
|
60
76
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
77
|
+
hash: 63
|
62
78
|
segments:
|
63
79
|
- 0
|
64
|
-
-
|
65
|
-
-
|
66
|
-
version: 0.
|
80
|
+
- 8
|
81
|
+
- 0
|
82
|
+
version: 0.8.0
|
67
83
|
type: :runtime
|
68
|
-
version_requirements: *
|
84
|
+
version_requirements: *id004
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: activemodel
|
87
|
+
prerelease: false
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ">"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 7
|
94
|
+
segments:
|
95
|
+
- 3
|
96
|
+
- 0
|
97
|
+
- 0
|
98
|
+
version: 3.0.0
|
99
|
+
type: :runtime
|
100
|
+
version_requirements: *id005
|
69
101
|
- !ruby/object:Gem::Dependency
|
70
102
|
name: turn
|
71
103
|
prerelease: false
|
72
|
-
requirement: &
|
104
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
73
105
|
none: false
|
74
106
|
requirements:
|
75
107
|
- - ">="
|
@@ -79,11 +111,11 @@ dependencies:
|
|
79
111
|
- 0
|
80
112
|
version: "0"
|
81
113
|
type: :development
|
82
|
-
version_requirements: *
|
114
|
+
version_requirements: *id006
|
83
115
|
- !ruby/object:Gem::Dependency
|
84
116
|
name: shoulda
|
85
117
|
prerelease: false
|
86
|
-
requirement: &
|
118
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
87
119
|
none: false
|
88
120
|
requirements:
|
89
121
|
- - ">="
|
@@ -93,11 +125,11 @@ dependencies:
|
|
93
125
|
- 0
|
94
126
|
version: "0"
|
95
127
|
type: :development
|
96
|
-
version_requirements: *
|
128
|
+
version_requirements: *id007
|
97
129
|
- !ruby/object:Gem::Dependency
|
98
130
|
name: mocha
|
99
131
|
prerelease: false
|
100
|
-
requirement: &
|
132
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
101
133
|
none: false
|
102
134
|
requirements:
|
103
135
|
- - ">="
|
@@ -107,11 +139,11 @@ dependencies:
|
|
107
139
|
- 0
|
108
140
|
version: "0"
|
109
141
|
type: :development
|
110
|
-
version_requirements: *
|
142
|
+
version_requirements: *id008
|
111
143
|
- !ruby/object:Gem::Dependency
|
112
144
|
name: sdoc
|
113
145
|
prerelease: false
|
114
|
-
requirement: &
|
146
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
115
147
|
none: false
|
116
148
|
requirements:
|
117
149
|
- - ">="
|
@@ -121,11 +153,11 @@ dependencies:
|
|
121
153
|
- 0
|
122
154
|
version: "0"
|
123
155
|
type: :development
|
124
|
-
version_requirements: *
|
156
|
+
version_requirements: *id009
|
125
157
|
- !ruby/object:Gem::Dependency
|
126
158
|
name: rcov
|
127
159
|
prerelease: false
|
128
|
-
requirement: &
|
160
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
129
161
|
none: false
|
130
162
|
requirements:
|
131
163
|
- - ">="
|
@@ -135,8 +167,36 @@ dependencies:
|
|
135
167
|
- 0
|
136
168
|
version: "0"
|
137
169
|
type: :development
|
138
|
-
version_requirements: *
|
139
|
-
|
170
|
+
version_requirements: *id010
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: activerecord
|
173
|
+
prerelease: false
|
174
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
175
|
+
none: false
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
hash: 3
|
180
|
+
segments:
|
181
|
+
- 0
|
182
|
+
version: "0"
|
183
|
+
type: :development
|
184
|
+
version_requirements: *id011
|
185
|
+
- !ruby/object:Gem::Dependency
|
186
|
+
name: supermodel
|
187
|
+
prerelease: false
|
188
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
189
|
+
none: false
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
hash: 3
|
194
|
+
segments:
|
195
|
+
- 0
|
196
|
+
version: "0"
|
197
|
+
type: :development
|
198
|
+
version_requirements: *id012
|
199
|
+
description: " Slingshot is a Ruby client for the ElasticSearch search engine/database.\n\n It provides Ruby-like API for fluent communication with the ElasticSearch server\n and blends with ActiveModel class for convenient usage in Rails applications.\n\n It allows to delete and create indices, define mapping for them, supports\n the bulk API, and presents an easy-to-use DSL for constructing your queries.\n\n It has full ActiveRecord/ActiveModel compatibility, allowing you to index\n your models (incrementally upon saving, or in bulk), searching and\n paginating the results.\n"
|
140
200
|
email: karmi@karmi.cz
|
141
201
|
executables: []
|
142
202
|
|
@@ -152,6 +212,7 @@ files:
|
|
152
212
|
- README.markdown
|
153
213
|
- Rakefile
|
154
214
|
- examples/dsl.rb
|
215
|
+
- examples/rails-application-template.rb
|
155
216
|
- examples/slingshot-dsl.rb
|
156
217
|
- lib/slingshot-rb.rb
|
157
218
|
- lib/slingshot.rb
|
@@ -160,15 +221,27 @@ files:
|
|
160
221
|
- lib/slingshot/dsl.rb
|
161
222
|
- lib/slingshot/index.rb
|
162
223
|
- lib/slingshot/logger.rb
|
224
|
+
- lib/slingshot/model/callbacks.rb
|
225
|
+
- lib/slingshot/model/import.rb
|
226
|
+
- lib/slingshot/model/indexing.rb
|
227
|
+
- lib/slingshot/model/naming.rb
|
228
|
+
- lib/slingshot/model/persistence.rb
|
229
|
+
- lib/slingshot/model/persistence/attributes.rb
|
230
|
+
- lib/slingshot/model/persistence/finders.rb
|
231
|
+
- lib/slingshot/model/persistence/storage.rb
|
232
|
+
- lib/slingshot/model/search.rb
|
163
233
|
- lib/slingshot/results/collection.rb
|
164
234
|
- lib/slingshot/results/item.rb
|
235
|
+
- lib/slingshot/results/pagination.rb
|
165
236
|
- lib/slingshot/rubyext/hash.rb
|
237
|
+
- lib/slingshot/rubyext/symbol.rb
|
166
238
|
- lib/slingshot/search.rb
|
167
239
|
- lib/slingshot/search/facet.rb
|
168
240
|
- lib/slingshot/search/filter.rb
|
169
241
|
- lib/slingshot/search/highlight.rb
|
170
242
|
- lib/slingshot/search/query.rb
|
171
243
|
- lib/slingshot/search/sort.rb
|
244
|
+
- lib/slingshot/tasks.rb
|
172
245
|
- lib/slingshot/version.rb
|
173
246
|
- slingshot.gemspec
|
174
247
|
- slingshot.png
|
@@ -177,22 +250,39 @@ files:
|
|
177
250
|
- test/fixtures/articles/3.json
|
178
251
|
- test/fixtures/articles/4.json
|
179
252
|
- test/fixtures/articles/5.json
|
253
|
+
- test/integration/active_model_searchable_test.rb
|
254
|
+
- test/integration/active_record_searchable_test.rb
|
180
255
|
- test/integration/facets_test.rb
|
181
256
|
- test/integration/filters_test.rb
|
182
257
|
- test/integration/highlight_test.rb
|
183
258
|
- test/integration/index_mapping_test.rb
|
184
259
|
- test/integration/index_store_test.rb
|
260
|
+
- test/integration/persistent_model_test.rb
|
185
261
|
- test/integration/query_string_test.rb
|
186
262
|
- test/integration/results_test.rb
|
187
263
|
- test/integration/sort_test.rb
|
264
|
+
- test/models/active_model_article.rb
|
265
|
+
- test/models/active_model_article_with_callbacks.rb
|
266
|
+
- test/models/active_model_article_with_custom_index_name.rb
|
267
|
+
- test/models/active_record_article.rb
|
188
268
|
- test/models/article.rb
|
269
|
+
- test/models/persistent_article.rb
|
270
|
+
- test/models/persistent_articles_with_custom_index_name.rb
|
271
|
+
- test/models/supermodel_article.rb
|
272
|
+
- test/models/validated_model.rb
|
189
273
|
- test/test_helper.rb
|
274
|
+
- test/unit/active_model_lint_test.rb
|
190
275
|
- test/unit/client_test.rb
|
191
276
|
- test/unit/configuration_test.rb
|
192
277
|
- test/unit/index_test.rb
|
193
278
|
- test/unit/logger_test.rb
|
279
|
+
- test/unit/model_callbacks_test.rb
|
280
|
+
- test/unit/model_import_test.rb
|
281
|
+
- test/unit/model_persistence_test.rb
|
282
|
+
- test/unit/model_search_test.rb
|
194
283
|
- test/unit/results_collection_test.rb
|
195
284
|
- test/unit/results_item_test.rb
|
285
|
+
- test/unit/rubyext_hash_test.rb
|
196
286
|
- test/unit/search_facet_test.rb
|
197
287
|
- test/unit/search_filter_test.rb
|
198
288
|
- test/unit/search_highlight_test.rb
|
@@ -235,29 +325,46 @@ rubyforge_project: slingshot
|
|
235
325
|
rubygems_version: 1.5.0
|
236
326
|
signing_key:
|
237
327
|
specification_version: 3
|
238
|
-
summary: Ruby
|
328
|
+
summary: Ruby client for ElasticSearch
|
239
329
|
test_files:
|
240
330
|
- test/fixtures/articles/1.json
|
241
331
|
- test/fixtures/articles/2.json
|
242
332
|
- test/fixtures/articles/3.json
|
243
333
|
- test/fixtures/articles/4.json
|
244
334
|
- test/fixtures/articles/5.json
|
335
|
+
- test/integration/active_model_searchable_test.rb
|
336
|
+
- test/integration/active_record_searchable_test.rb
|
245
337
|
- test/integration/facets_test.rb
|
246
338
|
- test/integration/filters_test.rb
|
247
339
|
- test/integration/highlight_test.rb
|
248
340
|
- test/integration/index_mapping_test.rb
|
249
341
|
- test/integration/index_store_test.rb
|
342
|
+
- test/integration/persistent_model_test.rb
|
250
343
|
- test/integration/query_string_test.rb
|
251
344
|
- test/integration/results_test.rb
|
252
345
|
- test/integration/sort_test.rb
|
346
|
+
- test/models/active_model_article.rb
|
347
|
+
- test/models/active_model_article_with_callbacks.rb
|
348
|
+
- test/models/active_model_article_with_custom_index_name.rb
|
349
|
+
- test/models/active_record_article.rb
|
253
350
|
- test/models/article.rb
|
351
|
+
- test/models/persistent_article.rb
|
352
|
+
- test/models/persistent_articles_with_custom_index_name.rb
|
353
|
+
- test/models/supermodel_article.rb
|
354
|
+
- test/models/validated_model.rb
|
254
355
|
- test/test_helper.rb
|
356
|
+
- test/unit/active_model_lint_test.rb
|
255
357
|
- test/unit/client_test.rb
|
256
358
|
- test/unit/configuration_test.rb
|
257
359
|
- test/unit/index_test.rb
|
258
360
|
- test/unit/logger_test.rb
|
361
|
+
- test/unit/model_callbacks_test.rb
|
362
|
+
- test/unit/model_import_test.rb
|
363
|
+
- test/unit/model_persistence_test.rb
|
364
|
+
- test/unit/model_search_test.rb
|
259
365
|
- test/unit/results_collection_test.rb
|
260
366
|
- test/unit/results_item_test.rb
|
367
|
+
- test/unit/rubyext_hash_test.rb
|
261
368
|
- test/unit/search_facet_test.rb
|
262
369
|
- test/unit/search_filter_test.rb
|
263
370
|
- test/unit/search_highlight_test.rb
|