eac_ruby_utils 0.97.0 → 0.98.0
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: 8e589ad673e489c92596bc3ad46ec06db307af584835cae664a96b163a9e1534
|
4
|
+
data.tar.gz: 6a8f0a202d5fd79decc0a3e416b4b83a559f36ff2258510b2a92db2d5ea8c653
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0184ca1df801cbbc7bdd241e15e628dbc42fa692695500ce0b77c11384d131712587834d36ddc6399926c3513548c6d59d1be53d9777306d12714f9b2d63d7af'
|
7
|
+
data.tar.gz: 36991e903d0f00b8cac236477e8775915cb03dfb2a521308fba707dce3142b4ca0b305b4da34c04c9932de26ae7074ba22ce510b493621b97af815732ec7c678
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'addressable'
|
4
|
+
|
5
|
+
module Addressable
|
6
|
+
class URI
|
7
|
+
# @return [ActiveSupport:HashWithIndifferentAccess]
|
8
|
+
def hash_query_values
|
9
|
+
(query_values || {}).with_indifferent_access
|
10
|
+
end
|
11
|
+
|
12
|
+
def query_value(*args)
|
13
|
+
if args.count == 1
|
14
|
+
query_value_get(*args)
|
15
|
+
elsif args.count == 2
|
16
|
+
query_value_set(*args)
|
17
|
+
else
|
18
|
+
raise ::ArgumentError, "#{object.class}.#{__method__}: wrong number of arguments" \
|
19
|
+
" (given #{args.count}, expected 1..2)"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def query_value_get(name)
|
26
|
+
hash_query_values[name]
|
27
|
+
end
|
28
|
+
|
29
|
+
def query_value_set(name, value)
|
30
|
+
new_query_values = hash_query_values
|
31
|
+
new_query_values[name] = value
|
32
|
+
self.query_values = new_query_values
|
33
|
+
|
34
|
+
self
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.98.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -182,6 +182,9 @@ files:
|
|
182
182
|
- lib/eac_ruby_utils/options_consumer.rb
|
183
183
|
- lib/eac_ruby_utils/patch.rb
|
184
184
|
- lib/eac_ruby_utils/patches.rb
|
185
|
+
- lib/eac_ruby_utils/patches/addressable.rb
|
186
|
+
- lib/eac_ruby_utils/patches/addressable/uri.rb
|
187
|
+
- lib/eac_ruby_utils/patches/addressable/uri/query_value.rb
|
185
188
|
- lib/eac_ruby_utils/patches/class.rb
|
186
189
|
- lib/eac_ruby_utils/patches/class/abstract.rb
|
187
190
|
- lib/eac_ruby_utils/patches/class/common_constructor.rb
|