lite-ruby 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +52 -51
- data/lib/lite/ruby/array.rb +4 -0
- data/lib/lite/ruby/hash.rb +1 -1
- data/lib/lite/ruby/helpers/date_helper.rb +2 -2
- data/lib/lite/ruby/helpers/time_helper.rb +1 -1
- data/lib/lite/ruby/integer.rb +1 -1
- data/lib/lite/ruby/object.rb +2 -2
- data/lib/lite/ruby/string.rb +1 -1
- data/lib/lite/ruby/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d888bbc03ab7a3385008969089ec8b73d92af59cf6f1384a9176f90807b91d89
|
4
|
+
data.tar.gz: a2aa054f8d6f728f8d84b42b80031e3f15f899d5722e01dcf5c3758927838dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c6e3d0db894b83cba54985a3272f453b4001610f399268ddacd2952045a8cc879bf3eca38c7451a9cffddb299a5c50a03988573e29b34bfe9fefa284718296b
|
7
|
+
data.tar.gz: 6177ea5a91f27eb3e534bb385500bb2eee6d111f77b2d7339ca8993539c32ac9e611639a4685c8db4999222bac8f5a6bb174a76f51d70323f9f807be72889936
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.1.5] - 2021-02-16
|
10
|
+
### Added
|
11
|
+
- Added Array => `divergence`
|
12
|
+
|
9
13
|
## [1.1.4] - 2020-11-19
|
10
14
|
### Changed
|
11
15
|
- Object `array?` coerce ARGV check from nil to string
|
data/Gemfile.lock
CHANGED
@@ -1,56 +1,58 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lite-ruby (1.1.
|
4
|
+
lite-ruby (1.1.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
actionpack (6.
|
10
|
-
actionview (= 6.
|
11
|
-
activesupport (= 6.
|
12
|
-
rack (~> 2.0, >= 2.0.
|
9
|
+
actionpack (6.1.2.1)
|
10
|
+
actionview (= 6.1.2.1)
|
11
|
+
activesupport (= 6.1.2.1)
|
12
|
+
rack (~> 2.0, >= 2.0.9)
|
13
13
|
rack-test (>= 0.6.3)
|
14
14
|
rails-dom-testing (~> 2.0)
|
15
15
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
16
|
-
actionview (6.
|
17
|
-
activesupport (= 6.
|
16
|
+
actionview (6.1.2.1)
|
17
|
+
activesupport (= 6.1.2.1)
|
18
18
|
builder (~> 3.1)
|
19
19
|
erubi (~> 1.4)
|
20
20
|
rails-dom-testing (~> 2.0)
|
21
21
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
22
|
-
activesupport (6.
|
22
|
+
activesupport (6.1.2.1)
|
23
23
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
24
|
-
i18n (>=
|
25
|
-
minitest (
|
26
|
-
tzinfo (~>
|
27
|
-
zeitwerk (~> 2.
|
28
|
-
ast (2.4.
|
24
|
+
i18n (>= 1.6, < 2)
|
25
|
+
minitest (>= 5.1)
|
26
|
+
tzinfo (~> 2.0)
|
27
|
+
zeitwerk (~> 2.3)
|
28
|
+
ast (2.4.2)
|
29
29
|
builder (3.2.4)
|
30
30
|
colorize (0.8.1)
|
31
|
-
concurrent-ruby (1.1.
|
31
|
+
concurrent-ruby (1.1.8)
|
32
32
|
crass (1.0.6)
|
33
33
|
diff-lcs (1.4.4)
|
34
34
|
erubi (1.10.0)
|
35
|
-
fasterer (0.
|
35
|
+
fasterer (0.9.0)
|
36
36
|
colorize (~> 0.7)
|
37
37
|
ruby_parser (>= 3.14.1)
|
38
38
|
generator_spec (0.9.4)
|
39
39
|
activesupport (>= 3.0.0)
|
40
40
|
railties (>= 3.0.0)
|
41
|
-
i18n (1.8.
|
41
|
+
i18n (1.8.9)
|
42
42
|
concurrent-ruby (~> 1.0)
|
43
|
-
loofah (2.
|
43
|
+
loofah (2.9.0)
|
44
44
|
crass (~> 1.0.2)
|
45
45
|
nokogiri (>= 1.5.9)
|
46
46
|
method_source (1.0.0)
|
47
|
-
mini_portile2 (2.
|
48
|
-
minitest (5.14.
|
49
|
-
nokogiri (1.
|
50
|
-
mini_portile2 (~> 2.
|
51
|
-
|
52
|
-
|
47
|
+
mini_portile2 (2.5.0)
|
48
|
+
minitest (5.14.3)
|
49
|
+
nokogiri (1.11.1)
|
50
|
+
mini_portile2 (~> 2.5.0)
|
51
|
+
racc (~> 1.4)
|
52
|
+
parallel (1.20.1)
|
53
|
+
parser (3.0.0.0)
|
53
54
|
ast (~> 2.4.1)
|
55
|
+
racc (1.5.2)
|
54
56
|
rack (2.2.3)
|
55
57
|
rack-test (1.1.0)
|
56
58
|
rack (>= 1.0, < 3)
|
@@ -59,56 +61,55 @@ GEM
|
|
59
61
|
nokogiri (>= 1.6)
|
60
62
|
rails-html-sanitizer (1.3.0)
|
61
63
|
loofah (~> 2.3)
|
62
|
-
railties (6.
|
63
|
-
actionpack (= 6.
|
64
|
-
activesupport (= 6.
|
64
|
+
railties (6.1.2.1)
|
65
|
+
actionpack (= 6.1.2.1)
|
66
|
+
activesupport (= 6.1.2.1)
|
65
67
|
method_source
|
66
68
|
rake (>= 0.8.7)
|
67
|
-
thor (
|
69
|
+
thor (~> 1.0)
|
68
70
|
rainbow (3.0.0)
|
69
|
-
rake (13.0.
|
70
|
-
regexp_parser (
|
71
|
+
rake (13.0.3)
|
72
|
+
regexp_parser (2.0.3)
|
71
73
|
rexml (3.2.4)
|
72
74
|
rspec (3.10.0)
|
73
75
|
rspec-core (~> 3.10.0)
|
74
76
|
rspec-expectations (~> 3.10.0)
|
75
77
|
rspec-mocks (~> 3.10.0)
|
76
|
-
rspec-core (3.10.
|
78
|
+
rspec-core (3.10.1)
|
77
79
|
rspec-support (~> 3.10.0)
|
78
|
-
rspec-expectations (3.10.
|
80
|
+
rspec-expectations (3.10.1)
|
79
81
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
82
|
rspec-support (~> 3.10.0)
|
81
|
-
rspec-mocks (3.10.
|
83
|
+
rspec-mocks (3.10.2)
|
82
84
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
85
|
rspec-support (~> 3.10.0)
|
84
|
-
rspec-support (3.10.
|
85
|
-
rubocop (1.
|
86
|
+
rspec-support (3.10.2)
|
87
|
+
rubocop (1.10.0)
|
86
88
|
parallel (~> 1.10)
|
87
|
-
parser (>=
|
89
|
+
parser (>= 3.0.0.0)
|
88
90
|
rainbow (>= 2.2.2, < 4.0)
|
89
|
-
regexp_parser (>= 1.8)
|
91
|
+
regexp_parser (>= 1.8, < 3.0)
|
90
92
|
rexml
|
91
|
-
rubocop-ast (>= 1.
|
93
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
92
94
|
ruby-progressbar (~> 1.7)
|
93
|
-
unicode-display_width (>= 1.4.0, <
|
94
|
-
rubocop-ast (1.
|
95
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
96
|
+
rubocop-ast (1.4.1)
|
95
97
|
parser (>= 2.7.1.5)
|
96
|
-
rubocop-performance (1.9.
|
98
|
+
rubocop-performance (1.9.2)
|
97
99
|
rubocop (>= 0.90.0, < 2.0)
|
98
100
|
rubocop-ast (>= 0.4.0)
|
99
|
-
rubocop-rspec (2.
|
101
|
+
rubocop-rspec (2.2.0)
|
100
102
|
rubocop (~> 1.0)
|
101
103
|
rubocop-ast (>= 1.1.0)
|
102
|
-
ruby-progressbar (1.
|
103
|
-
ruby_parser (3.15.
|
104
|
+
ruby-progressbar (1.11.0)
|
105
|
+
ruby_parser (3.15.1)
|
104
106
|
sexp_processor (~> 4.9)
|
105
|
-
sexp_processor (4.15.
|
106
|
-
thor (1.0
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
zeitwerk (2.4.1)
|
107
|
+
sexp_processor (4.15.2)
|
108
|
+
thor (1.1.0)
|
109
|
+
tzinfo (2.0.4)
|
110
|
+
concurrent-ruby (~> 1.0)
|
111
|
+
unicode-display_width (2.0.0)
|
112
|
+
zeitwerk (2.4.2)
|
112
113
|
|
113
114
|
PLATFORMS
|
114
115
|
ruby
|
@@ -125,4 +126,4 @@ DEPENDENCIES
|
|
125
126
|
rubocop-rspec
|
126
127
|
|
127
128
|
BUNDLED WITH
|
128
|
-
2.
|
129
|
+
2.2.9
|
data/lib/lite/ruby/array.rb
CHANGED
@@ -147,6 +147,10 @@ if Lite::Ruby.configuration.monkey_patches.include?('array')
|
|
147
147
|
replace(denillify(identity))
|
148
148
|
end
|
149
149
|
|
150
|
+
def divergence(other)
|
151
|
+
(self - other) | (other - self)
|
152
|
+
end
|
153
|
+
|
150
154
|
def duplicates(minimum = 2)
|
151
155
|
hash = Hash.new(0)
|
152
156
|
each { |val| hash[val] += 1 }
|
data/lib/lite/ruby/hash.rb
CHANGED
@@ -5,7 +5,7 @@ if Lite::Ruby.configuration.monkey_patches.include?('date')
|
|
5
5
|
module Ruby
|
6
6
|
module DateHelper
|
7
7
|
|
8
|
-
DATE_STAMPS
|
8
|
+
DATE_STAMPS = {
|
9
9
|
weekday: '%d',
|
10
10
|
weekday_blank: '%_d',
|
11
11
|
weekday_padded: '%d',
|
@@ -41,7 +41,7 @@ if Lite::Ruby.configuration.monkey_patches.include?('date')
|
|
41
41
|
date_abbr: '%b %-d, %Y',
|
42
42
|
date_iso: '%Y-%m-%d'
|
43
43
|
}.freeze
|
44
|
-
DATE_UNITS
|
44
|
+
DATE_UNITS = {
|
45
45
|
w: 'u',
|
46
46
|
weekday: 'u',
|
47
47
|
ww: 'w',
|
data/lib/lite/ruby/integer.rb
CHANGED
data/lib/lite/ruby/object.rb
CHANGED
data/lib/lite/ruby/string.rb
CHANGED
@@ -5,7 +5,7 @@ if Lite::Ruby.configuration.monkey_patches.include?('string')
|
|
5
5
|
|
6
6
|
class String
|
7
7
|
|
8
|
-
TRANSLITERATIONS
|
8
|
+
TRANSLITERATIONS = {
|
9
9
|
'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'Ae',
|
10
10
|
'Ç' => 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I',
|
11
11
|
'Î' => 'I', 'Ï' => 'I', 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O',
|
data/lib/lite/ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.
|
211
|
+
rubygems_version: 3.2.9
|
212
212
|
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: Collection of useful Ruby methods for its primitive classes
|