rbdo 1.1.1 → 1.1.2
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.
- checksums.yaml +4 -4
- data/README.md +10 -8
- data/lib/rbdo/command/command_help.rb +36 -2
- data/lib/rbdo/version.rb +1 -1
- data/rbdo.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5b18ae751462fb00ad41c3fc00a7340e167eb79a2e588325c3f6a2faf0465d1
|
4
|
+
data.tar.gz: 279bfd0b4c7c01cd5cad64909d6979e6691466bef0e0bf1b080f6f9dfb503371
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c7dbdd4a5e2d475d51558cba0210cafabbc6019759c9688333a334ed64ebe8d9fc967376e514b1c43ba11fbe70e81df525f4ad25b02134847b730b7be1c6c5a
|
7
|
+
data.tar.gz: 9ea4bf02b65d5e5f011490515bcc04032bfade33cd511facde436ef2b9835fa4600c39d3b62d7d42cee16eec435d779e0455bd80c4deedfb9e7752958976c8bf
|
data/README.md
CHANGED
@@ -1,41 +1,43 @@
|
|
1
1
|
# rbdo: a simple todo app in cli
|
2
2
|
|
3
|
+
[](https://rubygems.org/gems/rbdo)
|
4
|
+
|
3
5
|
## commands
|
4
6
|
|
5
7
|
### .add
|
6
8
|
|
7
|
-
|
9
|
+
`rbdo add --text="netflix and chill" --date=28/01/2019 --time=18:03`
|
8
10
|
|
9
11
|
### .ls
|
10
12
|
|
11
|
-
|
13
|
+
`rbdo ls`
|
12
14
|
|
13
15
|
### .rm
|
14
16
|
|
15
|
-
|
17
|
+
`rbdo rm --index=5`
|
16
18
|
|
17
19
|
## arguments
|
18
20
|
|
19
21
|
### --text
|
20
22
|
|
21
|
-
|
23
|
+
content of the todo entry.
|
22
24
|
|
23
|
-
|
25
|
+
`rbdo add --text="netflix and chill"`
|
24
26
|
|
25
27
|
### --date
|
26
28
|
|
27
29
|
date of the todo entry. (year and month are optional)
|
28
30
|
|
29
|
-
|
31
|
+
`rbdo add --date=28/01/2019 --text="netflix and chill"`
|
30
32
|
|
31
33
|
### --time
|
32
34
|
|
33
35
|
time of the todo entry. (minute and second are optional)
|
34
36
|
|
35
|
-
|
37
|
+
`rbdo add --time=18:03:08 --text=todo`
|
36
38
|
|
37
39
|
### --index
|
38
40
|
|
39
41
|
index of the todo entry required for the rm command.
|
40
42
|
|
41
|
-
|
43
|
+
`rbdo rm --index=5`
|
@@ -18,7 +18,7 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
19
|
# SOFTWARE.
|
20
20
|
|
21
|
-
require '
|
21
|
+
require 'pastel'
|
22
22
|
require_relative 'command'
|
23
23
|
|
24
24
|
module RBDO
|
@@ -33,7 +33,41 @@ module RBDO
|
|
33
33
|
def handle(argv)
|
34
34
|
return false unless @command.handle(argv).instance_of?(Hash)
|
35
35
|
|
36
|
-
|
36
|
+
pastel = Pastel.new
|
37
|
+
header = pastel.bright_yellow.bold.underline.detach
|
38
|
+
section = pastel.bright_cyan.bold.detach
|
39
|
+
command = pastel.black.on_white.detach
|
40
|
+
|
41
|
+
puts <<~HELP
|
42
|
+
#{header['commands']}
|
43
|
+
|
44
|
+
#{section['.add']}
|
45
|
+
#{command['rbdo add --text="blah" --date=28/01/2019']}
|
46
|
+
|
47
|
+
#{section['.ls']}
|
48
|
+
#{command['rbdo ls']}
|
49
|
+
|
50
|
+
#{section['.rm']}
|
51
|
+
#{command['rbdo rm --index=5']}
|
52
|
+
|
53
|
+
#{header['arguments']}
|
54
|
+
|
55
|
+
#{section['--text']}
|
56
|
+
content of the todo entry. example:
|
57
|
+
#{command['rbdo add --text="blah"']}
|
58
|
+
|
59
|
+
#{section['--date']}
|
60
|
+
date of the todo entry (year and month are optional). example:
|
61
|
+
#{command['rbdo add --date=28/01/2019 --text="blah"']}
|
62
|
+
|
63
|
+
#{section['--time']}
|
64
|
+
time of the todo entry (minute and second are optional). example:
|
65
|
+
#{command['rbdo add --time=18:03:08 --text="blah"']}
|
66
|
+
|
67
|
+
#{section['--time']}
|
68
|
+
index of the todo entry required for the rm command. example:
|
69
|
+
#{command['rbdo rm --index=5']}
|
70
|
+
HELP
|
37
71
|
true
|
38
72
|
end
|
39
73
|
end
|
data/lib/rbdo/version.rb
CHANGED
data/rbdo.gemspec
CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
24
|
spec.required_ruby_version = '>= 2.2'
|
25
|
-
spec.add_runtime_dependency '
|
25
|
+
spec.add_runtime_dependency 'pastel', '~> 0.7.2'
|
26
26
|
spec.add_development_dependency 'bundler', '~> 1.17'
|
27
27
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbdo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- personinblack
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: pastel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.7.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.7.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|