acts_as_hashish 0.4.1 → 0.4.2

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.
@@ -1,3 +1,3 @@
1
1
  module Hashish
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
data/spec/hashish_spec.rb CHANGED
@@ -41,6 +41,12 @@ describe Hashish do
41
41
  Hashish.redis_connection.zscore("#{@options[:key_prefix]}*", "#{@options[:key_prefix]}@#{SampleClass.send(:hashish_get_key, @sample_data_1)}").should_not be_nil
42
42
  end
43
43
 
44
+ it "should overwrite data and indexes if an existing key is being re-inserted with new values" do
45
+ SampleClass.hashish_insert(@sample_data_1)
46
+ SampleClass.hashish_insert(@sample_data_1.merge('name' => 'Doe'))
47
+ SampleClass.hashish_list(:filters => {'_name' => 'Joe'}).should == []
48
+ end
49
+
44
50
  it "should create appropriate indexes" do
45
51
  SampleClass.hashish_insert(@sample_data_1)
46
52
  Hashish.redis_connection.zscore("#{@options[:key_prefix]}!#{@index_name}=#{@sample_data_1[@index_value]}", "#{@options[:key_prefix]}@#{SampleClass.send(:hashish_get_key, @sample_data_1)}").should_not be_nil
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: acts_as_hashish
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.1
5
+ version: 0.4.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Schubert Cardozo
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-01-25 00:00:00 Z
13
+ date: 2013-04-29 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: redis