mongoid-list 0.3.0 → 0.3.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b8f75debecad6fdacc61bcea0f0869164576c476
4
+ data.tar.gz: 7c34bc6ad23242cd59c19a306e92638f3f142a3a
5
+ SHA512:
6
+ metadata.gz: f24971c39f6885a7f99c5e767456e8c9c9318b3b55c018404202de23fed490e3ad53d7ee98e450658522e71f958daabafd6046d5c38dc536d51d48608007ea48
7
+ data.tar.gz: 16dc802018bd4622896c5d22eabdfd442a4f3acc5e4f817cd2bfac7fc8af412de9d425224a96ce5b3ae5e71ad9d01accfeb8833d4295b8cde45dd160ba2625c5
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ mongoid-list
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0
data/README.md CHANGED
@@ -1 +1,81 @@
1
- Needs Documentation
1
+ Mongoid List
2
+ ============
3
+
4
+ Mongoid List uses a position column to maintain an ordered list, with optional scoping. It uses atomic updates to keep lists in either a Collection or Embedded in sync.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ Add to your Gemfile:
10
+
11
+ ```ruby
12
+ gem 'mongoid-list'
13
+ ```
14
+
15
+ Usage
16
+ -----
17
+
18
+ Add a list:
19
+
20
+ ```ruby
21
+ class CrowTRobot
22
+ include Mongoid::Document
23
+ include Mongoid::List
24
+
25
+ field :title
26
+ slug :title
27
+ end
28
+ ```
29
+
30
+
31
+ Available methods:
32
+
33
+ ```ruby
34
+
35
+ # Update Position
36
+
37
+ doc1.position # => 1
38
+ doc2.position # => 2
39
+
40
+ doc1.position = 2
41
+ doc1.save
42
+
43
+ doc1.position # => 2
44
+ doc2.position # => 1
45
+
46
+
47
+ # Reorder a Full List
48
+ Klass.update_positions_in_list!(elements)
49
+
50
+ Pass in all elements in new ordering. Accepts documents or ids.
51
+
52
+ # Scope Information
53
+ doc.list_scoped? # If scoping has been defined
54
+ doc.list_scope_field # Which field to scope against
55
+ doc.list_scope_value # Value of the scoping field
56
+ doc.list_scope_conditions # Additional query conditions for scoped lists.
57
+
58
+ ```
59
+
60
+
61
+ Scoping
62
+ -------
63
+
64
+ To scope the list, pass `:scope` on field definition:
65
+
66
+ ```ruby
67
+ class TomServo
68
+ include Mongoid::Document
69
+ include Mongoid::Slug
70
+
71
+ field :position, type: Integer, scope: :satellite_of_love_id
72
+ belongs_to :satellite_of_love
73
+
74
+ end
75
+ ```
76
+
77
+ TO-DO
78
+ -------
79
+ * Helper methods to move individual documents within the list.
80
+ * Customizable filed name.
81
+
@@ -9,7 +9,9 @@ module Mongoid
9
9
  def update_positions!(klass, elements)
10
10
  elements.each_with_index do |element, idx|
11
11
  id = element.kind_of?(Hash) ? element['id'] : element
12
- id = Moped::BSON::ObjectId.from_string(id) if id.is_a?(String)
12
+ if klass.using_object_ids?
13
+ id = Moped::BSON::ObjectId.from_string(id) if id.is_a?(String)
14
+ end
13
15
  klass.collection.find({ _id: id }).update({ '$set' => { position: (idx + 1) } })
14
16
  end
15
17
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module List
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ describe Mongoid::List::Collection do
12
12
  Mongoid::List::Collection.new(simple)
13
13
  end
14
14
 
15
- it "should assign simple to :obj" do
15
+ it "should assign simple to :doc" do
16
16
  collection.obj.should eq simple
17
17
  end
18
18
 
@@ -84,82 +84,109 @@ describe Mongoid::List::Collection do
84
84
 
85
85
  context "string Ids" do
86
86
 
87
- let!(:obj1) { Simple.create }
88
- let!(:obj2) { Simple.create }
89
- let!(:obj3) { Simple.create }
87
+ let!(:doc1) { Simple.create }
88
+ let!(:doc2) { Simple.create }
89
+ let!(:doc3) { Simple.create }
90
90
 
91
91
  before do
92
- Simple.update_positions_in_list!([obj2.id.to_s, obj1.id.to_s, obj3.id.to_s])
92
+ Simple.update_positions_in_list!([doc2.id.to_s, doc1.id.to_s, doc3.id.to_s])
93
93
  end
94
94
 
95
- it "should change obj1 from :position of 1 to 2" do
96
- obj1.position.should eq 1
97
- obj1.reload.position.should eq 2
95
+ it "should change doc1 from :position of 1 to 2" do
96
+ doc1.position.should eq 1
97
+ doc1.reload.position.should eq 2
98
98
  end
99
99
 
100
- it "should change obj2 from :position of 2 to 1" do
101
- obj2.position.should eq 2
102
- obj2.reload.position.should eq 1
100
+ it "should change doc2 from :position of 2 to 1" do
101
+ doc2.position.should eq 2
102
+ doc2.reload.position.should eq 1
103
103
  end
104
104
 
105
- it "should not change obj3 from :position of 3" do
106
- obj3.position.should eq 3
107
- obj3.reload.position.should eq 3
105
+ it "should not change doc3 from :position of 3" do
106
+ doc3.position.should eq 3
107
+ doc3.reload.position.should eq 3
108
+ end
109
+
110
+ end
111
+
112
+ context "string Ids for class using custom Ids" do
113
+
114
+ let!(:doc1) { Custom.create(slug: "one") }
115
+ let!(:doc2) { Custom.create(slug: "two") }
116
+ let!(:doc3) { Custom.create(slug: "three") }
117
+
118
+ before do
119
+ Custom.update_positions_in_list!([ "two", "one", "three" ])
120
+ end
121
+
122
+ it "should change doc1 from :position of 1 to 2" do
123
+ doc1.position.should eq 1
124
+ doc1.reload.position.should eq 2
125
+ end
126
+
127
+ it "should change doc2 from :position of 2 to 1" do
128
+ doc2.position.should eq 2
129
+ doc2.reload.position.should eq 1
130
+ end
131
+
132
+ it "should not change doc3 from :position of 3" do
133
+ doc3.position.should eq 3
134
+ doc3.reload.position.should eq 3
108
135
  end
109
136
 
110
137
  end
111
138
 
112
139
  context "unscoped" do
113
140
 
114
- let!(:obj1) { Simple.create }
115
- let!(:obj2) { Simple.create }
116
- let!(:obj3) { Simple.create }
141
+ let!(:doc1) { Simple.create }
142
+ let!(:doc2) { Simple.create }
143
+ let!(:doc3) { Simple.create }
117
144
 
118
145
  before do
119
- Simple.update_positions_in_list!([obj2.id, obj1.id, obj3.id])
146
+ Simple.update_positions_in_list!([doc2.id, doc1.id, doc3.id])
120
147
  end
121
148
 
122
- it "should change obj1 from :position of 1 to 2" do
123
- obj1.position.should eq 1
124
- obj1.reload.position.should eq 2
149
+ it "should change doc1 from :position of 1 to 2" do
150
+ doc1.position.should eq 1
151
+ doc1.reload.position.should eq 2
125
152
  end
126
153
 
127
- it "should change obj2 from :position of 2 to 1" do
128
- obj2.position.should eq 2
129
- obj2.reload.position.should eq 1
154
+ it "should change doc2 from :position of 2 to 1" do
155
+ doc2.position.should eq 2
156
+ doc2.reload.position.should eq 1
130
157
  end
131
158
 
132
- it "should not change obj3 from :position of 3" do
133
- obj3.position.should eq 3
134
- obj3.reload.position.should eq 3
159
+ it "should not change doc3 from :position of 3" do
160
+ doc3.position.should eq 3
161
+ doc3.reload.position.should eq 3
135
162
  end
136
163
 
137
164
  end
138
165
 
139
166
  context "scoped" do
140
167
 
141
- let!(:obj1) { Scoped.create(group: "hell's angels") }
142
- let!(:obj2) { Scoped.create(group: "hell's angels") }
143
- let!(:obj3) { Scoped.create(group: "hell's angels") }
168
+ let!(:doc1) { Scoped.create(group: "hell's angels") }
169
+ let!(:doc2) { Scoped.create(group: "hell's angels") }
170
+ let!(:doc3) { Scoped.create(group: "hell's angels") }
144
171
  let!(:other) { Scoped.create(group: "charlie's angels") }
145
172
 
146
173
  before do
147
- Scoped.update_positions_in_list!([obj3.id, obj2.id, obj1.id])
174
+ Scoped.update_positions_in_list!([doc3.id, doc2.id, doc1.id])
148
175
  end
149
176
 
150
- it "should change obj1 from :position of 1 to 3" do
151
- obj1.position.should eq 1
152
- obj1.reload.position.should eq 3
177
+ it "should change doc1 from :position of 1 to 3" do
178
+ doc1.position.should eq 1
179
+ doc1.reload.position.should eq 3
153
180
  end
154
181
 
155
- it "should not change obj2 from :position of 2" do
156
- obj2.position.should eq 2
157
- obj2.reload.position.should eq 2
182
+ it "should not change doc2 from :position of 2" do
183
+ doc2.position.should eq 2
184
+ doc2.reload.position.should eq 2
158
185
  end
159
186
 
160
- it "should change obj3 from :position of 3 to 1" do
161
- obj3.position.should eq 3
162
- obj3.reload.position.should eq 1
187
+ it "should change doc3 from :position of 3 to 1" do
188
+ doc3.position.should eq 3
189
+ doc3.reload.position.should eq 1
163
190
  end
164
191
 
165
192
  it "should not have touched other scoped" do
@@ -16,7 +16,7 @@ describe Mongoid::List::Embedded do
16
16
  Mongoid::List::Embedded.new(item)
17
17
  end
18
18
 
19
- it "should assign item to :obj" do
19
+ it "should assign item to :doc" do
20
20
  embedded.obj.should eq item
21
21
  end
22
22
 
@@ -118,81 +118,81 @@ describe Mongoid::List::Embedded do
118
118
 
119
119
  context "with String Ids" do
120
120
 
121
- let!(:obj1) { container.items.create! }
122
- let!(:obj2) { container.items.create! }
123
- let!(:obj3) { container.items.create! }
121
+ let!(:doc1) { container.items.create! }
122
+ let!(:doc2) { container.items.create! }
123
+ let!(:doc3) { container.items.create! }
124
124
 
125
125
  before do
126
- container.items.update_positions_in_list!([ obj2.id.to_s, obj1.id.to_s, obj3.id.to_s ])
126
+ container.items.update_positions_in_list!([ doc2.id.to_s, doc1.id.to_s, doc3.id.to_s ])
127
127
  end
128
128
 
129
- it "should change obj1 from :position of 1 to 2" do
130
- obj1.position.should eq 1
131
- obj1.reload.position.should eq 2
129
+ it "should change doc1 from :position of 1 to 2" do
130
+ doc1.position.should eq 1
131
+ doc1.reload.position.should eq 2
132
132
  end
133
133
 
134
- it "should change obj2 from :position of 2 to 1" do
135
- obj2.position.should eq 2
136
- obj2.reload.position.should eq 1
134
+ it "should change doc2 from :position of 2 to 1" do
135
+ doc2.position.should eq 2
136
+ doc2.reload.position.should eq 1
137
137
  end
138
138
 
139
- it "should not change obj3 from :position of 3" do
140
- obj3.position.should eq 3
141
- obj3.reload.position.should eq 3
139
+ it "should not change doc3 from :position of 3" do
140
+ doc3.position.should eq 3
141
+ doc3.reload.position.should eq 3
142
142
  end
143
143
 
144
144
  end
145
145
  context "unscoped" do
146
146
 
147
- let!(:obj1) { container.items.create! }
148
- let!(:obj2) { container.items.create! }
149
- let!(:obj3) { container.items.create! }
147
+ let!(:doc1) { container.items.create! }
148
+ let!(:doc2) { container.items.create! }
149
+ let!(:doc3) { container.items.create! }
150
150
 
151
151
  before do
152
- container.items.update_positions_in_list!([obj2.id, obj1.id, obj3.id])
152
+ container.items.update_positions_in_list!([doc2.id, doc1.id, doc3.id])
153
153
  end
154
154
 
155
- it "should change obj1 from :position of 1 to 2" do
156
- obj1.position.should eq 1
157
- obj1.reload.position.should eq 2
155
+ it "should change doc1 from :position of 1 to 2" do
156
+ doc1.position.should eq 1
157
+ doc1.reload.position.should eq 2
158
158
  end
159
159
 
160
- it "should change obj2 from :position of 2 to 1" do
161
- obj2.position.should eq 2
162
- obj2.reload.position.should eq 1
160
+ it "should change doc2 from :position of 2 to 1" do
161
+ doc2.position.should eq 2
162
+ doc2.reload.position.should eq 1
163
163
  end
164
164
 
165
- it "should not change obj3 from :position of 3" do
166
- obj3.position.should eq 3
167
- obj3.reload.position.should eq 3
165
+ it "should not change doc3 from :position of 3" do
166
+ doc3.position.should eq 3
167
+ doc3.reload.position.should eq 3
168
168
  end
169
169
 
170
170
  end
171
171
 
172
172
  context "scoped" do
173
173
 
174
- let!(:obj1) { container.scoped_items.create!(group: "hell's angels") }
175
- let!(:obj2) { container.scoped_items.create!(group: "hell's angels") }
176
- let!(:obj3) { container.scoped_items.create!(group: "hell's angels") }
174
+ let!(:doc1) { container.scoped_items.create!(group: "hell's angels") }
175
+ let!(:doc2) { container.scoped_items.create!(group: "hell's angels") }
176
+ let!(:doc3) { container.scoped_items.create!(group: "hell's angels") }
177
177
  let!(:other) { container.scoped_items.create!(group: "charlie's angels") }
178
178
 
179
179
  before do
180
- container.scoped_items.update_positions_in_list!([obj3.id, obj2.id, obj1.id])
180
+ container.scoped_items.update_positions_in_list!([doc3.id, doc2.id, doc1.id])
181
181
  end
182
182
 
183
- it "should change obj1 from :position of 1 to 3" do
184
- obj1.position.should eq 1
185
- obj1.reload.position.should eq 3
183
+ it "should change doc1 from :position of 1 to 3" do
184
+ doc1.position.should eq 1
185
+ doc1.reload.position.should eq 3
186
186
  end
187
187
 
188
- it "should not change obj2 from :position of 2" do
189
- obj2.position.should eq 2
190
- obj2.reload.position.should eq 2
188
+ it "should not change doc2 from :position of 2" do
189
+ doc2.position.should eq 2
190
+ doc2.reload.position.should eq 2
191
191
  end
192
192
 
193
- it "should change obj3 from :position of 3 to 1" do
194
- obj3.position.should eq 3
195
- obj3.reload.position.should eq 1
193
+ it "should change doc3 from :position of 3 to 1" do
194
+ doc3.position.should eq 3
195
+ doc3.reload.position.should eq 1
196
196
  end
197
197
 
198
198
  it "should not have touched other scoped" do
@@ -740,27 +740,27 @@ describe Mongoid::List do
740
740
 
741
741
  context "on a Collection" do
742
742
 
743
- let!(:obj1) { Simple.create }
744
- let!(:obj2) { Simple.create }
745
- let!(:obj3) { Simple.create }
743
+ let!(:doc1) { Simple.create }
744
+ let!(:doc2) { Simple.create }
745
+ let!(:doc3) { Simple.create }
746
746
 
747
747
  before do
748
- Simple.update_positions_in_list!([obj2.id, obj1.id, obj3.id])
748
+ Simple.update_positions_in_list!([doc2.id, doc1.id, doc3.id])
749
749
  end
750
750
 
751
- it "should change obj1 from :position of 1 to 2" do
752
- obj1.position.should eq 1
753
- obj1.reload.position.should eq 2
751
+ it "should change doc1 from :position of 1 to 2" do
752
+ doc1.position.should eq 1
753
+ doc1.reload.position.should eq 2
754
754
  end
755
755
 
756
- it "should change obj2 from :position of 2 to 1" do
757
- obj2.position.should eq 2
758
- obj2.reload.position.should eq 1
756
+ it "should change doc2 from :position of 2 to 1" do
757
+ doc2.position.should eq 2
758
+ doc2.reload.position.should eq 1
759
759
  end
760
760
 
761
- it "should not change obj3 from :position of 3" do
762
- obj3.position.should eq 3
763
- obj3.reload.position.should eq 3
761
+ it "should not change doc3 from :position of 3" do
762
+ doc3.position.should eq 3
763
+ doc3.reload.position.should eq 3
764
764
  end
765
765
 
766
766
  end
@@ -768,33 +768,33 @@ describe Mongoid::List do
768
768
  context "on an Embedded Collection" do
769
769
 
770
770
  let(:container) { Container.create! }
771
- let!(:obj1) { container.items.create! }
772
- let!(:obj2) { container.items.create! }
773
- let!(:obj3) { container.items.create! }
774
- let!(:obj4) { container.items.create! }
771
+ let!(:doc1) { container.items.create! }
772
+ let!(:doc2) { container.items.create! }
773
+ let!(:doc3) { container.items.create! }
774
+ let!(:doc4) { container.items.create! }
775
775
 
776
776
  before do
777
- container.items.update_positions_in_list!([obj2.id, obj1.id, obj4.id, obj3.id])
777
+ container.items.update_positions_in_list!([doc2.id, doc1.id, doc4.id, doc3.id])
778
778
  end
779
779
 
780
- it "should change obj1 from :position of 1 to 2" do
781
- obj1.position.should eq 1
782
- obj1.reload.position.should eq 2
780
+ it "should change doc1 from :position of 1 to 2" do
781
+ doc1.position.should eq 1
782
+ doc1.reload.position.should eq 2
783
783
  end
784
784
 
785
- it "should change obj2 from :position of 2 to 1" do
786
- obj2.position.should eq 2
787
- obj2.reload.position.should eq 1
785
+ it "should change doc2 from :position of 2 to 1" do
786
+ doc2.position.should eq 2
787
+ doc2.reload.position.should eq 1
788
788
  end
789
789
 
790
- it "should change obj3 from :position of 3 to 4" do
791
- obj3.position.should eq 3
792
- obj3.reload.position.should eq 4
790
+ it "should change doc3 from :position of 3 to 4" do
791
+ doc3.position.should eq 3
792
+ doc3.reload.position.should eq 4
793
793
  end
794
794
 
795
- it "should change obj4 from :position of 4 to 3" do
796
- obj4.position.should eq 4
797
- obj4.reload.position.should eq 3
795
+ it "should change doc4 from :position of 4 to 3" do
796
+ doc4.position.should eq 4
797
+ doc4.reload.position.should eq 3
798
798
  end
799
799
  end
800
800
 
@@ -808,33 +808,33 @@ describe Mongoid::List do
808
808
  root.items.create!
809
809
  end
810
810
 
811
- let!(:obj1) { embedded.items.create! }
812
- let!(:obj2) { embedded.items.create! }
813
- let!(:obj3) { embedded.items.create! }
814
- let!(:obj4) { embedded.items.create! }
811
+ let!(:doc1) { embedded.items.create! }
812
+ let!(:doc2) { embedded.items.create! }
813
+ let!(:doc3) { embedded.items.create! }
814
+ let!(:doc4) { embedded.items.create! }
815
815
 
816
816
  before do
817
- embedded.items.update_positions_in_list!([obj3.id, obj4.id, obj1.id, obj2.id])
817
+ embedded.items.update_positions_in_list!([doc3.id, doc4.id, doc1.id, doc2.id])
818
818
  end
819
819
 
820
- it "should change obj1 from :position of 1 to 3" do
821
- obj1.position.should eq 1
822
- obj1.reload.position.should eq 3
820
+ it "should change doc1 from :position of 1 to 3" do
821
+ doc1.position.should eq 1
822
+ doc1.reload.position.should eq 3
823
823
  end
824
824
 
825
- it "should change @obj2 from :position of 2 to 4" do
826
- obj2.position.should eq 2
827
- obj2.reload.position.should eq 4
825
+ it "should change @doc2 from :position of 2 to 4" do
826
+ doc2.position.should eq 2
827
+ doc2.reload.position.should eq 4
828
828
  end
829
829
 
830
- it "should change @obj3 from :position of 3 to 1" do
831
- obj3.position.should eq 3
832
- obj3.reload.position.should eq 1
830
+ it "should change @doc3 from :position of 3 to 1" do
831
+ doc3.position.should eq 3
832
+ doc3.reload.position.should eq 1
833
833
  end
834
834
 
835
- it "should change @obj4 from :position of 4 to 2" do
836
- obj4.position.should eq 4
837
- obj4.reload.position.should eq 2
835
+ it "should change @doc4 from :position of 4 to 2" do
836
+ doc4.position.should eq 4
837
+ doc4.reload.position.should eq 2
838
838
  end
839
839
 
840
840
  end
@@ -0,0 +1,6 @@
1
+ class Custom
2
+ include Mongoid::Document
3
+ include Mongoid::List
4
+ field :_id, type: String, default: -> { slug }
5
+ field :slug, type: String
6
+ end
metadata CHANGED
@@ -1,116 +1,102 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
5
- prerelease:
4
+ version: 0.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dave Krupinski
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-22 00:00:00.000000000 Z
11
+ date: 2013-09-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: mongoid
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 3.1.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 3.1.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 2.13.0
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 2.13.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: guard
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 1.8.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 1.8.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: guard-rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: 2.5.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 2.5.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: guard-spork
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: 1.5.0
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: 1.5.0
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: listen
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: 1.1.0
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: 1.1.0
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: database_cleaner
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
@@ -130,7 +115,8 @@ extensions: []
130
115
  extra_rdoc_files: []
131
116
  files:
132
117
  - .gitignore
133
- - .rvmrc
118
+ - .ruby-gemset
119
+ - .ruby-version
134
120
  - Gemfile
135
121
  - Guardfile
136
122
  - LICENSE
@@ -150,6 +136,7 @@ files:
150
136
  - spec/mongoid/list_spec.rb
151
137
  - spec/spec_helper.rb
152
138
  - spec/support/models/container.rb
139
+ - spec/support/models/custom.rb
153
140
  - spec/support/models/embedded.rb
154
141
  - spec/support/models/embedded_deeply.rb
155
142
  - spec/support/models/scoped.rb
@@ -157,27 +144,26 @@ files:
157
144
  - spec/support/models/simple.rb
158
145
  homepage: https://github.com/davekrupinski/mongoid-list
159
146
  licenses: []
147
+ metadata: {}
160
148
  post_install_message:
161
149
  rdoc_options: []
162
150
  require_paths:
163
151
  - lib
164
152
  required_ruby_version: !ruby/object:Gem::Requirement
165
- none: false
166
153
  requirements:
167
- - - ! '>='
154
+ - - '>='
168
155
  - !ruby/object:Gem::Version
169
156
  version: '0'
170
157
  required_rubygems_version: !ruby/object:Gem::Requirement
171
- none: false
172
158
  requirements:
173
- - - ! '>='
159
+ - - '>='
174
160
  - !ruby/object:Gem::Version
175
161
  version: '0'
176
162
  requirements: []
177
163
  rubyforge_project:
178
- rubygems_version: 1.8.24
164
+ rubygems_version: 2.0.6
179
165
  signing_key:
180
- specification_version: 3
166
+ specification_version: 4
181
167
  summary: Simple list behavior for Mongoid
182
168
  test_files:
183
169
  - spec/mongoid/list/collection_spec.rb
@@ -185,6 +171,7 @@ test_files:
185
171
  - spec/mongoid/list_spec.rb
186
172
  - spec/spec_helper.rb
187
173
  - spec/support/models/container.rb
174
+ - spec/support/models/custom.rb
188
175
  - spec/support/models/embedded.rb
189
176
  - spec/support/models/embedded_deeply.rb
190
177
  - spec/support/models/scoped.rb
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm 1.9.3@mongoid-list