mongoid-locker 1.0.0 → 1.0.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 +4 -4
- data/.gitignore +1 -2
- data/.rubocop.yml +1 -6
- data/.rubocop_todo.yml +46 -27
- data/.travis.yml +36 -10
- data/CHANGELOG.md +11 -0
- data/Gemfile +4 -8
- data/README.md +9 -8
- data/RELEASING.md +2 -2
- data/Rakefile +1 -1
- data/lib/mongoid/locker.rb +19 -18
- data/lib/mongoid/locker/version.rb +1 -1
- data/lib/mongoid/locker/wrapper.rb +2 -16
- data/mongoid-locker.gemspec +2 -3
- metadata +10 -27
- data/demo/README.md +0 -10
- data/demo/config/mongoid.yml +0 -6
- data/demo/instagram.graffle +0 -1012
- data/demo/instagram.png +0 -0
- data/demo/showoff.css +0 -16
- data/demo/showoff.md +0 -159
- data/lib/mongoid/locker/wrapper2.rb +0 -26
- data/lib/mongoid/locker/wrapper3.rb +0 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1bd397a8299e68e225e9df96570840b39592559e458f808834722548fb486387
|
|
4
|
+
data.tar.gz: a6d879248d41b1f6e1b0eeb715dc4ba72c93042c7e382d56743f53c40868007e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29b6005758187e0020a375971f37da4c0d476cdec634f2dda35b0e78695b26da00c4ff6e8f2dab98c4f9b628514668be8135336d87f525cd974cf55c7c9cd8db
|
|
7
|
+
data.tar.gz: 1df8d96ae35dee15bf9ce2225cc3834ef0b055e95c68b4685e5f3efbeddab5a1af87fb129a800d558c9d2692fce59ce1fa72b9ca968a3519d9614a884f30cfc5
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2018-
|
|
3
|
+
# on 2018-11-23 00:20:08 +0300 using RuboCop version 0.60.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
9
|
+
# Offense count: 4
|
|
10
10
|
# Configuration parameters: Include.
|
|
11
11
|
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
|
12
12
|
Bundler/DuplicatedGem:
|
|
@@ -21,13 +21,21 @@ Metrics/AbcSize:
|
|
|
21
21
|
# Configuration parameters: CountComments, ExcludedMethods.
|
|
22
22
|
# ExcludedMethods: refine
|
|
23
23
|
Metrics/BlockLength:
|
|
24
|
-
Max:
|
|
24
|
+
Max: 505
|
|
25
25
|
|
|
26
|
-
# Offense count:
|
|
27
|
-
# Configuration parameters: CountComments.
|
|
26
|
+
# Offense count: 3
|
|
27
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
|
28
28
|
Metrics/MethodLength:
|
|
29
29
|
Max: 25
|
|
30
30
|
|
|
31
|
+
# Offense count: 2
|
|
32
|
+
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
|
33
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
|
34
|
+
Naming/FileName:
|
|
35
|
+
Exclude:
|
|
36
|
+
- 'lib/mongoid-locker.rb'
|
|
37
|
+
- 'spec/mongoid-locker_spec.rb'
|
|
38
|
+
|
|
31
39
|
# Offense count: 1
|
|
32
40
|
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
|
33
41
|
# NamePrefix: is_, has_, have_
|
|
@@ -39,6 +47,37 @@ Naming/PredicateName:
|
|
|
39
47
|
- 'spec/**/*'
|
|
40
48
|
- 'lib/mongoid/locker.rb'
|
|
41
49
|
|
|
50
|
+
# Offense count: 37
|
|
51
|
+
# Cop supports --auto-correct.
|
|
52
|
+
# Configuration parameters: SkipBlocks, EnforcedStyle.
|
|
53
|
+
# SupportedStyles: described_class, explicit
|
|
54
|
+
RSpec/DescribedClass:
|
|
55
|
+
Exclude:
|
|
56
|
+
- 'spec/mongoid-locker_spec.rb'
|
|
57
|
+
|
|
58
|
+
# Offense count: 19
|
|
59
|
+
# Configuration parameters: Max.
|
|
60
|
+
RSpec/ExampleLength:
|
|
61
|
+
Exclude:
|
|
62
|
+
- 'spec/mongoid-locker_spec.rb'
|
|
63
|
+
|
|
64
|
+
# Offense count: 1
|
|
65
|
+
# Configuration parameters: CustomTransform, IgnoreMethods.
|
|
66
|
+
RSpec/FilePath:
|
|
67
|
+
Exclude:
|
|
68
|
+
- 'spec/mongoid-locker_spec.rb'
|
|
69
|
+
|
|
70
|
+
# Offense count: 6
|
|
71
|
+
# Configuration parameters: .
|
|
72
|
+
# SupportedStyles: have_received, receive
|
|
73
|
+
RSpec/MessageSpies:
|
|
74
|
+
EnforcedStyle: receive
|
|
75
|
+
|
|
76
|
+
# Offense count: 16
|
|
77
|
+
# Configuration parameters: AggregateFailuresByDefault.
|
|
78
|
+
RSpec/MultipleExpectations:
|
|
79
|
+
Max: 5
|
|
80
|
+
|
|
42
81
|
# Offense count: 2
|
|
43
82
|
Style/Documentation:
|
|
44
83
|
Exclude:
|
|
@@ -51,28 +90,8 @@ Style/DoubleNegation:
|
|
|
51
90
|
Exclude:
|
|
52
91
|
- 'lib/mongoid/locker.rb'
|
|
53
92
|
|
|
54
|
-
# Offense count:
|
|
55
|
-
# Configuration parameters: MinBodyLength.
|
|
56
|
-
Style/GuardClause:
|
|
57
|
-
Exclude:
|
|
58
|
-
- 'lib/mongoid/locker.rb'
|
|
59
|
-
|
|
60
|
-
# Offense count: 1
|
|
61
|
-
# Cop supports --auto-correct.
|
|
62
|
-
# Configuration parameters: .
|
|
63
|
-
# SupportedStyles: compact, exploded
|
|
64
|
-
Style/RaiseArgs:
|
|
65
|
-
EnforcedStyle: compact
|
|
66
|
-
|
|
67
|
-
# Offense count: 1
|
|
68
|
-
# Cop supports --auto-correct.
|
|
69
|
-
# Configuration parameters: MinSize.
|
|
70
|
-
# SupportedStyles: percent, brackets
|
|
71
|
-
Style/SymbolArray:
|
|
72
|
-
EnforcedStyle: brackets
|
|
73
|
-
|
|
74
|
-
# Offense count: 63
|
|
93
|
+
# Offense count: 55
|
|
75
94
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
76
95
|
# URISchemes: http, https
|
|
77
96
|
Metrics/LineLength:
|
|
78
|
-
Max:
|
|
97
|
+
Max: 180
|
data/.travis.yml
CHANGED
|
@@ -11,26 +11,52 @@ before_install:
|
|
|
11
11
|
|
|
12
12
|
matrix:
|
|
13
13
|
include:
|
|
14
|
-
- rvm: 2.3.
|
|
14
|
+
- rvm: 2.3.8
|
|
15
15
|
env: MONGOID_VERSION=4
|
|
16
|
-
- rvm: 2.3.
|
|
16
|
+
- rvm: 2.3.8
|
|
17
17
|
env: MONGOID_VERSION=5
|
|
18
|
-
- rvm: 2.3.
|
|
18
|
+
- rvm: 2.3.8
|
|
19
19
|
env: MONGOID_VERSION=6
|
|
20
|
-
- rvm: 2.4.
|
|
20
|
+
- rvm: 2.4.5
|
|
21
21
|
env: MONGOID_VERSION=6
|
|
22
|
-
- rvm: 2.4.
|
|
22
|
+
- rvm: 2.4.5
|
|
23
23
|
env: MONGOID_VERSION=7
|
|
24
|
-
- rvm: 2.5.
|
|
24
|
+
- rvm: 2.5.3
|
|
25
25
|
env: MONGOID_VERSION=7
|
|
26
|
-
before_script:
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
before_script: bundle exec danger
|
|
27
|
+
- rvm: jruby-9.1.17.0
|
|
28
|
+
env: MONGOID_VERSION=4
|
|
29
|
+
- rvm: jruby-9.1.17.0
|
|
30
|
+
env: MONGOID_VERSION=5
|
|
31
|
+
- rvm: jruby-9.1.17.0
|
|
32
|
+
env: MONGOID_VERSION=6
|
|
33
|
+
- rvm: jruby-9.2.4.0
|
|
34
|
+
env: MONGOID_VERSION=6
|
|
35
|
+
- rvm: jruby-9.2.4.0
|
|
36
|
+
env: MONGOID_VERSION=7
|
|
37
|
+
- name: Code Climate Test Coverage
|
|
38
|
+
rvm: 2.3.8
|
|
39
|
+
env: COVERAGE=true
|
|
40
|
+
script:
|
|
41
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
42
|
+
- chmod +x ./cc-test-reporter
|
|
43
|
+
- ./cc-test-reporter before-build
|
|
44
|
+
- for version in 4 5 6 7; do
|
|
45
|
+
MONGOID_VERSION=$version bundle update;
|
|
46
|
+
bundle exec rake;
|
|
47
|
+
./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.mongoid${version}.json;
|
|
48
|
+
done
|
|
49
|
+
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then
|
|
50
|
+
./cc-test-reporter sum-coverage coverage/codeclimate.mongoid*.json -p 4;
|
|
51
|
+
./cc-test-reporter upload-coverage;
|
|
52
|
+
fi
|
|
29
53
|
- rvm: ruby-head
|
|
30
54
|
- rvm: jruby-head
|
|
55
|
+
fast_finish: true
|
|
31
56
|
allow_failures:
|
|
32
57
|
- rvm: ruby-head
|
|
58
|
+
- rvm: jruby-9.1.17.0
|
|
59
|
+
- rvm: jruby-9.2.4.0
|
|
33
60
|
- rvm: jruby-head
|
|
34
|
-
- rvm: rbx-2
|
|
35
61
|
|
|
36
62
|
bundler_args: --without development
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 1.0.1 (2019-03-23)
|
|
4
|
+
|
|
5
|
+
* [#74](https://github.com/mongoid/mongoid-locker/pull/74): Add JRuby tests - [@dks17](https://github.com/dks17).
|
|
6
|
+
* [#68](https://github.com/mongoid/mongoid-locker/pull/68): Fix Rubocop offenses, refactoring, update `ruby` versions, add `COVERAGE` test env, update `.travis.yml` matrix - [@dks17](https://github.com/dks17).
|
|
7
|
+
* [#67](https://github.com/mongoid/mongoid-locker/pull/67): Deprecate `:wait` in favor of `:retries` option, which can attempt to grab a lock multiple times - [@afeld](https://github.com/afeld), [@dks17](https://github.com/dks17).
|
|
8
|
+
* [#66](https://github.com/mongoid/mongoid-locker/pull/66): Fix Mongoid::Locker::LockError for not persisted document - [@dks17](https://github.com/dks17).
|
|
9
|
+
* [#65](https://github.com/mongoid/mongoid-locker/pull/65): Drop `mongoid-compatibility` gem dependency - [@dks17](https://github.com/dks17).
|
|
10
|
+
* [#64](https://github.com/mongoid/mongoid-locker/pull/64): Exclude demo files from the gem - [@dks17](https://github.com/dks17).
|
|
11
|
+
* [#60](https://github.com/mongoid/mongoid-locker/pull/60): Drop support for `mongoid` version `2` and `3` - [@dks17](https://github.com/dks17).
|
|
12
|
+
* [#60](https://github.com/mongoid/mongoid-locker/pull/60): Add SimpleCov - [@dks17](https://github.com/dks17).
|
|
13
|
+
|
|
3
14
|
### 1.0.0 (2018-09-02)
|
|
4
15
|
|
|
5
16
|
* [#57](https://github.com/mongoid/mongoid-locker/pull/57): `Time.now` replaced by `Time.now.utc` - [@dks17](https://github.com/dks17).
|
data/Gemfile
CHANGED
|
@@ -4,16 +4,11 @@ case ENV['MONGOID_VERSION']
|
|
|
4
4
|
when /^7/
|
|
5
5
|
gem 'mongoid', '~> 7.0'
|
|
6
6
|
when /^6/
|
|
7
|
-
gem 'mongoid', '~> 6.
|
|
7
|
+
gem 'mongoid', '~> 6.4'
|
|
8
8
|
when /^5/
|
|
9
|
-
gem 'mongoid', '~> 5.
|
|
9
|
+
gem 'mongoid', '~> 5.4'
|
|
10
10
|
when /^4/
|
|
11
11
|
gem 'mongoid', '~> 4.0'
|
|
12
|
-
when /^3/
|
|
13
|
-
gem 'mongoid', '~> 3.1'
|
|
14
|
-
when /^2/
|
|
15
|
-
gem 'bson_ext', platforms: :ruby
|
|
16
|
-
gem 'mongoid', '~> 2.8'
|
|
17
12
|
else
|
|
18
13
|
gem 'mongoid', '>= 4.0'
|
|
19
14
|
end
|
|
@@ -26,10 +21,11 @@ group :development do
|
|
|
26
21
|
end
|
|
27
22
|
|
|
28
23
|
group :development, :test do
|
|
29
|
-
gem 'mongoid-compatibility'
|
|
30
24
|
gem 'mongoid-danger', '~> 0.1.1'
|
|
31
25
|
gem 'rack', '~> 1.5'
|
|
32
26
|
gem 'rake', '11.3.0'
|
|
33
27
|
gem 'rspec', '~> 3.0'
|
|
34
28
|
gem 'rubocop'
|
|
29
|
+
gem 'rubocop-rspec'
|
|
30
|
+
gem 'simplecov', require: false
|
|
35
31
|
end
|
data/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# mongoid-locker
|
|
2
|
-
[](
|
|
3
|
-
[](https://badge.fury.io/rb/mongoid-locker)
|
|
3
|
+
[](https://travis-ci.org/mongoid/mongoid-locker)
|
|
4
|
+
[](https://codeclimate.com/github/mongoid/mongoid-locker/maintainability)
|
|
5
|
+
[](https://codeclimate.com/github/mongoid/mongoid-locker/test_coverage)
|
|
5
6
|
|
|
6
|
-
Document-level locking for MongoDB via Mongoid.
|
|
7
|
+
Document-level locking for MongoDB via Mongoid. Mongoid-Locker is an easy way to ensure only one process can perform a certain operation on a document at a time.
|
|
7
8
|
|
|
8
|
-
[Tested](
|
|
9
|
-
- MRI: `2.3.
|
|
10
|
-
- Mongoid: `
|
|
9
|
+
[Tested](https://travis-ci.org/mongoid/mongoid-locker) against:
|
|
10
|
+
- MRI: `2.3.8`, `2.4.5`, `2.5.3`
|
|
11
|
+
- Mongoid: `4`, `5`, `6`, `7`
|
|
11
12
|
|
|
12
13
|
See [.travis.yml](.travis.yml) for the latest test matrix.
|
|
13
14
|
|
|
@@ -56,7 +57,7 @@ class QueueItem
|
|
|
56
57
|
end
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
Note that these locks are only enforced when using `#with_lock`, not at the database level. It's useful for transactional operations, where you can make atomic modification of the document with checks.
|
|
60
|
+
Note that these locks are only enforced when using `#with_lock`, not at the database level. It's useful for transactional operations, where you can make atomic modification of the document with checks. For example, you could deduct a purchase from a user's balance ... _unless_ they are broke.
|
|
60
61
|
|
|
61
62
|
More in-depth method documentation can be found at [rdoc.info](http://rdoc.info/github/mongoid/mongoid-locker/frames).
|
|
62
63
|
|
data/RELEASING.md
CHANGED
|
@@ -9,7 +9,7 @@ Run tests, check that all tests succeed locally.
|
|
|
9
9
|
|
|
10
10
|
```
|
|
11
11
|
bundle install
|
|
12
|
-
rake
|
|
12
|
+
bundle exec rake
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Check that the last build succeeded in [Travis CI](https://travis-ci.org/mongoid/mongoid-locker) for all supported platforms.
|
|
@@ -38,7 +38,7 @@ git push origin master
|
|
|
38
38
|
Release.
|
|
39
39
|
|
|
40
40
|
```
|
|
41
|
-
$ rake release
|
|
41
|
+
$ bundle exec rake release
|
|
42
42
|
|
|
43
43
|
mongoid-locker 0.4.0 built to pkg/mongoid-locker-0.4.0.gem.
|
|
44
44
|
Tagged v0.4.0.
|
data/Rakefile
CHANGED
data/lib/mongoid/locker.rb
CHANGED
|
@@ -108,23 +108,25 @@ module Mongoid
|
|
|
108
108
|
#
|
|
109
109
|
# @param [Hash] opts for the locking mechanism
|
|
110
110
|
# @option opts [Fixnum] :timeout The number of seconds until the lock is considered "expired" - defaults to the {ClassMethods#lock_timeout}
|
|
111
|
-
# @option opts [Fixnum] :retries If the document is currently locked, the number of times to retry
|
|
111
|
+
# @option opts [Fixnum] :retries If the document is currently locked, the number of times to retry - defaults to 0
|
|
112
112
|
# @option opts [Float] :retry_sleep How long to sleep between attempts to acquire lock - defaults to time left until lock is available
|
|
113
|
-
# @option opts [Boolean] :wait If the document is currently locked, wait until the lock expires and try again - defaults to false. If set, :retries will be ignored
|
|
113
|
+
# @option opts [Boolean] :wait (deprecated) If the document is currently locked, wait until the lock expires and try again - defaults to false. If set, :retries will be ignored
|
|
114
114
|
# @option opts [Boolean] :reload After acquiring the lock, reload the document - defaults to true
|
|
115
115
|
# @return [void]
|
|
116
116
|
def with_lock(opts = {})
|
|
117
|
-
had_lock = has_lock?
|
|
117
|
+
unless !persisted? || (had_lock = has_lock?)
|
|
118
|
+
if opts[:wait]
|
|
119
|
+
opts[:retries] = 1
|
|
120
|
+
warn 'WARN: `:wait` option for Mongoid::Locker is deprecated - use `retries: 1` instead.'
|
|
121
|
+
end
|
|
118
122
|
|
|
119
|
-
unless had_lock
|
|
120
|
-
opts[:retries] = 1 if opts[:wait]
|
|
121
123
|
lock(opts)
|
|
122
124
|
end
|
|
123
125
|
|
|
124
126
|
begin
|
|
125
127
|
yield
|
|
126
128
|
ensure
|
|
127
|
-
unlock if
|
|
129
|
+
unlock if !had_lock && locked?
|
|
128
130
|
end
|
|
129
131
|
end
|
|
130
132
|
|
|
@@ -175,19 +177,18 @@ module Mongoid
|
|
|
175
177
|
|
|
176
178
|
attempts_left -= 1
|
|
177
179
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
sleep retry_sleep if retry_sleep > 0
|
|
188
|
-
else
|
|
189
|
-
raise LockError.new('could not get lock')
|
|
180
|
+
raise LockError, 'could not get lock' unless attempts_left > 0
|
|
181
|
+
|
|
182
|
+
# if not passed a retry_sleep value, we sleep for the remaining life of the lock
|
|
183
|
+
unless retry_sleep
|
|
184
|
+
locked_until = Mongoid::Locker::Wrapper.locked_until(self)
|
|
185
|
+
# the lock might be released since the last check so make another attempt
|
|
186
|
+
next unless locked_until
|
|
187
|
+
|
|
188
|
+
retry_sleep = locked_until - Time.now.utc
|
|
190
189
|
end
|
|
190
|
+
|
|
191
|
+
sleep retry_sleep if retry_sleep > 0
|
|
191
192
|
end
|
|
192
193
|
end
|
|
193
194
|
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
raise "Incompatible Mongoid #{version} version" unless %w[4 5 6 7].include?(version = Mongoid::VERSION.split('.')[0])
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require 'mongoid/locker/wrapper7'
|
|
5
|
-
elsif Mongoid::Compatibility::Version.mongoid6?
|
|
6
|
-
require 'mongoid/locker/wrapper6'
|
|
7
|
-
elsif Mongoid::Compatibility::Version.mongoid5?
|
|
8
|
-
require 'mongoid/locker/wrapper5'
|
|
9
|
-
elsif Mongoid::Compatibility::Version.mongoid4?
|
|
10
|
-
require 'mongoid/locker/wrapper4'
|
|
11
|
-
elsif Mongoid::Compatibility::Version.mongoid3?
|
|
12
|
-
require 'mongoid/locker/wrapper3'
|
|
13
|
-
elsif Mongoid::Compatibility::Version.mongoid2?
|
|
14
|
-
require 'mongoid/locker/wrapper2'
|
|
15
|
-
else
|
|
16
|
-
raise 'incompatible Mongoid version'
|
|
17
|
-
end
|
|
3
|
+
require "mongoid/locker/wrapper#{version}"
|
data/mongoid-locker.gemspec
CHANGED
|
@@ -13,9 +13,8 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
spec.homepage = 'https://github.com/mongoid/mongoid-locker'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
|
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|demo)/}) }
|
|
17
17
|
spec.require_paths = ['lib']
|
|
18
18
|
|
|
19
|
-
spec.add_runtime_dependency 'mongoid', '>=
|
|
20
|
-
spec.add_runtime_dependency 'mongoid-compatibility', '>= 0.4.1'
|
|
19
|
+
spec.add_runtime_dependency 'mongoid', '>= 4.0', '< 8'
|
|
21
20
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mongoid-locker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aidan Feldman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mongoid
|
|
@@ -16,28 +16,20 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
20
|
-
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
19
|
+
version: '4.0'
|
|
20
|
+
- - "<"
|
|
25
21
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: mongoid-compatibility
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.4.1
|
|
22
|
+
version: '8'
|
|
34
23
|
type: :runtime
|
|
35
24
|
prerelease: false
|
|
36
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
26
|
requirements:
|
|
38
27
|
- - ">="
|
|
39
28
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
29
|
+
version: '4.0'
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '8'
|
|
41
33
|
description: Allows multiple processes to operate on individual documents in MongoDB
|
|
42
34
|
while ensuring that only one can act at a time.
|
|
43
35
|
email:
|
|
@@ -62,18 +54,10 @@ files:
|
|
|
62
54
|
- RELEASING.md
|
|
63
55
|
- Rakefile
|
|
64
56
|
- UPGRADING.md
|
|
65
|
-
- demo/README.md
|
|
66
|
-
- demo/config/mongoid.yml
|
|
67
|
-
- demo/instagram.graffle
|
|
68
|
-
- demo/instagram.png
|
|
69
|
-
- demo/showoff.css
|
|
70
|
-
- demo/showoff.md
|
|
71
57
|
- lib/mongoid-locker.rb
|
|
72
58
|
- lib/mongoid/locker.rb
|
|
73
59
|
- lib/mongoid/locker/version.rb
|
|
74
60
|
- lib/mongoid/locker/wrapper.rb
|
|
75
|
-
- lib/mongoid/locker/wrapper2.rb
|
|
76
|
-
- lib/mongoid/locker/wrapper3.rb
|
|
77
61
|
- lib/mongoid/locker/wrapper4.rb
|
|
78
62
|
- lib/mongoid/locker/wrapper5.rb
|
|
79
63
|
- lib/mongoid/locker/wrapper6.rb
|
|
@@ -98,8 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
98
82
|
- !ruby/object:Gem::Version
|
|
99
83
|
version: '0'
|
|
100
84
|
requirements: []
|
|
101
|
-
|
|
102
|
-
rubygems_version: 2.7.6
|
|
85
|
+
rubygems_version: 3.0.3
|
|
103
86
|
signing_key:
|
|
104
87
|
specification_version: 4
|
|
105
88
|
summary: Document-level locking for MongoDB via Mongoid.
|