rom-repository 1.0.0.rc2 → 1.0.0

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: abd8ee5d8b4132b20ab01c4fc4ee586c26b0e7ac
4
- data.tar.gz: c4f4b25f08b77773c33b585e41cf20b7725f324f
3
+ metadata.gz: c707538203786422c6f8a84fb4c0cc9eeb09c042
4
+ data.tar.gz: c926f00d3af0cced7bf8c49cd631d0d6d8d49325
5
5
  SHA512:
6
- metadata.gz: cb3fe13af29c34580949161270134dfcc53a80fe083948bde31c0eb8126b710c962df8b76a5d0fb371f5e5ae776eafc7df036dc151038220af812036d713c72b
7
- data.tar.gz: 788fa703d7e283afbf330059ce7466b8882ed907ecc8e8ca65ff90a297f0f710167afe4e13d7d7e14d27b9fe5697ee1d3b28bc34c5b51f2443092b35b3d29e2a
6
+ metadata.gz: e2cd0fbb32bc8ad51c6d7c4242c74bd9ac6117630c0f3cfb7e14a08f90cb04225e82d52308d0699fe9d59e4d1c601514864c2a1f3165bd67027abfa813823710
7
+ data.tar.gz: c75b062e768280c3d6a347c4608c74e372d243add19d425b1b0a98d49964c869a8b611e1e8d89f373dd698d56cb3cab1020f6f12da06d34d66e7a90f2d8144a4
@@ -23,6 +23,8 @@
23
23
 
24
24
  ### Fixed
25
25
 
26
+ * `Create` commands generated for aliased associations work correctly (solnic)
27
+ * `Create` commands generated for `belongs_to` associations work correctly (solnic)
26
28
  * FKs are always included in auto-generated structs used in aggregates (solnic)
27
29
  * Calling undefined methods on repo relations raises a nicer error (solnic)
28
30
 
@@ -3,16 +3,14 @@ require 'transproc/transformer'
3
3
 
4
4
  module ROM
5
5
  class Changeset
6
- # Composable data transformation pipe used by default in changesets
6
+ # Transproc Registry useful for pipe
7
7
  #
8
8
  # @api private
9
- class Pipe < Transproc::Transformer
9
+ module PipeRegistry
10
10
  extend Transproc::Registry
11
11
 
12
12
  import Transproc::HashTransformations
13
13
 
14
- attr_reader :processor
15
-
16
14
  def self.add_timestamps(data)
17
15
  now = Time.now
18
16
  data.merge(created_at: now, updated_at: now)
@@ -21,11 +19,22 @@ module ROM
21
19
  def self.touch(data)
22
20
  data.merge(updated_at: Time.now)
23
21
  end
22
+ end
23
+
24
+ # Composable data transformation pipe used by default in changesets
25
+ #
26
+ # @api private
27
+ class Pipe < Transproc::Transformer[PipeRegistry]
28
+ attr_reader :processor
24
29
 
25
30
  def initialize(processor = self.class.transproc)
26
31
  @processor = processor
27
32
  end
28
33
 
34
+ def self.[](name)
35
+ container[name]
36
+ end
37
+
29
38
  def [](name)
30
39
  self.class[name]
31
40
  end
@@ -95,7 +95,7 @@ module ROM
95
95
  # changeset.map(:add_timestamps)
96
96
  #
97
97
  # @param [Array<Symbol>] steps A list of mapping steps
98
-
98
+ #
99
99
  # @overload map(&block)
100
100
  # Apply mapping using a custom block
101
101
  #
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  class Repository
3
- VERSION = '1.0.0.rc2'.freeze
3
+ VERSION = '1.0.0'.freeze
4
4
  end
5
5
  end
@@ -15,8 +15,8 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = `git ls-files -- {spec}/*`.split("\n")
16
16
  gem.license = 'MIT'
17
17
 
18
- gem.add_runtime_dependency 'rom', '~> 3.0.0.rc'
19
- gem.add_runtime_dependency 'rom-mapper', '~> 0.5.0.rc'
18
+ gem.add_runtime_dependency 'rom', '~> 3.0'
19
+ gem.add_runtime_dependency 'rom-mapper', '~> 0.5'
20
20
  gem.add_runtime_dependency 'dry-core', '~> 0.2', '>= 0.2.1'
21
21
  gem.add_runtime_dependency 'dry-struct', '~> 0.1'
22
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-repository
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.0
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-01-27 00:00:00.000000000 Z
11
+ date: 2017-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rom
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0.rc
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0.rc
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rom-mapper
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.5.0.rc
33
+ version: '0.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.5.0.rc
40
+ version: '0.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dry-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -182,9 +182,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 1.3.1
187
+ version: '0'
188
188
  requirements: []
189
189
  rubyforge_project:
190
190
  rubygems_version: 2.5.1