local_uri 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/local_uri/query.rb +7 -2
- data/lib/local_uri/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: 817a0d947dc2eca80eb0688d5cd777d5bbfa9c679fbfd8accbc402650ec4bfe1
|
4
|
+
data.tar.gz: c68eb509ec868040808cce7e0523537487c07462bf4159daa7b4b88225a6d818
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d5fbee11f7c9ba22b253c4f73572981c8bc9b56377907ce1d8a27f5fe02949ac4a59f795d60e9341d8567c5591dd8e21dccd0dd8bd69be757cd3d4a61fb1431
|
7
|
+
data.tar.gz: 45ffb979ebf5786cac6820d62d63b2f3fab366cc0289b86ff72da68db68b0e60d599429843f5ae1c83ba817285f4d0a9ef453d38b31f50672fe41698fc95f5d1
|
data/lib/local_uri/query.rb
CHANGED
@@ -16,13 +16,13 @@ module LocalUri
|
|
16
16
|
|
17
17
|
def merge(*args, &block)
|
18
18
|
@uri.dup.tap do |uri|
|
19
|
-
uri.query_string =
|
19
|
+
uri.query_string = build_query_string(*args, &block)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
def merge!(*args, &block)
|
24
24
|
@uri.tap do |uri|
|
25
|
-
uri.query_string =
|
25
|
+
uri.query_string = build_query_string(*args, &block)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -31,5 +31,10 @@ module LocalUri
|
|
31
31
|
def parsed_query
|
32
32
|
Rack::Utils.parse_nested_query(@uri.query_string).with_indifferent_access
|
33
33
|
end
|
34
|
+
|
35
|
+
def build_query_string(*args, &block)
|
36
|
+
query_string = Rack::Utils.build_nested_query(parsed_query.merge(*args, &block))
|
37
|
+
query_string.empty? ? nil : query_string
|
38
|
+
end
|
34
39
|
end
|
35
40
|
end
|
data/lib/local_uri/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: local_uri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/local_uri/graphs/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|