rest-easy 1.2.0 → 1.3.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/CHANGELOG.md +30 -1
- data/README.md +1 -1
- data/lib/rest_easy/attribute.rb +6 -4
- data/lib/rest_easy/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95a7fdafc540b448187281dfcd184257553fc79cbf93af6236463e9bbcadcfa5
|
|
4
|
+
data.tar.gz: a5710b3e26d6fb8078d1079359f78dbe0b7a12810411f86652a84997086a0022
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7444dc20090fc6547e1f55516fcb0a9d7d467ecfd6f0a9530c768ae7d6b735fa2ca789bdb7cc222277269fa4494a05c4187b2f3ffd28c74d82636ae09a197848
|
|
7
|
+
data.tar.gz: 1c7af7dc5042410d6a11483356c41a24dacff39c240fb1cdce1950b859f47c2adb4a6293f93e0257ef5e5b482fb28b000d3660c6f2c705fe9b1925a3837e3837
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.3.1] - 2026-05-27
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **`ConstraintError` messages now include the attribute name.**
|
|
10
|
+
When attribute coercion fails, the raised `RestEasy::ConstraintError`
|
|
11
|
+
previously surfaced only the underlying dry-types reason
|
|
12
|
+
(e.g. `invalid value for Integer(): ""`), leaving the user to guess which
|
|
13
|
+
attribute on which resource had failed. The message now prefixes the
|
|
14
|
+
model-side attribute name:
|
|
15
|
+
`Attribute 'count': invalid value for Integer(): ""`.
|
|
16
|
+
The exception's `#attribute_name` reader is unchanged.
|
|
17
|
+
|
|
18
|
+
## [1.3.0] - 2026-05-19
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `base64` is now an explicit runtime dependency. It stopped being a
|
|
23
|
+
default gem in Ruby 3.4, so it must be declared for the basic-auth
|
|
24
|
+
strategy to load.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **Minimum Ruby version raised to 3.2.** Ruby 3.1 reached end-of-life
|
|
29
|
+
in March 2025 and is no longer supported or tested. Consumers on Ruby
|
|
30
|
+
3.1 are held at the previous release by Bundler.
|
|
31
|
+
|
|
5
32
|
## [1.2.0] - 2026-05-17
|
|
6
33
|
|
|
7
34
|
### Added
|
|
@@ -55,7 +82,9 @@
|
|
|
55
82
|
|
|
56
83
|
Initial release.
|
|
57
84
|
|
|
58
|
-
[Unreleased]: https://github.com/accodeing/rest-easy/compare/v1.
|
|
85
|
+
[Unreleased]: https://github.com/accodeing/rest-easy/compare/v1.3.1...HEAD
|
|
86
|
+
[1.3.1]: https://github.com/accodeing/rest-easy/compare/v1.3.0...v1.3.1
|
|
87
|
+
[1.3.0]: https://github.com/accodeing/rest-easy/compare/v1.2.0...v1.3.0
|
|
59
88
|
[1.2.0]: https://github.com/accodeing/rest-easy/compare/v1.1.2...v1.2.0
|
|
60
89
|
[1.1.2]: https://github.com/accodeing/rest-easy/compare/v1.1.1...v1.1.2
|
|
61
90
|
[1.1.1]: https://github.com/accodeing/rest-easy/compare/v1.1.0...v1.1.1
|
data/README.md
CHANGED
data/lib/rest_easy/attribute.rb
CHANGED
|
@@ -38,10 +38,12 @@ module RestEasy
|
|
|
38
38
|
|
|
39
39
|
def coerce(value)
|
|
40
40
|
@type[value]
|
|
41
|
-
rescue Dry::Types::ConstraintError => e
|
|
42
|
-
raise RestEasy::ConstraintError.new(
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
rescue Dry::Types::ConstraintError, Dry::Types::CoercionError => e
|
|
42
|
+
raise RestEasy::ConstraintError.new(
|
|
43
|
+
@model_name,
|
|
44
|
+
value,
|
|
45
|
+
"Attribute '#{@model_name}': #{e.message}"
|
|
46
|
+
)
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
def parse_value(*raw_values)
|
data/lib/rest_easy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rest-easy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonas Schubert Erlandsson
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2026-05-
|
|
13
|
+
date: 2026-05-27 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: dry-types
|
|
@@ -68,6 +68,20 @@ dependencies:
|
|
|
68
68
|
- - "~>"
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
70
|
version: '2.0'
|
|
71
|
+
- !ruby/object:Gem::Dependency
|
|
72
|
+
name: base64
|
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
|
74
|
+
requirements:
|
|
75
|
+
- - "~>"
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: '0.2'
|
|
78
|
+
type: :runtime
|
|
79
|
+
prerelease: false
|
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
81
|
+
requirements:
|
|
82
|
+
- - "~>"
|
|
83
|
+
- !ruby/object:Gem::Version
|
|
84
|
+
version: '0.2'
|
|
71
85
|
- !ruby/object:Gem::Dependency
|
|
72
86
|
name: bundler
|
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -145,14 +159,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
145
159
|
requirements:
|
|
146
160
|
- - ">="
|
|
147
161
|
- !ruby/object:Gem::Version
|
|
148
|
-
version: 3.
|
|
162
|
+
version: 3.2.0
|
|
149
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
164
|
requirements:
|
|
151
165
|
- - ">="
|
|
152
166
|
- !ruby/object:Gem::Version
|
|
153
167
|
version: '0'
|
|
154
168
|
requirements: []
|
|
155
|
-
rubygems_version: 3.4.
|
|
169
|
+
rubygems_version: 3.4.19
|
|
156
170
|
signing_key:
|
|
157
171
|
specification_version: 4
|
|
158
172
|
summary: Boilerplate for REST API libraries, using on dry-rb
|