Sha256: 9c06c7f83539671a9cbdc1c58a891be9600ae2cd1974b076d3fb9ea1b6df2962
Contents?: true
Size: 1.44 KB
Versions: 2
Compression:
Stored size: 1.44 KB
Contents
# encoding: UTF-8 task :default => :spec require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |t| t.rspec_opts = '--backtrace --color' end task :run do file = 'spec/temp.txt' File.open(file, 'w'){|f|f.write("12345\n1234\n#{'abcdefg'*20}\n123")} exec "./bin/ruco #{file}" end task :try do require 'curses' Curses.setpos(0,0) Curses.addstr("xxxxxxxx\nyyyyyyy"); Curses.getch end task :key do require 'curses' Curses.noecho # do not show typed chars Curses.nonl # turn off newline translation Curses.stdscr.keypad(true) # enable arrow keys Curses.raw # give us all other keys Curses.stdscr.nodelay = 1 # do not block -> we can use timeouts Curses.init_screen nothing = (2**32 - 1) count = 0 loop do key = Curses.getch || nothing next if key >= nothing exit if key == 3 # Ctrl+c count = (count + 1) % 20 Curses.setpos(count,0) Curses.addstr("#{key.inspect} "); end end begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = 'ruco' gem.summary = "Commandline editor written in ruby" gem.email = "michael@grosser.it" gem.homepage = "http://github.com/grosser/#{gem.name}" gem.authors = ["Michael Grosser"] gem.post_install_message = <<-TEXT Ubuntu: sudo apt-get install xclip TEXT end Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruco-0.0.54 | Rakefile |
ruco-0.0.53 | Rakefile |