cotcube-helpers 0.1.7.1 → 0.1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/cotcube-helpers/enum_ext.rb +22 -0
- data/lib/cotcube-helpers/range_ext.rb +4 -0
- data/lib/cotcube-helpers/simple_series_stats.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 273a697c87680d0c695c1617caa490bb89f7712688c60a772e109ccda91fc622
|
4
|
+
data.tar.gz: c3f91ba72a275068527f0fdc9dc59026ecffacd63de1466df9a6df9b39c1104c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6017fee6976dbb5c9306fb783df42174bf0d88a6df33d7d4a3647f744d484358257380297970faf2c14897c506aa6b9e6dd383399f21a623e993572e50c76bf0
|
7
|
+
data.tar.gz: 1f39b5c5ac1002e1596f6d9ca79c73524fce4ba574d4fec594912f4f37f14ec4e0bb53ef57d60b2b648e95c1c8d7193fa0e3b47a6262c11d882eea228c7a3509
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.7.
|
1
|
+
0.1.7.2
|
@@ -11,3 +11,25 @@ class Enumerator
|
|
11
11
|
ret
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
# Recursively freeze self if it's Enumerable
|
16
|
+
# Supports all Ruby versions 1.8.* to 2.2.*+
|
17
|
+
module Kernel
|
18
|
+
alias deep_freeze freeze
|
19
|
+
alias deep_frozen? frozen?
|
20
|
+
end
|
21
|
+
|
22
|
+
# Adding deep_freeze and deep_frozen?
|
23
|
+
module Enumerable
|
24
|
+
def deep_freeze
|
25
|
+
unless @deep_frozen
|
26
|
+
each(&:deep_freeze)
|
27
|
+
@deep_frozen = true
|
28
|
+
end
|
29
|
+
freeze
|
30
|
+
end
|
31
|
+
|
32
|
+
def deep_frozen?
|
33
|
+
!!@deep_frozen
|
34
|
+
end
|
35
|
+
end
|
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
# Monkey patching the Ruby Core class Range
|
4
4
|
class Range
|
5
|
+
def mod(first, last = 0)
|
6
|
+
exclude_end? ? ((self.begin + first)...(self.end + last)) : ((self.begin + first)..(self.begin + last))
|
7
|
+
end
|
8
|
+
|
5
9
|
def to_time_intervals(step:,
|
6
10
|
timezone: Time.find_zone('America/Chicago'),
|
7
11
|
# ranges: nil,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cotcube-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.7.
|
4
|
+
version: 0.1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin L. Tischendorf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01
|
11
|
+
date: 2021-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|