lb-persistence 0.0.2 → 0.0.3
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/lb/persistence.rb +12 -12
- data/lib/lb/persistence/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0da5a5b0b10bc0013d2a17d3b8e66054dfcd580b4eed33b5ac6036fead78173a
|
|
4
|
+
data.tar.gz: d3e3d177f693f756fc422b6c09294424111c1fa55080c70fd5a0796e6a75afb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52ad5a8a0eca92325705b3a618661583e387ab5b439fec46753fdac83bfaba0c4d7e159ac0c729c0f94f2fd2794d5992728291673eb7abaea0ad36012e5036fb
|
|
7
|
+
data.tar.gz: 9c0e54821029ca1b33e6207a520daf8c2146680cee0f1a491432d17963ef72b5f577ba88d1cc195dfef2c93fe4af2df44055186720dc2506f3213ada73094f1e
|
data/lib/lb/persistence.rb
CHANGED
|
@@ -71,8 +71,6 @@ module LB
|
|
|
71
71
|
@uri ||= settings.database_uri
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
-
private
|
|
75
|
-
|
|
76
74
|
# Create ROM container for given config
|
|
77
75
|
#
|
|
78
76
|
# @param [ROM::Configuration] config
|
|
@@ -85,28 +83,30 @@ module LB
|
|
|
85
83
|
ROM.container(config)
|
|
86
84
|
end
|
|
87
85
|
|
|
88
|
-
#
|
|
86
|
+
# Create ROM configuration for given connection or URI
|
|
89
87
|
#
|
|
90
|
-
# @param [String]
|
|
88
|
+
# @param [Sequel::Database | String]
|
|
91
89
|
#
|
|
92
|
-
# @return [ROM::
|
|
90
|
+
# @return [ROM::Configuration]
|
|
93
91
|
#
|
|
94
92
|
# @api private
|
|
95
93
|
#
|
|
96
|
-
def
|
|
97
|
-
|
|
94
|
+
def configuration_for(connection)
|
|
95
|
+
ROM::Configuration.new(:sql, connection)
|
|
98
96
|
end
|
|
99
97
|
|
|
100
|
-
|
|
98
|
+
private
|
|
99
|
+
|
|
100
|
+
# Setup rom for given URI
|
|
101
101
|
#
|
|
102
|
-
# @param [
|
|
102
|
+
# @param [String]
|
|
103
103
|
#
|
|
104
|
-
# @return [ROM::
|
|
104
|
+
# @return [ROM::Conatainer]
|
|
105
105
|
#
|
|
106
106
|
# @api private
|
|
107
107
|
#
|
|
108
|
-
def
|
|
109
|
-
|
|
108
|
+
def rom_setup(uri)
|
|
109
|
+
container_from(configure_for(uri))
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
# Configure ROM
|