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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: caa9d2f25b700ff2a28a8a6886426c7934492675488b0a9f19c128db8ff8a12b
4
- data.tar.gz: c1082b30719ec5ce94ea677de1fbe48374568c8dd0f53dda58907339ae34fd75
3
+ metadata.gz: 817a0d947dc2eca80eb0688d5cd777d5bbfa9c679fbfd8accbc402650ec4bfe1
4
+ data.tar.gz: c68eb509ec868040808cce7e0523537487c07462bf4159daa7b4b88225a6d818
5
5
  SHA512:
6
- metadata.gz: d6b54b04bbc94c191371896e496f1ae04cf394b66d1282da0aeed621604b2ceb1785c5e41e1e572be99ee0208221c2ac6957fc60146b519c36afb2ab511287dc
7
- data.tar.gz: ab14910f84fd4147c6610adf20ece458848032e0b27e6bf7584bbb0839ee5341d6300860d02369e70300012fecc2aa0b8a5837c0478f732b3dcfb7dd9fc7e573
6
+ metadata.gz: 6d5fbee11f7c9ba22b253c4f73572981c8bc9b56377907ce1d8a27f5fe02949ac4a59f795d60e9341d8567c5591dd8e21dccd0dd8bd69be757cd3d4a61fb1431
7
+ data.tar.gz: 45ffb979ebf5786cac6820d62d63b2f3fab366cc0289b86ff72da68db68b0e60d599429843f5ae1c83ba817285f4d0a9ef453d38b31f50672fe41698fc95f5d1
@@ -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 = Rack::Utils.build_nested_query(parsed_query.merge(*args, &block))
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 = Rack::Utils.build_nested_query(parsed_query.merge(*args, &block))
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
@@ -1,3 +1,3 @@
1
1
  module LocalUri
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  end
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.0
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-09 00:00:00.000000000 Z
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport