mongo_mapper 0.14.0.rc1 → 0.15.3

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.
Files changed (95) hide show
  1. checksums.yaml +5 -13
  2. data/LICENSE +1 -1
  3. data/{README.rdoc → README.md} +26 -21
  4. data/examples/keys.rb +1 -1
  5. data/examples/modifiers/set.rb +1 -1
  6. data/examples/querying.rb +1 -1
  7. data/examples/safe.rb +2 -2
  8. data/examples/scopes.rb +1 -1
  9. data/lib/mongo_mapper.rb +3 -0
  10. data/lib/mongo_mapper/connection.rb +16 -38
  11. data/lib/mongo_mapper/extensions/object_id.rb +5 -1
  12. data/lib/mongo_mapper/plugins/accessible.rb +1 -1
  13. data/lib/mongo_mapper/plugins/associations/base.rb +10 -2
  14. data/lib/mongo_mapper/plugins/associations/belongs_to_association.rb +1 -1
  15. data/lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb +6 -0
  16. data/lib/mongo_mapper/plugins/associations/in_array_proxy.rb +36 -6
  17. data/lib/mongo_mapper/plugins/associations/in_foreign_array_proxy.rb +136 -0
  18. data/lib/mongo_mapper/plugins/associations/many_association.rb +4 -2
  19. data/lib/mongo_mapper/plugins/associations/one_embedded_proxy.rb +3 -1
  20. data/lib/mongo_mapper/plugins/associations/proxy.rb +11 -3
  21. data/lib/mongo_mapper/plugins/associations/single_association.rb +5 -4
  22. data/lib/mongo_mapper/plugins/dirty.rb +29 -37
  23. data/lib/mongo_mapper/plugins/document.rb +1 -1
  24. data/lib/mongo_mapper/plugins/dynamic_querying/dynamic_finder.rb +1 -1
  25. data/lib/mongo_mapper/plugins/embedded_callbacks.rb +1 -0
  26. data/lib/mongo_mapper/plugins/embedded_document.rb +2 -2
  27. data/lib/mongo_mapper/plugins/identity_map.rb +3 -1
  28. data/lib/mongo_mapper/plugins/indexes.rb +13 -6
  29. data/lib/mongo_mapper/plugins/keys.rb +12 -7
  30. data/lib/mongo_mapper/plugins/keys/key.rb +13 -8
  31. data/lib/mongo_mapper/plugins/modifiers.rb +39 -14
  32. data/lib/mongo_mapper/plugins/persistence.rb +6 -2
  33. data/lib/mongo_mapper/plugins/querying.rb +9 -3
  34. data/lib/mongo_mapper/plugins/querying/decorated_plucky_query.rb +6 -6
  35. data/lib/mongo_mapper/plugins/safe.rb +10 -4
  36. data/lib/mongo_mapper/plugins/scopes.rb +19 -3
  37. data/lib/mongo_mapper/plugins/stats.rb +1 -3
  38. data/lib/mongo_mapper/plugins/strong_parameters.rb +26 -0
  39. data/lib/mongo_mapper/railtie.rb +1 -0
  40. data/lib/mongo_mapper/utils.rb +2 -2
  41. data/lib/mongo_mapper/version.rb +1 -1
  42. data/spec/examples.txt +1729 -0
  43. data/spec/functional/accessible_spec.rb +7 -1
  44. data/spec/functional/associations/belongs_to_polymorphic_proxy_spec.rb +2 -2
  45. data/spec/functional/associations/belongs_to_proxy_spec.rb +55 -5
  46. data/spec/functional/associations/in_array_proxy_spec.rb +149 -14
  47. data/spec/functional/associations/in_foreign_array_proxy_spec.rb +321 -0
  48. data/spec/functional/associations/many_documents_as_proxy_spec.rb +6 -6
  49. data/spec/functional/associations/many_documents_proxy_spec.rb +22 -22
  50. data/spec/functional/associations/many_embedded_polymorphic_proxy_spec.rb +2 -2
  51. data/spec/functional/associations/many_polymorphic_proxy_spec.rb +4 -4
  52. data/spec/functional/associations/one_as_proxy_spec.rb +8 -8
  53. data/spec/functional/associations/one_embedded_proxy_spec.rb +28 -0
  54. data/spec/functional/associations/one_proxy_spec.rb +19 -9
  55. data/spec/functional/associations_spec.rb +3 -3
  56. data/spec/functional/binary_spec.rb +2 -2
  57. data/spec/functional/caching_spec.rb +15 -22
  58. data/spec/functional/callbacks_spec.rb +2 -2
  59. data/spec/functional/counter_cache_spec.rb +10 -10
  60. data/spec/functional/dirty_spec.rb +48 -10
  61. data/spec/functional/dirty_with_callbacks_spec.rb +59 -0
  62. data/spec/functional/document_spec.rb +5 -8
  63. data/spec/functional/dumpable_spec.rb +1 -1
  64. data/spec/functional/embedded_document_spec.rb +5 -5
  65. data/spec/functional/identity_map_spec.rb +8 -8
  66. data/spec/functional/indexes_spec.rb +19 -18
  67. data/spec/functional/keys_spec.rb +51 -33
  68. data/spec/functional/logger_spec.rb +2 -2
  69. data/spec/functional/modifiers_spec.rb +81 -19
  70. data/spec/functional/partial_updates_spec.rb +8 -8
  71. data/spec/functional/protected_spec.rb +1 -1
  72. data/spec/functional/querying_spec.rb +70 -22
  73. data/spec/functional/safe_spec.rb +23 -27
  74. data/spec/functional/sci_spec.rb +7 -7
  75. data/spec/functional/scopes_spec.rb +89 -1
  76. data/spec/functional/static_keys_spec.rb +2 -2
  77. data/spec/functional/stats_spec.rb +28 -12
  78. data/spec/functional/strong_parameters_spec.rb +49 -0
  79. data/spec/functional/validations_spec.rb +8 -16
  80. data/spec/quality_spec.rb +1 -1
  81. data/spec/spec_helper.rb +39 -8
  82. data/spec/support/matchers.rb +1 -1
  83. data/spec/unit/associations/proxy_spec.rb +13 -5
  84. data/spec/unit/clone_spec.rb +1 -1
  85. data/spec/unit/document_spec.rb +3 -3
  86. data/spec/unit/embedded_document_spec.rb +4 -5
  87. data/spec/unit/extensions_spec.rb +2 -2
  88. data/spec/unit/identity_map_middleware_spec.rb +65 -96
  89. data/spec/unit/key_spec.rb +16 -17
  90. data/spec/unit/keys_spec.rb +17 -8
  91. data/spec/unit/mongo_mapper_spec.rb +41 -88
  92. data/spec/unit/rails_spec.rb +2 -2
  93. data/spec/unit/validations_spec.rb +18 -18
  94. metadata +53 -31
  95. data/lib/mongo_mapper/extensions/ordered_hash.rb +0 -23
@@ -1,6 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
-
4
3
  describe "Key" do
5
4
  context ".new with no id and _id of type integer" do
6
5
  it "should not error" do
@@ -9,7 +8,7 @@ describe "Key" do
9
8
  key :_id, Integer
10
9
  end
11
10
  # No sensible default id for integer, people better pass them in if they user this
12
- silence_stderr { klass.new.id.should be_nil }
11
+ suppress_stderr { klass.new.id.should be_nil }
13
12
  }.should_not raise_error
14
13
  end
15
14
  end
@@ -30,7 +29,7 @@ describe "Key" do
30
29
  key :_id, Integer
31
30
  end
32
31
  doc = klass.new
33
- expect(doc).to receive(:warn).once
32
+ doc.should_receive(:warn).once
34
33
  doc.assign({:x => :y})
35
34
  end
36
35
  end
@@ -82,11 +81,11 @@ describe "Key" do
82
81
  end
83
82
 
84
83
  it "should use []= for keys instead of public writer" do
85
- expect {
84
+ lambda {
86
85
  doc = @klass.first
87
86
  doc.user['id'].should == 1
88
87
  doc.user['name'].should == 'John Nunemaker'
89
- }.to_not raise_error
88
+ }.should_not raise_error
90
89
  end
91
90
  end
92
91
 
@@ -141,15 +140,25 @@ describe "Key" do
141
140
  key :value, Integer, :default => lambda { counter += 1 }
142
141
  end
143
142
 
144
- expect { instance = klass.create }.to change { counter }.by(1)
145
- expect {
143
+ lambda { instance = klass.create }.should change { counter }.by(1)
144
+ lambda {
146
145
  instance.reload.value.should == 1
147
146
 
148
147
  instance.value = 10
149
148
  instance.save
150
149
 
151
150
  instance.reload.value.should == 10
152
- }.to_not change { counter }
151
+ }.should_not change { counter }
152
+ end
153
+ end
154
+
155
+ context "with attributes key" do
156
+ it "should raise an error" do
157
+ lambda do
158
+ klass = Doc do
159
+ key :attributes, Hash
160
+ end
161
+ end.should raise_error("`attributes` is a reserved key name")
153
162
  end
154
163
  end
155
164
  end # KeyTest
@@ -3,23 +3,28 @@ require 'spec_helper'
3
3
  class Address; end
4
4
 
5
5
  describe "MongoMapper" do
6
- it "should be able to write and read connection" do
7
- conn = Mongo::MongoClient.new
6
+ it "should be able to write and read connection", :without_connection do
7
+ conn = Mongo::Client.new(['127.0.0.1:27001'])
8
8
  MongoMapper.connection = conn
9
9
  MongoMapper.connection.should == conn
10
10
  end
11
11
 
12
- it "should default connection to new mongo ruby driver" do
12
+ it "should default connection to new mongo ruby driver", :without_connection do
13
13
  MongoMapper.connection = nil
14
- MongoMapper.connection.should be_instance_of(Mongo::MongoClient)
14
+ MongoMapper.connection.should be_instance_of(Mongo::Client)
15
15
  end
16
16
 
17
- it "should be able to write and read default database" do
18
- MongoMapper.database = 'test'
19
- MongoMapper.database.should be_instance_of(Mongo::DB)
17
+ it "should be able to read default database" do
18
+ MongoMapper.database.should be_instance_of(Mongo::Database)
20
19
  MongoMapper.database.name.should == 'test'
21
20
  end
22
21
 
22
+ it "should be able to write default database", :without_connection do
23
+ MongoMapper.database = 'test-2'
24
+ MongoMapper.database.should be_instance_of(Mongo::Database)
25
+ MongoMapper.database.name.should == 'test-2'
26
+ end
27
+
23
28
  it "should have document not found error" do
24
29
  lambda {
25
30
  MongoMapper::DocumentNotFound
@@ -35,96 +40,64 @@ describe "MongoMapper" do
35
40
  MongoMapper.config.should == config
36
41
  end
37
42
 
38
- context "connecting to environment from config" do
39
- it "should work without authentication" do
40
- MongoMapper.config = {
41
- 'development' => {'host' => '127.0.0.1', 'port' => 27017, 'database' => 'test'}
42
- }
43
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, {})
44
- expect(MongoMapper).to receive(:database=).with('test')
45
- expect_any_instance_of(Mongo::DB).to receive(:authenticate).never
46
- MongoMapper.connect('development')
47
- end
43
+ context "connecting to environment from config", :without_connection do
48
44
 
49
45
  it "should work without authentication using uri" do
50
46
  MongoMapper.config = {
51
47
  'development' => {'uri' => 'mongodb://127.0.0.1:27017/test'}
52
48
  }
53
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, {})
54
- expect(MongoMapper).to receive(:database=).with('test')
55
- expect_any_instance_of(Mongo::DB).to receive(:authenticate).never
49
+ Mongo::Client.should_receive(:new).with('mongodb://127.0.0.1:27017/test', {})
56
50
  MongoMapper.connect('development')
57
51
  end
58
52
 
59
- it "should work with sinatra environment symbol" do
53
+ it "should work without authentication using hosts" do
60
54
  MongoMapper.config = {
61
- 'development' => {'host' => '127.0.0.1', 'port' => 27017, 'database' => 'test'}
55
+ 'development' => {'hosts' => ['127.0.0.1:27017']}
62
56
  }
63
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, {})
64
- expect(MongoMapper).to receive(:database=).with('test')
65
- expect_any_instance_of(Mongo::DB).to receive(:authenticate).never
66
- MongoMapper.connect(:development)
67
- end
68
-
69
- it "should work with options" do
70
- MongoMapper.config = {
71
- 'development' => {'host' => '127.0.0.1', 'port' => 27017, 'database' => 'test'}
72
- }
73
- connection, logger = double('connection'), double('logger')
74
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, :logger => logger)
75
- MongoMapper.connect('development', :logger => logger)
76
- end
77
-
78
- it "should pass along ssl when true" do
79
- MongoMapper.config = {
80
- 'development' => {'host' => '127.0.0.1', 'port' => 27017, 'database' => 'test', 'ssl' => true}
81
- }
82
- connection, logger = double('connection'), double('logger')
83
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, :logger => logger, :ssl => true)
84
- MongoMapper.connect('development', :logger => logger)
57
+ Mongo::Client.should_receive(:new).with(['127.0.0.1:27017'], {})
58
+ MongoMapper.connect('development')
85
59
  end
86
60
 
87
- it "should pass along ssl when false" do
61
+ it "should work without authentication using host" do
88
62
  MongoMapper.config = {
89
- 'development' => {'host' => '127.0.0.1', 'port' => 27017, 'database' => 'test', 'ssl' => false}
63
+ 'development' => {'host' => '127.0.0.1:27017'}
90
64
  }
91
- connection, logger = double('connection'), double('logger')
92
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, :logger => logger, :ssl => false)
93
- MongoMapper.connect('development', :logger => logger)
65
+ Mongo::Client.should_receive(:new).with(['127.0.0.1:27017'], {})
66
+ MongoMapper.connect('development')
94
67
  end
95
68
 
96
69
  it "should convert read preferences to symbols" do
97
70
  MongoMapper.config = {
98
- 'development' => {'host' => '127.0.0.1', 'port' => 27017, 'database' => 'test', 'options' => {'read' => 'primary'}}
71
+ 'development' => {'hosts' => ['127.0.0.1:27017'], 'database' => 'test', 'read' => 'primary'}
99
72
  }
100
- connection, logger = double('connection'), double('logger')
101
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, :logger => logger, :read => :primary)
73
+ logger = double('logger')
74
+ Mongo::Client.should_receive(:new).with(['127.0.0.1:27017'], :logger => logger, :read => :primary, :database => 'test')
102
75
  MongoMapper.connect('development', :logger => logger)
103
76
  end
104
77
 
105
78
  it "should work with options from config" do
106
79
  MongoMapper.config = {
107
- 'development' => {'host' => '192.168.1.1', 'port' => 2222, 'database' => 'test', 'options' => {'safe' => true}}
80
+ 'development' => {'hosts' => ['192.168.1.1:2222'], 'database' => 'test', 'safe' => true}
108
81
  }
109
- connection, logger = double('connection'), double('logger')
110
- expect(Mongo::MongoClient).to receive(:new).with('192.168.1.1', 2222, :logger => logger, :safe => true)
82
+ logger = double('logger')
83
+ Mongo::Client.should_receive(:new).with(['192.168.1.1:2222'], :logger => logger, :safe => true, :database => 'test')
111
84
  MongoMapper.connect('development', :logger => logger)
112
85
  end
113
86
 
114
87
  it "should work with options using uri" do
115
88
  MongoMapper.config = {
116
- 'development' => {'uri' => 'mongodb://127.0.0.1:27017/test'}
89
+ 'development' => {'uri' => 'mongodb://127.0.0.1:27017/test', 'options'=> {:foo => 1}}
117
90
  }
118
- connection, logger = double('connection'), double('logger')
119
- expect(Mongo::MongoClient).to receive(:new).with('127.0.0.1', 27017, :logger => logger)
91
+ logger = double('logger')
92
+ Mongo::Client.should_receive(:new).with('mongodb://127.0.0.1:27017/test', :logger => logger, :foo => 1)
120
93
  MongoMapper.connect('development', :logger => logger)
121
94
  end
122
95
 
123
96
  it "should work with authentication" do
124
97
  MongoMapper.config = {
125
- 'development' => {'host' => '127.0.0.1', 'port' => 27017, 'database' => 'test', 'username' => 'john', 'password' => 'secret'}
98
+ 'development' => {'hosts' => ['127.0.0.1:27017'], 'database' => 'test', 'user' => 'john', 'password' => 'secret'}
126
99
  }
127
- expect_any_instance_of(Mongo::DB).to receive(:authenticate).with('john', 'secret')
100
+ Mongo::Client.should_receive(:new).with(['127.0.0.1:27017'], :database => 'test', :user => 'john', :password => 'secret')
128
101
  MongoMapper.connect('development')
129
102
  end
130
103
 
@@ -132,7 +105,7 @@ describe "MongoMapper" do
132
105
  MongoMapper.config = {
133
106
  'development' => {'uri' => 'mongodb://john:secret@127.0.0.1:27017/test'}
134
107
  }
135
- expect_any_instance_of(Mongo::DB).to receive(:authenticate).with('john', 'secret')
108
+ Mongo::Client.should_receive(:new).with('mongodb://john:secret@127.0.0.1:27017/test', {})
136
109
  MongoMapper.connect('development')
137
110
  end
138
111
 
@@ -140,44 +113,24 @@ describe "MongoMapper" do
140
113
  MongoMapper.config = {
141
114
  'development' => {'uri' => 'mysql://127.0.0.1:5336/foo'}
142
115
  }
143
- expect { MongoMapper.connect('development') }.to raise_error(MongoMapper::InvalidScheme)
116
+ lambda { MongoMapper.connect('development') }.should raise_error(Mongo::Error::InvalidURI)
144
117
  end
145
118
 
146
- it "should create a replica set connection if config contains multiple hosts in the old format" do
119
+ it 'should forbid use of port' do
147
120
  MongoMapper.config = {
148
- 'development' => {
149
- 'hosts' => [ ['127.0.0.1', 27017], ['localhost', 27017] ],
150
- 'database' => 'test'
151
- }
121
+ 'development' => {'host' => '192.168.1.1', 'port' => '27017', 'database' => 'test', 'safe' => true}
152
122
  }
153
-
154
- expect(Mongo::MongoReplicaSetClient).to receive(:new).with( ['127.0.0.1', 27017], ['localhost', 27017], {'read_secondary' => true} )
155
- expect(MongoMapper).to receive(:database=).with('test')
156
- expect_any_instance_of(Mongo::DB).to receive(:authenticate).never
157
- MongoMapper.connect('development', 'read_secondary' => true)
123
+ lambda { MongoMapper.connect('development') }.should raise_error(RuntimeError)
158
124
  end
159
125
 
160
- it "should create a replica set connection if config contains multiple hosts in the new format" do
161
- MongoMapper.config = {
162
- 'development' => {
163
- 'hosts' => ['127.0.0.1:27017', 'localhost:27017'],
164
- 'database' => 'test'
165
- }
166
- }
167
-
168
- expect(Mongo::MongoReplicaSetClient).to receive(:new).with( ['127.0.0.1:27017', 'localhost:27017'], {'read_secondary' => true} )
169
- expect(MongoMapper).to receive(:database=).with('test')
170
- expect_any_instance_of(Mongo::DB).to receive(:authenticate).never
171
- MongoMapper.connect('development', 'read_secondary' => true)
172
- end
173
126
  end
174
127
 
175
128
  context "setup" do
176
129
  it "should work as shortcut for setting config, environment and options" do
177
130
  config, logger = double('config'), double('logger')
178
- expect(MongoMapper).to receive(:config=).with(config)
179
- expect(MongoMapper).to receive(:connect).with('development', :logger => logger)
180
- expect(MongoMapper).to receive(:handle_passenger_forking).once
131
+ MongoMapper.should_receive(:config=).with(config)
132
+ MongoMapper.should_receive(:connect).with('development', :logger => logger)
133
+ MongoMapper.should_receive(:handle_passenger_forking).once
181
134
  MongoMapper.setup(config, 'development', :logger => logger)
182
135
  end
183
136
  end
@@ -163,7 +163,7 @@ describe "Rails integration" do
163
163
 
164
164
  it "should array representation of id if persisted" do
165
165
  @klass.new.tap do |doc|
166
- expect(doc).to receive(:persisted?).and_return(true)
166
+ doc.should_receive(:persisted?).and_return(true)
167
167
  doc.to_param.should == doc.id.to_s
168
168
  end
169
169
  end
@@ -178,7 +178,7 @@ describe "Rails integration" do
178
178
 
179
179
  it "should array representation of id if persisted" do
180
180
  @klass.new.tap do |doc|
181
- expect(doc).to receive(:persisted?).and_return(true)
181
+ doc.should_receive(:persisted?).and_return(true)
182
182
  doc.to_key.should == [doc.id]
183
183
  end
184
184
  end
@@ -157,19 +157,19 @@ describe "Validations" do
157
157
  end # numericality of
158
158
 
159
159
  context "validating presence of" do
160
- it "should work with validates_presence_of macro" do
161
- @document.key :name, String
162
- @document.validates_presence_of :name
163
- doc = @document.new
164
- doc.should have_error_on(:name)
165
- end
166
-
167
- it "should work with :required shortcut on key definition" do
168
- @document.key :name, String, :required => true
169
- doc = @document.new
170
- doc.should have_error_on(:name)
171
- end
172
- end
160
+ it "should work with validates_presence_of macro" do
161
+ @document.key :name, String
162
+ @document.validates_presence_of :name
163
+ doc = @document.new
164
+ doc.should have_error_on(:name)
165
+ end
166
+
167
+ it "should work with :required shortcut on key definition" do
168
+ @document.key :name, String, :required => true
169
+ doc = @document.new
170
+ doc.should have_error_on(:name)
171
+ end
172
+ end
173
173
 
174
174
  context "validating exclusion of" do
175
175
  it "should throw error if enumerator not provided" do
@@ -436,19 +436,19 @@ describe "Validations" do
436
436
  end # numericality of
437
437
 
438
438
  context "validating presence of" do
439
- it "should work with validates_presence_of macro" do
439
+ it "should work with validates_presence_of macro" do
440
440
  @embedded_doc.key :name, String
441
441
  @embedded_doc.validates_presence_of :name
442
442
  doc = @embedded_doc.new
443
443
  doc.should have_error_on(:name)
444
- end
444
+ end
445
445
 
446
- it "should work with :required shortcut on key definition" do
446
+ it "should work with :required shortcut on key definition" do
447
447
  @embedded_doc.key :name, String, :required => true
448
448
  doc = @embedded_doc.new
449
449
  doc.should have_error_on(:name)
450
- end
451
- end
450
+ end
451
+ end
452
452
 
453
453
  context "validating exclusion of" do
454
454
  it "should throw error if enumerator not provided" do
metadata CHANGED
@@ -1,81 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0.rc1
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
- autorequire:
8
+ - Chris Heald
9
+ - Scott Taylor
10
+ autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2016-03-16 00:00:00.000000000 Z
13
+ date: 2021-02-11 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
- name: activemodel
16
+ name: mongo
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '2.0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: plucky
15
31
  requirement: !ruby/object:Gem::Requirement
16
32
  requirements:
17
- - - ! '>='
33
+ - - "~>"
18
34
  - !ruby/object:Gem::Version
19
- version: 3.0.0
35
+ version: 0.8.0
20
36
  type: :runtime
21
37
  prerelease: false
22
38
  version_requirements: !ruby/object:Gem::Requirement
23
39
  requirements:
24
- - - ! '>='
40
+ - - "~>"
25
41
  - !ruby/object:Gem::Version
26
- version: 3.0.0
42
+ version: 0.8.0
27
43
  - !ruby/object:Gem::Dependency
28
44
  name: activesupport
29
45
  requirement: !ruby/object:Gem::Requirement
30
46
  requirements:
31
- - - ! '>='
47
+ - - ">="
32
48
  - !ruby/object:Gem::Version
33
- version: '3.0'
49
+ version: '5.0'
34
50
  type: :runtime
35
51
  prerelease: false
36
52
  version_requirements: !ruby/object:Gem::Requirement
37
53
  requirements:
38
- - - ! '>='
54
+ - - ">="
39
55
  - !ruby/object:Gem::Version
40
- version: '3.0'
56
+ version: '5.0'
41
57
  - !ruby/object:Gem::Dependency
42
- name: plucky
58
+ name: activemodel
43
59
  requirement: !ruby/object:Gem::Requirement
44
60
  requirements:
45
- - - ~>
61
+ - - ">="
46
62
  - !ruby/object:Gem::Version
47
- version: 0.7.0
63
+ version: '5.0'
48
64
  type: :runtime
49
65
  prerelease: false
50
66
  version_requirements: !ruby/object:Gem::Requirement
51
67
  requirements:
52
- - - ~>
68
+ - - ">="
53
69
  - !ruby/object:Gem::Version
54
- version: 0.7.0
70
+ version: '5.0'
55
71
  - !ruby/object:Gem::Dependency
56
- name: mongo
72
+ name: activemodel-serializers-xml
57
73
  requirement: !ruby/object:Gem::Requirement
58
74
  requirements:
59
- - - ~>
75
+ - - "~>"
60
76
  - !ruby/object:Gem::Version
61
- version: '1.8'
77
+ version: '1.0'
62
78
  type: :runtime
63
79
  prerelease: false
64
80
  version_requirements: !ruby/object:Gem::Requirement
65
81
  requirements:
66
- - - ~>
82
+ - - "~>"
67
83
  - !ruby/object:Gem::Version
68
- version: '1.8'
84
+ version: '1.0'
69
85
  description: MongoMapper is a Object-Document Mapper for Ruby and Rails
70
86
  email:
71
87
  - nunemaker@gmail.com
88
+ - cheald@gmail.com
89
+ - scott@railsnewbie.com
72
90
  executables:
73
91
  - mmconsole
74
92
  extensions: []
75
93
  extra_rdoc_files: []
76
94
  files:
77
95
  - LICENSE
78
- - README.rdoc
96
+ - README.md
79
97
  - UPGRADES
80
98
  - bin/mmconsole
81
99
  - examples/attr_accessible.rb
@@ -107,7 +125,6 @@ files:
107
125
  - lib/mongo_mapper/extensions/nil_class.rb
108
126
  - lib/mongo_mapper/extensions/object.rb
109
127
  - lib/mongo_mapper/extensions/object_id.rb
110
- - lib/mongo_mapper/extensions/ordered_hash.rb
111
128
  - lib/mongo_mapper/extensions/set.rb
112
129
  - lib/mongo_mapper/extensions/string.rb
113
130
  - lib/mongo_mapper/extensions/symbol.rb
@@ -125,6 +142,7 @@ files:
125
142
  - lib/mongo_mapper/plugins/associations/collection.rb
126
143
  - lib/mongo_mapper/plugins/associations/embedded_collection.rb
127
144
  - lib/mongo_mapper/plugins/associations/in_array_proxy.rb
145
+ - lib/mongo_mapper/plugins/associations/in_foreign_array_proxy.rb
128
146
  - lib/mongo_mapper/plugins/associations/many_association.rb
129
147
  - lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb
130
148
  - lib/mongo_mapper/plugins/associations/many_documents_proxy.rb
@@ -171,6 +189,7 @@ files:
171
189
  - lib/mongo_mapper/plugins/scopes.rb
172
190
  - lib/mongo_mapper/plugins/serialization.rb
173
191
  - lib/mongo_mapper/plugins/stats.rb
192
+ - lib/mongo_mapper/plugins/strong_parameters.rb
174
193
  - lib/mongo_mapper/plugins/timestamps.rb
175
194
  - lib/mongo_mapper/plugins/touch.rb
176
195
  - lib/mongo_mapper/plugins/userstamps.rb
@@ -184,10 +203,12 @@ files:
184
203
  - lib/rails/generators/mongo_mapper/config/templates/mongo.yml
185
204
  - lib/rails/generators/mongo_mapper/model/model_generator.rb
186
205
  - lib/rails/generators/mongo_mapper/model/templates/model.rb
206
+ - spec/examples.txt
187
207
  - spec/functional/accessible_spec.rb
188
208
  - spec/functional/associations/belongs_to_polymorphic_proxy_spec.rb
189
209
  - spec/functional/associations/belongs_to_proxy_spec.rb
190
210
  - spec/functional/associations/in_array_proxy_spec.rb
211
+ - spec/functional/associations/in_foreign_array_proxy_spec.rb
191
212
  - spec/functional/associations/many_documents_as_proxy_spec.rb
192
213
  - spec/functional/associations/many_documents_proxy_spec.rb
193
214
  - spec/functional/associations/many_embedded_polymorphic_proxy_spec.rb
@@ -203,6 +224,7 @@ files:
203
224
  - spec/functional/callbacks_spec.rb
204
225
  - spec/functional/counter_cache_spec.rb
205
226
  - spec/functional/dirty_spec.rb
227
+ - spec/functional/dirty_with_callbacks_spec.rb
206
228
  - spec/functional/document_spec.rb
207
229
  - spec/functional/dumpable_spec.rb
208
230
  - spec/functional/dynamic_querying_spec.rb
@@ -224,6 +246,7 @@ files:
224
246
  - spec/functional/scopes_spec.rb
225
247
  - spec/functional/static_keys_spec.rb
226
248
  - spec/functional/stats_spec.rb
249
+ - spec/functional/strong_parameters_spec.rb
227
250
  - spec/functional/timestamps_spec.rb
228
251
  - spec/functional/touch_spec.rb
229
252
  - spec/functional/userstamps_spec.rb
@@ -266,24 +289,23 @@ homepage: http://mongomapper.com
266
289
  licenses:
267
290
  - MIT
268
291
  metadata: {}
269
- post_install_message:
292
+ post_install_message:
270
293
  rdoc_options: []
271
294
  require_paths:
272
295
  - lib
273
296
  required_ruby_version: !ruby/object:Gem::Requirement
274
297
  requirements:
275
- - - ! '>='
298
+ - - ">="
276
299
  - !ruby/object:Gem::Version
277
300
  version: '0'
278
301
  required_rubygems_version: !ruby/object:Gem::Requirement
279
302
  requirements:
280
- - - ! '>'
303
+ - - ">="
281
304
  - !ruby/object:Gem::Version
282
- version: 1.3.1
305
+ version: '0'
283
306
  requirements: []
284
- rubyforge_project:
285
- rubygems_version: 2.5.0
286
- signing_key:
307
+ rubygems_version: 3.1.4
308
+ signing_key:
287
309
  specification_version: 4
288
310
  summary: A Ruby Object Mapper for Mongo
289
311
  test_files: []