rom-sql 3.6.0 → 3.6.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: cc51c9abdc25fa792a3115391e4dbb169d8c7dba6bac5553810140013d097836
|
4
|
+
data.tar.gz: 9b96d61a4dbdb7fa422f66e04933f89c513e429d5576cb6ce5c3c41acec96649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185d71f20d84f614f47511bd1f5f21fd03cfd5d6f0734431464cfa895bb5a1b263798becd891c26b54498c50970d73dcb43cda8c34b2a90a25ca5e164a3921e9
|
7
|
+
data.tar.gz: 57926f14bd364b7abbab21c5bb6d89a53989029e84540e88e9b3b4695abc60509d741884e52313e329f676cfb787ce53eeaf8519794672e75d60f66162bbfb9a
|
data/CHANGELOG.md
CHANGED
@@ -7,9 +7,22 @@ module ROM
|
|
7
7
|
module Postgres
|
8
8
|
module Types
|
9
9
|
IPAddress = Type('inet') do
|
10
|
-
read = SQL::Types.Constructor(IPAddr) { |ip| IPAddr.new(ip.to_s) }
|
10
|
+
read = SQL::Types.Constructor(IPAddr) { |ip| ::IPAddr.new(ip.to_s) }
|
11
11
|
|
12
|
-
SQL::Types.Constructor(IPAddr, &:to_s).meta(read: read)
|
12
|
+
SQL::Types.Constructor(::IPAddr, &:to_s).meta(read: read)
|
13
|
+
end
|
14
|
+
|
15
|
+
IPNetwork = Type('cidr') do
|
16
|
+
read = SQL::Types.Constructor(IPAddr) do |ip|
|
17
|
+
case ip
|
18
|
+
when ::IPAddr
|
19
|
+
ip
|
20
|
+
when String
|
21
|
+
::IPAddr.new(ip)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
SQL::Types.Constructor(::IPAddr) { |ip| "#{ip}/#{ip.prefix}" }.meta(read: read)
|
13
26
|
end
|
14
27
|
end
|
15
28
|
end
|
data/lib/rom/sql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.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: 2022-11-
|
11
|
+
date: 2022-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|