hanami-utils 2.1.0 → 2.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +5 -12
- data/hanami-utils.gemspec +1 -1
- data/lib/hanami/utils/kernel.rb +5 -5
- data/lib/hanami/utils/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fab055c1b9c5bffe2f9137b7ef25d4d8699d958f817829e6b0142d6b25f1c10
|
4
|
+
data.tar.gz: d777a001f447f3903e24738714c056879931b8bce98082c2213767c01846b209
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d44fc75e23555ede52d3254691d184fb10be8568cbc5b0952583f9b90831a557de721aa0414278ccfcad841a15bb5e1d13b3c02cda809ccc1a39ac5d1f887cdb
|
7
|
+
data.tar.gz: cb59a843250330d7ec8d7ce69e86656235d4b2a4268f568a89826930cd7890b67aa26261a88bd81c7faeeea813d2c3ac9b6fc524af197f2e5cc8a2c80775e1bb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,30 +5,23 @@ Ruby core extensions and class utilities for [Hanami](http://hanamirb.org)
|
|
5
5
|
## Status
|
6
6
|
|
7
7
|
[![Gem Version](https://badge.fury.io/rb/hanami-utils.svg)](https://badge.fury.io/rb/hanami-utils)
|
8
|
-
[![CI](https://github.com/hanami/utils/workflows/ci/badge.svg
|
8
|
+
[![CI](https://github.com/hanami/utils/actions/workflows/ci.yml/badge.svg)](https://github.com/hanami/utils/actions?query=workflow%3Aci+branch%3Amain)
|
9
9
|
[![Test Coverage](https://codecov.io/gh/hanami/utils/branch/main/graph/badge.svg)](https://codecov.io/gh/hanami/utils)
|
10
10
|
[![Depfu](https://badges.depfu.com/badges/a8545fb67cf32a2c75b6227bc0821027/overview.svg)](https://depfu.com/github/hanami/utils?project=Bundler)
|
11
|
-
[![Inline Docs](http://inch-ci.org/github/hanami/utils.svg)](http://inch-ci.org/github/hanami/utils)
|
12
|
-
|
13
|
-
## Version
|
14
|
-
|
15
|
-
**This branch contains the code for `hanami-utils` 2.x.**
|
16
11
|
|
17
12
|
## Contact
|
18
13
|
|
19
14
|
- Home page: http://hanamirb.org
|
20
15
|
- Mailing List: http://hanamirb.org/mailing-list
|
21
|
-
- API Doc: http://
|
16
|
+
- API Doc: http://rubydoc.info/gems/hanami-utils
|
22
17
|
- Bugs/Issues: https://github.com/hanami/utils/issues
|
23
|
-
- Support: http://stackoverflow.com/questions/tagged/hanami
|
24
18
|
- Chat: http://chat.hanamirb.org
|
25
19
|
|
26
|
-
## Rubies
|
27
|
-
|
28
|
-
**Hanami::Utils** supports Ruby (MRI) 3.0+
|
29
20
|
|
30
21
|
## Installation
|
31
22
|
|
23
|
+
**Hanami::Utils** supports Ruby (MRI) 3.1+.
|
24
|
+
|
32
25
|
Add this line to your application's Gemfile:
|
33
26
|
|
34
27
|
```ruby
|
@@ -128,4 +121,4 @@ Enhanced version of Ruby's `String`. [[API doc](http://www.rubydoc.info/gems/han
|
|
128
121
|
|
129
122
|
## Copyright
|
130
123
|
|
131
|
-
Copyright © 2014 Hanami Team – Released under MIT License
|
124
|
+
Copyright © 2014–2024 Hanami Team – Released under MIT License
|
data/hanami-utils.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
spec.metadata["rubygems_mfa_required"] = "true"
|
21
|
-
spec.required_ruby_version = ">= 3.
|
21
|
+
spec.required_ruby_version = ">= 3.1"
|
22
22
|
|
23
23
|
spec.add_dependency "dry-core", "~> 1.0", "< 2"
|
24
24
|
spec.add_dependency "dry-transformer", "~> 1.0", "< 2"
|
data/lib/hanami/utils/kernel.rb
CHANGED
@@ -93,7 +93,7 @@ module Hanami
|
|
93
93
|
# response = Response.new(200, {}, 'hello')
|
94
94
|
# Hanami::Utils::Kernel.Array(response) # => [200, {}, "hello"]
|
95
95
|
def self.Array(arg)
|
96
|
-
super
|
96
|
+
super.dup.tap do |a|
|
97
97
|
a.flatten!
|
98
98
|
a.compact!
|
99
99
|
a.uniq!
|
@@ -215,7 +215,7 @@ module Hanami
|
|
215
215
|
if arg.respond_to?(:to_h)
|
216
216
|
arg.to_h
|
217
217
|
else
|
218
|
-
super
|
218
|
+
super
|
219
219
|
end
|
220
220
|
rescue NoMethodError
|
221
221
|
raise TypeError.new "can't convert #{inspect_type_error(arg)}into Hash"
|
@@ -329,7 +329,7 @@ module Hanami
|
|
329
329
|
# input = Complex(2, 3)
|
330
330
|
# Hanami::Utils::Kernel.Integer(input) # => TypeError
|
331
331
|
def self.Integer(arg)
|
332
|
-
super
|
332
|
+
super
|
333
333
|
rescue ArgumentError, TypeError, NoMethodError
|
334
334
|
begin
|
335
335
|
case arg
|
@@ -549,7 +549,7 @@ module Hanami
|
|
549
549
|
# input = Complex(2, 3)
|
550
550
|
# Hanami::Utils::Kernel.Float(input) # => TypeError
|
551
551
|
def self.Float(arg)
|
552
|
-
super
|
552
|
+
super
|
553
553
|
rescue ArgumentError, TypeError
|
554
554
|
begin
|
555
555
|
case arg
|
@@ -654,7 +654,7 @@ module Hanami
|
|
654
654
|
# Hanami::Utils::Kernel.String(input) # => TypeError
|
655
655
|
def self.String(arg)
|
656
656
|
arg = arg.to_str if arg.respond_to?(:to_str)
|
657
|
-
super
|
657
|
+
super
|
658
658
|
rescue NoMethodError
|
659
659
|
raise TypeError.new "can't convert #{inspect_type_error(arg)}into String"
|
660
660
|
end
|
data/lib/hanami/utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-core
|
@@ -171,14 +171,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
171
|
requirements:
|
172
172
|
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version: '3.
|
174
|
+
version: '3.1'
|
175
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - ">="
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
|
-
rubygems_version: 3.5.
|
181
|
+
rubygems_version: 3.5.9
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Ruby core extentions and Hanami utilities
|