mongoid-locking 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c503286097299824c534beaed6886b61ee0b314dae7a362a2b556d142074dd54
4
- data.tar.gz: 80ef23fc4832dc9610f4c1723deea805904d0085961caf6b08eb8f0b721a0d28
3
+ metadata.gz: 8d0e6fc6d5ee935327d525147b776e047a02c7a6e5d3333511c7970b9f3134e4
4
+ data.tar.gz: 82e6e6b8a51e311e8ce893ea90d33b0d484aef129dc8f119b0e3999fcc78e6d4
5
5
  SHA512:
6
- metadata.gz: cf84bddf69cfa2d9ba33c6b1ca2bc71360da3e91b7f8fd4c80878477eafa93153081f63ba523f93d1e7981eb96d54a083262b2bb3bf2a842a31f38a8308e94a1
7
- data.tar.gz: ca61600a4d453867b75829b4b7a72d6cd9c8f952ab26ead8a386459b7e3eda20bd31bd01b9c7b0c5595b3d30ed293b7c9ee50e76cf8963d5065d21880b7a9278
6
+ metadata.gz: 98a30ae0a41505c9aefe8f9cf5d66e6412952e170c8c82fdfa158a785f5f523784fbdb1b288337430d6215eab72648a02b0789ba4d21b4f70d033b0c6928aa47
7
+ data.tar.gz: 7ce149336c4e7bff291ab3664af449e5d582e51124abda696e44e578d75745548c74c14361a52765bc8b99f9fd2283e49c2a90f2543772ab3378f92db9cb5255
data/.rubocop.yml CHANGED
@@ -27,3 +27,6 @@ Metrics/BlockLength:
27
27
 
28
28
  RSpec/DescribeClass:
29
29
  Enabled: false
30
+
31
+ RSpec/MultipleExpectations:
32
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongoid-locking (0.1.0)
4
+ mongoid-locking (0.1.1)
5
5
  mongoid (> 6.0)
6
6
 
7
7
  GEM
@@ -81,4 +81,4 @@ DEPENDENCIES
81
81
  rubocop-rspec
82
82
 
83
83
  BUNDLED WITH
84
- 2.3.14
84
+ 2.3.21
data/Rakefile CHANGED
@@ -9,4 +9,4 @@ require "rubocop/rake_task"
9
9
 
10
10
  RuboCop::RakeTask.new
11
11
 
12
- task default: %i[spec rubocop]
12
+ task default: %i[spec]
@@ -9,15 +9,13 @@ module Mongoid
9
9
  def update_document(options = {})
10
10
  prepare_update(options) do
11
11
  updates, conflicts = init_atomic_updates
12
- return if updates.empty?
13
-
14
- coll = collection(_root)
15
- selector = atomic_selector
16
-
17
- _update_one_locked(coll, selector, updates)
18
-
19
- conflicts.each_pair do |key, value|
20
- coll.find(selector).update_one(positionally(selector, { key => value }), session: _session)
12
+ unless updates.empty?
13
+ coll = collection(_root)
14
+ selector = atomic_selector
15
+ _update_one_locked(coll, selector, updates)
16
+ conflicts.each_pair do |key, value|
17
+ coll.find(selector).update_one(positionally(selector, { key => value }), session: _session)
18
+ end
21
19
  end
22
20
  end
23
21
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Mongoid
4
4
  module Locking
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-locking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo RA