cronex 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/cronex/description/base.rb +5 -3
- data/lib/cronex/version.rb +1 -1
- data/spec/exp_descriptor_de_spec.rb +4 -0
- data/spec/exp_descriptor_en_spec.rb +4 -0
- data/spec/exp_descriptor_fr_spec.rb +4 -0
- data/spec/exp_descriptor_it_spec.rb +4 -0
- data/spec/exp_descriptor_pt_BR_spec.rb +4 -0
- data/spec/exp_descriptor_ro_spec.rb +4 -0
- data/spec/exp_descriptor_ru_spec.rb +4 -0
- 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: 5326f654a688b504da9a79818cc3ae5c9e5b36797246ef53d8311946543c5432
|
4
|
+
data.tar.gz: 5609b37b9e49f3a850937df6c912236e737def16c397a556fa549e173867aab3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a0b1c000223a3c63c6b74c3f479a6be6e21534db10c7abaac4c329d11b5c06d425173c82f527ffef0f333e1a632974bceaf520f5fbe21f82c63a490a46c3cd
|
7
|
+
data.tar.gz: d80c695bbac875c1fc77ab5681e56261aa5161327baa6c45110b050156448f8a8bf7fa89762a59fec7809b2ef113483137629cddedf88b979105d239c26dd420
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -18,7 +18,7 @@ Original Author & Credit: Brady Holt (http://www.geekytidbits.com).
|
|
18
18
|
* Supports printing to locale specific human readable format
|
19
19
|
* Supports displaying times in specific timezones
|
20
20
|
|
21
|
-
For a quick intro to cron see Quartz [Cron Tutorial](http://www.quartz-scheduler.org/documentation/quartz-
|
21
|
+
For a quick intro to cron see Quartz [Cron Tutorial](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html).
|
22
22
|
|
23
23
|
## Available Locales
|
24
24
|
|
@@ -12,11 +12,11 @@ module Cronex
|
|
12
12
|
['/', '-', ',']
|
13
13
|
end
|
14
14
|
|
15
|
-
def segment_description(expression,
|
15
|
+
def segment_description(expression, all_values_description)
|
16
16
|
if expression.empty? || expression == '0'
|
17
17
|
desc = ''
|
18
18
|
elsif expression == '*'
|
19
|
-
desc =
|
19
|
+
desc = all_values_description
|
20
20
|
elsif !Cronex::Utils.include_any?(expression, special_chars)
|
21
21
|
desc = format(description_format(expression), single_item_description(expression))
|
22
22
|
elsif expression.include?('/')
|
@@ -26,10 +26,12 @@ module Cronex
|
|
26
26
|
if segments[0].include?('-')
|
27
27
|
between_segment_of_interval = segments[0]
|
28
28
|
between_segments = between_segment_of_interval.split('-')
|
29
|
-
|
29
|
+
between = format(
|
30
30
|
between_description_format(between_segment_of_interval),
|
31
31
|
single_item_description(between_segments[0]),
|
32
32
|
single_item_description(between_segments[1]).gsub(':00', ':59'))
|
33
|
+
desc += ', ' if !between.start_with?(', ')
|
34
|
+
desc += between
|
33
35
|
elsif !Cronex::Utils.include_any?(segments[0], special_chars + ['*'])
|
34
36
|
desc += ', ' + format(starting_description_format(segments[0]), single_item_description(segments[0]))
|
35
37
|
end
|
data/lib/cronex/version.rb
CHANGED
@@ -298,6 +298,10 @@ module Cronex
|
|
298
298
|
'Alle 2 Minuten, Minuten 00 bis 30 nach der vergangenen Stunde, um 5:00 PM, Montag bis Freitag')
|
299
299
|
end
|
300
300
|
|
301
|
+
it 'every x days with interval' do
|
302
|
+
expect(desc('30 7 1-L/2 * *')).to eq('Um 7:30 AM, Alle 2 Tagen, zwischen Tag 1 und der letzte Tag des Monats')
|
303
|
+
end
|
304
|
+
|
301
305
|
it 'one year only with seconds' do
|
302
306
|
expect(desc('* * * * * * 2013')).to eq('Jede Sekunde, nur in 2013')
|
303
307
|
end
|
@@ -298,6 +298,10 @@ module Cronex
|
|
298
298
|
'Every 2 minutes, minutes 00 through 30 past the hour, at 5:00 PM, Monday through Friday')
|
299
299
|
end
|
300
300
|
|
301
|
+
it 'every x days with interval' do
|
302
|
+
expect(desc('30 7 1-L/2 * *')).to eq('At 7:30 AM, every 2 days, between day 1 and the last day of the month')
|
303
|
+
end
|
304
|
+
|
301
305
|
it 'one year only with seconds' do
|
302
306
|
expect(desc('* * * * * * 2013')).to eq('Every second, only in 2013')
|
303
307
|
end
|
@@ -298,6 +298,10 @@ module Cronex
|
|
298
298
|
"Tous les 2 minutes, minutes 00 à 30 après l'heure, à 5:00 PM, lundi à vendredi")
|
299
299
|
end
|
300
300
|
|
301
|
+
it 'every x days with interval' do
|
302
|
+
expect(desc('30 7 1-L/2 * *')).to eq('À 7:30 AM, tous les 2 jours, entre le jour 1 et le dernier jour du mois')
|
303
|
+
end
|
304
|
+
|
301
305
|
it 'one year only with seconds' do
|
302
306
|
expect(desc('* * * * * * 2013')).to eq('Chaque seconde, seulement en 2013')
|
303
307
|
end
|
@@ -298,6 +298,10 @@ module Cronex
|
|
298
298
|
'Ogni 2 minuti, dal minuto 00 al 30 dopo l\'ora, alle(ai) 5:00 PM, da lunedì a venerdì')
|
299
299
|
end
|
300
300
|
|
301
|
+
it 'every x days with interval' do
|
302
|
+
expect(desc('30 7 1-L/2 * *')).to eq('Alle(ai) 7:30 AM, ogni 2 giorni, tra il giorno 1 e il ultimo giorno del mese')
|
303
|
+
end
|
304
|
+
|
301
305
|
it 'one year only with seconds' do
|
302
306
|
expect(desc('* * * * * * 2013')).to eq('Ogni secondo, solo a(nel) 2013')
|
303
307
|
end
|
@@ -298,6 +298,10 @@ module Cronex
|
|
298
298
|
'A cada 2 minutos, entre 00 e 30 minutos após a hora, 5:00 PM, de segunda-feira a sexta-feira')
|
299
299
|
end
|
300
300
|
|
301
|
+
it 'every x days with interval' do
|
302
|
+
expect(desc('30 7 1-L/2 * *')).to eq('Às 7:30 AM, a cada 2 dias, entre os dias 1 e último dia do mês')
|
303
|
+
end
|
304
|
+
|
301
305
|
it 'one year only with seconds' do
|
302
306
|
expect(desc('* * * * * * 2013')).to eq('A cada segundo, em 2013')
|
303
307
|
end
|
@@ -298,6 +298,10 @@ module Cronex
|
|
298
298
|
'La fiecare 2 minute, între minutele 00 și 30, la 5:00 PM, de luni până vineri')
|
299
299
|
end
|
300
300
|
|
301
|
+
it 'every x days with interval' do
|
302
|
+
expect(desc('30 7 1-L/2 * *')).to eq('La 7:30 AM, la fiecare 2 zile, între zilele 1 și ultima zi a lunii')
|
303
|
+
end
|
304
|
+
|
301
305
|
it 'one year only with seconds' do
|
302
306
|
expect(desc('* * * * * * 2013')).to eq('În fiecare secundă, numai în 2013')
|
303
307
|
end
|
@@ -298,6 +298,10 @@ module Cronex
|
|
298
298
|
'Каждые 2 минут, минуты с 00 по 30, в 5:00 PM, понедельник - пятница')
|
299
299
|
end
|
300
300
|
|
301
|
+
it 'every x days with interval' do
|
302
|
+
expect(desc('30 7 1-L/2 * *')).to eq('В 7:30 AM, каждые 2 дня(ей), между 1 днем и последним днем месяца')
|
303
|
+
end
|
304
|
+
|
301
305
|
it 'one year only with seconds' do
|
302
306
|
expect(desc('* * * * * * 2013')).to eq('Каждую секунду, только 2013')
|
303
307
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cronex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Kazaku
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|