mince_data_model 0.0.5 → 0.0.6

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 MinceDataModel
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -93,6 +93,10 @@ module MinceDataModel
93
93
  translate_each_from_data_store data_store.instance.array_contains(data_collection, field, value)
94
94
  end
95
95
 
96
+ def delete_collection
97
+ data_store.instance.delete_collection(data_collection)
98
+ end
99
+
96
100
  def translate_from_data_store(hash)
97
101
  if hash
98
102
  hash["id"] = hash[data_store.primary_key_identifier] if hash[data_store.primary_key_identifier]
@@ -30,6 +30,12 @@ shared_examples_for 'a data model' do
30
30
  end
31
31
  end
32
32
 
33
+ it 'can delete the collection' do
34
+ mock_data_store.should_receive(:delete_collection).with(collection_name)
35
+
36
+ described_class.delete_collection
37
+ end
38
+
33
39
  it 'can delete a field' do
34
40
  field = mock 'field to delete from the collection'
35
41
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mince_data_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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: rspec
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project: mince_data_model
108
- rubygems_version: 1.8.21
108
+ rubygems_version: 1.8.24
109
109
  signing_key:
110
110
  specification_version: 3
111
111
  summary: Interface for interchanging which type of data store to persist data to
@@ -113,3 +113,4 @@ test_files:
113
113
  - spec/guitar_data_model_spec.rb
114
114
  - spec/guitar_spec.rb
115
115
  - spec/support/shared_examples/mince_data_model_examples.rb
116
+ has_rdoc: