diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | README.markdown | 7 | ||||
| -rw-r--r-- | VERSION | 1 | ||||
| -rw-r--r-- | VERSION.yml | 4 | ||||
| -rw-r--r-- | lib/hcl.rb | 11 | 
5 files changed, 15 insertions, 9 deletions
| @@ -1 +1,2 @@  *.sw[nop] +pkg diff --git a/README.markdown b/README.markdown index d1c076e..047ead8 100644 --- a/README.markdown +++ b/README.markdown @@ -7,11 +7,8 @@ HCl is a command-line tool for interacting with Harvest time sheets using the  ## Quick Start -NOTE This software is nowhere near complete. To try it out: - -    $ cp hcl_conf.yml.example hcl_conf.yml -    $ $EDITOR hcl_conf.yml -    $ ./bin/hcl show [date] +    $ gem install zenhob-hcl --source=http://gems.github.com +    $ hcl show [date]  ### Prerequisites diff --git a/VERSION b/VERSION deleted file mode 100644 index 6e8bf73..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/VERSION.yml b/VERSION.yml new file mode 100644 index 0000000..25e00a3 --- /dev/null +++ b/VERSION.yml @@ -0,0 +1,4 @@ +--- +:major: 0 +:minor: 1 +:patch: 1 @@ -3,7 +3,6 @@ require 'rexml/document'  require 'net/http'  require 'net/https' -require 'rubygems'  require 'chronic'  require 'trollop'  require 'highline/import' @@ -26,7 +25,7 @@ class Net::HTTP  end  class HCl -  VERSION = "0.1.0" +  VERSION_FILE = File.dirname(__FILE__) + '/../VERSION.yml'    SETTINGS_FILE = "#{ENV['HOME']}/.hcl_settings"    CONFIG_FILE = "#{ENV['HOME']}/.hcl_config" @@ -49,13 +48,19 @@ class HCl    end    def initialize +    @version = YAML::load(File.read(VERSION_FILE))      read_config      read_settings    end +  def version +    [:major, :minor, :patch].map { |v| @version[v] }.join('.') +  end +    def process_args *args +    version_string = version      Trollop::options(args) do -      version "HCl #{VERSION}" +      version "HCl #{version_string}"        stop_on %w[ show tasks set unset note add rm start stop ]        banner <<-EOM  HCl is a command-line client for manipulating Harvest time sheets. | 
