class StreamingWiki::Cli

Public Instance Methods

live(path="./wiki") click to toggle source
# File lib/streaming_wiki/cli.rb, line 14
def live(path="./wiki")
  logger = Logger.new(STDOUT)
  git = Git.open(path, log: logger)
  listen = Listen.to(path) do |modified, added, removed|
    Differences.in(git).commit("notes")
    git.push
  end
  listen.start
  sleep
rescue
  binding.pry
end