faststep 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/faststep.rb +1 -0
- data/lib/faststep/collection.rb +11 -0
- data/lib/faststep/version.rb +1 -1
- data/spec/collection_spec.rb +12 -0
- metadata +3 -2
data/lib/faststep.rb
CHANGED
data/lib/faststep/version.rb
CHANGED
data/spec/collection_spec.rb
CHANGED
@@ -178,3 +178,15 @@ describe Faststep::Collection, "#remove" do
|
|
178
178
|
db["something"].remove({}, { :safe => true })["n"].should == 6
|
179
179
|
end
|
180
180
|
end
|
181
|
+
|
182
|
+
describe Faststep::Collection, "indexes" do
|
183
|
+
let(:collection) { $faststep_test_db["something"] }
|
184
|
+
|
185
|
+
it "creates indexes" do
|
186
|
+
collection.create_index(:foo => 1)
|
187
|
+
collection.index_information.should == {
|
188
|
+
"_id_" => { "name" => "_id_", "ns" => collection.ns, "key" => { "_id" => 1 }, "v" => 0 },
|
189
|
+
"_foo" => { "name" => "_foo", "ns" => collection.ns, "key" => { "foo" => 1 }, "v" => 0 }
|
190
|
+
}
|
191
|
+
end
|
192
|
+
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: faststep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Josh Clayton
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-24 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- ext/faststep/utilities.h
|
107
107
|
- faststep.gemspec
|
108
108
|
- lib/faststep.rb
|
109
|
+
- lib/faststep/collection.rb
|
109
110
|
- lib/faststep/connection.rb
|
110
111
|
- lib/faststep/cursor.rb
|
111
112
|
- lib/faststep/db.rb
|