hashy_db 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -94,6 +94,10 @@ module HashyDb
94
94
  end
95
95
  end
96
96
 
97
+ def delete_collection(collection_name)
98
+ data_store.delete(collection_name)
99
+ end
100
+
97
101
  def clear
98
102
  data_store.clear
99
103
  end
@@ -1,3 +1,3 @@
1
1
  module HashyDb
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
@@ -44,6 +44,12 @@ describe HashyDb::DataStore do
44
44
  end
45
45
  end
46
46
 
47
+ it 'can delete a collection' do
48
+ subject.delete_collection(:some_collection)
49
+
50
+ subject.find_all(:some_collection).should == []
51
+ end
52
+
47
53
  it 'can delete records that match a given set of fields' do
48
54
  params = { id: 1, field_1: 'value 1' }
49
55
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashy_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-05-23 00:00:00.000000000 Z
14
+ date: 2012-06-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -101,9 +101,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project: hashy_db
104
- rubygems_version: 1.8.21
104
+ rubygems_version: 1.8.24
105
105
  signing_key:
106
106
  specification_version: 3
107
107
  summary: Provides an interface to store and retrieve data in a Hash.
108
108
  test_files:
109
109
  - spec/lib/data_store_spec.rb
110
+ has_rdoc: