Sha256: 5e88b24fed1cabef0650b7577670e1612968d2d933eee65f16d9428ebf2ecb20

Contents?: true

Size: 592 Bytes

Versions: 2

Compression:

Stored size: 592 Bytes

Contents

require 'thor'
require 'pp'
require 'colored'
require 'active_support/time'

module Jog
  class CLI < Thor
    desc "today", "Edit the log entry for today"
    def today
      Jog.edit( Jog.get_or_create_file( Time.now ) )
    end

    desc "yesterday", "Edit the log entry for yesterday"
    def yesterday
      Jog.edit( Jog.get_or_create_file( Time.now - 1.day ) )
    end

    desc "config", "Print the current configuration"
    def config
      puts "Config".green.underline
      pp Jog.config
      puts
      puts "Template".green.underline
      puts Jog.template
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jog-0.0.6 lib/jog/cli.rb
jog-0.0.5 lib/jog/cli.rb