more_core_extensions 4.3.1 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +33 -0
- data/.rspec +2 -2
- data/.rubocop_local.yml +1 -1
- data/.whitesource +3 -0
- data/CHANGELOG.md +7 -1
- data/README.md +3 -4
- data/lib/more_core_extensions/core_ext/array/deletes.rb +1 -0
- data/lib/more_core_extensions/core_ext/array/math.rb +1 -0
- data/lib/more_core_extensions/core_ext/class/hierarchy.rb +1 -0
- data/lib/more_core_extensions/core_ext/digest/uuid.rb +1 -0
- data/lib/more_core_extensions/core_ext/hash/deletes.rb +1 -0
- data/lib/more_core_extensions/core_ext/object.rb +1 -0
- data/lib/more_core_extensions/core_ext/string/iec60027_2.rb +3 -1
- data/lib/more_core_extensions/version.rb +1 -1
- data/more_core_extensions.gemspec +4 -5
- metadata +21 -34
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db4cb66221e2ed8edd88cedf25dfc25c86d5ba70fd9896866262eadcc20c48cc
|
4
|
+
data.tar.gz: fe56790ae8f33f7d494dcf6a105578b76d6aa863cbdf15ccd2b4c8f3e3f352bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc5ffe0e3eed645b090a44a6f263070e1ca5f8c52d3243381d29d57a677c11771a2b3d3db745c8f9d41dd46e1b2b860be2f3b255cdb1842ce83c56760e85d92e
|
7
|
+
data.tar.gz: 5699d773b2b49bfe617972147354dc6293888657de6ce992aa708f70685f98943c74bfeadb162ee38d1abea75fff46498e605136843a001667e8af2f8c4826fc
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
pull_request:
|
6
|
+
schedule:
|
7
|
+
- cron: '0 0 * * 0'
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
ci:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version:
|
15
|
+
- '2.5'
|
16
|
+
- '2.6'
|
17
|
+
- '2.7'
|
18
|
+
- '3.0'
|
19
|
+
env:
|
20
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Set up Ruby
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby-version }}
|
27
|
+
bundler-cache: true
|
28
|
+
- name: Run tests
|
29
|
+
run: bundle exec rake
|
30
|
+
- name: Report code coverage
|
31
|
+
if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.0' }}
|
32
|
+
continue-on-error: true
|
33
|
+
uses: paambaati/codeclimate-action@v3.0.0
|
data/.rspec
CHANGED
data/.rubocop_local.yml
CHANGED
data/.whitesource
ADDED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
5
5
|
## [Unreleased]
|
6
6
|
|
7
|
+
## [4.4.0] - 2022-03-01
|
8
|
+
### Added
|
9
|
+
- Add support for Rails 7 ActiveSupport [[#105](https://github.com/ManageIQ/more_core_extensions/pull/105)]
|
10
|
+
- Add float base support to String#iec_60027_2_to_i [[#106](https://github.com/ManageIQ/more_core_extensions/pull/106)]
|
11
|
+
|
7
12
|
## [4.3.1] - 2021-07-13
|
8
13
|
### Changed
|
9
14
|
- Fix String#to_i_with_method to raise the correct error on private methods [[#101](https://github.com/ManageIQ/more_core_extensions/pull/101)]
|
@@ -107,7 +112,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
107
112
|
- Upgraded to RSpec 3 [[#16](https://github.com/ManageIQ/more_core_extensions/pull/16)]
|
108
113
|
- Added the Change Log!
|
109
114
|
|
110
|
-
[Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v4.
|
115
|
+
[Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v4.4.0...HEAD
|
116
|
+
[4.4.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.3.1...v4.4.0
|
111
117
|
[4.3.1]: https://github.com/ManageIQ/more_core_extensions/compare/v4.3.0...v4.3.1
|
112
118
|
[4.3.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.2.0...v4.3.0
|
113
119
|
[4.2.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.1.0...v4.2.0
|
data/README.md
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
# MoreCoreExtensions
|
2
2
|
|
3
|
-
[![Join the chat at https://gitter.im/ManageIQ/more_core_extensions](https://badges.gitter.im/ManageIQ/more_core_extensions.svg)](https://gitter.im/ManageIQ/more_core_extensions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4
|
-
|
5
3
|
MoreCoreExtensions are a set of core extensions beyond those provided by ActiveSupport.
|
6
4
|
|
7
5
|
[![Gem Version](https://badge.fury.io/rb/more_core_extensions.svg)](http://badge.fury.io/rb/more_core_extensions)
|
8
|
-
[![
|
6
|
+
[![CI](https://github.com/ManageIQ/more_core_extensions/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/more_core_extensions/actions/workflows/ci.yaml)
|
9
7
|
[![Code Climate](http://img.shields.io/codeclimate/github/ManageIQ/more_core_extensions.svg)](https://codeclimate.com/github/ManageIQ/more_core_extensions)
|
10
8
|
[![Coverage Status](http://img.shields.io/coveralls/ManageIQ/more_core_extensions.svg)](https://coveralls.io/r/ManageIQ/more_core_extensions)
|
11
|
-
|
9
|
+
|
10
|
+
[![Join the chat at https://gitter.im/ManageIQ/more_core_extensions](https://badges.gitter.im/ManageIQ/more_core_extensions.svg)](https://gitter.im/ManageIQ/more_core_extensions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
12
11
|
|
13
12
|
## Extensions Provided
|
14
13
|
|
@@ -9,8 +9,10 @@ module MoreCoreExtensions
|
|
9
9
|
suffix_index = IEC_60027_2_SIZE_SUFFIXES.index(self[-2..-1])
|
10
10
|
if suffix_index.nil?
|
11
11
|
Integer(self)
|
12
|
+
elsif include?(".")
|
13
|
+
Integer(Float(self[0..-3]) * ((2**10)**(suffix_index + 1)))
|
12
14
|
else
|
13
|
-
Integer(self[0..-3]) * (2**10)**(suffix_index + 1)
|
15
|
+
Integer(self[0..-3]) * ((2**10)**(suffix_index + 1))
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -22,14 +22,13 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.required_ruby_version = ">= 2.0.0"
|
24
24
|
|
25
|
+
spec.add_runtime_dependency "activesupport"
|
26
|
+
spec.add_runtime_dependency "sync"
|
27
|
+
|
25
28
|
spec.add_development_dependency "bundler"
|
26
|
-
spec.add_development_dependency "codeclimate-test-reporter"
|
27
29
|
spec.add_development_dependency "manageiq-style"
|
28
30
|
spec.add_development_dependency "rake"
|
29
31
|
spec.add_development_dependency "rspec", ">= 3.0"
|
30
|
-
spec.add_development_dependency "simplecov"
|
32
|
+
spec.add_development_dependency "simplecov", ">= 0.21.2"
|
31
33
|
spec.add_development_dependency "timecop"
|
32
|
-
|
33
|
-
spec.add_runtime_dependency "activesupport"
|
34
|
-
spec.add_runtime_dependency "sync"
|
35
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Frey
|
@@ -9,16 +9,16 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
|
-
type: :
|
21
|
+
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
@@ -26,13 +26,13 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: sync
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
|
-
type: :
|
35
|
+
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: manageiq-style
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
@@ -68,21 +68,7 @@ dependencies:
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '3.0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '3.0'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: simplecov
|
71
|
+
name: rake
|
86
72
|
requirement: !ruby/object:Gem::Requirement
|
87
73
|
requirements:
|
88
74
|
- - ">="
|
@@ -96,41 +82,41 @@ dependencies:
|
|
96
82
|
- !ruby/object:Gem::Version
|
97
83
|
version: '0'
|
98
84
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
85
|
+
name: rspec
|
100
86
|
requirement: !ruby/object:Gem::Requirement
|
101
87
|
requirements:
|
102
88
|
- - ">="
|
103
89
|
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
90
|
+
version: '3.0'
|
105
91
|
type: :development
|
106
92
|
prerelease: false
|
107
93
|
version_requirements: !ruby/object:Gem::Requirement
|
108
94
|
requirements:
|
109
95
|
- - ">="
|
110
96
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
97
|
+
version: '3.0'
|
112
98
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
99
|
+
name: simplecov
|
114
100
|
requirement: !ruby/object:Gem::Requirement
|
115
101
|
requirements:
|
116
102
|
- - ">="
|
117
103
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
119
|
-
type: :
|
104
|
+
version: 0.21.2
|
105
|
+
type: :development
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
108
|
requirements:
|
123
109
|
- - ">="
|
124
110
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
111
|
+
version: 0.21.2
|
126
112
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
113
|
+
name: timecop
|
128
114
|
requirement: !ruby/object:Gem::Requirement
|
129
115
|
requirements:
|
130
116
|
- - ">="
|
131
117
|
- !ruby/object:Gem::Version
|
132
118
|
version: '0'
|
133
|
-
type: :
|
119
|
+
type: :development
|
134
120
|
prerelease: false
|
135
121
|
version_requirements: !ruby/object:Gem::Requirement
|
136
122
|
requirements:
|
@@ -147,12 +133,13 @@ extensions: []
|
|
147
133
|
extra_rdoc_files: []
|
148
134
|
files:
|
149
135
|
- ".codeclimate.yml"
|
136
|
+
- ".github/workflows/ci.yaml"
|
150
137
|
- ".gitignore"
|
151
138
|
- ".rspec"
|
152
139
|
- ".rubocop.yml"
|
153
140
|
- ".rubocop_cc.yml"
|
154
141
|
- ".rubocop_local.yml"
|
155
|
-
- ".
|
142
|
+
- ".whitesource"
|
156
143
|
- CHANGELOG.md
|
157
144
|
- Gemfile
|
158
145
|
- LICENSE.txt
|
@@ -230,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
217
|
- !ruby/object:Gem::Version
|
231
218
|
version: '0'
|
232
219
|
requirements: []
|
233
|
-
rubygems_version: 3.
|
220
|
+
rubygems_version: 3.3.5
|
234
221
|
signing_key:
|
235
222
|
specification_version: 4
|
236
223
|
summary: MoreCoreExtensions are a set of core extensions beyond those provided by
|
data/.travis.yml
DELETED