more_core_extensions 4.6.0 → 4.7.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c70c0dd51a37f35b72c4403a74fa65c2e4f14650879535bfca1acc26a49483b
|
|
4
|
+
data.tar.gz: 6a073c5cec6a107ed96d0f89accccc52a522d6ba9312f841ce297033b15de4f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0ef3d2f74629185def922c3a4d9248b7cf486b911f74d057f4e215df446267704adb12568a34f65949db498a18eaa3772b5e38012cb53daf68ec7ff69ebf22a
|
|
7
|
+
data.tar.gz: 15181cda622ab9d8f888cfe0a43b48e031978223f3dd8df2e6d45fae5b95432e456d121c7d8be6c3766e3e263b17d9a795e49ce0db74af13f9c9647d024328fb
|
data/.github/workflows/ci.yaml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [4.7.0] - 2026-07-31
|
|
8
|
+
### Changed
|
|
9
|
+
- Drop Numeric#clamp as it is superseded by Ruby's built-in Comparable#clamp [[#162](https://github.com/ManageIQ/more_core_extensions/pull/162)]
|
|
10
|
+
|
|
7
11
|
## [4.6.0] - 2026-04-28
|
|
8
12
|
### Added
|
|
9
13
|
- Add allowlist support to String#constantize and String#safe_constantize [[#155](https://github.com/ManageIQ/more_core_extensions/pull/155)]
|
|
@@ -134,7 +138,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
134
138
|
- Upgraded to RSpec 3 [[#16](https://github.com/ManageIQ/more_core_extensions/pull/16)]
|
|
135
139
|
- Added the Change Log!
|
|
136
140
|
|
|
137
|
-
[Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v4.
|
|
141
|
+
[Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v4.7.0...HEAD
|
|
142
|
+
[4.7.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.6.0...v4.7.0
|
|
138
143
|
[4.6.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.5.1...v4.6.0
|
|
139
144
|
[4.5.1]: https://github.com/ManageIQ/more_core_extensions/compare/v4.5.0...v4.5.1
|
|
140
145
|
[4.5.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.3.1...v4.5.0
|
data/README.md
CHANGED
|
@@ -77,8 +77,6 @@ MoreCoreExtensions are a set of core extensions beyond those provided by ActiveS
|
|
|
77
77
|
|
|
78
78
|
#### Numeric
|
|
79
79
|
|
|
80
|
-
* core_ext/numeric/clamp.rb
|
|
81
|
-
* `#clamp` - Clamp a number to a minimum and/or maximum value
|
|
82
80
|
* core_ext/numeric/math.rb
|
|
83
81
|
* `#square` - Returns the square of a Numeric
|
|
84
82
|
* core_ext/numeric/rounding.rb
|
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: more_core_extensions
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Frey
|
|
8
8
|
- Brandon Dunne
|
|
9
|
+
autorequire:
|
|
9
10
|
bindir: exe
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2026-07-30 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: activesupport
|
|
@@ -188,7 +189,6 @@ files:
|
|
|
188
189
|
- lib/more_core_extensions/core_ext/module/cache_with_timeout.rb
|
|
189
190
|
- lib/more_core_extensions/core_ext/module/namespace.rb
|
|
190
191
|
- lib/more_core_extensions/core_ext/numeric.rb
|
|
191
|
-
- lib/more_core_extensions/core_ext/numeric/clamp.rb
|
|
192
192
|
- lib/more_core_extensions/core_ext/numeric/math.rb
|
|
193
193
|
- lib/more_core_extensions/core_ext/numeric/rounding.rb
|
|
194
194
|
- lib/more_core_extensions/core_ext/object.rb
|
|
@@ -215,6 +215,7 @@ homepage: http://github.com/ManageIQ/more_core_extensions
|
|
|
215
215
|
licenses:
|
|
216
216
|
- MIT
|
|
217
217
|
metadata: {}
|
|
218
|
+
post_install_message:
|
|
218
219
|
rdoc_options: []
|
|
219
220
|
require_paths:
|
|
220
221
|
- lib
|
|
@@ -229,7 +230,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
229
230
|
- !ruby/object:Gem::Version
|
|
230
231
|
version: '0'
|
|
231
232
|
requirements: []
|
|
232
|
-
rubygems_version:
|
|
233
|
+
rubygems_version: 3.5.22
|
|
234
|
+
signing_key:
|
|
233
235
|
specification_version: 4
|
|
234
236
|
summary: MoreCoreExtensions are a set of core extensions beyond those provided by
|
|
235
237
|
ActiveSupport.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
module MoreCoreExtensions
|
|
2
|
-
module NumericClamp
|
|
3
|
-
#
|
|
4
|
-
# Clamp a number to a minimum and/or maximum value.
|
|
5
|
-
#
|
|
6
|
-
# 8.clamp(nil, nil) #=> 8
|
|
7
|
-
# 8.clamp(9, nil) #=> 9
|
|
8
|
-
# 8.clamp(nil, 6) #=> 6
|
|
9
|
-
def clamp(min, max)
|
|
10
|
-
value = self
|
|
11
|
-
value = [value, min].max if min
|
|
12
|
-
value = [value, max].min if max
|
|
13
|
-
value
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
Numeric.prepend MoreCoreExtensions::NumericClamp
|