lib/ayadn/post.rb in ayadn-1.0.6 vs lib/ayadn/post.rb in ayadn-1.0.7
- old
+ new
@@ -8,37 +8,38 @@
error_text_empty
end
end
def compose
- case Settings.config[:platform]
- when /mswin|mingw|cygwin/
- post = classic
- else
+ # case Settings.config[:platform]
+ # when /mswin|mingw|cygwin/
+ # post = classic
+ # else
require "readline"
post = readline
- end
- post
+ # end
+ # post
end
- def auto_classic
- loop do
- begin
- print "#{Settings.config[:identity][:handle]} >> ".color(:red)
- t = STDIN.gets.chomp
- send_post(t)
- puts Status.done
- rescue Interrupt
- abort(Status.canceled)
- end
- end
- end
+ # def auto_classic
+ # loop do
+ # begin
+ # print "#{Settings.config[:identity][:handle]} >> ".color(:red)
+ # t = STDIN.gets.chomp
+ # send_post(t)
+ # puts Status.done
+ # rescue Interrupt
+ # abort(Status.canceled)
+ # end
+ # end
+ # end
def auto_readline
loop do
begin
- while buffer = Readline.readline("#{Settings.config[:identity][:handle]} >> ".color(:red))
+ #while buffer = Readline.readline("#{Settings.config[:identity][:handle]} >> ".color(:red))
+ while buffer = Readline.readline(">> ".color(:red))
send_post(buffer)
puts Status.done
end
rescue Interrupt
abort(Status.canceled)
@@ -59,14 +60,14 @@
abort(Status.canceled)
end
post
end
- def classic
- puts Status.classic
- input_text = STDIN.gets.chomp
- [input_text]
- end
+ # def classic
+ # puts Status.classic
+ # input_text = STDIN.gets.chomp
+ # [input_text]
+ # end
def reply(new_post, replied_to)
replied_to = replied_to.values[0]
reply = replied_to[:handle].dup
reply << " #{new_post}"