uri-builder 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -1
- data/lib/uri/builder/version.rb +1 -1
- data/lib/uri/builder.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfc6aae28ed080b625a086509de8d8f540c7b96ae18fd44ac5e9206a116160c4
|
4
|
+
data.tar.gz: 55094b5b4f3e05475b9fea762c6abad86a8665c3e817b0ba17ed264f795b5b06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 120a8ea8dbd40db58885acbd69aa2dd7c6a53f1dab53facc44d3e7415efb9568470e83798156359bccc8a87a5d289426d94fefca7f62fb7aff73d010bb8079a4
|
7
|
+
data.tar.gz: 4284aa8a800bd0f92156ee916dd087c1194f776291afdfc7204e17f532bb96efc97414ab72fba4193101b8a5e7816ce391218dcd80a4465c8eadb7ae95dbe94c
|
data/Gemfile.lock
CHANGED
data/lib/uri/builder/version.rb
CHANGED
data/lib/uri/builder.rb
CHANGED
@@ -14,12 +14,18 @@ module URI
|
|
14
14
|
@uri = uri.clone
|
15
15
|
end
|
16
16
|
|
17
|
-
[:host, :
|
17
|
+
[:host, :query, :fragment, :port].each do |property|
|
18
18
|
define_method property do |value|
|
19
19
|
wrap property, value
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def scheme(value)
|
24
|
+
target_scheme = URI.scheme_list[value.upcase]
|
25
|
+
args = Hash[target_scheme.component.map { |attr| [ attr, @uri.send(attr) ] }]
|
26
|
+
@uri = target_scheme.build(**args)
|
27
|
+
end
|
28
|
+
|
23
29
|
def query(value)
|
24
30
|
value = case value
|
25
31
|
when Hash
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uri-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Build URIs via chains
|
14
14
|
email:
|
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '0'
|
51
51
|
requirements: []
|
52
|
-
rubygems_version: 3.
|
52
|
+
rubygems_version: 3.4.6
|
53
53
|
signing_key:
|
54
54
|
specification_version: 4
|
55
55
|
summary: Build URIs via chains
|