collector 0.1.0 → 0.1.1
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/README.md +1 -1
- data/lib/collector/repository.rb +1 -1
- data/lib/collector/version.rb +1 -1
- data/test/collector/repository_spec.rb +2 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -33,7 +33,7 @@ Collector.connection = Mongo::Connection.new
|
|
33
33
|
|
34
34
|
### Models
|
35
35
|
|
36
|
-
Include `Collector::Model` in your domain objects to turn them into models. Create accessors for any attributes.
|
36
|
+
Include `Collector::Model` in your domain objects to turn them into models. Create accessors for any attributes. Accessors for `id`, `created_at`, and `updated_at` are created automatically.
|
37
37
|
|
38
38
|
```ruby
|
39
39
|
class Pickle
|
data/lib/collector/repository.rb
CHANGED
data/lib/collector/version.rb
CHANGED
@@ -57,7 +57,8 @@ describe Collector::Repository do
|
|
57
57
|
model = TestModel.new
|
58
58
|
TestRepository.expects(:serialize!).with(model).returns({ foo: "bar" })
|
59
59
|
|
60
|
-
|
60
|
+
object_id = stub(to_s: "123abc")
|
61
|
+
collection = mock { expects(:save).with({ foo: "bar" }).returns(object_id) }
|
61
62
|
TestRepository.stubs(:collection).returns(collection)
|
62
63
|
|
63
64
|
updated_model = TestRepository.save_without_updating_timestamps(model)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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: 2013-01-
|
12
|
+
date: 2013-01-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|