mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 11:10:12 +01:00
added verbose option
This commit is contained in:
parent
353c1b3dd1
commit
e0f7eec171
1 changed files with 7 additions and 3 deletions
|
|
@ -145,12 +145,12 @@ module Gtd
|
|||
req.basic_auth ENV['GTD_LOGIN'], ENV['GTD_PASSWORD']
|
||||
req.body = "<todo>#{props}</todo>"
|
||||
|
||||
puts req.body
|
||||
puts req.body if options[:verbose]
|
||||
|
||||
resp = http.request(req)
|
||||
|
||||
if resp.code == '302' || resp.code == '201'
|
||||
puts resp['location']
|
||||
puts resp['location'] if options[:verbose]
|
||||
|
||||
# return the todo id
|
||||
return resp['location'].split("/").last
|
||||
|
|
@ -183,7 +183,7 @@ module Gtd
|
|||
resp = http.request(req)
|
||||
|
||||
if resp.code == '302' || resp.code == '201'
|
||||
puts resp['location']
|
||||
puts resp['location'] if options[:verbose]
|
||||
|
||||
# return the project id
|
||||
return resp['location'].split("/").last
|
||||
|
|
@ -249,6 +249,10 @@ module Gtd
|
|||
@keywords[v.split("=")[0]] = v.split("=")[1]
|
||||
end
|
||||
|
||||
cmd.on('-v', "verbose on") do |v|
|
||||
@options[:verbose] = true
|
||||
end
|
||||
|
||||
cmd.on('-f [S]', "filename of the template") do |v|
|
||||
@filename = v
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue