Sha256: cc3125e2c96ed0d99a9212041782f234d2b7f3381ae38480483719b35f5e70f3

Contents?: true

Size: 803 Bytes

Versions: 2

Compression:

Stored size: 803 Bytes

Contents

#!/usr/bin/env ruby

require 'thor'
require 'toothpick'
require 'toothpick/errors'

class ToothpickRunner < Thor
  include Toothpick

  default_task :help

  desc "init PICKS_GIT_REPO", "Clones PICKS_GIT_REPO"
  def init(picks_repo)
    Commands::init(picks_repo)
    say("Initialized toothpick", :green)
  rescue Errors::ToothpickError => e
    say "Error: #{e.message}", :red
  end

  desc "new", "Creates a new pick"
  def new
    Commands::new_pick
    say("New pick added", :green)
  rescue Errors::ToothpickError => e
    say "Error: #{e.message}", :red
  end

  desc "search STRING", "Searches for STRING and opens files in your $EDITOR"
  def search(string)
    Commands::search(string)
  rescue Errors::ToothpickError => e
    say "Error: #{e.message}", :red
  end


end

ToothpickRunner.start

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
toothpick-0.0.2 bin/toothpick
toothpick-0.0.1 bin/toothpick