micro_manager 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/cli/add_task.rb +4 -2
- data/lib/cli/complete_task.rb +4 -2
- data/lib/cli/result.rb +4 -2
- data/lib/cli/show_help.rb +4 -2
- data/lib/micro_manager/persistence.rb +4 -2
- data/lib/micro_manager/schedule.rb +4 -2
- data/lib/micro_manager/version.rb +1 -1
- 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: 77457b6c6086fca0326d7b7025d1a5b0d5ff4581be0f194aedefc371bc2678e0
|
4
|
+
data.tar.gz: f0fa29ecf6cafcb67a9243ddeeb2b658d3fffe765af3b7c8d7c124ed4cb81db3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6458bd68457b2b60256cc096add9fefd06a7d092dc60fe0111e80e00e72312b7a2f8e76f67c48ef9feb1e150923e8feb639251004f165fbdbc6392564a6f4339
|
7
|
+
data.tar.gz: ea40645d47b2d102791a81d79e1cf73f02a899ca2cf816bf45281de1f381153561806c9dbe529d5e347b7abe9ed14ce61586b71af82607406821a9d62077d3c6
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
data/lib/cli/add_task.rb
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
module MicroManager
|
4
4
|
module CLI
|
5
5
|
class AddTask
|
6
|
-
private attr_reader :description, :due
|
7
|
-
|
8
6
|
def initialize(description:, due: Date.today)
|
9
7
|
@description = description
|
10
8
|
@due = due
|
@@ -15,6 +13,10 @@ module MicroManager
|
|
15
13
|
|
16
14
|
Result.new { "Task added successfully" }
|
17
15
|
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
attr_reader :description, :due
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
data/lib/cli/complete_task.rb
CHANGED
@@ -5,8 +5,6 @@ require "tty-prompt"
|
|
5
5
|
module MicroManager
|
6
6
|
module CLI
|
7
7
|
class CompleteTask
|
8
|
-
private attr_reader :prompt
|
9
|
-
|
10
8
|
def initialize(prompt: TTY::Prompt.new)
|
11
9
|
@prompt = prompt
|
12
10
|
end
|
@@ -23,6 +21,10 @@ module MicroManager
|
|
23
21
|
nil
|
24
22
|
end
|
25
23
|
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
attr_reader :prompt
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
data/lib/cli/result.rb
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
module MicroManager
|
4
4
|
module CLI
|
5
5
|
class Result
|
6
|
-
private attr_reader :render_block
|
7
|
-
|
8
6
|
def initialize(&block)
|
9
7
|
raise ArgumentError, "A block is required" unless block_given?
|
10
8
|
|
@@ -14,6 +12,10 @@ module MicroManager
|
|
14
12
|
def render
|
15
13
|
@render_block.call
|
16
14
|
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
attr_reader :render_block
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
data/lib/cli/show_help.rb
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
module MicroManager
|
4
4
|
module CLI
|
5
5
|
class ShowHelp
|
6
|
-
private attr_reader :parser
|
7
|
-
|
8
6
|
def initialize(parser)
|
9
7
|
@parser = parser
|
10
8
|
end
|
@@ -14,6 +12,10 @@ module MicroManager
|
|
14
12
|
|
15
13
|
parser.help
|
16
14
|
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
attr_reader :parser
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
@@ -4,8 +4,6 @@ require "yaml"
|
|
4
4
|
|
5
5
|
module MicroManager
|
6
6
|
class Persistence
|
7
|
-
private attr_reader :config
|
8
|
-
|
9
7
|
def initialize(config)
|
10
8
|
@config = config
|
11
9
|
end
|
@@ -20,5 +18,9 @@ module MicroManager
|
|
20
18
|
content = reader.read(config.save_location)
|
21
19
|
serializer.load(content)
|
22
20
|
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :config
|
23
25
|
end
|
24
26
|
end
|
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
module MicroManager
|
4
4
|
class Schedule
|
5
|
-
private attr_reader :tasks
|
6
|
-
|
7
5
|
def initialize(tasks: [])
|
8
6
|
@tasks = tasks
|
9
7
|
end
|
@@ -21,5 +19,9 @@ module MicroManager
|
|
21
19
|
def tasks_completed(on:)
|
22
20
|
tasks.select { |task| task.completed? && task.completed_on == on }
|
23
21
|
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
attr_reader :tasks
|
24
26
|
end
|
25
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micro_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno Vezoli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-prompt
|