rom-repository 5.1.2 → 5.2.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9dd018e536140066d8d0f38ef7de6f0699727c49c8441e282edf673781a6a1c
|
4
|
+
data.tar.gz: 66bc8bae27bdaa51d9a2cccf0266f4351d04692050cbb493e0babac1a7017874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 022bc16aab756a1e11e74a9c665534e1bc30fab8cd9227d6a43bcad9b96f05a9fff912196ebe4cef1307c32953b2b58cb3640299acae516a935126593d95783b
|
7
|
+
data.tar.gz: 4fca6bea5d7affe2f17c0a0dd5f56a1138769d5e5df2af4fa222e1de4d050b389de0cab946a2d3480b857c3d69f520f1b8347bd6dd9c724797a11b328e6e5a2d
|
data/lib/rom/repository.rb
CHANGED
@@ -111,6 +111,7 @@ module ROM
|
|
111
111
|
super
|
112
112
|
@relations = {}
|
113
113
|
end
|
114
|
+
ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true)
|
114
115
|
|
115
116
|
# Open a database transaction
|
116
117
|
#
|
@@ -153,7 +154,7 @@ module ROM
|
|
153
154
|
# @!visibility private
|
154
155
|
#
|
155
156
|
# @api public
|
156
|
-
def session
|
157
|
+
def session
|
157
158
|
session = Session.new(self)
|
158
159
|
yield(session)
|
159
160
|
transaction { session.commit! }
|
@@ -59,7 +59,7 @@ module ROM
|
|
59
59
|
include(relation_reader)
|
60
60
|
end
|
61
61
|
|
62
|
-
super(options
|
62
|
+
super(**options, container: container)
|
63
63
|
end
|
64
64
|
|
65
65
|
# Inherits configured relations and commands
|
@@ -70,7 +70,7 @@ module ROM
|
|
70
70
|
|
71
71
|
return if self === Repository
|
72
72
|
|
73
|
-
klass.extend(Dry::Core::Cache)
|
73
|
+
klass.extend(::Dry::Core::Cache)
|
74
74
|
klass.commands(*commands)
|
75
75
|
end
|
76
76
|
|
@@ -105,7 +105,7 @@ module ROM
|
|
105
105
|
@commands.each do |spec|
|
106
106
|
type, *view = Array(spec).flatten
|
107
107
|
|
108
|
-
if view.
|
108
|
+
if !view.empty?
|
109
109
|
define_restricted_command_method(type, view, mapper: mapper, use: use, plugins_options: plugins_options)
|
110
110
|
else
|
111
111
|
define_command_method(type, mapper: mapper, use: use, plugins_options: plugins_options)
|
@@ -117,8 +117,8 @@ module ROM
|
|
117
117
|
end
|
118
118
|
|
119
119
|
# @api public
|
120
|
-
def use(plugin, options
|
121
|
-
ROM.plugin_registry[:repository].fetch(plugin).apply_to(self, options)
|
120
|
+
def use(plugin, **options)
|
121
|
+
ROM.plugin_registry[:repository].fetch(plugin).apply_to(self, **options)
|
122
122
|
end
|
123
123
|
|
124
124
|
private
|
@@ -142,8 +142,8 @@ module ROM
|
|
142
142
|
define_method(meth_name) do |*args|
|
143
143
|
arity = root.__send__(view_name).arity
|
144
144
|
|
145
|
-
view_args = args[0..arity-1]
|
146
|
-
input = args[arity..args.size-1]
|
145
|
+
view_args = args[0..arity - 1]
|
146
|
+
input = args[arity..args.size - 1]
|
147
147
|
|
148
148
|
changeset = input.first
|
149
149
|
|
@@ -13,10 +13,10 @@ module ROM
|
|
13
13
|
module InstanceMethods
|
14
14
|
# @api private
|
15
15
|
def set_relation(name)
|
16
|
-
container
|
17
|
-
relations[name]
|
18
|
-
with(auto_struct: auto_struct)
|
19
|
-
struct_namespace(struct_namespace)
|
16
|
+
container
|
17
|
+
.relations[name]
|
18
|
+
.with(auto_struct: auto_struct)
|
19
|
+
.struct_namespace(struct_namespace)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/lib/rom/repository/root.rb
CHANGED
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: 5.1
|
4
|
+
version: 5.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-initializer
|
@@ -50,20 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '5.
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 5.1.2
|
53
|
+
version: '5.2'
|
57
54
|
type: :runtime
|
58
55
|
prerelease: false
|
59
56
|
version_requirements: !ruby/object:Gem::Requirement
|
60
57
|
requirements:
|
61
58
|
- - "~>"
|
62
59
|
- !ruby/object:Gem::Version
|
63
|
-
version: '5.
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 5.1.2
|
60
|
+
version: '5.2'
|
67
61
|
- !ruby/object:Gem::Dependency
|
68
62
|
name: rake
|
69
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
125
|
- !ruby/object:Gem::Version
|
132
126
|
version: '0'
|
133
127
|
requirements: []
|
134
|
-
rubygems_version: 3.0.
|
128
|
+
rubygems_version: 3.1.0.pre3
|
135
129
|
signing_key:
|
136
130
|
specification_version: 4
|
137
131
|
summary: Repository abstraction for rom-rb
|