ssickles-tire 0.4.2.7 → 0.4.3

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.
Files changed (59) hide show
  1. data/lib/tire.rb +18 -3
  2. data/lib/tire/alias.rb +11 -35
  3. data/lib/tire/index.rb +34 -76
  4. data/lib/tire/model/callbacks.rb +40 -0
  5. data/lib/tire/model/import.rb +26 -0
  6. data/lib/tire/model/indexing.rb +128 -0
  7. data/lib/tire/model/naming.rb +100 -0
  8. data/lib/tire/model/percolate.rb +99 -0
  9. data/lib/tire/model/persistence.rb +72 -0
  10. data/lib/tire/model/persistence/attributes.rb +143 -0
  11. data/lib/tire/model/persistence/finders.rb +66 -0
  12. data/lib/tire/model/persistence/storage.rb +71 -0
  13. data/lib/tire/model/search.rb +305 -0
  14. data/lib/tire/results/collection.rb +38 -13
  15. data/lib/tire/results/item.rb +19 -0
  16. data/lib/tire/rubyext/hash.rb +8 -0
  17. data/lib/tire/rubyext/ruby_1_8.rb +54 -0
  18. data/lib/tire/rubyext/symbol.rb +11 -0
  19. data/lib/tire/search.rb +7 -8
  20. data/lib/tire/search/scan.rb +8 -8
  21. data/lib/tire/search/sort.rb +1 -1
  22. data/lib/tire/utils.rb +17 -0
  23. data/lib/tire/version.rb +7 -38
  24. data/test/integration/active_model_indexing_test.rb +51 -0
  25. data/test/integration/active_model_searchable_test.rb +114 -0
  26. data/test/integration/active_record_searchable_test.rb +446 -0
  27. data/test/integration/mongoid_searchable_test.rb +309 -0
  28. data/test/integration/persistent_model_test.rb +117 -0
  29. data/test/integration/reindex_test.rb +2 -2
  30. data/test/integration/scan_test.rb +1 -1
  31. data/test/models/active_model_article.rb +31 -0
  32. data/test/models/active_model_article_with_callbacks.rb +49 -0
  33. data/test/models/active_model_article_with_custom_document_type.rb +7 -0
  34. data/test/models/active_model_article_with_custom_index_name.rb +7 -0
  35. data/test/models/active_record_models.rb +122 -0
  36. data/test/models/mongoid_models.rb +97 -0
  37. data/test/models/persistent_article.rb +11 -0
  38. data/test/models/persistent_article_in_namespace.rb +12 -0
  39. data/test/models/persistent_article_with_casting.rb +28 -0
  40. data/test/models/persistent_article_with_defaults.rb +11 -0
  41. data/test/models/persistent_articles_with_custom_index_name.rb +10 -0
  42. data/test/models/supermodel_article.rb +17 -0
  43. data/test/models/validated_model.rb +11 -0
  44. data/test/test_helper.rb +27 -3
  45. data/test/unit/active_model_lint_test.rb +17 -0
  46. data/test/unit/index_alias_test.rb +3 -17
  47. data/test/unit/index_test.rb +30 -18
  48. data/test/unit/model_callbacks_test.rb +116 -0
  49. data/test/unit/model_import_test.rb +71 -0
  50. data/test/unit/model_persistence_test.rb +516 -0
  51. data/test/unit/model_search_test.rb +899 -0
  52. data/test/unit/results_collection_test.rb +60 -0
  53. data/test/unit/results_item_test.rb +37 -0
  54. data/test/unit/rubyext_test.rb +3 -3
  55. data/test/unit/search_test.rb +1 -6
  56. data/test/unit/tire_test.rb +15 -0
  57. data/tire.gemspec +30 -13
  58. metadata +153 -41
  59. data/lib/tire/rubyext/to_json.rb +0 -21
@@ -214,6 +214,66 @@ module Tire
214
214
 
215
215
  end
216
216
 
217
+ context "with eager loading" do
218
+ setup do
219
+ @response = { 'hits' => { 'hits' => [ {'_id' => 1, '_type' => 'active_record_article'},
220
+ {'_id' => 2, '_type' => 'active_record_article'},
221
+ {'_id' => 3, '_type' => 'active_record_article'}] } }
222
+ ActiveRecordArticle.stubs(:inspect).returns("<ActiveRecordArticle>")
223
+ end
224
+
225
+ should "load the records via model find method from database" do
226
+ ActiveRecordArticle.expects(:find).with([1,2,3]).
227
+ returns([ Results::Item.new(:id => 3),
228
+ Results::Item.new(:id => 1),
229
+ Results::Item.new(:id => 2) ])
230
+ Results::Collection.new(@response, :load => true).results
231
+ end
232
+
233
+ should "pass the :load option Hash to model find metod" do
234
+ ActiveRecordArticle.expects(:find).with([1,2,3], :include => 'comments').
235
+ returns([ Results::Item.new(:id => 3),
236
+ Results::Item.new(:id => 1),
237
+ Results::Item.new(:id => 2) ])
238
+ Results::Collection.new(@response, :load => { :include => 'comments' }).results
239
+ end
240
+
241
+ should "preserve the order of records returned from search" do
242
+ ActiveRecordArticle.expects(:find).with([1,2,3]).
243
+ returns([ Results::Item.new(:id => 3),
244
+ Results::Item.new(:id => 1),
245
+ Results::Item.new(:id => 2) ])
246
+ assert_equal [1,2,3], Results::Collection.new(@response, :load => true).results.map(&:id)
247
+ end
248
+
249
+ should "raise error when model class cannot be inferred from _type" do
250
+ assert_raise(NameError) do
251
+ response = { 'hits' => { 'hits' => [ {'_id' => 1, '_type' => 'hic_sunt_leones'}] } }
252
+ Results::Collection.new(response, :load => true).results
253
+ end
254
+ end
255
+
256
+ should "raise error when _type is missing" do
257
+ assert_raise(NoMethodError) do
258
+ response = { 'hits' => { 'hits' => [ {'_id' => 1}] } }
259
+ Results::Collection.new(response, :load => true).results
260
+ end
261
+ end
262
+
263
+ should "return empty array for empty hits" do
264
+ response = { 'hits' => {
265
+ 'hits' => [],
266
+ 'total' => 4
267
+ },
268
+ 'took' => 1 }
269
+ @collection = Results::Collection.new( response, :load => true )
270
+ assert @collection.empty?, 'Collection should be empty'
271
+ assert @collection.results.empty?, 'Collection results should be empty'
272
+ assert_equal 0, @collection.size
273
+ end
274
+
275
+ end
276
+
217
277
  end
218
278
 
219
279
  end
@@ -10,6 +10,7 @@ module Tire
10
10
  begin; Object.send(:remove_const, :Rails); rescue; end
11
11
  @model = Results::Item.new :title => 'Test'
12
12
  end
13
+ include ActiveModel::Lint::Tests
13
14
 
14
15
  context "Item" do
15
16
 
@@ -111,6 +112,42 @@ module Tire
111
112
  assert_match /<Item title|Item author/, @document.inspect
112
113
  end
113
114
 
115
+ context "within Rails" do
116
+
117
+ setup do
118
+ module ::Rails
119
+ end
120
+
121
+ class ::FakeRailsModel
122
+ extend ActiveModel::Naming
123
+ include ActiveModel::Conversion
124
+ def self.find(id, options); new; end
125
+ end
126
+
127
+ @document = Results::Item.new :id => 1, :_type => 'fake_rails_model', :title => 'Test'
128
+ end
129
+
130
+ should "be an instance of model, based on _type" do
131
+ assert_equal FakeRailsModel, @document.class
132
+ end
133
+
134
+ should "be inspectable with masquerade" do
135
+ assert_match /<Item \(FakeRailsModel\)/, @document.inspect
136
+ end
137
+
138
+ should "return proper singular and plural forms" do
139
+ assert_equal 'fake_rails_model', ActiveModel::Naming.singular(@document)
140
+ assert_equal 'fake_rails_models', ActiveModel::Naming.plural(@document)
141
+ end
142
+
143
+ should "instantiate itself for deep hashes, not a Ruby class corresponding to type" do
144
+ document = Results::Item.new :_type => 'my_model', :title => 'Test', :author => { :name => 'John' }
145
+
146
+ assert_equal Tire::Results::Item, document.class
147
+ end
148
+
149
+ end
150
+
114
151
  end
115
152
 
116
153
  end
@@ -13,7 +13,7 @@ module Tire
13
13
  # Undefine the `to_json` method...
14
14
  ::Hash.class_eval { remove_method(:to_json) rescue nil }
15
15
  # ... and reload the extension, so it's added
16
- load 'tire/rubyext/to_json.rb'
16
+ load 'tire/rubyext/hash.rb'
17
17
  end
18
18
 
19
19
  should "have its own to_json method" do
@@ -41,8 +41,8 @@ module Tire
41
41
  end
42
42
 
43
43
  should "properly serialize Time into JSON" do
44
- json = { :time => Time.mktime(2011, 01, 01, 11, 00) }.to_json
45
- assert_match %r/\{\s*"time"\s*:\s*"2011-01-01T11:00:00.*?"\}/, json
44
+ json = { :time => Time.mktime(2011, 01, 01, 11, 00).to_json }.to_json
45
+ assert_match /"2011-01-01T11:00:00.*"/, MultiJson.decode(json)['time']
46
46
  end
47
47
 
48
48
  end
@@ -27,11 +27,6 @@ module Tire
27
27
  assert_match %r|localhost:9200/_search|, s.url
28
28
  end
29
29
 
30
- should "be initialized with a base URL" do
31
- s = Search::Search.new('index', :url => 'http://example.com:9200') { query { string 'foo' } }
32
- assert_equal 'http://example.com:9200/index/_search', s.url
33
- end
34
-
35
30
  should "allow to limit results with document type" do
36
31
  s = Search::Search.new('index', :type => 'bar') do
37
32
  query { string 'foo' }
@@ -203,7 +198,7 @@ module Tire
203
198
 
204
199
  should "allow to set the server url" do
205
200
  search = Search::Search.new('indexA')
206
- search.url ='http://es1.example.com'
201
+ Configuration.url 'http://es1.example.com'
207
202
 
208
203
  Configuration.client.
209
204
  expects(:get).
@@ -104,6 +104,21 @@ module Tire
104
104
 
105
105
  end
106
106
 
107
+ context "utils" do
108
+
109
+ should "encode a string for URL" do
110
+ assert_equal 'foo+bar', Utils.escape('foo bar')
111
+ assert_equal 'foo%2Fbar', Utils.escape('foo/bar')
112
+ assert_equal 'foo%21', Utils.escape('foo!')
113
+ end
114
+
115
+ should "encode a string from URL" do
116
+ assert_equal 'foo bar', Utils.unescape('foo+bar')
117
+ assert_equal 'foo/bar', Utils.unescape('foo%2Fbar')
118
+ assert_equal 'foo!', Utils.unescape('foo%21')
119
+ end
120
+
121
+ end
107
122
  end
108
123
 
109
124
  end
data/tire.gemspec CHANGED
@@ -1,21 +1,21 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.unshift File.expand_path("../lib", __FILE__)
2
+ $:.push File.expand_path("../lib", __FILE__)
3
3
  require "tire/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "ssickles-tire"
7
7
  s.version = Tire::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.summary = "Ruby client for ElasticSearch"
10
- s.homepage = "http://github.com/karmi/tire"
11
- s.authors = [ 'Scott Sickles' ]
12
- s.email = 'scottsickles@gmail.com'
9
+ s.summary = "Ruby client for ElasticSearch"
10
+ s.homepage = "http://github.com/karmi/tire"
11
+ s.authors = [ 'Scott Sickles' ]
12
+ s.email = 'scottsickles@gmail.com'
13
13
 
14
14
  s.rubyforge_project = "tire"
15
15
 
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
 
20
20
  s.require_paths = ["lib"]
21
21
 
@@ -27,11 +27,11 @@ Gem::Specification.new do |s|
27
27
  # = Library dependencies
28
28
  #
29
29
  s.add_dependency "rake"
30
- s.add_dependency "rest-client", "~> 1.6"
31
- s.add_dependency "multi_json", "~> 1.0"
32
- s.add_dependency "hashr", "~> 0.0.19"
33
- s.add_dependency "activesupport", ">= 2.3"
34
- s.add_dependency "escape_utils", "~> 0.3.1"
30
+ s.add_dependency "rest-client", "~> 1.6"
31
+ s.add_dependency "multi_json", "~> 1.0"
32
+ #s.add_dependency "activemodel", ">= 3.0"
33
+ s.add_dependency "hashr", "~> 0.0.19"
34
+ #s.add_dependency "rack", ">= 1.4" if defined?(RUBY_VERSION) && RUBY_VERSION < '1.9'
35
35
 
36
36
  # = Development dependencies
37
37
  #
@@ -39,7 +39,11 @@ Gem::Specification.new do |s|
39
39
  s.add_development_dependency "yajl-ruby", "~> 1.0"
40
40
  s.add_development_dependency "shoulda"
41
41
  s.add_development_dependency "mocha"
42
+ s.add_development_dependency "activerecord", ">= 3.0"
43
+ s.add_development_dependency "sqlite3"
44
+ s.add_development_dependency "mongoid", "~> 2.2"
42
45
  s.add_development_dependency "bson_ext"
46
+ s.add_development_dependency "redis-persistence"
43
47
  s.add_development_dependency "curb"
44
48
  s.add_development_dependency "minitest"
45
49
 
@@ -65,4 +69,17 @@ Gem::Specification.new do |s|
65
69
 
66
70
  Please check the documentation at <http://karmi.github.com/tire/>.
67
71
  DESC
72
+
73
+ s.post_install_message =<<-CHANGELOG.gsub(/^ /, '')
74
+ ================================================================================
75
+
76
+ Please check the documentation at <http://karmi.github.com/tire/>.
77
+
78
+ --------------------------------------------------------------------------------
79
+
80
+ #{Tire::CHANGELOG}
81
+ See the full changelog at <http://github.com/karmi/tire/commits/v#{Tire::VERSION}>.
82
+
83
+ --------------------------------------------------------------------------------
84
+ CHANGELOG
68
85
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssickles-tire
3
3
  version: !ruby/object:Gem::Version
4
- hash: 105
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- - 7
11
- version: 0.4.2.7
9
+ - 3
10
+ version: 0.4.3
12
11
  platform: ruby
13
12
  authors:
14
13
  - Scott Sickles
@@ -79,82 +78,80 @@ dependencies:
79
78
  type: :runtime
80
79
  version_requirements: *id004
81
80
  - !ruby/object:Gem::Dependency
82
- name: activesupport
81
+ name: bundler
83
82
  prerelease: false
84
83
  requirement: &id005 !ruby/object:Gem::Requirement
85
84
  none: false
86
85
  requirements:
87
- - - ">="
86
+ - - ~>
88
87
  - !ruby/object:Gem::Version
89
- hash: 5
88
+ hash: 15
90
89
  segments:
91
- - 2
92
- - 3
93
- version: "2.3"
94
- type: :runtime
90
+ - 1
91
+ - 0
92
+ version: "1.0"
93
+ type: :development
95
94
  version_requirements: *id005
96
95
  - !ruby/object:Gem::Dependency
97
- name: escape_utils
96
+ name: yajl-ruby
98
97
  prerelease: false
99
98
  requirement: &id006 !ruby/object:Gem::Requirement
100
99
  none: false
101
100
  requirements:
102
101
  - - ~>
103
102
  - !ruby/object:Gem::Version
104
- hash: 17
103
+ hash: 15
105
104
  segments:
106
- - 0
107
- - 3
108
105
  - 1
109
- version: 0.3.1
110
- type: :runtime
106
+ - 0
107
+ version: "1.0"
108
+ type: :development
111
109
  version_requirements: *id006
112
110
  - !ruby/object:Gem::Dependency
113
- name: bundler
111
+ name: shoulda
114
112
  prerelease: false
115
113
  requirement: &id007 !ruby/object:Gem::Requirement
116
114
  none: false
117
115
  requirements:
118
- - - ~>
116
+ - - ">="
119
117
  - !ruby/object:Gem::Version
120
- hash: 15
118
+ hash: 3
121
119
  segments:
122
- - 1
123
120
  - 0
124
- version: "1.0"
121
+ version: "0"
125
122
  type: :development
126
123
  version_requirements: *id007
127
124
  - !ruby/object:Gem::Dependency
128
- name: yajl-ruby
125
+ name: mocha
129
126
  prerelease: false
130
127
  requirement: &id008 !ruby/object:Gem::Requirement
131
128
  none: false
132
129
  requirements:
133
- - - ~>
130
+ - - ">="
134
131
  - !ruby/object:Gem::Version
135
- hash: 15
132
+ hash: 3
136
133
  segments:
137
- - 1
138
134
  - 0
139
- version: "1.0"
135
+ version: "0"
140
136
  type: :development
141
137
  version_requirements: *id008
142
138
  - !ruby/object:Gem::Dependency
143
- name: shoulda
139
+ name: activerecord
144
140
  prerelease: false
145
141
  requirement: &id009 !ruby/object:Gem::Requirement
146
142
  none: false
147
143
  requirements:
148
144
  - - ">="
149
145
  - !ruby/object:Gem::Version
150
- hash: 3
146
+ hash: 7
151
147
  segments:
148
+ - 3
152
149
  - 0
153
- version: "0"
150
+ version: "3.0"
154
151
  type: :development
155
152
  version_requirements: *id009
156
153
  - !ruby/object:Gem::Dependency
157
- name: mocha
154
+ name: sqlite3
158
155
  prerelease: false
159
156
  requirement: &id010 !ruby/object:Gem::Requirement
160
157
  none: false
@@ -168,21 +165,22 @@ dependencies:
168
165
  type: :development
169
166
  version_requirements: *id010
170
167
  - !ruby/object:Gem::Dependency
171
- name: bson_ext
168
+ name: mongoid
172
169
  prerelease: false
173
170
  requirement: &id011 !ruby/object:Gem::Requirement
174
171
  none: false
175
172
  requirements:
176
- - - ">="
173
+ - - ~>
177
174
  - !ruby/object:Gem::Version
178
- hash: 3
175
+ hash: 7
179
176
  segments:
180
- - 0
181
- version: "0"
177
+ - 2
178
+ - 2
179
+ version: "2.2"
182
180
  type: :development
183
181
  version_requirements: *id011
184
182
  - !ruby/object:Gem::Dependency
185
- name: curb
183
+ name: bson_ext
186
184
  prerelease: false
187
185
  requirement: &id012 !ruby/object:Gem::Requirement
188
186
  none: false
@@ -196,7 +194,7 @@ dependencies:
196
194
  type: :development
197
195
  version_requirements: *id012
198
196
  - !ruby/object:Gem::Dependency
199
- name: minitest
197
+ name: redis-persistence
200
198
  prerelease: false
201
199
  requirement: &id013 !ruby/object:Gem::Requirement
202
200
  none: false
@@ -210,7 +208,7 @@ dependencies:
210
208
  type: :development
211
209
  version_requirements: *id013
212
210
  - !ruby/object:Gem::Dependency
213
- name: rdoc
211
+ name: curb
214
212
  prerelease: false
215
213
  requirement: &id014 !ruby/object:Gem::Requirement
216
214
  none: false
@@ -223,6 +221,34 @@ dependencies:
223
221
  version: "0"
224
222
  type: :development
225
223
  version_requirements: *id014
224
+ - !ruby/object:Gem::Dependency
225
+ name: minitest
226
+ prerelease: false
227
+ requirement: &id015 !ruby/object:Gem::Requirement
228
+ none: false
229
+ requirements:
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ hash: 3
233
+ segments:
234
+ - 0
235
+ version: "0"
236
+ type: :development
237
+ version_requirements: *id015
238
+ - !ruby/object:Gem::Dependency
239
+ name: rdoc
240
+ prerelease: false
241
+ requirement: &id016 !ruby/object:Gem::Requirement
242
+ none: false
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ hash: 3
247
+ segments:
248
+ - 0
249
+ version: "0"
250
+ type: :development
251
+ version_requirements: *id016
226
252
  description: " Tire 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\n Please check the documentation at <http://karmi.github.com/tire/>.\n"
227
253
  email: scottsickles@gmail.com
228
254
  executables: []
@@ -250,10 +276,22 @@ files:
250
276
  - lib/tire/http/response.rb
251
277
  - lib/tire/index.rb
252
278
  - lib/tire/logger.rb
279
+ - lib/tire/model/callbacks.rb
280
+ - lib/tire/model/import.rb
281
+ - lib/tire/model/indexing.rb
282
+ - lib/tire/model/naming.rb
283
+ - lib/tire/model/percolate.rb
284
+ - lib/tire/model/persistence.rb
285
+ - lib/tire/model/persistence/attributes.rb
286
+ - lib/tire/model/persistence/finders.rb
287
+ - lib/tire/model/persistence/storage.rb
288
+ - lib/tire/model/search.rb
253
289
  - lib/tire/results/collection.rb
254
290
  - lib/tire/results/item.rb
255
291
  - lib/tire/results/pagination.rb
256
- - lib/tire/rubyext/to_json.rb
292
+ - lib/tire/rubyext/hash.rb
293
+ - lib/tire/rubyext/ruby_1_8.rb
294
+ - lib/tire/rubyext/symbol.rb
257
295
  - lib/tire/search.rb
258
296
  - lib/tire/search/facet.rb
259
297
  - lib/tire/search/filter.rb
@@ -262,12 +300,16 @@ files:
262
300
  - lib/tire/search/scan.rb
263
301
  - lib/tire/search/sort.rb
264
302
  - lib/tire/tasks.rb
303
+ - lib/tire/utils.rb
265
304
  - lib/tire/version.rb
266
305
  - test/fixtures/articles/1.json
267
306
  - test/fixtures/articles/2.json
268
307
  - test/fixtures/articles/3.json
269
308
  - test/fixtures/articles/4.json
270
309
  - test/fixtures/articles/5.json
310
+ - test/integration/active_model_indexing_test.rb
311
+ - test/integration/active_model_searchable_test.rb
312
+ - test/integration/active_record_searchable_test.rb
271
313
  - test/integration/boolean_queries_test.rb
272
314
  - test/integration/count_test.rb
273
315
  - test/integration/custom_score_queries_test.rb
@@ -281,7 +323,9 @@ files:
281
323
  - test/integration/index_aliases_test.rb
282
324
  - test/integration/index_mapping_test.rb
283
325
  - test/integration/index_store_test.rb
326
+ - test/integration/mongoid_searchable_test.rb
284
327
  - test/integration/percolator_test.rb
328
+ - test/integration/persistent_model_test.rb
285
329
  - test/integration/query_return_version_test.rb
286
330
  - test/integration/query_string_test.rb
287
331
  - test/integration/range_queries_test.rb
@@ -290,14 +334,32 @@ files:
290
334
  - test/integration/scan_test.rb
291
335
  - test/integration/sort_test.rb
292
336
  - test/integration/text_query_test.rb
337
+ - test/models/active_model_article.rb
338
+ - test/models/active_model_article_with_callbacks.rb
339
+ - test/models/active_model_article_with_custom_document_type.rb
340
+ - test/models/active_model_article_with_custom_index_name.rb
341
+ - test/models/active_record_models.rb
293
342
  - test/models/article.rb
343
+ - test/models/mongoid_models.rb
344
+ - test/models/persistent_article.rb
345
+ - test/models/persistent_article_in_namespace.rb
346
+ - test/models/persistent_article_with_casting.rb
347
+ - test/models/persistent_article_with_defaults.rb
348
+ - test/models/persistent_articles_with_custom_index_name.rb
349
+ - test/models/supermodel_article.rb
350
+ - test/models/validated_model.rb
294
351
  - test/test_helper.rb
352
+ - test/unit/active_model_lint_test.rb
295
353
  - test/unit/configuration_test.rb
296
354
  - test/unit/http_client_test.rb
297
355
  - test/unit/http_response_test.rb
298
356
  - test/unit/index_alias_test.rb
299
357
  - test/unit/index_test.rb
300
358
  - test/unit/logger_test.rb
359
+ - test/unit/model_callbacks_test.rb
360
+ - test/unit/model_import_test.rb
361
+ - test/unit/model_persistence_test.rb
362
+ - test/unit/model_search_test.rb
301
363
  - test/unit/results_collection_test.rb
302
364
  - test/unit/results_item_test.rb
303
365
  - test/unit/rubyext_test.rb
@@ -313,7 +375,34 @@ files:
313
375
  homepage: http://github.com/karmi/tire
314
376
  licenses: []
315
377
 
316
- post_install_message:
378
+ post_install_message: |
379
+ ================================================================================
380
+
381
+ Please check the documentation at <http://karmi.github.com/tire/>.
382
+
383
+ --------------------------------------------------------------------------------
384
+
385
+ IMPORTANT CHANGES LATELY:
386
+
387
+ Version 0.4.1
388
+ -------------
389
+ * Added a Index#settings method to retrieve index settings as a Hash
390
+ * Added support for the "scan" search in the Ruby API
391
+ * Added support for reindexing the index documents into new index
392
+ * Added basic support for index aliases
393
+ * Changed, that Index#bulk_store runs against an index endpoint, not against `/_bulk`
394
+ * Refactorings, fixes, Ruby 1.8 compatibility
395
+
396
+ Version 0.4.2
397
+ -------------
398
+ * Fixed incorrect handling of PUT requests in the Curb client
399
+ * Fixed, that blocks passed to `Tire::Index.new` or `Tire.index` losed the scope
400
+ * Added `Tire::Alias`, interface and DSL to manage aliases as resources
401
+
402
+ See the full changelog at <http://github.com/karmi/tire/commits/v0.4.3>.
403
+
404
+ --------------------------------------------------------------------------------
405
+
317
406
  rdoc_options:
318
407
  - --charset=UTF-8
319
408
  require_paths:
@@ -351,6 +440,9 @@ test_files:
351
440
  - test/fixtures/articles/3.json
352
441
  - test/fixtures/articles/4.json
353
442
  - test/fixtures/articles/5.json
443
+ - test/integration/active_model_indexing_test.rb
444
+ - test/integration/active_model_searchable_test.rb
445
+ - test/integration/active_record_searchable_test.rb
354
446
  - test/integration/boolean_queries_test.rb
355
447
  - test/integration/count_test.rb
356
448
  - test/integration/custom_score_queries_test.rb
@@ -364,7 +456,9 @@ test_files:
364
456
  - test/integration/index_aliases_test.rb
365
457
  - test/integration/index_mapping_test.rb
366
458
  - test/integration/index_store_test.rb
459
+ - test/integration/mongoid_searchable_test.rb
367
460
  - test/integration/percolator_test.rb
461
+ - test/integration/persistent_model_test.rb
368
462
  - test/integration/query_return_version_test.rb
369
463
  - test/integration/query_string_test.rb
370
464
  - test/integration/range_queries_test.rb
@@ -373,14 +467,32 @@ test_files:
373
467
  - test/integration/scan_test.rb
374
468
  - test/integration/sort_test.rb
375
469
  - test/integration/text_query_test.rb
470
+ - test/models/active_model_article.rb
471
+ - test/models/active_model_article_with_callbacks.rb
472
+ - test/models/active_model_article_with_custom_document_type.rb
473
+ - test/models/active_model_article_with_custom_index_name.rb
474
+ - test/models/active_record_models.rb
376
475
  - test/models/article.rb
476
+ - test/models/mongoid_models.rb
477
+ - test/models/persistent_article.rb
478
+ - test/models/persistent_article_in_namespace.rb
479
+ - test/models/persistent_article_with_casting.rb
480
+ - test/models/persistent_article_with_defaults.rb
481
+ - test/models/persistent_articles_with_custom_index_name.rb
482
+ - test/models/supermodel_article.rb
483
+ - test/models/validated_model.rb
377
484
  - test/test_helper.rb
485
+ - test/unit/active_model_lint_test.rb
378
486
  - test/unit/configuration_test.rb
379
487
  - test/unit/http_client_test.rb
380
488
  - test/unit/http_response_test.rb
381
489
  - test/unit/index_alias_test.rb
382
490
  - test/unit/index_test.rb
383
491
  - test/unit/logger_test.rb
492
+ - test/unit/model_callbacks_test.rb
493
+ - test/unit/model_import_test.rb
494
+ - test/unit/model_persistence_test.rb
495
+ - test/unit/model_search_test.rb
384
496
  - test/unit/results_collection_test.rb
385
497
  - test/unit/results_item_test.rb
386
498
  - test/unit/rubyext_test.rb