cronex 0.12.0 → 0.13.0

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: 27e7637c0b490441441238824af2bd3a54c6f263e88acc9490ee20190c852258
4
- data.tar.gz: bc2e41a12f8a15f21d50cffa2fef998647b8cc7e3429e2b4b5b7297d83d02c02
3
+ metadata.gz: 4e50033ab4a30d5fe6328b2e93e8469a24766a9fdf9b8cd56c3baaf19fc34393
4
+ data.tar.gz: '082777debd639d38aa059420dda67939acd553fa6b7e95dd337c9b90cd84896e'
5
5
  SHA512:
6
- metadata.gz: a73574bad6da9bfa391897a9a34f86ec3353718406da131faaa2af8f7b63a5f6f7694a45f67f47b24ff352179798c9342e21966f9104ed423c00dae41e144539
7
- data.tar.gz: '081dbbc263ed70ab9f6f514f3359f17df56c270ff1eea91a72b197426c31b6403bd10d4020e7289b6b9f7cc64069714d3decd1e43481e6a6384ec0601472169f'
6
+ metadata.gz: 98fdb7266076be0a18f445b9121662f796b01ec14bfd7c94bfc959d968191453668c69450f064e937436cc1ecbd86b28bb8fe367933cace832b92b117ca87462
7
+ data.tar.gz: f4720ae3074f29f6c6b213840fd7aa1aec8f1fe2736320f0808fb3d1f72f33e9942ab22d49f57fa10fcf048c1775e946dc6d3cba304424903beebaef74be9700
@@ -8,10 +8,10 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  strategy:
10
10
  matrix:
11
- ruby-version: [2.5, 2.6, 2.7]
11
+ ruby-version: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2]
12
12
  name: Ruby ${{ matrix.ruby-version }}
13
13
  steps:
14
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v3
15
15
  - name: Setup Ruby
16
16
  uses: ruby/setup-ruby@v1
17
17
  with:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### [0.13.0] - 2023-11-04
2
+ * Fix zero hour
3
+
1
4
  ### [0.12.0] - 2023-04-16
2
5
  * Add "strict_quartz" option for Java Quartz implementation (quartz-scheduler)
3
6
 
@@ -13,7 +13,7 @@ module Cronex
13
13
  end
14
14
 
15
15
  def segment_description(expression, all_values_description)
16
- if expression.empty? || expression == '0'
16
+ if expression.empty? || (expression == '0' && self.class != Cronex::HoursDescription)
17
17
  desc = ''
18
18
  elsif expression == '*'
19
19
  desc = all_values_description
@@ -1,3 +1,3 @@
1
1
  module Cronex
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
@@ -42,7 +42,11 @@ module Cronex
42
42
  expect(desc('*/5 * * * *')).to eq('Alle 5 Minuten')
43
43
  end
44
44
 
45
- it 'every 5 minute 0 */5' do
45
+ it 'every 5 minutes at Midnight' do
46
+ expect(desc('*/5 0 * * *')).to eq('Alle 5 Minuten, um 12:00 AM')
47
+ end
48
+
49
+ it 'every 5 minutes 0 */5' do
46
50
  expect(desc('0 */5 * * * *')).to eq('Alle 5 Minuten')
47
51
  end
48
52
 
@@ -293,12 +297,12 @@ module Cronex
293
297
  'Um 00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50 und 55 Minuten vergangene Stunde')
294
298
  end
295
299
 
296
- it 'every x minute past the hour with interval' do
300
+ it 'every X minutes past the hour with interval' do
297
301
  expect(desc('0 0-30/2 17 ? * MON-FRI')).to eq(
298
302
  'Alle 2 Minuten, Minuten 00 bis 30 nach der vergangenen Stunde, um 5:00 PM, Montag bis Freitag')
299
303
  end
300
304
 
301
- it 'every x days with interval' do
305
+ it 'every X days with interval' do
302
306
  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
307
  end
304
308
 
@@ -333,22 +337,30 @@ module Cronex
333
337
  end
334
338
 
335
339
  context 'minutes past the hour:' do
340
+ it 'minutes past the hour 5,10, midnight hour' do
341
+ expect(desc('5,10 0 * * *')).to eq('Um 05 und 10 Minuten vergangene Stunde, um 12:00 AM')
342
+ end
343
+
336
344
  it 'minutes past the hour 5,10' do
337
- expect(desc('5,10 0 * * *')).to eq('Um 05 und 10 Minuten vergangene Stunde')
345
+ expect(desc('5,10 * * * *')).to eq('Um 05 und 10 Minuten vergangene Stunde')
338
346
  end
339
347
 
340
348
  it 'minutes past the hour 5,10 day 2' do
341
- expect(desc('5,10 0 2 * *')).to eq('Um 05 und 10 Minuten vergangene Stunde, am 2 Tag des Monats')
349
+ expect(desc('5,10 * 2 * *')).to eq('Um 05 und 10 Minuten vergangene Stunde, am 2 Tag des Monats')
342
350
  end
343
351
 
344
352
  it 'minutes past the hour 5/10 day 2' do
345
- expect(desc('5/10 0 2 * *')).to eq('Alle 10 Minuten, beginnend um 05 Minuten vergangene Stunde, am 2 Tag des Monats')
353
+ expect(desc('5/10 * 2 * *')).to eq('Alle 10 Minuten, beginnend um 05 Minuten vergangene Stunde, am 2 Tag des Monats')
346
354
  end
347
355
  end
348
356
 
349
357
  context 'seconds past the minute:' do
358
+ it 'seconds past the minute 5,6, midnight hour' do
359
+ expect(desc('5,6 0 0 * * *')).to eq('Am 5 und 6 Sekunden nach der vergangenen Minute, um 12:00 AM')
360
+ end
361
+
350
362
  it 'seconds past the minute 5,6' do
351
- expect(desc('5,6 0 0 * * *')).to eq('Am 5 und 6 Sekunden nach der vergangenen Minute')
363
+ expect(desc('5,6 0 * * * *')).to eq('Am 5 und 6 Sekunden nach der vergangenen Minute')
352
364
  end
353
365
 
354
366
  it 'seconds past the minute 5,6 at 1' do
@@ -356,7 +368,7 @@ module Cronex
356
368
  end
357
369
 
358
370
  it 'seconds past the minute 5,6 day 2' do
359
- expect(desc('5,6 0 0 2 * *')).to eq('Am 5 und 6 Sekunden nach der vergangenen Minute, am 2 Tag des Monats')
371
+ expect(desc('5,6 0 * 2 * *')).to eq('Am 5 und 6 Sekunden nach der vergangenen Minute, am 2 Tag des Monats')
360
372
  end
361
373
  end
362
374
 
@@ -42,7 +42,11 @@ module Cronex
42
42
  expect(desc('*/5 * * * *')).to eq('Every 5 minutes')
43
43
  end
44
44
 
45
- it 'every 5 minute 0 */5' do
45
+ it 'every 5 minutes at Midnight' do
46
+ expect(desc('*/5 0 * * *')).to eq('Every 5 minutes, at 12:00 AM')
47
+ end
48
+
49
+ it 'every 5 minutes 0 */5' do
46
50
  expect(desc('0 */5 * * * *')).to eq('Every 5 minutes')
47
51
  end
48
52
 
@@ -293,12 +297,12 @@ module Cronex
293
297
  'At 00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50 and 55 minutes past the hour')
294
298
  end
295
299
 
296
- it 'every x minute past the hour with interval' do
300
+ it 'every X minutes past the hour with interval' do
297
301
  expect(desc('0 0-30/2 17 ? * MON-FRI')).to eq(
298
302
  'Every 2 minutes, minutes 00 through 30 past the hour, at 5:00 PM, Monday through Friday')
299
303
  end
300
304
 
301
- it 'every x days with interval' do
305
+ it 'every X days with interval' do
302
306
  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
307
  end
304
308
 
@@ -333,22 +337,30 @@ module Cronex
333
337
  end
334
338
 
335
339
  context 'minutes past the hour:' do
340
+ it 'minutes past the hour 5,10, midnight hour' do
341
+ expect(desc('5,10 0 * * *')).to eq('At 05 and 10 minutes past the hour, at 12:00 AM')
342
+ end
343
+
336
344
  it 'minutes past the hour 5,10' do
337
- expect(desc('5,10 0 * * *')).to eq('At 05 and 10 minutes past the hour')
345
+ expect(desc('5,10 * * * *')).to eq('At 05 and 10 minutes past the hour')
338
346
  end
339
347
 
340
348
  it 'minutes past the hour 5,10 day 2' do
341
- expect(desc('5,10 0 2 * *')).to eq('At 05 and 10 minutes past the hour, on day 2 of the month')
349
+ expect(desc('5,10 * 2 * *')).to eq('At 05 and 10 minutes past the hour, on day 2 of the month')
342
350
  end
343
351
 
344
352
  it 'minutes past the hour 5/10 day 2' do
345
- expect(desc('5/10 0 2 * *')).to eq('Every 10 minutes, starting at 05 minutes past the hour, on day 2 of the month')
353
+ expect(desc('5/10 * 2 * *')).to eq('Every 10 minutes, starting at 05 minutes past the hour, on day 2 of the month')
346
354
  end
347
355
  end
348
356
 
349
357
  context 'seconds past the minute:' do
358
+ it 'seconds past the minute 5,6, midnight hour' do
359
+ expect(desc('5,6 0 0 * * *')).to eq('At 5 and 6 seconds past the minute, at 12:00 AM')
360
+ end
361
+
350
362
  it 'seconds past the minute 5,6' do
351
- expect(desc('5,6 0 0 * * *')).to eq('At 5 and 6 seconds past the minute')
363
+ expect(desc('5,6 0 * * * *')).to eq('At 5 and 6 seconds past the minute')
352
364
  end
353
365
 
354
366
  it 'seconds past the minute 5,6 at 1' do
@@ -356,7 +368,7 @@ module Cronex
356
368
  end
357
369
 
358
370
  it 'seconds past the minute 5,6 day 2' do
359
- expect(desc('5,6 0 0 2 * *')).to eq('At 5 and 6 seconds past the minute, on day 2 of the month')
371
+ expect(desc('5,6 0 * 2 * *')).to eq('At 5 and 6 seconds past the minute, on day 2 of the month')
360
372
  end
361
373
  end
362
374
 
@@ -42,7 +42,11 @@ module Cronex
42
42
  expect(desc('*/5 * * * *')).to eq('Tous les 5 minutes')
43
43
  end
44
44
 
45
- it 'every 5 minute 0 */5' do
45
+ it 'every 5 minutes at Midnight' do
46
+ expect(desc('*/5 0 * * *')).to eq('Tous les 5 minutes, à 12:00 AM')
47
+ end
48
+
49
+ it 'every 5 minutes 0 */5' do
46
50
  expect(desc('0 */5 * * * *')).to eq('Tous les 5 minutes')
47
51
  end
48
52
 
@@ -293,12 +297,12 @@ module Cronex
293
297
  "À 00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50 et 55 minutes après l'heure")
294
298
  end
295
299
 
296
- it 'every x minute past the hour with interval' do
300
+ it 'every X minutes past the hour with interval' do
297
301
  expect(desc('0 0-30/2 17 ? * MON-FRI')).to eq(
298
302
  "Tous les 2 minutes, minutes 00 à 30 après l'heure, à 5:00 PM, lundi à vendredi")
299
303
  end
300
304
 
301
- it 'every x days with interval' do
305
+ it 'every X days with interval' do
302
306
  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
307
  end
304
308
 
@@ -333,22 +337,30 @@ module Cronex
333
337
  end
334
338
 
335
339
  context 'minutes past the hour:' do
340
+ it 'minutes past the hour 5,10, midnight hour' do
341
+ expect(desc('5,10 0 * * *')).to eq("À 05 et 10 minutes après l'heure, à 12:00 AM")
342
+ end
343
+
336
344
  it 'minutes past the hour 5,10' do
337
- expect(desc('5,10 0 * * *')).to eq("À 05 et 10 minutes après l'heure")
345
+ expect(desc('5,10 * * * *')).to eq("À 05 et 10 minutes après l'heure")
338
346
  end
339
347
 
340
348
  it 'minutes past the hour 5,10 day 2' do
341
- expect(desc('5,10 0 2 * *')).to eq("À 05 et 10 minutes après l'heure, le 2 de chaque mois")
349
+ expect(desc('5,10 * 2 * *')).to eq("À 05 et 10 minutes après l'heure, le 2 de chaque mois")
342
350
  end
343
351
 
344
352
  it 'minutes past the hour 5/10 day 2' do
345
- expect(desc('5/10 0 2 * *')).to eq("Tous les 10 minutes, commence à 05 minutes après l'heure, le 2 de chaque mois")
353
+ expect(desc('5/10 * 2 * *')).to eq("Tous les 10 minutes, commence à 05 minutes après l'heure, le 2 de chaque mois")
346
354
  end
347
355
  end
348
356
 
349
357
  context 'seconds past the minute:' do
358
+ it 'seconds past the minute 5,6, midnight hour' do
359
+ expect(desc('5,6 0 0 * * *')).to eq('À 5 et 6 secondes après la minute, à 12:00 AM')
360
+ end
361
+
350
362
  it 'seconds past the minute 5,6' do
351
- expect(desc('5,6 0 0 * * *')).to eq('À 5 et 6 secondes après la minute')
363
+ expect(desc('5,6 0 * * * *')).to eq('À 5 et 6 secondes après la minute')
352
364
  end
353
365
 
354
366
  it 'seconds past the minute 5,6 at 1' do
@@ -356,7 +368,7 @@ module Cronex
356
368
  end
357
369
 
358
370
  it 'seconds past the minute 5,6 day 2' do
359
- expect(desc('5,6 0 0 2 * *')).to eq('À 5 et 6 secondes après la minute, le 2 de chaque mois')
371
+ expect(desc('5,6 0 * 2 * *')).to eq('À 5 et 6 secondes après la minute, le 2 de chaque mois')
360
372
  end
361
373
  end
362
374
 
@@ -42,7 +42,11 @@ module Cronex
42
42
  expect(desc('*/5 * * * *')).to eq('Ogni 5 minuti')
43
43
  end
44
44
 
45
- it 'every 5 minute 0 */5' do
45
+ it 'every 5 minutes at Midnight' do
46
+ expect(desc('*/5 0 * * *')).to eq('Ogni 5 minuti, alle(ai) 12:00 AM')
47
+ end
48
+
49
+ it 'every 5 minutes 0 */5' do
46
50
  expect(desc('0 */5 * * * *')).to eq('Ogni 5 minuti')
47
51
  end
48
52
 
@@ -293,12 +297,12 @@ module Cronex
293
297
  'Alle(ai) 00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50 e 55 minuti dopo l\'ora')
294
298
  end
295
299
 
296
- it 'every x minute past the hour with interval' do
300
+ it 'every X minutes past the hour with interval' do
297
301
  expect(desc('0 0-30/2 17 ? * MON-FRI')).to eq(
298
302
  'Ogni 2 minuti, dal minuto 00 al 30 dopo l\'ora, alle(ai) 5:00 PM, da lunedì a venerdì')
299
303
  end
300
304
 
301
- it 'every x days with interval' do
305
+ it 'every X days with interval' do
302
306
  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
307
  end
304
308
 
@@ -333,22 +337,30 @@ module Cronex
333
337
  end
334
338
 
335
339
  context 'minutes past the hour:' do
340
+ it 'minutes past the hour 5,10, midnight hour' do
341
+ expect(desc('5,10 0 * * *')).to eq('Alle(ai) 05 e 10 minuti dopo l\'ora, alle(ai) 12:00 AM')
342
+ end
343
+
336
344
  it 'minutes past the hour 5,10' do
337
- expect(desc('5,10 0 * * *')).to eq('Alle(ai) 05 e 10 minuti dopo l\'ora')
345
+ expect(desc('5,10 * * * *')).to eq('Alle(ai) 05 e 10 minuti dopo l\'ora')
338
346
  end
339
347
 
340
348
  it 'minutes past the hour 5,10 day 2' do
341
- expect(desc('5,10 0 2 * *')).to eq('Alle(ai) 05 e 10 minuti dopo l\'ora, il giorno 2 del mese')
349
+ expect(desc('5,10 * 2 * *')).to eq('Alle(ai) 05 e 10 minuti dopo l\'ora, il giorno 2 del mese')
342
350
  end
343
351
 
344
352
  it 'minutes past the hour 5/10 day 2' do
345
- expect(desc('5/10 0 2 * *')).to eq('Ogni 10 minuti, a partire da alle(ai) 05 minuti dopo l\'ora, il giorno 2 del mese')
353
+ expect(desc('5/10 * 2 * *')).to eq('Ogni 10 minuti, a partire da alle(ai) 05 minuti dopo l\'ora, il giorno 2 del mese')
346
354
  end
347
355
  end
348
356
 
349
357
  context 'seconds past the minute:' do
358
+ it 'seconds past the minute 5,6, midnight hour' do
359
+ expect(desc('5,6 0 0 * * *')).to eq('A 5 e 6 secondi dopo il minuto, alle(ai) 12:00 AM')
360
+ end
361
+
350
362
  it 'seconds past the minute 5,6' do
351
- expect(desc('5,6 0 0 * * *')).to eq('A 5 e 6 secondi dopo il minuto')
363
+ expect(desc('5,6 0 * * * *')).to eq('A 5 e 6 secondi dopo il minuto')
352
364
  end
353
365
 
354
366
  it 'seconds past the minute 5,6 at 1' do
@@ -356,7 +368,7 @@ module Cronex
356
368
  end
357
369
 
358
370
  it 'seconds past the minute 5,6 day 2' do
359
- expect(desc('5,6 0 0 2 * *')).to eq('A 5 e 6 secondi dopo il minuto, il giorno 2 del mese')
371
+ expect(desc('5,6 0 * 2 * *')).to eq('A 5 e 6 secondi dopo il minuto, il giorno 2 del mese')
360
372
  end
361
373
  end
362
374
 
@@ -42,7 +42,11 @@ module Cronex
42
42
  expect(desc('*/5 * * * *')).to eq('A cada 5 minutos')
43
43
  end
44
44
 
45
- it 'every 5 minute 0 */5' do
45
+ it 'every 5 minutes at Midnight' do
46
+ expect(desc('*/5 0 * * *')).to eq('A cada 5 minutos, 12:00 AM')
47
+ end
48
+
49
+ it 'every 5 minutes 0 */5' do
46
50
  expect(desc('0 */5 * * * *')).to eq('A cada 5 minutos')
47
51
  end
48
52
 
@@ -293,12 +297,12 @@ module Cronex
293
297
  '00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50 e 55 minutos após a hora')
294
298
  end
295
299
 
296
- it 'every x minute past the hour with interval' do
300
+ it 'every X minutes past the hour with interval' do
297
301
  expect(desc('0 0-30/2 17 ? * MON-FRI')).to eq(
298
302
  'A cada 2 minutos, entre 00 e 30 minutos após a hora, 5:00 PM, de segunda-feira a sexta-feira')
299
303
  end
300
304
 
301
- it 'every x days with interval' do
305
+ it 'every X days with interval' do
302
306
  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
307
  end
304
308
 
@@ -333,22 +337,30 @@ module Cronex
333
337
  end
334
338
 
335
339
  context 'minutes past the hour:' do
340
+ it 'minutes past the hour 5,10, midnight hour' do
341
+ expect(desc('5,10 0 * * *')).to eq('05 e 10 minutos após a hora, 12:00 AM')
342
+ end
343
+
336
344
  it 'minutes past the hour 5,10' do
337
- expect(desc('5,10 0 * * *')).to eq('05 e 10 minutos após a hora')
345
+ expect(desc('5,10 * * * *')).to eq('05 e 10 minutos após a hora')
338
346
  end
339
347
 
340
348
  it 'minutes past the hour 5,10 day 2' do
341
- expect(desc('5,10 0 2 * *')).to eq('05 e 10 minutos após a hora, no dia 2 do mês')
349
+ expect(desc('5,10 * 2 * *')).to eq('05 e 10 minutos após a hora, no dia 2 do mês')
342
350
  end
343
351
 
344
352
  it 'minutes past the hour 5/10 day 2' do
345
- expect(desc('5/10 0 2 * *')).to eq('A cada 10 minutos, iniciando 05 minutos após a hora, no dia 2 do mês')
353
+ expect(desc('5/10 * 2 * *')).to eq('A cada 10 minutos, iniciando 05 minutos após a hora, no dia 2 do mês')
346
354
  end
347
355
  end
348
356
 
349
357
  context 'seconds past the minute:' do
358
+ it 'seconds past the minute 5,6, midnight hour' do
359
+ expect(desc('5,6 0 0 * * *')).to eq('5 e 6 segundos após o minuto, 12:00 AM')
360
+ end
361
+
350
362
  it 'seconds past the minute 5,6' do
351
- expect(desc('5,6 0 0 * * *')).to eq('5 e 6 segundos após o minuto')
363
+ expect(desc('5,6 0 * * * *')).to eq('5 e 6 segundos após o minuto')
352
364
  end
353
365
 
354
366
  it 'seconds past the minute 5,6 at 1' do
@@ -356,7 +368,7 @@ module Cronex
356
368
  end
357
369
 
358
370
  it 'seconds past the minute 5,6 day 2' do
359
- expect(desc('5,6 0 0 2 * *')).to eq('5 e 6 segundos após o minuto, no dia 2 do mês')
371
+ expect(desc('5,6 0 * 2 * *')).to eq('5 e 6 segundos após o minuto, no dia 2 do mês')
360
372
  end
361
373
  end
362
374
 
@@ -42,7 +42,11 @@ module Cronex
42
42
  expect(desc('*/5 * * * *')).to eq('La fiecare 5 minute')
43
43
  end
44
44
 
45
- it 'every 5 minute 0 */5' do
45
+ it 'every 5 minutes at Midnight' do
46
+ expect(desc('*/5 0 * * *')).to eq('La fiecare 5 minute, la 12:00 AM')
47
+ end
48
+
49
+ it 'every 5 minutes 0 */5' do
46
50
  expect(desc('0 */5 * * * *')).to eq('La fiecare 5 minute')
47
51
  end
48
52
 
@@ -293,12 +297,12 @@ module Cronex
293
297
  'La 00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50 și 55 minute în fiecare oră')
294
298
  end
295
299
 
296
- it 'every x minute past the hour with interval' do
300
+ it 'every X minutes past the hour with interval' do
297
301
  expect(desc('0 0-30/2 17 ? * MON-FRI')).to eq(
298
302
  'La fiecare 2 minute, între minutele 00 și 30, la 5:00 PM, de luni până vineri')
299
303
  end
300
304
 
301
- it 'every x days with interval' do
305
+ it 'every X days with interval' do
302
306
  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
307
  end
304
308
 
@@ -333,22 +337,30 @@ module Cronex
333
337
  end
334
338
 
335
339
  context 'minutes past the hour:' do
340
+ it 'minutes past the hour 5,10, midnight hour' do
341
+ expect(desc('5,10 0 * * *')).to eq('La 05 și 10 minute în fiecare oră, la 12:00 AM')
342
+ end
343
+
336
344
  it 'minutes past the hour 5,10' do
337
- expect(desc('5,10 0 * * *')).to eq('La 05 și 10 minute în fiecare oră')
345
+ expect(desc('5,10 * * * *')).to eq('La 05 și 10 minute în fiecare oră')
338
346
  end
339
347
 
340
348
  it 'minutes past the hour 5,10 day 2' do
341
- expect(desc('5,10 0 2 * *')).to eq('La 05 și 10 minute în fiecare oră, în a 2-a zi a lunii')
349
+ expect(desc('5,10 * 2 * *')).to eq('La 05 și 10 minute în fiecare oră, în a 2-a zi a lunii')
342
350
  end
343
351
 
344
352
  it 'minutes past the hour 5/10 day 2' do
345
- expect(desc('5/10 0 2 * *')).to eq('La fiecare 10 minute, pornire la 05 minute în fiecare oră, în a 2-a zi a lunii')
353
+ expect(desc('5/10 * 2 * *')).to eq('La fiecare 10 minute, pornire la 05 minute în fiecare oră, în a 2-a zi a lunii')
346
354
  end
347
355
  end
348
356
 
349
357
  context 'seconds past the minute:' do
358
+ it 'seconds past the minute 5,6, midnight hour' do
359
+ expect(desc('5,6 0 0 * * *')).to eq('La secunda 5 și 6, la 12:00 AM')
360
+ end
361
+
350
362
  it 'seconds past the minute 5,6' do
351
- expect(desc('5,6 0 0 * * *')).to eq('La secunda 5 și 6')
363
+ expect(desc('5,6 0 * * * *')).to eq('La secunda 5 și 6')
352
364
  end
353
365
 
354
366
  it 'seconds past the minute 5,6 at 1' do
@@ -356,7 +368,7 @@ module Cronex
356
368
  end
357
369
 
358
370
  it 'seconds past the minute 5,6 day 2' do
359
- expect(desc('5,6 0 0 2 * *')).to eq('La secunda 5 și 6, în a 2-a zi a lunii')
371
+ expect(desc('5,6 0 * 2 * *')).to eq('La secunda 5 și 6, în a 2-a zi a lunii')
360
372
  end
361
373
  end
362
374
 
@@ -42,7 +42,11 @@ module Cronex
42
42
  expect(desc('*/5 * * * *')).to eq('Каждые 5 минут')
43
43
  end
44
44
 
45
- it 'every 5 minute 0 */5' do
45
+ it 'every 5 minutes at Midnight' do
46
+ expect(desc('*/5 0 * * *')).to eq('Каждые 5 минут, в 12:00 AM')
47
+ end
48
+
49
+ it 'every 5 minutes 0 */5' do
46
50
  expect(desc('0 */5 * * * *')).to eq('Каждые 5 минут')
47
51
  end
48
52
 
@@ -293,12 +297,12 @@ module Cronex
293
297
  'В 00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50 и 55 минут часа')
294
298
  end
295
299
 
296
- it 'every x minute past the hour with interval' do
300
+ it 'every X minutes past the hour with interval' do
297
301
  expect(desc('0 0-30/2 17 ? * MON-FRI')).to eq(
298
302
  'Каждые 2 минут, минуты с 00 по 30, в 5:00 PM, понедельник - пятница')
299
303
  end
300
304
 
301
- it 'every x days with interval' do
305
+ it 'every X days with interval' do
302
306
  expect(desc('30 7 1-L/2 * *')).to eq('В 7:30 AM, каждые 2 дня(ей), между 1 днем и последним днем месяца')
303
307
  end
304
308
 
@@ -333,22 +337,30 @@ module Cronex
333
337
  end
334
338
 
335
339
  context 'minutes past the hour:' do
340
+ it 'minutes past the hour 5,10, midnight hour' do
341
+ expect(desc('5,10 0 * * *')).to eq('В 05 и 10 минут часа, в 12:00 AM')
342
+ end
343
+
336
344
  it 'minutes past the hour 5,10' do
337
- expect(desc('5,10 0 * * *')).to eq('В 05 и 10 минут часа')
345
+ expect(desc('5,10 * * * *')).to eq('В 05 и 10 минут часа')
338
346
  end
339
347
 
340
348
  it 'minutes past the hour 5,10 day 2' do
341
- expect(desc('5,10 0 2 * *')).to eq('В 05 и 10 минут часа, 2 день месяца')
349
+ expect(desc('5,10 * 2 * *')).to eq('В 05 и 10 минут часа, 2 день месяца')
342
350
  end
343
351
 
344
352
  it 'minutes past the hour 5/10 day 2' do
345
- expect(desc('5/10 0 2 * *')).to eq('Каждые 10 минут, начало в 05 минут часа, 2 день месяца')
353
+ expect(desc('5/10 * 2 * *')).to eq('Каждые 10 минут, начало в 05 минут часа, 2 день месяца')
346
354
  end
347
355
  end
348
356
 
349
357
  context 'seconds past the minute:' do
358
+ it 'seconds past the minute 5,6, midnight hour' do
359
+ expect(desc('5,6 0 0 * * *')).to eq('В 5 и 6 секунд, в 12:00 AM')
360
+ end
361
+
350
362
  it 'seconds past the minute 5,6' do
351
- expect(desc('5,6 0 0 * * *')).to eq('В 5 и 6 секунд')
363
+ expect(desc('5,6 0 * * * *')).to eq('В 5 и 6 секунд')
352
364
  end
353
365
 
354
366
  it 'seconds past the minute 5,6 at 1' do
@@ -356,7 +368,7 @@ module Cronex
356
368
  end
357
369
 
358
370
  it 'seconds past the minute 5,6 day 2' do
359
- expect(desc('5,6 0 0 2 * *')).to eq('В 5 и 6 секунд, 2 день месяца')
371
+ expect(desc('5,6 0 * 2 * *')).to eq('В 5 и 6 секунд, 2 день месяца')
360
372
  end
361
373
  end
362
374
 
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.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Kazaku
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-16 00:00:00.000000000 Z
11
+ date: 2023-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo