rom-core 5.2.1 → 5.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rom/command_compiler.rb +0 -2
- data/lib/rom/core/version.rb +1 -1
- data/lib/rom/environment.rb +3 -0
- data/lib/rom/gateway.rb +4 -0
- data/lib/rom/plugins/command/schema.rb +10 -9
- data/lib/rom/relation/view_dsl.rb +1 -1
- data/lib/rom/setup/auto_registration.rb +1 -1
- data/lib/rom/support/configurable.rb +0 -6
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bafb062dd70c60068b1833425097b30aafc14f928272c352f5f4ba835f874f68
|
4
|
+
data.tar.gz: 70048675b39e98a2b8871df48c79d5b7dfc2d91d644fe4d73063aeaf79225b5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8f85677084bcf45fc78d3a3983c797f45255455e0f35fc50c892b85426f219572c2f564761e57c32f755d7bd04b9aebcf92bb29ace6042b384879c7be52eaaa
|
7
|
+
data.tar.gz: 4ac7f60759b67bc6d51dfbf805550a890eda4285375063fe4b38f7f18716c588c0f3953e2e076d70f22495d332ea2aa710948d3bf7958480f9d3db6aee847eb2
|
data/lib/rom/command_compiler.rb
CHANGED
@@ -193,8 +193,6 @@ module ROM
|
|
193
193
|
type.create_class(rel_name, type) do |klass|
|
194
194
|
klass.result(rel_meta.fetch(:combine_type, result))
|
195
195
|
|
196
|
-
klass.input(meta.fetch(:input, relation.input_schema))
|
197
|
-
|
198
196
|
meta.each do |name, value|
|
199
197
|
klass.public_send(name, value)
|
200
198
|
end
|
data/lib/rom/core/version.rb
CHANGED
data/lib/rom/environment.rb
CHANGED
@@ -49,6 +49,9 @@ module ROM
|
|
49
49
|
|
50
50
|
if identifier.is_a?(Gateway)
|
51
51
|
gateway = identifier
|
52
|
+
elsif RUBY_VERSION >= "3.0"
|
53
|
+
kwargs = args.last.is_a?(Hash) ? args.pop : {}
|
54
|
+
gateway = Gateway.setup(identifier, *args.flatten, **kwargs)
|
52
55
|
else
|
53
56
|
gateway = Gateway.setup(identifier, *args.flatten)
|
54
57
|
end
|
data/lib/rom/gateway.rb
CHANGED
@@ -22,19 +22,20 @@ module ROM
|
|
22
22
|
#
|
23
23
|
# @api public
|
24
24
|
def build(relation, **options)
|
25
|
-
if options.key?(:input)
|
26
|
-
|
27
|
-
|
28
|
-
default_input = options.fetch(:input, input)
|
25
|
+
if relation.schema? && !options.key?(:input)
|
26
|
+
relation_input = relation.input_schema
|
27
|
+
command_input = input
|
29
28
|
|
30
|
-
|
31
|
-
if
|
32
|
-
|
29
|
+
composed_input =
|
30
|
+
if command_input.equal?(ROM::Command.input)
|
31
|
+
relation_input
|
33
32
|
else
|
34
|
-
|
33
|
+
-> tuple { relation_input[command_input[tuple]] }
|
35
34
|
end
|
36
35
|
|
37
|
-
super(relation, **options, input:
|
36
|
+
super(relation, **options, input: composed_input)
|
37
|
+
else
|
38
|
+
super
|
38
39
|
end
|
39
40
|
end
|
40
41
|
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: 5.2.
|
4
|
+
version: 5.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -327,7 +327,7 @@ metadata:
|
|
327
327
|
documentation_uri: https://api.rom-rb.org/rom/
|
328
328
|
mailing_list_uri: https://discourse.rom-rb.org/
|
329
329
|
bug_tracker_uri: https://github.com/rom-rb/rom/issues
|
330
|
-
post_install_message:
|
330
|
+
post_install_message:
|
331
331
|
rdoc_options: []
|
332
332
|
require_paths:
|
333
333
|
- lib
|
@@ -342,8 +342,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
342
342
|
- !ruby/object:Gem::Version
|
343
343
|
version: '0'
|
344
344
|
requirements: []
|
345
|
-
rubygems_version: 3.
|
346
|
-
signing_key:
|
345
|
+
rubygems_version: 3.2.3
|
346
|
+
signing_key:
|
347
347
|
specification_version: 4
|
348
348
|
summary: Ruby Object Mapper
|
349
349
|
test_files: []
|