hanami-utils 2.3.0.beta2 → 3.0.0.rc1
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/CHANGELOG.md +473 -294
- data/LICENSE +20 -0
- data/README.md +17 -24
- data/hanami-utils.gemspec +27 -21
- data/lib/hanami/utils/deprecation.rb +5 -1
- data/lib/hanami/utils/files.rb +1 -1
- data/lib/hanami/utils/kernel.rb +2 -2
- data/lib/hanami/utils/version.rb +1 -2
- metadata +16 -72
- data/LICENSE.md +0 -22
data/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-2026 Hanakai team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
<!--- This file is synced from hanakai-rb/repo-sync -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[actions]: https://github.com/hanami/hanami-utils/actions
|
|
4
|
+
[chat]: https://discord.gg/naQApPAsZB
|
|
5
|
+
[forum]: https://discourse.hanamirb.org
|
|
6
|
+
[rubygem]: https://rubygems.org/gems/hanami-utils
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[](https://badge.fury.io/rb/hanami-utils)
|
|
8
|
-
[](https://github.com/hanami/utils/actions?query=workflow%3Aci+branch%3Amain)
|
|
9
|
-
[](https://codecov.io/gh/hanami/utils)
|
|
10
|
-
[](https://depfu.com/github/hanami/utils?project=Bundler)
|
|
11
|
-
|
|
12
|
-
## Contact
|
|
13
|
-
|
|
14
|
-
- Home page: http://hanamirb.org
|
|
15
|
-
- Mailing List: http://hanamirb.org/mailing-list
|
|
16
|
-
- API Doc: http://rubydoc.info/gems/hanami-utils
|
|
17
|
-
- Bugs/Issues: https://github.com/hanami/utils/issues
|
|
18
|
-
- Chat: http://chat.hanamirb.org
|
|
8
|
+
# Hanami Utils [][rubygem] [][actions]
|
|
19
9
|
|
|
10
|
+
[][forum]
|
|
11
|
+
[][chat]
|
|
20
12
|
|
|
21
13
|
## Installation
|
|
22
14
|
|
|
23
|
-
**Hanami::Utils** supports Ruby (MRI) 3.1+.
|
|
24
|
-
|
|
25
15
|
Add this line to your application's Gemfile:
|
|
26
16
|
|
|
27
17
|
```ruby
|
|
@@ -107,10 +97,6 @@ Shell colorizer [[API doc](http://www.rubydoc.info/gems/hanami-utils/Hanami/Util
|
|
|
107
97
|
|
|
108
98
|
Enhanced version of Ruby's `String`. [[API doc](http://www.rubydoc.info/gems/hanami-utils/Hanami/Utils/String)]
|
|
109
99
|
|
|
110
|
-
## Versioning
|
|
111
|
-
|
|
112
|
-
**Hanami::Utils** uses [Semantic Versioning 2.0.0](http://semver.org)
|
|
113
|
-
|
|
114
100
|
## Contributing
|
|
115
101
|
|
|
116
102
|
1. Fork it ( https://github.com/hanami/utils/fork )
|
|
@@ -119,6 +105,13 @@ Enhanced version of Ruby's `String`. [[API doc](http://www.rubydoc.info/gems/han
|
|
|
119
105
|
4. Push to the branch (`git push origin my-new-feature`)
|
|
120
106
|
5. Create new Pull Request
|
|
121
107
|
|
|
122
|
-
##
|
|
108
|
+
## Links
|
|
109
|
+
|
|
110
|
+
- [User documentation](https://hanamirb.org)
|
|
111
|
+
- [API documentation](http://rubydoc.info/gems/hanami-utils)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
See `LICENSE` file.
|
|
123
117
|
|
|
124
|
-
Copyright © 2014–2024 Hanami Team – Released under MIT License
|
data/hanami-utils.gemspec
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# This file is synced from hanakai-rb/repo-sync. To update it, edit repo-sync.yml.
|
|
4
|
+
|
|
5
|
+
lib = File.expand_path("lib", __dir__)
|
|
4
6
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
7
|
require "hanami/utils/version"
|
|
6
8
|
|
|
7
9
|
Gem::Specification.new do |spec|
|
|
8
10
|
spec.name = "hanami-utils"
|
|
9
|
-
spec.
|
|
10
|
-
spec.
|
|
11
|
-
spec.email = ["me@lucaguidi.com"]
|
|
12
|
-
spec.description = "Hanami utilities"
|
|
13
|
-
spec.summary = "Ruby core extentions and Hanami utilities"
|
|
14
|
-
spec.homepage = "http://hanamirb.org"
|
|
11
|
+
spec.authors = ["Hanakai team"]
|
|
12
|
+
spec.email = ["info@hanakai.org"]
|
|
15
13
|
spec.license = "MIT"
|
|
14
|
+
spec.version = Hanami::Utils::VERSION.dup
|
|
16
15
|
|
|
17
|
-
spec.
|
|
18
|
-
spec.
|
|
16
|
+
spec.summary = "Ruby core extentions and Hanami utilities"
|
|
17
|
+
spec.description = spec.summary
|
|
18
|
+
spec.homepage = "https://hanamirb.org"
|
|
19
|
+
spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "hanami-utils.gemspec", "lib/**/*"]
|
|
20
|
+
spec.bindir = "exe"
|
|
21
|
+
spec.executables = Dir["exe/*"].map { |f| File.basename(f) }
|
|
19
22
|
spec.require_paths = ["lib"]
|
|
20
|
-
|
|
21
|
-
spec.
|
|
22
|
-
|
|
23
|
-
spec.
|
|
24
|
-
spec.
|
|
25
|
-
spec.
|
|
26
|
-
spec.
|
|
27
|
-
|
|
28
|
-
spec.
|
|
29
|
-
|
|
30
|
-
spec.
|
|
31
|
-
spec.
|
|
23
|
+
|
|
24
|
+
spec.extra_rdoc_files = ["README.md", "CHANGELOG.md", "LICENSE"]
|
|
25
|
+
|
|
26
|
+
spec.metadata["changelog_uri"] = "https://github.com/hanami/hanami-utils/blob/main/CHANGELOG.md"
|
|
27
|
+
spec.metadata["source_code_uri"] = "https://github.com/hanami/hanami-utils"
|
|
28
|
+
spec.metadata["bug_tracker_uri"] = "https://github.com/hanami/hanami-utils/issues"
|
|
29
|
+
spec.metadata["funding_uri"] = "https://github.com/sponsors/hanami"
|
|
30
|
+
|
|
31
|
+
spec.required_ruby_version = ">= 3.3"
|
|
32
|
+
|
|
33
|
+
spec.add_runtime_dependency "dry-core", "~> 1.0", "< 2"
|
|
34
|
+
spec.add_runtime_dependency "dry-transformer", "~> 1.0", "< 2"
|
|
35
|
+
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
|
36
|
+
spec.add_runtime_dependency "bigdecimal", "~> 3.1"
|
|
32
37
|
end
|
|
38
|
+
|
data/lib/hanami/utils/files.rb
CHANGED
|
@@ -9,7 +9,7 @@ module Hanami
|
|
|
9
9
|
# Files utilities
|
|
10
10
|
#
|
|
11
11
|
# @since 1.1.0
|
|
12
|
-
module Files
|
|
12
|
+
module Files
|
|
13
13
|
# Creates an empty file for the given path.
|
|
14
14
|
# All the intermediate directories are created.
|
|
15
15
|
# If the path already exists, it doesn't change the contents
|
data/lib/hanami/utils/kernel.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Hanami
|
|
|
21
21
|
module Utils
|
|
22
22
|
# Kernel utilities
|
|
23
23
|
# @since 0.1.1
|
|
24
|
-
module Kernel
|
|
24
|
+
module Kernel
|
|
25
25
|
# Matcher for numeric values
|
|
26
26
|
#
|
|
27
27
|
# @since 0.3.3
|
|
@@ -1015,7 +1015,7 @@ module Hanami
|
|
|
1015
1015
|
case arg
|
|
1016
1016
|
when "" then raise TypeError.new "can't convert #{inspect_type_error(arg)}into Symbol"
|
|
1017
1017
|
when ->(a) { a.respond_to?(:to_sym) } then arg.to_sym
|
|
1018
|
-
else
|
|
1018
|
+
else
|
|
1019
1019
|
raise TypeError.new "can't convert #{inspect_type_error(arg)}into Symbol"
|
|
1020
1020
|
end
|
|
1021
1021
|
rescue NoMethodError
|
data/lib/hanami/utils/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hanami-utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
8
|
-
bindir:
|
|
7
|
+
- Hanakai team
|
|
8
|
+
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
@@ -77,77 +77,18 @@ dependencies:
|
|
|
77
77
|
- - "~>"
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
79
|
version: '3.1'
|
|
80
|
-
|
|
81
|
-
name: bundler
|
|
82
|
-
requirement: !ruby/object:Gem::Requirement
|
|
83
|
-
requirements:
|
|
84
|
-
- - ">="
|
|
85
|
-
- !ruby/object:Gem::Version
|
|
86
|
-
version: '1.6'
|
|
87
|
-
- - "<"
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '3'
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - ">="
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '1.6'
|
|
97
|
-
- - "<"
|
|
98
|
-
- !ruby/object:Gem::Version
|
|
99
|
-
version: '3'
|
|
100
|
-
- !ruby/object:Gem::Dependency
|
|
101
|
-
name: rake
|
|
102
|
-
requirement: !ruby/object:Gem::Requirement
|
|
103
|
-
requirements:
|
|
104
|
-
- - "~>"
|
|
105
|
-
- !ruby/object:Gem::Version
|
|
106
|
-
version: '13'
|
|
107
|
-
type: :development
|
|
108
|
-
prerelease: false
|
|
109
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
110
|
-
requirements:
|
|
111
|
-
- - "~>"
|
|
112
|
-
- !ruby/object:Gem::Version
|
|
113
|
-
version: '13'
|
|
114
|
-
- !ruby/object:Gem::Dependency
|
|
115
|
-
name: rspec
|
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
|
117
|
-
requirements:
|
|
118
|
-
- - "~>"
|
|
119
|
-
- !ruby/object:Gem::Version
|
|
120
|
-
version: '3.9'
|
|
121
|
-
type: :development
|
|
122
|
-
prerelease: false
|
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
124
|
-
requirements:
|
|
125
|
-
- - "~>"
|
|
126
|
-
- !ruby/object:Gem::Version
|
|
127
|
-
version: '3.9'
|
|
128
|
-
- !ruby/object:Gem::Dependency
|
|
129
|
-
name: rubocop
|
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
|
131
|
-
requirements:
|
|
132
|
-
- - "~>"
|
|
133
|
-
- !ruby/object:Gem::Version
|
|
134
|
-
version: '1.0'
|
|
135
|
-
type: :development
|
|
136
|
-
prerelease: false
|
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
138
|
-
requirements:
|
|
139
|
-
- - "~>"
|
|
140
|
-
- !ruby/object:Gem::Version
|
|
141
|
-
version: '1.0'
|
|
142
|
-
description: Hanami utilities
|
|
80
|
+
description: Ruby core extentions and Hanami utilities
|
|
143
81
|
email:
|
|
144
|
-
-
|
|
82
|
+
- info@hanakai.org
|
|
145
83
|
executables: []
|
|
146
84
|
extensions: []
|
|
147
|
-
extra_rdoc_files:
|
|
85
|
+
extra_rdoc_files:
|
|
86
|
+
- CHANGELOG.md
|
|
87
|
+
- LICENSE
|
|
88
|
+
- README.md
|
|
148
89
|
files:
|
|
149
90
|
- CHANGELOG.md
|
|
150
|
-
- LICENSE
|
|
91
|
+
- LICENSE
|
|
151
92
|
- README.md
|
|
152
93
|
- hanami-utils.gemspec
|
|
153
94
|
- lib/hanami-utils.rb
|
|
@@ -171,11 +112,14 @@ files:
|
|
|
171
112
|
- lib/hanami/utils/shell_color.rb
|
|
172
113
|
- lib/hanami/utils/string.rb
|
|
173
114
|
- lib/hanami/utils/version.rb
|
|
174
|
-
homepage:
|
|
115
|
+
homepage: https://hanamirb.org
|
|
175
116
|
licenses:
|
|
176
117
|
- MIT
|
|
177
118
|
metadata:
|
|
178
|
-
|
|
119
|
+
changelog_uri: https://github.com/hanami/hanami-utils/blob/main/CHANGELOG.md
|
|
120
|
+
source_code_uri: https://github.com/hanami/hanami-utils
|
|
121
|
+
bug_tracker_uri: https://github.com/hanami/hanami-utils/issues
|
|
122
|
+
funding_uri: https://github.com/sponsors/hanami
|
|
179
123
|
rdoc_options: []
|
|
180
124
|
require_paths:
|
|
181
125
|
- lib
|
|
@@ -183,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
183
127
|
requirements:
|
|
184
128
|
- - ">="
|
|
185
129
|
- !ruby/object:Gem::Version
|
|
186
|
-
version: '3.
|
|
130
|
+
version: '3.3'
|
|
187
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
132
|
requirements:
|
|
189
133
|
- - ">="
|
data/LICENSE.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Copyright © 2014 Hanami Team
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|