ohm 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ohm.rb +1 -3
- data/test/filtering.rb +13 -0
- metadata +10 -10
data/lib/ohm.rb
CHANGED
data/test/filtering.rb
CHANGED
@@ -61,6 +61,19 @@ test "#except" do |john, jane|
|
|
61
61
|
assert res.include?(jane)
|
62
62
|
end
|
63
63
|
|
64
|
+
test "indices bug related to a nil attribute" do |john, jane|
|
65
|
+
# First we create a record with a nil attribute
|
66
|
+
out = User.create(:status => nil, :lname => "Doe")
|
67
|
+
|
68
|
+
# Then, we update the old nil attribute to a different
|
69
|
+
# non-nil, value.
|
70
|
+
out.update(status: "inactive")
|
71
|
+
|
72
|
+
# At this point, the index for the nil attribute should
|
73
|
+
# have been cleared.
|
74
|
+
assert_equal 0, User.db.scard("User:indices:status:")
|
75
|
+
end
|
76
|
+
|
64
77
|
test "#union" do |john, jane|
|
65
78
|
included = User.create(:status => "inactive", :lname => "Doe")
|
66
79
|
excluded = User.create(:status => "super", :lname => "Doe")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-04-
|
13
|
+
date: 2012-04-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nest
|
17
|
-
requirement: &
|
17
|
+
requirement: &70347702087860 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '1.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70347702087860
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: scrivener
|
28
|
-
requirement: &
|
28
|
+
requirement: &70347702087160 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 0.0.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70347702087160
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: cutest
|
39
|
-
requirement: &
|
39
|
+
requirement: &70347702086580 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0.1'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70347702086580
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: batch
|
50
|
-
requirement: &
|
50
|
+
requirement: &70347702086060 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: 0.0.1
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70347702086060
|
59
59
|
description: Ohm is a library that allows to store an object in Redis, a persistent
|
60
60
|
key-value database. It includes an extensible list of validations and has very good
|
61
61
|
performance.
|