wtf-doc 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wtf/cli/application.rb +21 -18
- data/lib/wtf/doc.rb +1 -1
- data/lib/wtf/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cf134a51aae1edbb5c5f635e06beba1e9f714b9
|
4
|
+
data.tar.gz: 8d7404959798a92f357e35797a4dd6a1a0ac2e0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f783bbf3e4eb6f328d3b43c6372501e6674b1bfb428540f2e13b33bfba9f978c50fec2d8498d4e620ff60e649453f9eedab83aa4409b6fb251943840cba374a8
|
7
|
+
data.tar.gz: a8e43ea76f7d7a914acdbb12bf1e49b352a437bf60f5168df58baab8678388be20e6f8aeb619ed4491a5a5727cce4aec12686bdf19d93783baea8dd2f736bb39
|
data/lib/wtf/cli/application.rb
CHANGED
@@ -6,30 +6,33 @@ module Wtf
|
|
6
6
|
|
7
7
|
desc "here","This will read you the description of this folder"
|
8
8
|
def here
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
default_task :here
|
13
|
-
|
14
|
-
desc "doc", "This will write the description of the current folder.
|
15
|
-
\n\n Usage:
|
16
|
-
\n\n wtf doc -c 'my documentation'"
|
17
|
-
option :c
|
18
|
-
def doc(*args)
|
19
|
-
if options[:c]
|
20
|
-
content = options[:c] + " " + args.join(" ")
|
21
|
-
Wtf::Doc.write(content)
|
22
|
-
puts "Folder documentation added:"
|
23
|
-
puts "Doc ==> " + Wtf::Doc.content
|
9
|
+
if Wtf::Doc.content
|
10
|
+
say "DOC ==> " + Wtf::Doc.content.to_s, :green
|
24
11
|
else
|
25
|
-
|
12
|
+
doc if yes?("Do you want to add a documentation for this folder?")
|
26
13
|
end
|
27
14
|
end
|
15
|
+
default_task :here
|
28
16
|
|
17
|
+
|
18
|
+
desc "doc", "This will write the description of the current folder. \n\n Usage: \n\n wtf doc"
|
19
|
+
def doc
|
20
|
+
content = ask("What others should know about this folder? \n\n").to_s
|
21
|
+
Wtf::Doc.write(content)
|
22
|
+
say "\n\n Folder documentation added: \n\n"
|
23
|
+
say Wtf::Doc.content.to_s + "\n\n", :green
|
24
|
+
end
|
25
|
+
|
29
26
|
desc "clean", "This will clean the .wtf file from the current folder"
|
30
|
-
option :clean
|
31
27
|
def clean
|
32
|
-
Wtf::Doc.
|
28
|
+
if Wtf::Doc.has_documentation?
|
29
|
+
if yes?("Are you sure to cleanup the documentation for this folder?")
|
30
|
+
Wtf::Doc.clean
|
31
|
+
say :cleaned, :green
|
32
|
+
end
|
33
|
+
else
|
34
|
+
say "This directory doesn't have any .wtf file", :yellow
|
35
|
+
end
|
33
36
|
end
|
34
37
|
|
35
38
|
end
|
data/lib/wtf/doc.rb
CHANGED
data/lib/wtf/version.rb
CHANGED