mongoid-locker 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/danger.yml +17 -0
- data/.github/workflows/rubocop.yml +13 -0
- data/.github/workflows/test.yml +62 -0
- data/.rubocop.yml +22 -0
- data/.rubocop_todo.yml +1 -26
- data/CHANGELOG.md +23 -9
- data/Gemfile +6 -1
- data/README.md +5 -7
- data/RELEASING.md +4 -5
- data/lib/mongoid/locker/errors.rb +1 -1
- data/lib/mongoid/locker/version.rb +1 -1
- data/lib/mongoid/locker/wrapper.rb +1 -1
- data/lib/mongoid/locker.rb +2 -5
- data/mongoid-locker.gemspec +1 -1
- metadata +11 -9
- data/.travis.yml +0 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e8773897b78e752adb20817abcc9ac800089614d3a1e3b797e2f551f87470d1
|
4
|
+
data.tar.gz: e6283788f21ccefda79d62b61329530a6a996874ed067496c102f51087d6dd21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2922aac736bb767623cec9d51d69d80b51473d2e02be9265ddea767b29e4109185bc3ef259a8643697efc91cf7c1e7b506e7018ef46810e3881275ba18955138
|
7
|
+
data.tar.gz: 5c215fb77dcba9646496f0eaf4735cdacd955540946d6cf5565d61c639764be3336e2123cdab050b1587444488e2ba82b4501955ad63aade3e289e353f9de75d
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: Danger
|
2
|
+
on: [pull_request]
|
3
|
+
jobs:
|
4
|
+
danger:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
steps:
|
7
|
+
- uses: actions/checkout@v3
|
8
|
+
with:
|
9
|
+
fetch-depth: 0
|
10
|
+
- uses: ruby/setup-ruby@v1
|
11
|
+
with:
|
12
|
+
ruby-version: 2.7
|
13
|
+
bundler-cache: true
|
14
|
+
- run: |
|
15
|
+
# Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub
|
16
|
+
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
|
17
|
+
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
@@ -0,0 +1,62 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
entry:
|
12
|
+
- { ruby: '2.6.6', mongo: 'mongo:4.4', mongoid: '5' }
|
13
|
+
# - { ruby: 'jruby-9.1.17.0', mongo: 'mongo:4.4', mongoid: '5' }
|
14
|
+
- { ruby: 'jruby-9.2.11.1', mongo: 'mongo:4.4', mongoid: '5' }
|
15
|
+
- { ruby: '2.6.6', mongo: 'mongo:4.4', mongoid: '6' }
|
16
|
+
- { ruby: '2.7.1', mongo: 'mongo:4.4', mongoid: '6' }
|
17
|
+
- { ruby: '3.0.5', mongo: 'mongo:4.4', mongoid: '6' }
|
18
|
+
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '6' }
|
19
|
+
- { ruby: 'jruby-9.2.11.1', mongo: 'mongo:4.4', mongoid: '6' }
|
20
|
+
- { ruby: '2.6.6', mongo: 'mongo:4.4', mongoid: '7', coverage: 'true' }
|
21
|
+
- { ruby: '2.7.1', mongo: 'mongo:4.4', mongoid: '7' }
|
22
|
+
- { ruby: '3.0.5', mongo: 'mongo:4.4', mongoid: '7' }
|
23
|
+
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '7' }
|
24
|
+
- { ruby: 'jruby-9.2.11.1', mongo: 'mongo:4.4', mongoid: '7' }
|
25
|
+
- { ruby: '2.6.6', mongo: 'mongo:4.4', mongoid: '8' }
|
26
|
+
- { ruby: '2.7.1', mongo: 'mongo:4.4', mongoid: '8' }
|
27
|
+
- { ruby: '3.0.5', mongo: 'mongo:4.4', mongoid: '8' }
|
28
|
+
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '8' }
|
29
|
+
- { ruby: '3.1.3', mongo: 'mongo:4.4', mongoid: '9' }
|
30
|
+
experimental: [false]
|
31
|
+
|
32
|
+
name: test (ruby=${{ matrix.entry.ruby }}, mongo=${{ matrix.entry.mongo }}, mongoid=${{ matrix.entry.mongoid }})
|
33
|
+
runs-on: ubuntu-latest
|
34
|
+
|
35
|
+
continue-on-error: ${{ matrix.experimental }}
|
36
|
+
|
37
|
+
services:
|
38
|
+
mongo:
|
39
|
+
image: ${{ matrix.entry.mongo }}
|
40
|
+
ports: ["27017:27017"]
|
41
|
+
|
42
|
+
env:
|
43
|
+
MONGOID_VERSION: ${{ matrix.entry.mongoid }}
|
44
|
+
COVERAGE: ${{ matrix.entry.coverage }}
|
45
|
+
|
46
|
+
steps:
|
47
|
+
- uses: actions/checkout@v3
|
48
|
+
|
49
|
+
- name: Set up Ruby
|
50
|
+
uses: ruby/setup-ruby@v1
|
51
|
+
with:
|
52
|
+
ruby-version: ${{ matrix.entry.ruby }}
|
53
|
+
bundler-cache: true
|
54
|
+
|
55
|
+
- name: Run tests
|
56
|
+
run: bundle exec rspec
|
57
|
+
|
58
|
+
- name: Code Climate
|
59
|
+
if: ${{ env.CC_TEST_REPORTER_ID != '' && success() && matrix.entry.coverage == 'true' }}
|
60
|
+
uses: paambaati/codeclimate-action@v3.2.0
|
61
|
+
env:
|
62
|
+
CC_TEST_REPORTER_ID: ${{ vars.CC_TEST_REPORTER_ID }}
|
data/.rubocop.yml
CHANGED
@@ -1,2 +1,24 @@
|
|
1
|
+
Lint/RaiseException:
|
2
|
+
Enabled: true
|
3
|
+
|
4
|
+
Lint/StructNewOverride:
|
5
|
+
Enabled: true
|
6
|
+
|
7
|
+
Style/HashEachMethods:
|
8
|
+
Enabled: true
|
9
|
+
|
10
|
+
Style/HashTransformKeys:
|
11
|
+
Enabled: true
|
12
|
+
|
13
|
+
Style/HashTransformValues:
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
RSpec/MultipleExpectations:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
RSpec/LeakyConstantDeclaration:
|
20
|
+
Enabled: false
|
21
|
+
|
1
22
|
inherit_from: .rubocop_todo.yml
|
23
|
+
|
2
24
|
require: rubocop-rspec
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-04-
|
3
|
+
# on 2020-04-07 15:05:45 -0400 using RuboCop version 0.81.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
|
@@ -13,11 +13,6 @@ Bundler/DuplicatedGem:
|
|
13
13
|
Exclude:
|
14
14
|
- 'Gemfile'
|
15
15
|
|
16
|
-
# Offense count: 2
|
17
|
-
Lint/AmbiguousBlockAssociation:
|
18
|
-
Exclude:
|
19
|
-
- 'spec/test_examples_spec.rb'
|
20
|
-
|
21
16
|
# Offense count: 4
|
22
17
|
# Configuration parameters: IgnoredMethods.
|
23
18
|
Metrics/AbcSize:
|
@@ -66,15 +61,6 @@ RSpec/BeforeAfterAll:
|
|
66
61
|
- 'spec/support/**/*.rb'
|
67
62
|
- 'spec/test_examples_spec.rb'
|
68
63
|
|
69
|
-
# Offense count: 12
|
70
|
-
# Configuration parameters: Prefixes.
|
71
|
-
# Prefixes: when, with, without
|
72
|
-
RSpec/ContextWording:
|
73
|
-
Exclude:
|
74
|
-
- 'spec/support/configurations_shared_context.rb'
|
75
|
-
- 'spec/support/populate_database_shared_context.rb'
|
76
|
-
- 'spec/support/reset_shared_context.rb'
|
77
|
-
|
78
64
|
# Offense count: 1
|
79
65
|
RSpec/DescribeClass:
|
80
66
|
Exclude:
|
@@ -93,23 +79,12 @@ RSpec/FilePath:
|
|
93
79
|
Exclude:
|
94
80
|
- 'spec/mongoid-locker_spec.rb'
|
95
81
|
|
96
|
-
# Offense count: 7
|
97
|
-
RSpec/LeakyConstantDeclaration:
|
98
|
-
Exclude:
|
99
|
-
- 'spec/support/configurations_shared_context.rb'
|
100
|
-
- 'spec/test_examples_spec.rb'
|
101
|
-
|
102
82
|
# Offense count: 12
|
103
83
|
# Configuration parameters: .
|
104
84
|
# SupportedStyles: have_received, receive
|
105
85
|
RSpec/MessageSpies:
|
106
86
|
EnforcedStyle: receive
|
107
87
|
|
108
|
-
# Offense count: 10
|
109
|
-
# Configuration parameters: AggregateFailuresByDefault.
|
110
|
-
RSpec/MultipleExpectations:
|
111
|
-
Max: 3
|
112
|
-
|
113
88
|
# Offense count: 1
|
114
89
|
RSpec/SubjectStub:
|
115
90
|
Exclude:
|
data/CHANGELOG.md
CHANGED
@@ -1,28 +1,42 @@
|
|
1
1
|
## Changelog
|
2
2
|
|
3
|
+
### 2.1.0 (2024-05-07)
|
4
|
+
|
5
|
+
* [#101](https://github.com/mongoid/mongoid-locker/pull/101): Replace the $where operator with the $expr operator - [@amanfrinati](https://github.com/amanfrinati).
|
6
|
+
* [#102](https://github.com/mongoid/mongoid-locker/pull/102): Re-added danger, removed Travis-CI config, extracted RuboCop - [@dblock](https://github.com/dblock).
|
7
|
+
* [#104](https://github.com/mongoid/mongoid-locker/pull/104): Fixed code coverage - [@dblock](https://github.com/dblock).
|
8
|
+
* [#105](https://github.com/mongoid/mongoid-locker/pull/105): Added support for Mongoid 9.0 - [@saisrinivasan](https://github.com/SairamSrinivasan).
|
9
|
+
|
10
|
+
### 2.0.2 (2023-01-24)
|
11
|
+
|
12
|
+
* [#92](https://github.com/mongoid/mongoid-locker/pull/92): Removed TTL and updated unique index definitions - [@cesarizu](https://github.com/cesarizu).
|
13
|
+
* [#96](https://github.com/mongoid/mongoid-locker/pull/96): `new Date()` replaced by `Time.now.utc` - [@rsosag](https://github.com/rsosag).
|
14
|
+
* [#96](https://github.com/mongoid/mongoid-locker/pull/96): Update the use of the `change` method in tests - [@rsosag](https://github.com/rsosag).
|
15
|
+
* [#97](https://github.com/mongoid/mongoid-locker/pull/97): Added support for mongoid 8.0.x versions - [@randikabanura](https://github.com/randikabanura).
|
16
|
+
|
3
17
|
### 2.0.1 (2020-06-17)
|
4
18
|
|
5
19
|
* [#86](https://github.com/mongoid/mongoid-locker/pull/86): Upgraded to RuboCop 0.81.0 - [@dks17](https://github.com/dks17).
|
6
20
|
* [#86](https://github.com/mongoid/mongoid-locker/pull/86): Fixed issue with `ruby` `delegate` method - [@dks17](https://github.com/dks17).
|
7
|
-
* [#86](https://github.com/mongoid/mongoid-locker/pull/86):
|
8
|
-
* [#88](https://github.com/mongoid/mongoid-locker/pull/88):
|
21
|
+
* [#86](https://github.com/mongoid/mongoid-locker/pull/86): Updated Ruby and JRUby versions for Travis config - [@dks17](https://github.com/dks17).
|
22
|
+
* [#88](https://github.com/mongoid/mongoid-locker/pull/88): Added RSpec test examples - [@dks17](https://github.com/dks17).
|
9
23
|
|
10
24
|
### 2.0.0 (2019-10-23)
|
11
25
|
|
12
|
-
* [#79](https://github.com/mongoid/mongoid-locker/pull/79):
|
13
|
-
* [#78](https://github.com/mongoid/mongoid-locker/pull/78):
|
26
|
+
* [#79](https://github.com/mongoid/mongoid-locker/pull/79): Updated find_and_lock and find_and_unlock methods - [@dks17](https://github.com/dks17).
|
27
|
+
* [#78](https://github.com/mongoid/mongoid-locker/pull/78): Upgraded to v2.0 - [@dks17](https://github.com/dks17).
|
14
28
|
* [#83](https://github.com/mongoid/mongoid-locker/pull/83): Upgraded to RuboCop 0.75.1 - [@dblock](https://github.com/dblock).
|
15
29
|
|
16
30
|
### 1.0.1 (2019-03-23)
|
17
31
|
|
18
|
-
* [#74](https://github.com/mongoid/mongoid-locker/pull/74):
|
32
|
+
* [#74](https://github.com/mongoid/mongoid-locker/pull/74): Added JRuby tests - [@dks17](https://github.com/dks17).
|
19
33
|
* [#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).
|
20
|
-
* [#67](https://github.com/mongoid/mongoid-locker/pull/67):
|
34
|
+
* [#67](https://github.com/mongoid/mongoid-locker/pull/67): Deprecated `: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).
|
21
35
|
* [#66](https://github.com/mongoid/mongoid-locker/pull/66): Fix Mongoid::Locker::LockError for not persisted document - [@dks17](https://github.com/dks17).
|
22
|
-
* [#65](https://github.com/mongoid/mongoid-locker/pull/65):
|
36
|
+
* [#65](https://github.com/mongoid/mongoid-locker/pull/65): Dropped `mongoid-compatibility` gem dependency - [@dks17](https://github.com/dks17).
|
23
37
|
* [#64](https://github.com/mongoid/mongoid-locker/pull/64): Exclude demo files from the gem - [@dks17](https://github.com/dks17).
|
24
|
-
* [#60](https://github.com/mongoid/mongoid-locker/pull/60):
|
25
|
-
* [#60](https://github.com/mongoid/mongoid-locker/pull/60):
|
38
|
+
* [#60](https://github.com/mongoid/mongoid-locker/pull/60): Dropped support for `mongoid` version `2` and `3` - [@dks17](https://github.com/dks17).
|
39
|
+
* [#60](https://github.com/mongoid/mongoid-locker/pull/60): Added SimpleCov - [@dks17](https://github.com/dks17).
|
26
40
|
|
27
41
|
### 1.0.0 (2018-09-02)
|
28
42
|
|
data/Gemfile
CHANGED
@@ -4,6 +4,10 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
case ENV['MONGOID_VERSION']
|
7
|
+
when /^9/
|
8
|
+
gem 'mongoid', '~> 9.0'
|
9
|
+
when /^8/
|
10
|
+
gem 'mongoid', '~> 8.0'
|
7
11
|
when /^7/
|
8
12
|
gem 'mongoid', '~> 7.0'
|
9
13
|
when /^6/
|
@@ -23,7 +27,8 @@ end
|
|
23
27
|
group :development, :test do
|
24
28
|
gem 'pry-byebug', platforms: :mri
|
25
29
|
|
26
|
-
gem 'mongoid-
|
30
|
+
gem 'mongoid-compatibility'
|
31
|
+
gem 'mongoid-danger', '~> 0.2.0'
|
27
32
|
gem 'rspec', '~> 3.9'
|
28
33
|
gem 'rubocop', '0.81.0'
|
29
34
|
gem 'rubocop-rspec', '1.38.1'
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Mongoid-Locker
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/mongoid-locker.svg)](https://badge.fury.io/rb/mongoid-locker)
|
4
|
-
[![
|
4
|
+
[![Test](https://github.com/mongoid/mongoid-locker/actions/workflows/test.yml/badge.svg)](https://github.com/mongoid/mongoid-locker/actions/workflows/test.yml)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/04ee4ee75ff54659300a/maintainability)](https://codeclimate.com/github/mongoid/mongoid-locker/maintainability)
|
6
6
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/04ee4ee75ff54659300a/test_coverage)](https://codeclimate.com/github/mongoid/mongoid-locker/test_coverage)
|
7
7
|
|
@@ -11,12 +11,12 @@ Document-level optimistic locking for MongoDB via Mongoid. Mongoid-Locker is an
|
|
11
11
|
|
12
12
|
**NOTE:** Please refer to [1-x-stable](https://github.com/mongoid/mongoid-locker/tree/1-x-stable) branch for `1.x.x` documentation. See the [UPGRADING](UPGRADING.md) guide and [CHANGELOG](CHANGELOG.md) for an overview of the changes.
|
13
13
|
|
14
|
-
[Tested](https://
|
15
|
-
- MRI: `2.3.8`, `2.4.7`, `2.5.7`, `2.6.6`, `2.7.1`
|
14
|
+
[Tested](https://github.com/mongoid/mongoid-locker/actions) against:
|
15
|
+
- MRI: `2.3.8`, `2.4.7`, `2.5.7`, `2.6.6`, `2.7.1`, `3.0.5`, `3.1.3`
|
16
16
|
- JRuby `9.1.17.0`, `9.2.11.1`
|
17
|
-
- Mongoid: `5`, `6`, `7`
|
17
|
+
- Mongoid: `5`, `6`, `7`, `8`, `9`
|
18
18
|
|
19
|
-
See [.
|
19
|
+
See [.github/workflows/test.yml](.github/workflows/test.yml) for the latest test matrix.
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
@@ -37,8 +37,6 @@ class User
|
|
37
37
|
field :locked_at, type: Time
|
38
38
|
|
39
39
|
field :age, type: Integer
|
40
|
-
|
41
|
-
index({ _id: 1, locking_name: 1 }, name: 'mongoid_locker_index', sparse: true, unique: true, expire_after_seconds: lock_timeout)
|
42
40
|
end
|
43
41
|
```
|
44
42
|
|
data/RELEASING.md
CHANGED
@@ -12,7 +12,7 @@ bundle install
|
|
12
12
|
bundle exec rake
|
13
13
|
```
|
14
14
|
|
15
|
-
Check that the last build succeeded in [
|
15
|
+
Check that the last build succeeded in [GitHub Actions](https://github.com/mongoid/mongoid-locker/actions) for all supported platforms.
|
16
16
|
|
17
17
|
Check the version, if needed modify [lib/mongoid/locker/version.rb](lib/mongoid/locker/version.rb).
|
18
18
|
|
@@ -48,17 +48,16 @@ Pushed mongoid-locker 0.4.0 to rubygems.org.
|
|
48
48
|
|
49
49
|
### Prepare for the Next Version
|
50
50
|
|
51
|
+
Increment the minor version, modify [lib/mongoid-locker/version.rb](lib/mongoid-locker/version.rb).
|
52
|
+
|
51
53
|
Add the next release to [CHANGELOG.md](CHANGELOG.md).
|
52
54
|
|
53
55
|
```
|
54
|
-
Next
|
55
|
-
============
|
56
|
+
### 0.4.1 (Next)
|
56
57
|
|
57
58
|
* Your contribution here.
|
58
59
|
```
|
59
60
|
|
60
|
-
Increment the minor version, modify [lib/mongoid-locker/version.rb](lib/mongoid-locker/version.rb).
|
61
|
-
|
62
61
|
Commit your changes.
|
63
62
|
|
64
63
|
```
|
@@ -8,7 +8,7 @@ module Mongoid
|
|
8
8
|
BASE_KEY = 'mongoid.locker.errors.messages'
|
9
9
|
|
10
10
|
def initialize(key, **params)
|
11
|
-
message = I18n.translate("#{BASE_KEY}.#{key}.message", params)
|
11
|
+
message = I18n.translate("#{BASE_KEY}.#{key}.message", **params)
|
12
12
|
|
13
13
|
super("\nmessage:\n #{message}")
|
14
14
|
end
|
@@ -36,7 +36,7 @@ module Mongoid
|
|
36
36
|
]
|
37
37
|
},
|
38
38
|
{
|
39
|
-
'$
|
39
|
+
'$expr': { '$gte': ['$$NOW', { '$add': ["$#{model.locked_at_field}", model.lock_timeout * 1000] }] } # The expr means "Time.now.utc >= model.locked_at_field + model.lock_timeout * 1000"
|
40
40
|
}
|
41
41
|
]
|
42
42
|
}
|
data/lib/mongoid/locker.rb
CHANGED
@@ -138,8 +138,7 @@ module Mongoid
|
|
138
138
|
where(
|
139
139
|
'$and': [
|
140
140
|
{ locking_name_field => { '$exists': true, '$ne': nil } },
|
141
|
-
{ locked_at_field => { '$
|
142
|
-
{ '$where': "new Date() - this.#{locked_at_field} < #{lock_timeout * 1000}" }
|
141
|
+
{ locked_at_field => { '$gte': Time.now.utc - (lock_timeout * 1000) } }
|
143
142
|
]
|
144
143
|
)
|
145
144
|
end
|
@@ -168,9 +167,7 @@ module Mongoid
|
|
168
167
|
{ locked_at_field => { '$eq': nil } }
|
169
168
|
]
|
170
169
|
},
|
171
|
-
{
|
172
|
-
'$where': "new Date() - this.#{locked_at_field} >= #{lock_timeout * 1000}"
|
173
|
-
}
|
170
|
+
{ locked_at_field => { '$lt': Time.now.utc - (lock_timeout * 1000) } }
|
174
171
|
]
|
175
172
|
)
|
176
173
|
end
|
data/mongoid-locker.gemspec
CHANGED
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: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aidan Feldman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '10'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '10'
|
33
33
|
description: Allows multiple processes to operate on individual documents in MongoDB
|
34
34
|
while ensuring that only one can act at a time.
|
35
35
|
email:
|
@@ -38,11 +38,13 @@ executables: []
|
|
38
38
|
extensions: []
|
39
39
|
extra_rdoc_files: []
|
40
40
|
files:
|
41
|
+
- ".github/workflows/danger.yml"
|
42
|
+
- ".github/workflows/rubocop.yml"
|
43
|
+
- ".github/workflows/test.yml"
|
41
44
|
- ".gitignore"
|
42
45
|
- ".rspec"
|
43
46
|
- ".rubocop.yml"
|
44
47
|
- ".rubocop_todo.yml"
|
45
|
-
- ".travis.yml"
|
46
48
|
- CHANGELOG.md
|
47
49
|
- CONTRIBUTING.md
|
48
50
|
- Dangerfile
|
@@ -64,7 +66,7 @@ homepage: https://github.com/mongoid/mongoid-locker
|
|
64
66
|
licenses:
|
65
67
|
- MIT
|
66
68
|
metadata: {}
|
67
|
-
post_install_message:
|
69
|
+
post_install_message:
|
68
70
|
rdoc_options: []
|
69
71
|
require_paths:
|
70
72
|
- lib
|
@@ -79,8 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
81
|
- !ruby/object:Gem::Version
|
80
82
|
version: '0'
|
81
83
|
requirements: []
|
82
|
-
rubygems_version: 3.
|
83
|
-
signing_key:
|
84
|
+
rubygems_version: 3.3.7
|
85
|
+
signing_key:
|
84
86
|
specification_version: 4
|
85
87
|
summary: Document-level optimistic locking for MongoDB via Mongoid.
|
86
88
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
services:
|
2
|
-
- mongodb
|
3
|
-
|
4
|
-
language: ruby
|
5
|
-
|
6
|
-
cache: bundler
|
7
|
-
|
8
|
-
script:
|
9
|
-
- bundle exec rspec
|
10
|
-
|
11
|
-
rvm:
|
12
|
-
- 2.3.8
|
13
|
-
- 2.4.7
|
14
|
-
- 2.5.7
|
15
|
-
- 2.6.6
|
16
|
-
- 2.7.1
|
17
|
-
- jruby-9.1.17.0
|
18
|
-
- jruby-9.2.11.1
|
19
|
-
|
20
|
-
env:
|
21
|
-
- MONGOID_VERSION=5
|
22
|
-
- MONGOID_VERSION=6
|
23
|
-
- MONGOID_VERSION=7
|
24
|
-
|
25
|
-
matrix:
|
26
|
-
include:
|
27
|
-
- rvm: 2.6.6
|
28
|
-
env:
|
29
|
-
- MONGOID_VERSION=7
|
30
|
-
- COVERAGE=true
|
31
|
-
before_script:
|
32
|
-
- bundle exec rubocop
|
33
|
-
- bundle exec danger
|
34
|
-
after_script:
|
35
|
-
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then
|
36
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter;
|
37
|
-
chmod +x ./cc-test-reporter;
|
38
|
-
./cc-test-reporter before-build;
|
39
|
-
./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json coverage/.resultset.json;
|
40
|
-
./cc-test-reporter upload-coverage;
|
41
|
-
fi
|
42
|
-
- rvm: ruby-head
|
43
|
-
env: MONGOID_VERSION=7
|
44
|
-
- rvm: jruby-head
|
45
|
-
env: MONGOID_VERSION=7
|
46
|
-
exclude:
|
47
|
-
- rvm: 2.7.1
|
48
|
-
env: MONGOID_VERSION=5
|
49
|
-
fast_finish: true
|
50
|
-
allow_failures:
|
51
|
-
- rvm: ruby-head
|
52
|
-
- rvm: jruby-head
|
53
|
-
|
54
|
-
bundler_args: --without development
|