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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -1
  3. data/iri.gemspec +2 -2
  4. data/lib/iri.rb +5 -5
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 954071d3530c678879761bb88cb8b62b9cec4d2859fbd1b3eea21e030d412a5e
4
- data.tar.gz: 4d1076ef2dd1bc1ef804a5df31793d45e021140e98ecf5cc5c80677a48e5f96f
3
+ metadata.gz: 32dd06d46f3e63261c7e24410e56038974ace83eecbd04623b981ac75b066bc6
4
+ data.tar.gz: 0ea7d9af045ff9cf0a6bc43ed9dc6b263a79ec641ada6f5d22e43d22dd1ea562
5
5
  SHA512:
6
- metadata.gz: 56abcf6044957b2cabecb1f4b63e405514cb2fd9143a387d0e47678470fe4fe7cf178ee681737cf6c93a48ea0cbf23866d5a73b85f216ce365b01106da15ebee
7
- data.tar.gz: '0488f1643bfe812abcd6bd387117060d18b1c5612b675af76a52a2b9b83f620565ca4dd944132405773cb6f749b274813d70d345c300a0db86ef6a1dc1327a56'
6
+ metadata.gz: ac08d8d5ca552f3ac93328ef478edb3ddc83719daf06ebb9afbbe72500a02994fe9602a0d5999c661abb294a35a6d08f3982a14f2fc98a444235af4b629c20a2
7
+ data.tar.gz: cf21ed44b8cdbdec9a0888d9938080a0ab53f9315558ae20f09e0403613030800bbdff8aef65359c3fc1916c0928c2596d48a19f284cdd1dc6b63cbdad3e695a
data/README.md CHANGED
@@ -6,7 +6,6 @@
6
6
 
7
7
  [![rake](https://github.com/yegor256/iri/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/iri/actions/workflows/rake.yml)
8
8
  [![Gem Version](https://badge.fury.io/rb/iri.svg)](https://badge.fury.io/rb/iri)
9
- [![Maintainability](https://api.codeclimate.com/v1/badges/7018d2fe438103828685/maintainability)](https://codeclimate.com/github/yegor256/iri/maintainability)
10
9
  [![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://rubydoc.info/github/yegor256/iri/master/frames)
11
10
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/iri/blob/master/LICENSE.txt)
12
11
  [![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/iri.svg)](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.4'
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 for reuse.'
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: @local, safe: @safe)
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
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 for reuse.
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: []