supernova 0.4.16 → 0.4.17
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/supernova/solr_indexer.rb +9 -0
- data/spec/supernova/solr_indexer_spec.rb +28 -0
- data/supernova.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.17
|
@@ -235,6 +235,34 @@ describe Supernova::SolrIndexer do
|
|
235
235
|
end
|
236
236
|
end
|
237
237
|
|
238
|
+
let(:index) { CustomSolrIndex.new }
|
239
|
+
|
240
|
+
describe "#ids=" do
|
241
|
+
it "sets the ids array" do
|
242
|
+
index.ids = [2, 4]
|
243
|
+
index.ids.should == [2, 4]
|
244
|
+
end
|
245
|
+
|
246
|
+
it "sets the @cached array to nil" do
|
247
|
+
index.instance_variable_set("@cached", { :a => 1 })
|
248
|
+
index.ids = [2, 4]
|
249
|
+
index.instance_variable_get("@cached").should == {}
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
describe "#cached" do
|
254
|
+
it "returns the instance variable when set" do
|
255
|
+
index.instance_variable_set("@cached", { :a => 1 })
|
256
|
+
index.cached.should == { :a => 1 }
|
257
|
+
end
|
258
|
+
|
259
|
+
it "returns and initializes a new cached hash when nil" do
|
260
|
+
index.instance_variable_set("@cached", nil)
|
261
|
+
index.cached.should == {}
|
262
|
+
index.instance_variable_get("@cached").should == {}
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
238
266
|
describe "#map_hash_keys_to_solr" do
|
239
267
|
class CustomSolrIndex < Supernova::SolrIndexer
|
240
268
|
has :offer_id, :type => :integer
|
data/supernova.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: supernova
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 45
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 17
|
10
|
+
version: 0.4.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tobias Schwab
|