rom-core 4.0.0 → 4.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/CHANGELOG.md +8 -0
- data/lib/rom/attribute.rb +11 -2
- data/lib/rom/relation.rb +15 -3
- data/lib/rom/schema.rb +1 -1
- data/lib/rom/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46a9964ca6426508b30b41ed76d3aaeacecbd88c
|
4
|
+
data.tar.gz: a3a664e1cbf35744d5778486626e7e9685b44ec4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b59133ac784a48fc5c4e984745b5504cd7e88c52b90b51cb575e7b98a7cff3866799754350b6161f81d430976b2d14346b07d64a7a9dc5973062427f055645ed
|
7
|
+
data.tar.gz: c03960ab283be71525c34bf106f1a76a800fe208925417160af2437a93b2663664d9a8b78f4335c9414fe92a0d2e6c562d44db09cd6e7b2db3092b64ba85740b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# v4.0.1 2017-10-22
|
2
|
+
|
3
|
+
## Internal
|
4
|
+
|
5
|
+
* `Schema#to_input_hash` uses attribute types instead of whole attribute objects (solnic)
|
6
|
+
|
7
|
+
[Compare v4.0.0...v4.0.1](https://github.com/rom-rb/rom/compare/v4.0.0...v4.0.1)
|
8
|
+
|
1
9
|
# v4.0.0 2017-10-18
|
2
10
|
|
3
11
|
Previous `rom` gem was renamed to `rom-core`
|
data/lib/rom/attribute.rb
CHANGED
@@ -355,15 +355,24 @@ module ROM
|
|
355
355
|
! meta[:read].nil?
|
356
356
|
end
|
357
357
|
|
358
|
-
# Return read type
|
358
|
+
# Return read type
|
359
359
|
#
|
360
|
-
# @return [
|
360
|
+
# @return [Dry::Types::Type]
|
361
361
|
#
|
362
362
|
# @api private
|
363
363
|
def to_read_type
|
364
364
|
read? ? meta[:read] : type
|
365
365
|
end
|
366
366
|
|
367
|
+
# Return write type
|
368
|
+
#
|
369
|
+
# @return [Dry::Types::Type]
|
370
|
+
#
|
371
|
+
# @api private
|
372
|
+
def to_write_type
|
373
|
+
type
|
374
|
+
end
|
375
|
+
|
367
376
|
# Return nullable attribute
|
368
377
|
#
|
369
378
|
# @return [Attribute]
|
data/lib/rom/relation.rb
CHANGED
@@ -225,15 +225,27 @@ module ROM
|
|
225
225
|
end
|
226
226
|
end
|
227
227
|
|
228
|
-
# Combine with other relations
|
228
|
+
# Combine with other relations using configured associations
|
229
229
|
#
|
230
230
|
# @overload combine(*associations)
|
231
|
-
# Composes relations using configured associations
|
232
|
-
#
|
233
231
|
# @example
|
234
232
|
# users.combine(:tasks, :posts)
|
233
|
+
#
|
235
234
|
# @param *associations [Array<Symbol>] A list of association names
|
236
235
|
#
|
236
|
+
# @overload combine(*associations, **nested_associations)
|
237
|
+
# @example
|
238
|
+
# users.combine(:tasks, posts: :authors)
|
239
|
+
#
|
240
|
+
# @param *associations [Array<Symbol>] A list of association names
|
241
|
+
# @param *nested_associations [Hash] A hash with nested association names
|
242
|
+
#
|
243
|
+
# @overload combine(associations)
|
244
|
+
# @example
|
245
|
+
# users.combine(posts: [:authors, reviews: [:tags, comments: :author])
|
246
|
+
#
|
247
|
+
# @param *associations [Hash] A hash with nested association names
|
248
|
+
#
|
237
249
|
# @return [Relation]
|
238
250
|
#
|
239
251
|
# @api public
|
data/lib/rom/schema.rb
CHANGED
data/lib/rom/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|