rom-changeset 1.0.0.rc1 → 1.0.0.rc2

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: ac26fa822218a9b349d6f09543deb6a61a4590f1
4
- data.tar.gz: d49f5d26caf046d2ac23c28b2fee9656cd036bc1
3
+ metadata.gz: fc29106959ec22e9a963fbeb69cd135b28e86009
4
+ data.tar.gz: 708f934f1a1d0286cee170f04742d9147ce81684
5
5
  SHA512:
6
- metadata.gz: 1cbe5db0a4d56fd23d08183c30f689be74d656c24d63d1d837e680e7ed07d50f5cf5fda3cf562f4969cd1b0be8a42b9f2641562a7f5e7ed6a60b812d6f87292f
7
- data.tar.gz: 4e080b8c7c5e452794323e7423ca1533674c714bf0cb85baf2e3004c5644df7145fa1a7fba36bb53a4d85994e144703727840f3010c547810818c51efafd572a
6
+ metadata.gz: 7fcb5b5fbadf35d0784d81fd7994ca1a43affb0e409ea964e76e04e4f9add1b51c6e00b65c280345db30445712bad0da9a9ff3313a5e43cfff0b004e45c7efdb
7
+ data.tar.gz: 72bdabc21205c7cfe5fbb966869a6b51c94cefb7387e18170997b9e650e8179b1ece8a603a139c144227f936b7aea573feaaf82f1806947290ba05dc608a5e92
@@ -29,8 +29,8 @@ module ROM
29
29
  extend Initializer
30
30
 
31
31
  param :processor, default: -> { self.class.transproc }
32
- option :diff_processor, optional: true
33
32
  option :use_for_diff, optional: true, default: -> { true }
33
+ option :diff_processor, default: -> { use_for_diff ? processor : nil }
34
34
 
35
35
  def self.[](name)
36
36
  container[name]
@@ -8,7 +8,7 @@ module ROM
8
8
  # @abstract
9
9
  class Stateful < Changeset
10
10
  # Default no-op pipe
11
- EMPTY_PIPE = Pipe.new.freeze
11
+ EMPTY_PIPE = Pipe.new(use_for_diff: false).freeze
12
12
 
13
13
  # @!attribute [r] __data__
14
14
  # @return [Hash] The relation data
@@ -68,8 +68,8 @@ module ROM
68
68
  data_tuple = data.to_a
69
69
  data_keys = data.keys & source.keys
70
70
 
71
- new_tuple = data_tuple.to_a.select { |(k, _)| data_keys.include?(k) }
72
- ori_tuple = source.to_a.select { |(k, _)| data_keys.include?(k) }
71
+ new_tuple = data_tuple.to_a.select { |k, _| data_keys.include?(k) }
72
+ ori_tuple = source.to_a.select { |k, _| data_keys.include?(k) }
73
73
 
74
74
  Hash[new_tuple - (new_tuple & ori_tuple)]
75
75
  end
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  class Changeset
3
- VERSION = '1.0.0.rc1'.freeze
3
+ VERSION = '1.0.0.rc2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-changeset
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc1
4
+ version: 1.0.0.rc2
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-09-15 00:00:00.000000000 Z
11
+ date: 2017-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-core
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 4.0.0.beta
39
+ version: 4.0.0.rc
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 4.0.0.beta
46
+ version: 4.0.0.rc
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: transproc
49
49
  requirement: !ruby/object:Gem::Requirement