syc-task 0.4.2 → 1.0.0

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.
@@ -14,7 +14,6 @@ require 'rainbow'
14
14
  # To stop the timer the semaphore has to be deleted
15
15
  # FileUtils.rm semaphore
16
16
  class ConsoleTimer
17
-
18
17
  # Create a new ConsoleTimer with the time to count down, the task's ID and a
19
18
  # semaphore. The semaphore is a file named id.track where id is equal to the
20
19
  # provided id. The semaphore is checked for existence. If the semaphore is
@@ -32,7 +31,7 @@ class ConsoleTimer
32
31
  while track
33
32
  sleep 1
34
33
  output
35
- track = File.exists? @semaphore
34
+ track = File.exist? @semaphore
36
35
  end
37
36
  exit 0
38
37
  end
@@ -49,16 +48,15 @@ class ConsoleTimer
49
48
  end
50
49
  seconds = difference % 60
51
50
  minutes = difference / 60 % 60
52
- hours = difference / 60 / 60 % 60
53
- count_down = sprintf("%d: %02d:%02d:%02d", @id, hours, minutes, seconds)
51
+ hours = difference / 60 / 60 % 60
52
+ count_down = format('%d: %02d:%02d:%02d', @id, hours, minutes, seconds)
54
53
  size = count_down.size
55
54
  count_down = count_down.color(color)
56
- command = "tput sc;"+
57
- "tput cup 0 $(($(tput cols) - #{size}));"+
55
+ command = 'tput sc;' +
56
+ "tput cup 0 $(($(tput cols) - #{size}));" +
58
57
  "echo #{count_down};tput rc"
59
58
  system command
60
59
  end
61
-
62
60
  end
63
61
 
64
62
  # Expects to receive parameters duration, id and semaphore
@@ -71,5 +69,3 @@ if ARGV.size == 3
71
69
  else
72
70
  exit -1
73
71
  end
74
-
75
-
metadata CHANGED
@@ -1,85 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syc-task
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Sugar
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-08 00:00:00.000000000 Z
11
+ date: 2024-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aruba
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.2.0
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 11.1.3
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 11.1.3
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: rake
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
- - - ! '>='
45
+ - - "~>"
18
46
  - !ruby/object:Gem::Version
19
- version: '0'
47
+ version: 13.2.1
20
48
  type: :development
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
- - - ! '>='
52
+ - - "~>"
25
53
  - !ruby/object:Gem::Version
26
- version: '0'
54
+ version: 13.2.1
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rdoc
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - ! '>='
59
+ - - "~>"
32
60
  - !ruby/object:Gem::Version
33
- version: '0'
61
+ version: 6.9.0
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - ! '>='
66
+ - - "~>"
39
67
  - !ruby/object:Gem::Version
40
- version: '0'
68
+ version: 6.9.0
41
69
  - !ruby/object:Gem::Dependency
42
- name: aruba
70
+ name: ruby-lsp
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
- - - ! '>='
73
+ - - "~>"
46
74
  - !ruby/object:Gem::Version
47
- version: '0'
75
+ version: 0.22.1
48
76
  type: :development
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
- - - ! '>='
80
+ - - "~>"
53
81
  - !ruby/object:Gem::Version
54
- version: '0'
82
+ version: 0.22.1
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: shoulda
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
- - - ! '>='
87
+ - - "~>"
60
88
  - !ruby/object:Gem::Version
61
- version: '0'
89
+ version: 4.0.0
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - ! '>='
94
+ - - "~>"
67
95
  - !ruby/object:Gem::Version
68
- version: '0'
96
+ version: 4.0.0
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: gli
71
99
  requirement: !ruby/object:Gem::Requirement
72
100
  requirements:
73
101
  - - '='
74
102
  - !ruby/object:Gem::Version
75
- version: 2.5.4
103
+ version: '2.22'
76
104
  type: :runtime
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
108
  - - '='
81
109
  - !ruby/object:Gem::Version
82
- version: 2.5.4
110
+ version: '2.22'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: rainbow
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -98,17 +126,17 @@ dependencies:
98
126
  name: timeleap
99
127
  requirement: !ruby/object:Gem::Requirement
100
128
  requirements:
101
- - - ! '>='
129
+ - - "~>"
102
130
  - !ruby/object:Gem::Version
103
- version: '0'
131
+ version: 0.0.1
104
132
  type: :runtime
105
133
  prerelease: false
106
134
  version_requirements: !ruby/object:Gem::Requirement
107
135
  requirements:
108
- - - ! '>='
136
+ - - "~>"
109
137
  - !ruby/object:Gem::Version
110
- version: '0'
111
- description: ! "= Simple task organizer\nsyctask can be used to create, plan, prioritize
138
+ version: 0.0.1
139
+ description: "= Simple task organizer\nsyctask can be used to create, plan, prioritize
112
140
  and schedule tasks.\n\n==Install\nThe application can be installed with\n $ gem
113
141
  install syc-task\n\n== Usage\nsyctask provides basic task organizer functions as
114
142
  create, update, list and \ncomplete a task. Additional functions are to plan tasks
@@ -194,16 +222,16 @@ description: ! "= Simple task organizer\nsyctask can be used to create, plan, pr
194
222
  schedule command is invoked the planned tasks are \nadded at or after the current
195
223
  time within the time schedule. Tasks that are done\nand scheduled in the future
196
224
  are not shown. Tasks done and in the past are shown\nwith the actual processing
197
- time.\n\nCreate a schedule with working time from 8a.m. to 6p.m. and meetings between\n9a.m.
198
- and 9.30a.m. and 1p.m. and 2.45p.m.\n $ syctask schedule -w \"8:00-18:00\" -b
199
- \"9:00-9:30,13:00-14:45\"\n\nAdd titles to the meetings\n $ syctask schedule
200
- -m \"Project status,Management meeting\"\n\nThe output will be\n Meetings\n --------\n
201
- \ A - Project status\n B - Management meeting\n\n A B\n
202
- \ xxx-///-|---|---|---///////-|---|---|---|\n 8 9 10 11 12 13 14 15
203
- \ 16 17 18\n 1\n\n Tasks\n -----\n 0 - 1: My first task\n\nAdding
204
- a task to a meeting\n $ syctask schedule -a \"A:0\"\n\nwill print\n Meetings\n
205
- \ --------\n A - Project status\n 1 - My first task\n B - Management
206
- meeting\n\n A B\n ----///-|---|---|---///////-|---|---|---|\n
225
+ time.\n\nThe day starts at 00:00 and ends at 23:59. So 24:00 should be 00:00.\n\nCreate
226
+ a schedule with working time from 8a.m. to 6p.m. and meetings between\n9a.m. and
227
+ 9.30a.m. and 1p.m. and 2.45p.m.\n $ syctask schedule -w \"8:00-18:00\" -b \"9:00-9:30,13:00-14:45\"\n\nAdd
228
+ titles to the meetings\n $ syctask schedule -m \"Project status,Management meeting\"\n\nThe
229
+ output will be\n Meetings\n --------\n A - Project status\n B - Management
230
+ meeting\n\n A B\n xxx-///-|---|---|---///////-|---|---|---|\n
231
+ \ 8 9 10 11 12 13 14 15 16 17 18\n 1\n\n Tasks\n -----\n 0
232
+ - 1: My first task\n\nAdding a task to a meeting\n $ syctask schedule -a \"A:0\"\n\nwill
233
+ print\n Meetings\n --------\n A - Project status\n 1 - My first
234
+ task\n B - Management meeting\n\n A B\n ----///-|---|---|---///////-|---|---|---|\n
207
235
  \ 8 9 10 11 12 13 14 15 16 17 18\n \n\n Tasks\n -----\n 0:
208
236
  1 - My first task\n\nA task that is re-scheduled with\n $ syctask update 1 -f
209
237
  tomorrow\n\nwill be shown as done (green) in the schedule and instead of separator
@@ -283,8 +311,8 @@ description: ! "= Simple task organizer\nsyctask can be used to create, plan, pr
283
311
  (optionally)\nIf I want to process the tasks in a specific sequence I prioritize
284
312
  the tasks\nwith \n $ syctask prio\n\n==== Create schedule\nI create a schedule
285
313
  with my working hours and meetings that have been scheduled \nwith \n $ syctask
286
- -w \"8:00-18:00\" -b \"9:00-10:00,14:30-16:00\" -m \"Team,Status\"\n\n==== Create
287
- an agenda\nI assign the topics I want to discuss in the meetings to the meetings
314
+ schedule -w \"8:00-18:00\" -b \"9:00-10:00,14:30-16:00\" -m \"Team,Status\"\n\n====
315
+ Create an agenda\nI assign the topics I want to discuss in the meetings to the meetings
288
316
  with\n syctask schedule -a \"A:1,3,6;B:3,5\"\n \n==== Start a task\nTo begin
289
317
  I start the first task in the schedule with syctask start -p ID \n(where ID is the
290
318
  ID of the planned (-p) tasks)\n $ syctask start -p 10\n\n==== End a task\nTo
@@ -297,29 +325,31 @@ description: ! "= Simple task organizer\nsyctask can be used to create, plan, pr
297
325
  prepend with the ID and move the e-mail to a\n<b>open topics</b> directory.\n\n*
298
326
  Files\nIf I create files in the course of a task I create a folder in the task\ndirectory
299
327
  with the ID and save the files in this directory. If there is an\nexisting directory
300
- I link to the file from the ID directory\n\n==Supported platform\nsyc-task has been
301
- tested with 1.9.3. It also works in Windows using Cygwin.\n\n==Add TAB-completion
302
- to syctask\nTo activate bash's TAB-completion following lines have to be added to
303
- ~/.bashrc\n\n complete -F get_syctask_commands syctask\n\n function get_syctask_commands\n
304
- \ {\n if [ -z $2 ] ; then\n COMPREPLY=(`syctask help -c`)\n else\n
305
- \ COMPREPLY=(`syctask help -c $2`)\n fi\n }\n\nAfter ~/.bashrc has
306
- been updated the shell session has to be restarted with\n $ source ~/.bashrc\n\nNow
307
- syctask followed by TAB TAB will print\n\n $ syctask <TAB><TAB>\n delete done
308
- list plan scan stop _doc help new prio schedule start update\n \nTo complete a command
309
- we can type\n\n $ syctask sch<TAB>\n\nwhich will complete to\n\n $ syctask
310
- schedule\n\n==Output to Printer\nTo print syctask's output to a printer pipe the
311
- command to lpr\n\n $ syctask schedule | lpr\n\nThis will print the schedule to
312
- the default printer. \n\nTo determine all available printer lpstat can be used with
313
- the lpstat -a command\n\n $ lpstat -a\n Canon-LBP6650-3470 accepting requests
314
- since Sat 16 Mar 2013 04:26:15 PM CET\n Dell-B1160w-Mono accepting requests since
315
- Sat 16 Mar 2013 04:27:45 PM CET\n \nTo print to Dell-B1160w-Mono the following
316
- command can be used\n\n $ syctask schedule | lpr -P Dell-B1160w-Mono\n\n==Release
317
- Notes\n===Version 0.0.1 \nImplementation of new, update, list and done commands.\n\n===Version
318
- 0.0.4\n* delete: deleting tasks or remove tasks from a task plan\n* plan: plan tasks
319
- and add them to the task plan\n* schedule: create a schedule with work and busy
320
- time and assign the tasks from\n the task plan to the free times\n\n===Version
321
- 0.0.6\n* start: start a task and track the lead time\n* stop: stop the tracking
322
- and print the lead time of the task\n* start, stop: the task is logged in the ~/.tasks/task.log
328
+ I link to the file from the ID directory\n\n==Supported platform\nsyc-task up to
329
+ version 0.4.2 has been tested with Ruby 1.9.3. Version 0.4.2 also runs\nwith Ruby
330
+ 2.7. It also works in Windows using Cygwin. Version 1.0.0 has been upgraded\nto
331
+ Ruby 3.2.\n\n==Add TAB-completion to syctask\nTo activate bash's TAB-completion
332
+ following lines have to be added to ~/.bashrc\n\n complete -F get_syctask_commands
333
+ syctask\n\n function get_syctask_commands\n {\n if [ -z $2 ] ; then\n
334
+ \ COMPREPLY=(`syctask help -c`)\n else\n COMPREPLY=(`syctask help
335
+ -c $2`)\n fi\n }\n\nAfter ~/.bashrc has been updated the shell session has
336
+ to be restarted with\n $ source ~/.bashrc\n\nNow syctask followed by TAB TAB
337
+ will print\n\n $ syctask <TAB><TAB>\n delete done list plan scan stop _doc
338
+ help new prio schedule start update\n \nTo complete a command we can type\n\n $
339
+ syctask sch<TAB>\n\nwhich will complete to\n\n $ syctask schedule\n\n==Output
340
+ to Printer\nTo print syctask's output to a printer pipe the command to lpr\n\n $
341
+ syctask schedule | lpr\n\nThis will print the schedule to the default printer. \n\nTo
342
+ determine all available printer lpstat can be used with the lpstat -a command\n\n
343
+ \ $ lpstat -a\n Canon-LBP6650-3470 accepting requests since Sat 16 Mar 2013
344
+ 04:26:15 PM CET\n Dell-B1160w-Mono accepting requests since Sat 16 Mar 2013 04:27:45
345
+ PM CET\n \nTo print to Dell-B1160w-Mono the following command can be used\n\n
346
+ \ $ syctask schedule | lpr -P Dell-B1160w-Mono\n\n==Release Notes\n===Version
347
+ 0.0.1 \nImplementation of new, update, list and done commands.\n\n===Version 0.0.4\n*
348
+ delete: deleting tasks or remove tasks from a task plan\n* plan: plan tasks and
349
+ add them to the task plan\n* schedule: create a schedule with work and busy time
350
+ and assign the tasks from\n the task plan to the free times\n\n===Version 0.0.6\n*
351
+ start: start a task and track the lead time\n* stop: stop the tracking and print
352
+ the lead time of the task\n* start, stop: the task is logged in the ~/.tasks/task.log
323
353
  file when added and\n when stopped\n* prio: prioritize tasks in the task plan,
324
354
  that is specifying the sequence in\n that the tasks should be conducted\n* plan:
325
355
  --move flag added to move tasks from the specified plan to another days\n task
@@ -380,17 +410,17 @@ description: ! "= Simple task organizer\nsyctask can be used to create, plan, pr
380
410
  'Follow-up' as well as 'follow_up' now. That is an underscore\n can be replaced
381
411
  with '-'\n* Fix bug when scanning tables that have spaces between separator and
382
412
  column\n* When tasks.log file is missing `syctask inspect` prints warning with reason\n
383
- \ why statistics cannot be printed\n\n==Development\nPull from Github and then run
384
- \n\n $ bundle install \n \nNew classes have to be added to 'lib/syctask.rb'\n\nDebugging
385
- the interface can be done with GLI_DEBUG: \n\n $ bundle exec env GLI_DEBUG=true
386
- bin/syctask\n\nBuilding and pushing the gemfile to Rubygems\n\n $ gem build syctask.gemspec\n
387
- \ $ gem push syc-task-0.2.1.gem\n\n==Tests\nThe test files live in the folder
388
- test and start with test_.\n\nThere is a rake file available to run all tests\n\n
389
- \ $ rake test\n \nThe CLI is tested with Cucumber. To run the Cucumber features
390
- in verbose mode\n\n $ cucumber\n\nor if you prefer cleaner output run\n\n $
391
- rake features\n\n==License\nsyc-task is released under the {MIT License}[http://opensource.org/licenses/MIT]\n\n==Links\n*
392
- [http://www.github.com/sugaryourcoffee/syc-task] - Source code on GitHub\n* [https://rubygems.org/gems/syc-task]
393
- - RubyGems\n"
413
+ \ why statistics cannot be printed\n\n====Version 1.0.0\n* Upgrade to Ruby 3.2.2\n\n==Development\nPull
414
+ from Github and then run \n\n $ bundle install \n \nNew classes have to be
415
+ added to 'lib/syctask.rb'\n\nDebugging the interface can be done with GLI_DEBUG:
416
+ \n\n $ bundle exec env GLI_DEBUG=true bin/syctask\n\nBuilding and pushing the
417
+ gemfile to Rubygems\n\n $ gem build syctask.gemspec\n $ gem push syc-task-0.2.1.gem\n\n==Tests\nThe
418
+ test files live in the folder test and start with test_.\n\nThere is a rake file
419
+ available to run all tests\n\n $ rake test\n \nThe CLI is tested with Cucumber.
420
+ To run the Cucumber features in verbose mode\n\n $ cucumber\n\nor if you prefer
421
+ cleaner output run\n\n $ rake features\n\n==License\nsyc-task is released under
422
+ the {MIT License}[http://opensource.org/licenses/MIT]\n\n==Links\n* [http://www.github.com/sugaryourcoffee/syc-task]
423
+ - Source code on GitHub\n* [https://rubygems.org/gems/syc-task] - RubyGems\n"
394
424
  email: pierre@sugaryourcoffee.de
395
425
  executables:
396
426
  - syctask
@@ -427,30 +457,29 @@ homepage: https://github.com/sugaryourcoffee/syc-task
427
457
  licenses:
428
458
  - MIT
429
459
  metadata: {}
430
- post_install_message:
460
+ post_install_message:
431
461
  rdoc_options:
432
- - --title
462
+ - "--title"
433
463
  - syctask
434
- - --main
464
+ - "--main"
435
465
  - README.rdoc
436
- - -ri
466
+ - "-ri"
437
467
  require_paths:
438
468
  - lib
439
469
  - lib
440
470
  required_ruby_version: !ruby/object:Gem::Requirement
441
471
  requirements:
442
- - - ! '>='
472
+ - - ">="
443
473
  - !ruby/object:Gem::Version
444
- version: '0'
474
+ version: '3.2'
445
475
  required_rubygems_version: !ruby/object:Gem::Requirement
446
476
  requirements:
447
- - - ! '>='
477
+ - - ">="
448
478
  - !ruby/object:Gem::Version
449
479
  version: '0'
450
480
  requirements: []
451
- rubyforge_project:
452
- rubygems_version: 2.4.3
453
- signing_key:
481
+ rubygems_version: 3.5.23
482
+ signing_key:
454
483
  specification_version: 4
455
484
  summary: Simple task organizer
456
485
  test_files: []