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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b7f22572ca60d54c6ae412b47afec772d698d9289f047736abec4cff3204d03
4
- data.tar.gz: 51037bedd097a1d44a590c4a4502e42a2bc79841ca240fdc8ae429bb7887114d
3
+ metadata.gz: fb3f91f72b2c1bc1462184ddab53609ba5b5b09f733eb78f0c34c89e7851f507
4
+ data.tar.gz: b78bda65aa6f835881b77e069cb1d010fb32dddf72d46c2b67187085a36f88f3
5
5
  SHA512:
6
- metadata.gz: 8f5a9444c922416547bfb24e4a3efcb9bda6fcecccd29f38a2ac12c637ee463018c80d51d68695a822c76030066d2f04731e3eb9a40edea141f6f1ddf7ce5e13
7
- data.tar.gz: 9077ad1ea1242be1e82293ee5698b457d70962c9c405c0df127ae796000c2b1b29749906d7d5ef41fece1163205b2c508f129a33e0b342512c68f144a329a2c6
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
- - https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml
3
- # put all local rubocop config into .rubocop_local.yml as it will be loaded by .rubocop_cc.yml as well
4
- - .rubocop_local.yml
2
+ - ".rubocop_local.yml"
3
+ inherit_gem:
4
+ manageiq-style: ".rubocop_base.yml"
data/.rubocop_cc.yml ADDED
@@ -0,0 +1,4 @@
1
+ inherit_from:
2
+ - ".rubocop_base.yml"
3
+ - ".rubocop_cc_base.yml"
4
+ - ".rubocop_local.yml"
data/.travis.yml CHANGED
@@ -1,12 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "2.1"
4
- - "2.2"
5
- - "2.3"
6
- - "2.4"
7
3
  - "2.5.8"
8
4
  - "2.6.6"
9
- - "2.7.1"
5
+ - "2.7.2"
10
6
  - ruby-head
11
7
  - jruby-head
12
8
  cache: bundler
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.0...HEAD
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 { |i| i.nil? }
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 { |i| i.blank? }
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
 
@@ -48,7 +48,7 @@ module MoreCoreExtensions
48
48
  return n unless n =~ NUMBER_WITH_METHOD_REGEX && $2 != "percent"
49
49
 
50
50
  n = $1.include?('.') ? $1.to_f : $1.to_i
51
- n.send($2)
51
+ n.public_send($2)
52
52
  end
53
53
 
54
54
  # Determines if the object contains a number with a method invocation
@@ -1,3 +1,3 @@
1
1
  module MoreCoreExtensions
2
- VERSION = "4.3.0".freeze
2
+ VERSION = "4.3.1".freeze
3
3
  end
@@ -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.0
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: 2020-10-27 00:00:00.000000000 Z
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.0.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