mnc 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d433cb0d7408bb4c4ad1ccacdfaa2d9604c48f0f6b3c45a0251e17ac8f3eb6ef
4
- data.tar.gz: fba06709179621e34f3db761376a7f2e5a76bf2e0b2d668c244126067d063955
3
+ metadata.gz: 1e77d647f24181ed3c773372cc620a6ea35dde4079a81aac31e54e84323df9ec
4
+ data.tar.gz: 69467981647a3637c704e50c00adff473a9b52993c45c9e622420aad600b3618
5
5
  SHA512:
6
- metadata.gz: c8882535c5ca4a7e8b0d6a8070f8658af59ca4e222fcb04f296aaf426a04f3a9d723ab260d6c2a3a6857c41749573cb389716ceaf00dae2de1d36decc68a58ee
7
- data.tar.gz: ee2661269a0044419f05f56f56d9397dddf6c5be17d05c0a5baeca4ca768a86acecc7fcb65ed8c127d9b21c1b335d55abf7fd26c3165af95fb5a354ce56b201b
6
+ metadata.gz: fddf5ddebd23030434fa9c23ea8db67e1a2e6b86e086485cb84d7b5e9add7a66eca269258549a50669c456cda347bde43844a4c6dd6ea9f727de35dbb0a125f1
7
+ data.tar.gz: e8a02283f940afeac9104c515f0cfe5a87f841ffb59a9d2ce1118134ead0b6388c81649941ad92bb01251bd5a1cd75d6006ab8791117ccbf09d6998eb5ee93b3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mnc (0.1.1)
4
+ mnc (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/mnc.rb CHANGED
@@ -8,12 +8,17 @@ module MNC
8
8
  Integer(
9
9
  crontab
10
10
  .lines
11
- .select { |l| l =~ /^(?:[0-9,*]+\s+){5}\S+/ }
11
+ .select { |l| l =~ /^(?:[-0-9,*]+\s+){5}\S+/ }
12
12
  .map { |l| l.split.zip %w[%M %H %d %m %w] }
13
13
  .map { |a| a[0..4].reject { |b| b[0] == '*' } }
14
14
  .map { |a|
15
15
  a.map { |b|
16
16
  b[0].split(',').map { |c| [c, b[1]] }
17
+ }.map { |b|
18
+ b.map { |c|
19
+ d = c[0].split('-')
20
+ (d[0]..(d[1] || d[0])).map { |e| [e, c[1]] }
21
+ }.flatten(1)
17
22
  }
18
23
  }
19
24
  .map { |a|
@@ -26,7 +31,7 @@ module MNC
26
31
  t = g.map { |h| h[0] }.join(' ')
27
32
  f = g.map { |h| h[1] }.join(' ')
28
33
  n = now
29
- n += 60 while (r = (Time.strptime t, f, n)) < n
34
+ n += 60 while (r = (Time.strptime t, f, n)) < now
30
35
  r
31
36
  }
32
37
  }
data/lib/mnc/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MNC
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mnc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank J. Cameron
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-21 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: