rom-core 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f256f939ec1f20c42d24e4977ea66e6be1883a2f
4
- data.tar.gz: 8c31c54af6b3e8e64975ce99b2102ed831e6cdc7
3
+ metadata.gz: 46a9964ca6426508b30b41ed76d3aaeacecbd88c
4
+ data.tar.gz: a3a664e1cbf35744d5778486626e7e9685b44ec4
5
5
  SHA512:
6
- metadata.gz: fa57797e9ca8f08c5f493e2357189b23e9ad1bf5a145d163b9e13936562f61ce9d4983d72079be295aa9740fae8df0ec9eec4c47f773e4e378d4738ed590b532
7
- data.tar.gz: a5f6953a56b1467077909c68cb53660af962c4ef57b589861ba6c67b01d5294dde18820ba2a9175c3dfd3c1e85988872e2dc3993357d70c4bd5e052f68ac9431
6
+ metadata.gz: b59133ac784a48fc5c4e984745b5504cd7e88c52b90b51cb575e7b98a7cff3866799754350b6161f81d430976b2d14346b07d64a7a9dc5973062427f055645ed
7
+ data.tar.gz: c03960ab283be71525c34bf106f1a76a800fe208925417160af2437a93b2663664d9a8b78f4335c9414fe92a0d2e6c562d44db09cd6e7b2db3092b64ba85740b
@@ -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`
@@ -355,15 +355,24 @@ module ROM
355
355
  ! meta[:read].nil?
356
356
  end
357
357
 
358
- # Return read type or self
358
+ # Return read type
359
359
  #
360
- # @return [Attribute]
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]
@@ -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
@@ -402,7 +402,7 @@ module ROM
402
402
  # @api private
403
403
  def to_input_hash
404
404
  Types::Coercible::Hash.schema(
405
- map { |attr| [attr.name, attr] }.to_h
405
+ map { |attr| [attr.name, attr.to_write_type] }.to_h
406
406
  )
407
407
  end
408
408
 
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  module Core
3
- VERSION = '4.0.0'.freeze
3
+ VERSION = '4.0.1'.freeze
4
4
  end
5
5
  end
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.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-18 00:00:00.000000000 Z
11
+ date: 2017-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby