mongo_mapper 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eab0f4521b6ddb6f397e27b3b299fbae43def4a8d5f7b406e18aad7da0a54b37
4
- data.tar.gz: 27b79f11695bbf661b6cc892b151287bb90d2c551b57d40181ecceeabf10a786
3
+ metadata.gz: 74ec9f278a24ea6d1a430b798204b50f2e69e96f5d01d3cd564a4a582b3683c8
4
+ data.tar.gz: d803b9283fcef845d9d841d2d93dba96084bdeb55c316b0f9350e304e2fbe809
5
5
  SHA512:
6
- metadata.gz: bd232e1e9ceb0f8c62b17a8d6287aca6d99e97fc22a07b95f423d87e89e9fc0e8a3297800292528051ee3129e96f7f134803f8fd6ad8dd6d191dbf79b8eb452e
7
- data.tar.gz: cb0e5ce9ced8a690ae5812a576f749a6d82566c92099c8309f13d46e2a25abf5e61869f111b652576c82fee189a0d7ecfce48b8215f0965749122bb99545bb56
6
+ metadata.gz: e58932d6d99c84dd711aaac5162fa4ac7e6fd518e187f9c544e2498fb215aa3ab21f6f70e27abfddb312a594c0ec115a217eede15772202a8e6c24b6b51dc051
7
+ data.tar.gz: 23f13767289d092fb1aad74fb4dc18d92a573b42fd4bf938b426ea15fcfdc317de252c6100a3687a11e7edce855bfa13a10e3e956e2e2eb182314208182b0351
data/README.md CHANGED
@@ -30,14 +30,15 @@ work some more on the project, send an email to Scott Taylor
30
30
 
31
31
  MongoMapper is tested against:
32
32
 
33
- * MRI 2.4 - 3.2
34
- * JRuby (Versions with 3.1 compatibility)
33
+ - MRI 2.4 - 3.2
34
+ - JRuby (Versions with 3.1 compatibility)
35
35
 
36
36
  Additionally, MongoMapper is tested against:
37
37
 
38
- * Rails 5.0 - 5.2
39
- * Rails 6.0 - 6.1
40
- * Rails 7.0 - 7.1
38
+ - Rails 5.0 - 5.2
39
+ - Rails 6.0 - 6.1
40
+ - Rails 7.0 - 7.2
41
+ - Rails 8.0
41
42
 
42
43
  Note, if you are using Ruby 3.0+, you'll need Rails 6.0+.
43
44
 
@@ -47,11 +48,11 @@ Note, if you are using Ruby 3.0+, you'll need Rails 6.0+.
47
48
  $ bundle install
48
49
  $ bundle exec rake
49
50
 
50
- * Fork the project.
51
- * Make your feature addition or bug fix. All specs should pass.
52
- * Add specs for your changes. This is important so that it doesn't break in a future version.
53
- * Commit, do not mess with Rakefile, version, or history. If you want to have your own version, that is fine but bump version in a commit by itself in another branch so a maintainer can ignore it when your pull request is merged.
54
- * Send a pull request. Bonus points for topic branches.
51
+ - Fork the project.
52
+ - Make your feature addition or bug fix. All specs should pass.
53
+ - Add specs for your changes. This is important so that it doesn't break in a future version.
54
+ - Commit, do not mess with Rakefile, version, or history. If you want to have your own version, that is fine but bump version in a commit by itself in another branch so a maintainer can ignore it when your pull request is merged.
55
+ - Send a pull request. Bonus points for topic branches.
55
56
 
56
57
  ## How to release
57
58
 
@@ -63,15 +64,15 @@ Hit up the Google group: http://groups.google.com/group/mongomapper
63
64
 
64
65
  ## Copyright
65
66
 
66
- Copyright (c) 2009-2022 MongoMapper. See LICENSE for details.
67
+ Copyright (c) 2009-2023 MongoMapper. See LICENSE for details.
67
68
 
68
69
  ## Contributors
69
70
 
70
71
  MongoMapper/Plucky is:
71
72
 
72
- * John Nunemaker
73
- * Chris Heald
74
- * Scott Taylor
73
+ - John Nunemaker
74
+ - Chris Heald
75
+ - Scott Taylor
75
76
 
76
77
  But all open source projects are a team effort and could not happen without
77
- everyone who has contributed. See `CONTRIBUTORS` for the full list. Thank you!
78
+ everyone who has contributed. See `CONTRIBUTORS` for the full list. Thank you!
@@ -18,7 +18,7 @@ module MongoMapper
18
18
  end
19
19
 
20
20
  def serializable_hash(options = nil)
21
- options ||= {}
21
+ options = options ? options.dup : {}
22
22
 
23
23
  options[:only] = Array.wrap(options[:only]).map { |k| k.to_s }
24
24
  options[:except] = Array.wrap(options[:except]).map { |k| k.to_s }
@@ -5,8 +5,11 @@ module MongoMapper
5
5
  module Stats
6
6
  extend ActiveSupport::Concern
7
7
  module ClassMethods
8
- def stats
9
- stats = database.command(:collstats => collection.name).documents[0]
8
+ def stats(scale: nil)
9
+ query = { :collstats => collection.name }
10
+ query[:scale] = scale if scale
11
+
12
+ stats = database.command(query).documents[0]
10
13
  Struct.new(*stats.keys.collect { |key| key.underscore.to_sym }).new(*stats.values)
11
14
  rescue
12
15
  nil
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module MongoMapper
3
- Version = '0.16.0'
3
+ Version = '0.17.0'
4
4
  end