summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--README.markdown7
-rw-r--r--VERSION1
-rw-r--r--VERSION.yml4
-rw-r--r--lib/hcl.rb11
5 files changed, 15 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index c1e0636..3dd36c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/lib/hcl.rb b/lib/hcl.rb
index d14fa8e..9a18920 100644
--- a/lib/hcl.rb
+++ b/lib/hcl.rb
@@ -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.