rom-changeset 1.0.0.beta3 → 1.0.0.rc1

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: 3e974c1c36fcff82e3b23b9f2a3cfea2e6b8de4a
4
- data.tar.gz: c87a7913578f4091f9496b9b7676ebb8d797963e
3
+ metadata.gz: ac26fa822218a9b349d6f09543deb6a61a4590f1
4
+ data.tar.gz: d49f5d26caf046d2ac23c28b2fee9656cd036bc1
5
5
  SHA512:
6
- metadata.gz: 63d0b84a39845c77a5ca20a2806cb736b010867549290d8a41a132f16703278d02e4d9ed75bf34c30c9dca7510e920cbfc9371ab6b2d62211a3f8d0a33ebb18f
7
- data.tar.gz: dd10e1c4f3b82c80b576aa77c46b122e2355e7979df82a69e70f9b29518a6b060ed0d69f50e07f2b52f28731d1808e986a5cc372cac47889040f4acba46a728b
6
+ metadata.gz: 1cbe5db0a4d56fd23d08183c30f689be74d656c24d63d1d837e680e7ed07d50f5cf5fda3cf562f4969cd1b0be8a42b9f2641562a7f5e7ed6a60b812d6f87292f
7
+ data.tar.gz: 4e080b8c7c5e452794323e7423ca1533674c714bf0cb85baf2e3004c5644df7145fa1a7fba36bb53a4d85994e144703727840f3010c547810818c51efafd572a
@@ -53,6 +53,12 @@ module ROM
53
53
  command.call
54
54
  end
55
55
 
56
+ # Associate with other changesets
57
+ #
58
+ # @see Changeset#associate
59
+ #
60
+ # @return [Associated]
61
+ #
56
62
  # @api public
57
63
  def associate(other, name = Associated.infer_assoc_name(other))
58
64
  self.class.new(left, associations: associations.merge(name => other))
@@ -4,10 +4,10 @@ module ROM
4
4
  #
5
5
  # Update changesets will only execute their commands when
6
6
  # the data is different from the original tuple. Original tuple
7
- # is fetched from changeset's relation using `by_pk` relation view.
8
- # This means the underlying adapter must provide this view, or you
9
- # you need to implement it yourself in your relations if you want to
10
- # use Update changesets.
7
+ # is fetched from changeset's relation using `one` method.
8
+ #
9
+ # @example
10
+ # users.by_pk(1).changeset(:update, name: "Jane Doe").commit
11
11
  #
12
12
  # @see Changeset::Stateful
13
13
  #
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  class Changeset
3
- VERSION = '1.0.0.beta3'.freeze
3
+ VERSION = '1.0.0.rc1'.freeze
4
4
  end
5
5
  end
data/lib/rom/changeset.rb CHANGED
@@ -76,7 +76,7 @@ module ROM
76
76
  # New options can be provided too
77
77
  #
78
78
  # @param [Relation] relation
79
- # @param [Hash] options
79
+ # @param [Hash] new_options
80
80
  #
81
81
  # @return [Changeset]
82
82
  #
@@ -7,6 +7,9 @@ require 'rom/changeset/delete'
7
7
  module ROM
8
8
  module Plugins
9
9
  module Relation
10
+ # Relation plugin which adds `Relation#changeset` method
11
+ #
12
+ # @api public
10
13
  module Changeset
11
14
  TYPES = {
12
15
  create: ROM::Changeset::Create,
@@ -20,8 +23,10 @@ module ROM
20
23
  event[:relation].include(InstanceMethods)
21
24
  end
22
25
 
26
+ # Relation instance methods provided by the Changeset plugin
27
+ #
28
+ # @api public
23
29
  module InstanceMethods
24
-
25
30
  # Create a changeset for a relation
26
31
  #
27
32
  # @overload changeset(type, data)
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.beta3
4
+ version: 1.0.0.rc1
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-08-14 00:00:00.000000000 Z
11
+ date: 2017-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-core