swift 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/swift/adapter.rb +3 -3
- data/swift.gemspec +1 -1
- data/test/test_scheme.rb +3 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.1
|
data/lib/swift/adapter.rb
CHANGED
@@ -124,7 +124,7 @@ module Swift
|
|
124
124
|
resource.tuple[scheme.header.serial] = result.insert_id if scheme.header.serial
|
125
125
|
resource
|
126
126
|
end
|
127
|
-
resources.kind_of?(
|
127
|
+
resources.kind_of?(Array) ? result : result.first
|
128
128
|
end
|
129
129
|
|
130
130
|
# Update one or more.
|
@@ -169,7 +169,7 @@ module Swift
|
|
169
169
|
statement.execute(*resource.tuple.values_at(*scheme.header.updatable), *keys)
|
170
170
|
resource
|
171
171
|
end
|
172
|
-
resources.kind_of?(
|
172
|
+
resources.kind_of?(Array) ? result : result.first
|
173
173
|
end
|
174
174
|
|
175
175
|
# Destroy one or more.
|
@@ -212,7 +212,7 @@ module Swift
|
|
212
212
|
end
|
213
213
|
result
|
214
214
|
end
|
215
|
-
resources.kind_of?(
|
215
|
+
resources.kind_of?(Array) ? result : result.first
|
216
216
|
end
|
217
217
|
|
218
218
|
|
data/swift.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{swift}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Shane Hanna", "Bharanee 'Barney' Rathna"]
|
data/test/test_scheme.rb
CHANGED
@@ -58,7 +58,7 @@ describe 'scheme' do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
it 'adapter should destroy valid instance' do
|
61
|
-
user = @user.create
|
61
|
+
user = @user.create
|
62
62
|
assert_equal 1, user.id
|
63
63
|
|
64
64
|
assert Swift.db.destroy @user, user
|
@@ -70,7 +70,7 @@ describe 'scheme' do
|
|
70
70
|
end
|
71
71
|
|
72
72
|
it 'adapter should delete all rows given scheme' do
|
73
|
-
user = @user.create
|
73
|
+
user = @user.create
|
74
74
|
assert_equal 1, user.id
|
75
75
|
|
76
76
|
Swift.db.delete @user
|
@@ -92,7 +92,7 @@ describe 'scheme' do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
it 'should update with valid keys' do
|
95
|
-
user = @user.create
|
95
|
+
user = @user.create
|
96
96
|
assert user.update(name: 'dave')
|
97
97
|
assert_equal 'dave', @user.first.name
|
98
98
|
end
|