more_core_extensions 4.3.0 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +16 -0
- data/.rubocop.yml +3 -3
- data/.rubocop_cc.yml +4 -0
- data/.travis.yml +1 -5
- data/CHANGELOG.md +7 -1
- data/lib/more_core_extensions/core_ext/array/deletes.rb +2 -2
- data/lib/more_core_extensions/core_ext/array/tableize.rb +1 -0
- data/lib/more_core_extensions/core_ext/string/to_i_with_method.rb +1 -1
- data/lib/more_core_extensions/version.rb +1 -1
- data/more_core_extensions.gemspec +1 -0
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb3f91f72b2c1bc1462184ddab53609ba5b5b09f733eb78f0c34c89e7851f507
|
4
|
+
data.tar.gz: b78bda65aa6f835881b77e069cb1d010fb32dddf72d46c2b67187085a36f88f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 955082c21b2f443dcdd3d888d85e22086a80cb9cbe6cce425c2a8293d20550d52052cd67512cd31faa8333d5318d06ee240a5c33a3c8090f2d4cb56f1df636d1
|
7
|
+
data.tar.gz: 7e149a0ee4d1f68258a5a8d76d26d6f4a0b92ab8e39f496c6becc43cbb455e03e0091cf4530cc3ca5cd575d07ddd58761b5ad33944d0887316358e382498ae08
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
prepare:
|
2
|
+
fetch:
|
3
|
+
- url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
|
4
|
+
path: ".rubocop_base.yml"
|
5
|
+
- url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
|
6
|
+
path: ".rubocop_cc_base.yml"
|
7
|
+
- url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/base.yml
|
8
|
+
path: styles/base.yml
|
9
|
+
- url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/cc_base.yml
|
10
|
+
path: styles/cc_base.yml
|
11
|
+
plugins:
|
12
|
+
rubocop:
|
13
|
+
enabled: true
|
14
|
+
config: ".rubocop_cc.yml"
|
15
|
+
channel: rubocop-0-82
|
16
|
+
version: '2'
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
inherit_from:
|
2
|
-
-
|
3
|
-
|
4
|
-
- .
|
2
|
+
- ".rubocop_local.yml"
|
3
|
+
inherit_gem:
|
4
|
+
manageiq-style: ".rubocop_base.yml"
|
data/.rubocop_cc.yml
ADDED
data/.travis.yml
CHANGED
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.3.1] - 2021-07-13
|
8
|
+
### Changed
|
9
|
+
- Fix String#to_i_with_method to raise the correct error on private methods [[#101](https://github.com/ManageIQ/more_core_extensions/pull/101)]
|
10
|
+
- Fix issue where Array#tableize would not honor a smaller colored field [[#102](https://github.com/ManageIQ/more_core_extensions/pull/102)]
|
11
|
+
|
7
12
|
## [4.3.0] - 2020-10-27
|
8
13
|
### Added
|
9
14
|
- Add String#to_i_with_method and friends [[#95](https://github.com/ManageIQ/more_core_extensions/pull/95)]
|
@@ -102,7 +107,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
102
107
|
- Upgraded to RSpec 3 [[#16](https://github.com/ManageIQ/more_core_extensions/pull/16)]
|
103
108
|
- Added the Change Log!
|
104
109
|
|
105
|
-
[Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v4.3.
|
110
|
+
[Unreleased]: https://github.com/ManageIQ/more_core_extensions/compare/v4.3.1...HEAD
|
111
|
+
[4.3.1]: https://github.com/ManageIQ/more_core_extensions/compare/v4.3.0...v4.3.1
|
106
112
|
[4.3.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.2.0...v4.3.0
|
107
113
|
[4.2.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.1.0...v4.2.0
|
108
114
|
[4.1.0]: https://github.com/ManageIQ/more_core_extensions/compare/v4.0.0...v4.1.0
|
@@ -6,14 +6,14 @@ module MoreCoreExtensions
|
|
6
6
|
#
|
7
7
|
# [1, [], nil].delete_nils # => [1, []]
|
8
8
|
def delete_nils
|
9
|
-
delete_if
|
9
|
+
delete_if(&:nil?)
|
10
10
|
end
|
11
11
|
|
12
12
|
# Deletes all items where the value is blank
|
13
13
|
#
|
14
14
|
# [1, [], nil].delete_blanks # => [1]
|
15
15
|
def delete_blanks
|
16
|
-
delete_if
|
16
|
+
delete_if(&:blank?)
|
17
17
|
end
|
18
18
|
|
19
19
|
# Deletes all keys and subkeys that match +key+.
|
@@ -123,6 +123,7 @@ module MoreCoreExtensions
|
|
123
123
|
def format_field(field, width, justification)
|
124
124
|
field = field.to_s.gsub(/\n|\r/, '')
|
125
125
|
field = ansi_truncate(field, width)
|
126
|
+
width += ansi_escapes(field).sum { |f| f.to_s.size }
|
126
127
|
"%0#{justification}#{width}s" % field
|
127
128
|
end
|
128
129
|
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler"
|
26
26
|
spec.add_development_dependency "codeclimate-test-reporter"
|
27
|
+
spec.add_development_dependency "manageiq-style"
|
27
28
|
spec.add_development_dependency "rake"
|
28
29
|
spec.add_development_dependency "rspec", ">= 3.0"
|
29
30
|
spec.add_development_dependency "simplecov"
|
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.3.
|
4
|
+
version: 4.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Frey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-07-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -39,6 +39,20 @@ dependencies:
|
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: manageiq-style
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: rake
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,9 +146,11 @@ executables: []
|
|
132
146
|
extensions: []
|
133
147
|
extra_rdoc_files: []
|
134
148
|
files:
|
149
|
+
- ".codeclimate.yml"
|
135
150
|
- ".gitignore"
|
136
151
|
- ".rspec"
|
137
152
|
- ".rubocop.yml"
|
153
|
+
- ".rubocop_cc.yml"
|
138
154
|
- ".rubocop_local.yml"
|
139
155
|
- ".travis.yml"
|
140
156
|
- CHANGELOG.md
|
@@ -214,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
230
|
- !ruby/object:Gem::Version
|
215
231
|
version: '0'
|
216
232
|
requirements: []
|
217
|
-
rubygems_version: 3.
|
233
|
+
rubygems_version: 3.1.4
|
218
234
|
signing_key:
|
219
235
|
specification_version: 4
|
220
236
|
summary: MoreCoreExtensions are a set of core extensions beyond those provided by
|