nobrainer 0.36.0 → 0.40.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2be88d279ca6fb8c9c8698d25efe539c635949fa5d328034f9a30430e084d396
|
4
|
+
data.tar.gz: 4c5d8c072503e15d84198c9e1c33c293efdf3d4789784bbfe8420c7755cbc968
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 552bc01e727596b8060026e28dcd825cdce2152e3fbf7aa6ec128379bea7dc38b945938bfa79d82917e186d22477fded04127d6c565e4d2bc6e569b775bafc88
|
7
|
+
data.tar.gz: 9e52d7ffea00b58b0f80102e8d31b43c32d397082e30ccf3bb82e140565c0aec9ce853bf84d2ba204241076cd2e14523ac48670d9b55a8b12b918a08422f8072
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.40.0] - 2021-10-16
|
10
|
+
### Fixed
|
11
|
+
- Ruby 3 compatibility
|
12
|
+
- Test Ruby 3 + Rails 7 alpha2 on Travis CI
|
9
13
|
|
10
14
|
## [0.36.0] - 2021-08-08
|
11
15
|
### Added
|
@@ -104,7 +108,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
104
108
|
- Locks: bug fix: allow small timeouts in lock()
|
105
109
|
- Fix reentrant lock counter on steals
|
106
110
|
|
107
|
-
[Unreleased]: https://github.com/nobrainerorm/nobrainer/compare/v0.
|
111
|
+
[Unreleased]: https://github.com/nobrainerorm/nobrainer/compare/v0.40.0...HEAD
|
112
|
+
[0.40.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.36.0...v0.40.0
|
108
113
|
[0.36.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.35.0...v0.36.0
|
109
114
|
[0.35.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.34.1...v0.35.0
|
110
115
|
[0.34.1]: https://github.com/nobrainerorm/nobrainer/compare/v0.34.0...v0.34.1
|
@@ -9,7 +9,7 @@ module NoBrainer::Document::Validation::NotNull
|
|
9
9
|
|
10
10
|
class NotNullValidator < ActiveModel::EachValidator
|
11
11
|
def validate_each(doc, attr, value)
|
12
|
-
doc.errors.add(attr, :undefined, options) if value.nil?
|
12
|
+
doc.errors.add(attr, :undefined, **options) if value.nil?
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -74,7 +74,7 @@ module NoBrainer::Document::Validation::Uniqueness
|
|
74
74
|
criteria = self.model.unscoped.where(attr => value)
|
75
75
|
criteria = apply_scopes(criteria, doc)
|
76
76
|
criteria = exclude_doc(criteria, doc) if doc.persisted?
|
77
|
-
doc.errors.add(attr, :taken, options.except(:scope).merge(:value => value)) unless criteria.empty?
|
77
|
+
doc.errors.add(attr, :taken, **options.except(:scope).merge(:value => value)) unless criteria.empty?
|
78
78
|
rescue NoBrainer::Error::InvalidType
|
79
79
|
# We can't run the uniqueness validator: where() won't accept bad types
|
80
80
|
# and we have some values that don't have the right type.
|
data/lib/no_brainer/error.rb
CHANGED
@@ -51,7 +51,7 @@ module NoBrainer::Error
|
|
51
51
|
value = self.value
|
52
52
|
mock = model.allocate
|
53
53
|
mock.singleton_class.send(:define_method, :read_attribute_for_validation) { |_| value }
|
54
|
-
mock.errors.add(attr_name, :invalid_type, error)
|
54
|
+
mock.errors.add(attr_name, :invalid_type, **error)
|
55
55
|
mock.errors.full_messages.first
|
56
56
|
end
|
57
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nobrainer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.40.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Viennot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.1.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6.2'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 4.1.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: activesupport
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,6 +37,9 @@ dependencies:
|
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: 4.1.0
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '6.2'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +47,9 @@ dependencies:
|
|
38
47
|
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
49
|
version: 4.1.0
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '6.2'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: middleware
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +71,9 @@ dependencies:
|
|
59
71
|
- - ">="
|
60
72
|
- !ruby/object:Gem::Version
|
61
73
|
version: 2.3.0
|
74
|
+
- - "<"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '2.5'
|
62
77
|
type: :runtime
|
63
78
|
prerelease: false
|
64
79
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,6 +81,9 @@ dependencies:
|
|
66
81
|
- - ">="
|
67
82
|
- !ruby/object:Gem::Version
|
68
83
|
version: 2.3.0
|
84
|
+
- - "<"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '2.5'
|
69
87
|
- !ruby/object:Gem::Dependency
|
70
88
|
name: symbol_decoration
|
71
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -222,7 +240,7 @@ files:
|
|
222
240
|
- lib/rails/generators/templates/nobrainer.rb
|
223
241
|
homepage: http://nobrainer.io
|
224
242
|
licenses:
|
225
|
-
-
|
243
|
+
- LGPL-3.0-only
|
226
244
|
metadata: {}
|
227
245
|
post_install_message:
|
228
246
|
rdoc_options: []
|