iri 0.11.4 → 0.11.5
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/README.md +0 -1
- data/iri.gemspec +2 -2
- data/lib/iri.rb +5 -5
- 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: 32dd06d46f3e63261c7e24410e56038974ace83eecbd04623b981ac75b066bc6
|
|
4
|
+
data.tar.gz: 0ea7d9af045ff9cf0a6bc43ed9dc6b263a79ec641ada6f5d22e43d22dd1ea562
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac08d8d5ca552f3ac93328ef478edb3ddc83719daf06ebb9afbbe72500a02994fe9602a0d5999c661abb294a35a6d08f3982a14f2fc98a444235af4b629c20a2
|
|
7
|
+
data.tar.gz: cf21ed44b8cdbdec9a0888d9938080a0ab53f9315558ae20f09e0403613030800bbdff8aef65359c3fc1916c0928c2596d48a19f284cdd1dc6b63cbdad3e695a
|
data/README.md
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://github.com/yegor256/iri/actions/workflows/rake.yml)
|
|
8
8
|
[](https://badge.fury.io/rb/iri)
|
|
9
|
-
[](https://codeclimate.com/github/yegor256/iri/maintainability)
|
|
10
9
|
[](https://rubydoc.info/github/yegor256/iri/master/frames)
|
|
11
10
|
[](https://github.com/yegor256/iri/blob/master/LICENSE.txt)
|
|
12
11
|
[](https://codecov.io/github/yegor256/iri?branch=master)
|
data/iri.gemspec
CHANGED
|
@@ -9,14 +9,14 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
|
10
10
|
s.required_ruby_version = '>=2.2'
|
|
11
11
|
s.name = 'iri'
|
|
12
|
-
s.version = '0.11.
|
|
12
|
+
s.version = '0.11.5'
|
|
13
13
|
s.license = 'MIT'
|
|
14
14
|
s.summary = 'Simple Immutable Ruby URI Builder'
|
|
15
15
|
s.description =
|
|
16
16
|
'Class Iri helps you build a URI and then modify its ' \
|
|
17
17
|
'parts via a simple immutable fluent interface. It always returns a new ' \
|
|
18
18
|
'object instead of changing the existing one. This makes the object ' \
|
|
19
|
-
'safer and much easier
|
|
19
|
+
'safer and much easier to reuse.'
|
|
20
20
|
s.authors = ['Yegor Bugayenko']
|
|
21
21
|
s.email = 'yegor256@gmail.com'
|
|
22
22
|
s.homepage = 'https://github.com/yegor256/iri'
|
data/lib/iri.rb
CHANGED
|
@@ -219,7 +219,7 @@ class Iri
|
|
|
219
219
|
raise ArgumentError, "The scheme can't be nil" if val.nil?
|
|
220
220
|
val = val.to_s
|
|
221
221
|
raise ArgumentError, "The scheme can't be empty" if val.empty?
|
|
222
|
-
modify do |c|
|
|
222
|
+
modify(local: false) do |c|
|
|
223
223
|
c.scheme = val
|
|
224
224
|
end
|
|
225
225
|
end
|
|
@@ -238,7 +238,7 @@ class Iri
|
|
|
238
238
|
raise ArgumentError, "The host can't be nil" if val.nil?
|
|
239
239
|
val = val.to_s
|
|
240
240
|
raise ArgumentError, "The host can't be empty" if val.empty?
|
|
241
|
-
modify do |c|
|
|
241
|
+
modify(local: false) do |c|
|
|
242
242
|
c.host = val
|
|
243
243
|
end
|
|
244
244
|
end
|
|
@@ -259,7 +259,7 @@ class Iri
|
|
|
259
259
|
raise ArgumentError, "The port can'be negative" if val.negative?
|
|
260
260
|
raise ArgumentError, "The port can'be zero" if val.zero?
|
|
261
261
|
raise ArgumentError, "The port can'be larger than 65536" if val > 65_536
|
|
262
|
-
modify do |c|
|
|
262
|
+
modify(local: false) do |c|
|
|
263
263
|
c.port = val
|
|
264
264
|
end
|
|
265
265
|
end
|
|
@@ -406,10 +406,10 @@ class Iri
|
|
|
406
406
|
#
|
|
407
407
|
# @yield [URI] The cloned URI object for modification
|
|
408
408
|
# @return [Iri] A new Iri instance with the modified URI
|
|
409
|
-
def modify
|
|
409
|
+
def modify(local: @local, safe: @safe)
|
|
410
410
|
c = the_uri.clone
|
|
411
411
|
yield c
|
|
412
|
-
Iri.new(c, local:
|
|
412
|
+
Iri.new(c, local: local, safe: safe)
|
|
413
413
|
end
|
|
414
414
|
|
|
415
415
|
# Creates a new Iri object after modifying the query parameters.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iri
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
@@ -11,7 +11,7 @@ date: 1980-01-02 00:00:00.000000000 Z
|
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: Class Iri helps you build a URI and then modify its parts via a simple
|
|
13
13
|
immutable fluent interface. It always returns a new object instead of changing the
|
|
14
|
-
existing one. This makes the object safer and much easier
|
|
14
|
+
existing one. This makes the object safer and much easier to reuse.
|
|
15
15
|
email: yegor256@gmail.com
|
|
16
16
|
executables: []
|
|
17
17
|
extensions: []
|