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 +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/rom/repository/changeset/pipe.rb +13 -4
- data/lib/rom/repository/changeset/stateful.rb +1 -1
- data/lib/rom/repository/version.rb +1 -1
- data/rom-repository.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c707538203786422c6f8a84fb4c0cc9eeb09c042
|
4
|
+
data.tar.gz: c926f00d3af0cced7bf8c49cd631d0d6d8d49325
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2cd0fbb32bc8ad51c6d7c4242c74bd9ac6117630c0f3cfb7e14a08f90cb04225e82d52308d0699fe9d59e4d1c601514864c2a1f3165bd67027abfa813823710
|
7
|
+
data.tar.gz: c75b062e768280c3d6a347c4608c74e372d243add19d425b1b0a98d49964c869a8b611e1e8d89f373dd698d56cb3cab1020f6f12da06d34d66e7a90f2d8144a4
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
#
|
6
|
+
# Transproc Registry useful for pipe
|
7
7
|
#
|
8
8
|
# @api private
|
9
|
-
|
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
|
data/rom-repository.gemspec
CHANGED
@@ -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
|
19
|
-
gem.add_runtime_dependency 'rom-mapper', '~> 0.5
|
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
|
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-
|
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
|
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
|
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
|
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
|
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:
|
187
|
+
version: '0'
|
188
188
|
requirements: []
|
189
189
|
rubyforge_project:
|
190
190
|
rubygems_version: 2.5.1
|