activerecord-multirange 1.2.0 → 1.2.1
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/Gemfile.lock +1 -1
- data/docker-compose.yml +1 -1
- data/lib/activerecord-multirange/relation.rb +5 -5
- data/lib/activerecord-multirange/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e8ec13d27ae216e0f400e1624b05c71e9276a450e53622aba243f181443213a
|
4
|
+
data.tar.gz: 1ee4ac085770e7711541f70eccebaf8fc6e3fb11c45f6e49ebaece4536d29420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efa82b9f56b823dafa589c40de04d072aa9c6d7e6deefb4933e3460fecee039ec77952108709803647a77d7d9a42eac3805ed3a8637dcf64c2ed07bca31a65cb
|
7
|
+
data.tar.gz: 2aaf66267a719ae95509a1a8ce50eb78b476734c74ad15f7ee8ca0c778b59fbbfcf490c08974421deda75aa94a0b2c17527d008b52f664ddbb7976a842449b47
|
data/Gemfile.lock
CHANGED
data/docker-compose.yml
CHANGED
@@ -3,17 +3,17 @@
|
|
3
3
|
module Activerecord
|
4
4
|
module Multirange
|
5
5
|
module Relation
|
6
|
-
def where(
|
7
|
-
if
|
6
|
+
def where(*args)
|
7
|
+
if args.length > 1 && args.first.is_a?(String)
|
8
8
|
# Convert any arrays of ranges in the parameters to multirange format
|
9
|
-
converted_rest =
|
9
|
+
converted_rest = args.from(1).map do |param|
|
10
10
|
if array_of_ranges?(param)
|
11
11
|
encode_array_as_multirange(param)
|
12
12
|
else
|
13
13
|
param
|
14
14
|
end
|
15
15
|
end
|
16
|
-
super(
|
16
|
+
super(args.first, *converted_rest)
|
17
17
|
else
|
18
18
|
super
|
19
19
|
end
|
@@ -31,4 +31,4 @@ module Activerecord
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-multirange
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gustavo Warmling Teixeira
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-08-19 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: pg
|