fugit 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fugit might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/CREDITS.md +1 -0
- data/LICENSE.txt +1 -1
- data/README.md +1 -0
- data/fugit.gemspec +1 -1
- data/lib/fugit/cron.rb +21 -1
- data/lib/fugit.rb +2 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd6f6af6264734f4eb10d5aa8e88cbcfbca029fb697f20b7a0ae37d220c55653
|
4
|
+
data.tar.gz: 25606c4f975d71350a360f4feb092a54f88bbb022fef31e4eb13c22d98b36b8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253c2fc474a22ff93caa8b1f465af16565ab8b69037f7e83dc1e42719085d95342ee9d7a43200bdb05bcc9815dc29f590c5d86df51b7f526e25bb6d96dd4ef02
|
7
|
+
data.tar.gz: '0951e692d8026d3a66c374e99f872bd03270f77e93232bbbecefac44c8b9b17253b46218dbb36f9f009441bb6d602c04f40dad7782df31674e26244c1ce59055'
|
data/CHANGELOG.md
CHANGED
data/CREDITS.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
2
|
# fugit credits
|
3
3
|
|
4
|
+
* Peter Goldstein, https://github.com/petergoldstein GHA 3.3 j9.3, gh-65
|
4
5
|
* Pascal Zumkehr https://github.com/codez gh-62, Santiago into DST vs Time.zone
|
5
6
|
* Ggallardoh https://github.com/Ggallardoh gh-60, America/Santiago into DST
|
6
7
|
* Khaled AbuShqear https://github.com/shqear93 gh-57, "12pm"
|
data/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
Copyright (c) 2017-
|
2
|
+
Copyright (c) 2017-2022, John Mettraux, jmettraux+flor@gmail.com
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -37,6 +37,7 @@ The intersection of those two projects is where fugit is born:
|
|
37
37
|
* [flor](https://github.com/floraison/flor) - used in the [cron](https://github.com/floraison/flor/blob/master/doc/procedures/cron.md) procedure
|
38
38
|
* [que-scheduler](https://github.com/hlascelles/que-scheduler) - a reliable job scheduler for [que](https://github.com/chanks/que)
|
39
39
|
* [serial_scheduler](https://github.com/grosser/serial_scheduler) - ruby task scheduler without threading
|
40
|
+
* [delayed_cron_job](https://github.com/codez/delayed_cron_job) - an extension to Delayed::Job that allows you to set cron expressions for your jobs
|
40
41
|
* ...
|
41
42
|
|
42
43
|
## `Fugit.parse(s)`
|
data/fugit.gemspec
CHANGED
@@ -41,7 +41,7 @@ Time tools for flor and the floraison project. Cron parsing and occurrence compu
|
|
41
41
|
# this dependency appears in 'et-orbi'
|
42
42
|
|
43
43
|
s.add_runtime_dependency 'raabro', '~> 1.4'
|
44
|
-
s.add_runtime_dependency 'et-orbi', '~> 1
|
44
|
+
s.add_runtime_dependency 'et-orbi', '~> 1', '>= 1.2.7'
|
45
45
|
|
46
46
|
s.add_development_dependency 'rspec', '~> 3.8'
|
47
47
|
s.add_development_dependency 'chronic', '~> 0.10'
|
data/lib/fugit/cron.rb
CHANGED
@@ -60,7 +60,7 @@ module Fugit
|
|
60
60
|
(@hours || [ '*' ]).join(','),
|
61
61
|
(@monthdays || [ '*' ]).join(','),
|
62
62
|
(@months || [ '*' ]).join(','),
|
63
|
-
|
63
|
+
weekdays_to_cron_s,
|
64
64
|
@timezone ? @timezone.name : nil
|
65
65
|
].compact.join(' ')
|
66
66
|
end
|
@@ -74,6 +74,8 @@ module Fugit
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def time; @t; end
|
77
|
+
def to_t; @t; end
|
78
|
+
#
|
77
79
|
def to_i; @t.to_i; end
|
78
80
|
|
79
81
|
%w[ year month day wday hour min sec wday_in_month rweek rday ]
|
@@ -620,6 +622,24 @@ module Fugit
|
|
620
622
|
@zone, @timezone = z
|
621
623
|
end
|
622
624
|
|
625
|
+
def weekdays_to_cron_s
|
626
|
+
|
627
|
+
return '*' unless @weekdays
|
628
|
+
|
629
|
+
@weekdays
|
630
|
+
.collect { |a|
|
631
|
+
if a.length == 1
|
632
|
+
a[0].to_s
|
633
|
+
elsif a[1].is_a?(Array)
|
634
|
+
a11 = a[1][1]
|
635
|
+
off = (a11 < 0) ? a11.to_s : (a11 > 0) ? "+#{a11}" : ''
|
636
|
+
"#{a[0]}%#{a[1][0]}" + off
|
637
|
+
else
|
638
|
+
a.collect(&:to_s).join('#')
|
639
|
+
end }
|
640
|
+
.join(',')
|
641
|
+
end
|
642
|
+
|
623
643
|
module Parser include Raabro
|
624
644
|
|
625
645
|
WEEKDAYS =
|
data/lib/fugit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fugit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raabro
|
@@ -30,20 +30,20 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1
|
33
|
+
version: '1'
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.
|
36
|
+
version: 1.2.7
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '1
|
43
|
+
version: '1'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.
|
46
|
+
version: 1.2.7
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|