mongo_mapper 0.16.0 → 0.17.0

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.
@@ -82,5 +82,11 @@ describe "Stats" do
82
82
  it "should have the correct total index size" do
83
83
  Docs.stats.total_index_size.should == get_stats['totalIndexSize']
84
84
  end
85
+
86
+ context 'with scale keyword argument' do
87
+ it "should have the correct total index size (with scale)" do
88
+ Docs.stats(scale: 1_024).total_index_size.should == (get_stats['totalIndexSize'] / 1_024)
89
+ end
90
+ end
85
91
  end
86
92
  end
@@ -393,7 +393,12 @@ describe "Support" do
393
393
 
394
394
  it "should support ruby driver syntax also" do
395
395
  id = BSON::ObjectId.new
396
- id.original_to_json.should == %Q({"$oid":"#{id}"})
396
+
397
+ if Gem::Version.new(BSON::VERSION) >= Gem::Version.new("5.0.0")
398
+ id.original_to_json.should == %Q("#{id}")
399
+ else
400
+ id.original_to_json.should == %Q({"$oid":"#{id}"})
401
+ end
397
402
  end
398
403
  end
399
404
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-10-11 00:00:00.000000000 Z
13
+ date: 2024-12-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mongo
@@ -307,7 +307,11 @@ files:
307
307
  homepage: http://mongomapper.com
308
308
  licenses:
309
309
  - MIT
310
- metadata: {}
310
+ metadata:
311
+ bug_tracker_uri: https://github.com/mongomapper/mongomapper/issues
312
+ changelog_uri: https://github.com/mongomapper/mongomapper/releases/tag/v0.17.0
313
+ documentation_uri: https://www.rubydoc.info/gems/mongomapper/0.17.0
314
+ source_code_uri: https://github.com/mongomapper/mongomapper/tree/v0.17.0
311
315
  post_install_message:
312
316
  rdoc_options: []
313
317
  require_paths:
@@ -323,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
323
327
  - !ruby/object:Gem::Version
324
328
  version: '0'
325
329
  requirements: []
326
- rubygems_version: 3.3.7
330
+ rubygems_version: 3.5.22
327
331
  signing_key:
328
332
  specification_version: 4
329
333
  summary: A Ruby Object Mapper for Mongo