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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb3f91f72b2c1bc1462184ddab53609ba5b5b09f733eb78f0c34c89e7851f507
4
- data.tar.gz: b78bda65aa6f835881b77e069cb1d010fb32dddf72d46c2b67187085a36f88f3
3
+ metadata.gz: db4cb66221e2ed8edd88cedf25dfc25c86d5ba70fd9896866262eadcc20c48cc
4
+ data.tar.gz: fe56790ae8f33f7d494dcf6a105578b76d6aa863cbdf15ccd2b4c8f3e3f352bb
5
5
  SHA512:
6
- metadata.gz: 955082c21b2f443dcdd3d888d85e22086a80cb9cbe6cce425c2a8293d20550d52052cd67512cd31faa8333d5318d06ee240a5c33a3c8090f2d4cb56f1df636d1
7
- data.tar.gz: 7e149a0ee4d1f68258a5a8d76d26d6f4a0b92ab8e39f496c6becc43cbb455e03e0091cf4530cc3ca5cd575d07ddd58761b5ad33944d0887316358e382498ae08
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
@@ -1,3 +1,3 @@
1
- --color
2
- --warnings
3
1
  --require spec_helper
2
+ --color
3
+ --order random
data/.rubocop_local.yml CHANGED
@@ -1,4 +1,4 @@
1
- GlobalVars:
1
+ Style/GlobalVars:
2
2
  AllowedVariables:
3
3
  - $cache_with_timeout
4
4
  - $cache_with_timeout_lock
data/.whitesource ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "settingsInheritedFrom": "ManageIQ/whitesource-config@master"
3
+ }
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.3.1...HEAD
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
- [![Build Status](https://travis-ci.org/ManageIQ/more_core_extensions.svg?branch=master)](https://travis-ci.org/ManageIQ/more_core_extensions)
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
- [![Dependency Status](https://gemnasium.com/ManageIQ/more_core_extensions.svg)](https://gemnasium.com/ManageIQ/more_core_extensions)
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
 
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/object/blank'
2
3
 
3
4
  module MoreCoreExtensions
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/enumerable' # For Array#sum
2
3
 
3
4
  module MoreCoreExtensions
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/class/subclasses'
2
3
  require 'active_support/core_ext/object/try'
3
4
 
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/digest/uuid'
2
3
 
3
4
  module Digest
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/object/blank'
2
3
 
3
4
  module MoreCoreExtensions
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/core_ext/object/blank'
2
3
  require 'more_core_extensions/core_ext/object/deep_send'
3
4
  require 'more_core_extensions/core_ext/object/namespace'
@@ -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
@@ -1,3 +1,3 @@
1
1
  module MoreCoreExtensions
2
- VERSION = "4.3.1".freeze
2
+ VERSION = "4.4.0".freeze
3
3
  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.3.1
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: 2021-07-13 00:00:00.000000000 Z
12
+ date: 2022-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: bundler
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: :development
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: codeclimate-test-reporter
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: :development
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: manageiq-style
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: rake
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: rspec
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: timecop
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: activesupport
99
+ name: simplecov
114
100
  requirement: !ruby/object:Gem::Requirement
115
101
  requirements:
116
102
  - - ">="
117
103
  - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :runtime
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: '0'
111
+ version: 0.21.2
126
112
  - !ruby/object:Gem::Dependency
127
- name: sync
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: :runtime
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
- - ".travis.yml"
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.1.4
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
@@ -1,14 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "2.5.8"
4
- - "2.6.6"
5
- - "2.7.2"
6
- - ruby-head
7
- - jruby-head
8
- cache: bundler
9
- after_script: bundle exec codeclimate-test-reporter
10
- matrix:
11
- allow_failures:
12
- - rvm: ruby-head
13
- - rvm: jruby-head
14
- fast_finish: true