collector 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -102,15 +102,15 @@ If you don't already know why you need or want the Repository Pattern, then don'
102
102
 
103
103
  I rolled my own application-specific version of the Repository Pattern for each project I worked on before I realized I was using it often enough to merit extracting it into a gem. Right about that time Braintree announced curator, and since both their implentation and mine were very similar—except theirs was further along and had more features—I decided to use theirs instead. But after using it for a few months and then reading through the code to try and contribute back to it, I decided to go back to my own implementation and extract it into a gem after all.
104
104
 
105
- The biggest diference between curator and collector is that although curator is open source, I feel like a lot of the decisions made were and are in the interest of Braintree and the people that work there, rather than what is best for the project and the people who use it. The specific, functional differens are:
105
+ The specific, functional differences are:
106
106
 
107
107
  <table>
108
108
  <thead>
109
109
  <tr>
110
- <td>Project</td>
111
- <td>Stores</td>
112
- <td>Test suite</td>
113
- <td>Ruby version(s)</td>
110
+ <td><b>Project</b></td>
111
+ <td><b>Stores</b></td>
112
+ <td><b>Test suite</b></td>
113
+ <td><b>Ruby version(s)</b></td>
114
114
  </tr>
115
115
  </thead>
116
116
 
@@ -30,7 +30,7 @@ module Collector
30
30
 
31
31
  def save_without_updating_timestamps(model)
32
32
  attributes = serialize!(model)
33
- collection.insert(attributes)
33
+ collection.save(attributes)
34
34
  end
35
35
 
36
36
  def serialize!(model)
@@ -1,3 +1,3 @@
1
1
  module Collector
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
@@ -38,11 +38,11 @@ describe Collector::Repository do
38
38
  end
39
39
 
40
40
  describe "save_without_updating_timestamps" do
41
- it "serializes the model and then inserts it into the collection" do
41
+ it "serializes the model and then saves it into the collection" do
42
42
  model = stub()
43
43
  TestRepository.expects(:serialize!).with(model).returns({ foo: "bar" })
44
44
 
45
- collection = mock(insert: { foo: "bar" })
45
+ collection = mock(save: { foo: "bar" })
46
46
  TestRepository.stubs(:collection).returns(collection)
47
47
 
48
48
  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.0.17
4
+ version: 0.0.18
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-12-10 00:00:00.000000000 Z
12
+ date: 2012-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport