mince_data_model 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 1.9.3
|
data/lib/mince_data_model.rb
CHANGED
@@ -57,6 +57,10 @@ module MinceDataModel
|
|
57
57
|
translate_from_data_store data_store.instance.find(data_collection, data_store.primary_key_identifier, id)
|
58
58
|
end
|
59
59
|
|
60
|
+
def delete_field(field)
|
61
|
+
data_store.instance.delete_field(data_collection, field)
|
62
|
+
end
|
63
|
+
|
60
64
|
def all
|
61
65
|
translate_each_from_data_store data_store.instance.find_all(data_collection)
|
62
66
|
end
|
@@ -30,6 +30,14 @@ shared_examples_for 'a data model' do
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
it 'can delete a field' do
|
34
|
+
field = mock 'field to delete from the collection'
|
35
|
+
|
36
|
+
mock_data_store.should_receive(:delete).with(collection_name, field)
|
37
|
+
|
38
|
+
described_class.delete_field(field)
|
39
|
+
end
|
40
|
+
|
33
41
|
describe "updating a data model" do
|
34
42
|
let(:data_model_id) { '1234567' }
|
35
43
|
let(:mock_model) { mock 'a model', id: data_model_id, instance_values: data_field_attributes }
|
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.
|
4
|
+
version: 0.0.4
|
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-
|
14
|
+
date: 2012-05-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|
@@ -72,6 +72,7 @@ extra_rdoc_files: []
|
|
72
72
|
files:
|
73
73
|
- .gitignore
|
74
74
|
- .rspec
|
75
|
+
- .rvmrc
|
75
76
|
- Gemfile
|
76
77
|
- README.md
|
77
78
|
- Rakefile
|