mongo_adaptor 0.0.6 → 0.0.7

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.
data/.travis.yml CHANGED
@@ -1,16 +1,15 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.0.0
3
4
  - 1.9.3
4
5
  - 1.9.2
5
6
  - jruby-18mode
6
7
  - jruby-19mode
7
- - rbx-18mode
8
- - ruby-head
8
+ - rbx-19mode
9
9
  - 1.8.7
10
10
  - ree
11
11
  matrix:
12
12
  allow_failures:
13
13
  - rvm:
14
- - ruby-head
15
- - rbx-19mode
14
+ - rbx-18mode
16
15
  services: mongodb
data/lib/mongo_adaptor.rb CHANGED
@@ -27,6 +27,9 @@ class MongoAdaptor
27
27
  def fetch(*args)
28
28
  @collection.find_one *(args + [{ :transformer => builder }])
29
29
  end
30
+ def remove(*args)
31
+ @collection.remove *args
32
+ end
30
33
 
31
34
  def find(*args)
32
35
  @collection.find *(args + [{ :transformer => builder }])
@@ -1,3 +1,3 @@
1
1
  class MongoAdaptor
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -94,6 +94,13 @@ describe 'adapting structs into mongo' do
94
94
  its(:other) { should == 'Some Value' }
95
95
  its(:members) { should == 'Some Members' }
96
96
  end
97
+
98
+ describe 'to remove it' do
99
+ it 'removes the document matching the selector' do
100
+ adaptor.remove({ :_id => id })
101
+ adaptor.fetch({ :_id => id }).should be_nil
102
+ end
103
+ end
97
104
  end
98
105
 
99
106
  describe 'finding multiples' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_adaptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-24 00:00:00.000000000 Z
12
+ date: 2013-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongo
@@ -122,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  segments:
124
124
  - 0
125
- hash: -3305026289075587965
125
+ hash: 2571098276566375901
126
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
@@ -131,10 +131,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: -3305026289075587965
134
+ hash: 2571098276566375901
135
135
  requirements: []
136
136
  rubyforge_project:
137
- rubygems_version: 1.8.24
137
+ rubygems_version: 1.8.25
138
138
  signing_key:
139
139
  specification_version: 3
140
140
  summary: A simple mongo handler. Translates Structs into Mongo and back.