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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c53dd160cd7774a8808b28681dd7ad363cb46f7b69ae402d89c190e531060837
4
- data.tar.gz: 0f0731c06b715e753c73685f7acc967881b616410edde425705f43c38df601fc
3
+ metadata.gz: 273a697c87680d0c695c1617caa490bb89f7712688c60a772e109ccda91fc622
4
+ data.tar.gz: c3f91ba72a275068527f0fdc9dc59026ecffacd63de1466df9a6df9b39c1104c
5
5
  SHA512:
6
- metadata.gz: 3920e5754a1b8ae41f8d0ebe83502d9935766b08da022367694fe0ed4591e7c759378a8badca27e0672851fb7599ad97ceff1986146add4285ce4386d8e5852a
7
- data.tar.gz: 419275382240a93ad604cb32208b57e1b9e3cbf9db95bd0853b80b0fe4a29c10d162af2a20d801c5cb19fd04296d6519b442d66786e5bc56d82ee4f0da37b841
6
+ metadata.gz: 6017fee6976dbb5c9306fb783df42174bf0d88a6df33d7d4a3647f744d484358257380297970faf2c14897c506aa6b9e6dd383399f21a623e993572e50c76bf0
7
+ data.tar.gz: 1f39b5c5ac1002e1596f6d9ca79c73524fce4ba574d4fec594912f4f37f14ec4e0bb53ef57d60b2b648e95c1c8d7193fa0e3b47a6262c11d882eea228c7a3509
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.7.2 (February 01, 2021)
2
+ - adding #deep_freeze to Enumerable
3
+ - range_ext: added #mod to modify an (actually) immutable range
4
+ - simple_series_stats: minor fix
5
+
1
6
  ## 0.1.7.1 (January 17, 2021)
2
7
  - bugfix
3
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7.1
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,
@@ -23,9 +23,7 @@ module Cotcube
23
23
  sort
24
24
  unless dim.zero?
25
25
  reductor = (base.size * dim).round
26
- puts reductor
27
26
  worker = worker[reductor..base.size - reductor]
28
- puts worker.size
29
27
  end
30
28
  result = {}
31
29
 
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.1
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-17 00:00:00.000000000 Z
11
+ date: 2021-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport