diff --git a/CHANGELOG b/CHANGELOG index 7b56c0d..8f15855 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,10 @@ usefuldb gem CHANGELOG +## Version 0.0.9 +- Added require statements for rubygems to ensure the system will work on ruby 1.8.7 +- Slightly updated README, COPYING and gemspec content +- Executing the usefuldb script with no parameters now displays usage information. + ## Version 0.0.8 - Fixed issue introduced in 0.0.7 with deleting elements - Added logging to many parts of the UsefulDB system to aid debugging, and provide support for verbose mode diff --git a/COPYING b/COPYING index f5f023f..9036c8b 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -usefuldb - simple commands and or urls database for storage of useful information. +usefuldb - simple database for storage of useful commands and or urls. usefuldb is released under the creative commons attribution-sharealike 3.0 unported (cc by-sa 3.0) licence. for more information see: http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/README b/README.md similarity index 74% rename from README rename to README.md index b1b5ab7..0af0f6a 100644 --- a/README +++ b/README.md @@ -1,4 +1,4 @@ -## Readme - v0.0.8 +## Readme - v0.0.9 ### Install To run the unit tests use the following rake target @@ -9,3 +9,6 @@ If you cloned the repository, or downloaded this gem as an archive, you can inst This gem is also stored on rubygems.org and can be installed with the following command: gem install usefuldb + +### Usage +To run the system, simply call the _usefuldb_ script at the commandline for instructions diff --git a/Rakefile b/Rakefile index 0b3c1eb..5b06b1a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +require 'rubygems' require 'bundler' Bundler::GemHelper.install_tasks diff --git a/bin/usefuldb b/bin/usefuldb index 0a721d6..1b4682c 100755 --- a/bin/usefuldb +++ b/bin/usefuldb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby # Require statements +require 'rubygems' require 'usefuldb' require 'optparse' require 'logger' @@ -27,6 +28,7 @@ log.level = Logger::WARN options = {} optparse = nil +welcome = nil # Setup the system for use UsefulDB.setup(log) @@ -38,6 +40,9 @@ begin UsefulDB - a simple command and URL database (#{UsefulDB::Version}) Useage: usefuldb .. + usefuldb -a + usefuldb -d + usefuldb -l WELCOME @@ -61,15 +66,18 @@ WELCOME options[:v] = arg end + welcome = opts + opts.on('-h', '--help', "Print out this message") do |arg| log.debug "help parameter passed" puts opts exit end - + end.parse! rescue OptionParser::InvalidOption => e - puts e.message + "\n\nUseage: usefuldb -h or --help for help using the system" + puts "[" + e.message + "} Please see the following for usage instructions: \n" + puts welcome log.fatal e.message exit() end @@ -83,7 +91,7 @@ if options.empty? log.debug "Checking if ARGV is empty" if ARGV.empty? log.debug "No parameters of any kind were passed, exiting" - puts "Useage: usefuldb -h or --help for help using the system" + puts welcome exit() else log.debug "At least one non flag parameter was passed, launching the search system" diff --git a/lib/usefuldb.rb b/lib/usefuldb.rb index 417922d..1765bcc 100644 --- a/lib/usefuldb.rb +++ b/lib/usefuldb.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'usefuldb/settings' require 'usefuldb/utilities' require 'usefuldb/exceptions' diff --git a/lib/usefuldb/exceptions.rb b/lib/usefuldb/exceptions.rb index 22f65dd..58c5571 100644 --- a/lib/usefuldb/exceptions.rb +++ b/lib/usefuldb/exceptions.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'usefuldb' module UsefulDB diff --git a/lib/usefuldb/gui.rb b/lib/usefuldb/gui.rb index 29d9562..8056db8 100644 --- a/lib/usefuldb/gui.rb +++ b/lib/usefuldb/gui.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'usefuldb/utilities' module UsefulDB diff --git a/lib/usefuldb/settings.rb b/lib/usefuldb/settings.rb index 457571b..266a00a 100644 --- a/lib/usefuldb/settings.rb +++ b/lib/usefuldb/settings.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'yaml' module UsefulDB diff --git a/lib/usefuldb/utilities.rb b/lib/usefuldb/utilities.rb index 46b198a..183023c 100644 --- a/lib/usefuldb/utilities.rb +++ b/lib/usefuldb/utilities.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'usefuldb/exceptions' require 'logger' diff --git a/lib/usefuldb/version.rb b/lib/usefuldb/version.rb index abb3627..6345ba8 100644 --- a/lib/usefuldb/version.rb +++ b/lib/usefuldb/version.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'usefuldb' module UsefulDB @@ -7,7 +8,7 @@ class << self MAJOR = 0 unless defined? MAJOR MINOR = 0 unless defined? MINOR - PATCH = 8 unless defined? PATCH + PATCH = 9 unless defined? PATCH def to_s [MAJOR, MINOR, PATCH].compact.join('.') diff --git a/test/main_test.rb b/test/main_test.rb index 8d13b10..ce98498 100644 --- a/test/main_test.rb +++ b/test/main_test.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'test/unit' require 'rack/test' require 'fileutils' diff --git a/usefuldb.gemspec b/usefuldb.gemspec index 20ad524..6f7021d 100644 --- a/usefuldb.gemspec +++ b/usefuldb.gemspec @@ -1,15 +1,16 @@ # -*- encoding: utf-8 -*- #$:.push File.expand_path("../lib", __FILE__) -require File.expand_path('../lib/usefuldb/version', __FILE__) +require 'rubygems' require 'rake' + Gem::Specification.new do |s| s.name = 'usefuldb' - s.version = UsefulDB::Version + s.version = '0.0.9' s.date = '2012-08-01' - s.summary = "A simple commands and URLs database for storage of useful information" - s.description = "usefuldb is a simple database which is designed to store useful commands and URLs" + s.summary = "usefuldb - simple database for storage of useful commands and or urls." + s.description = "Accessible through a commandline script, UsefulDB allows the user to store information about a useful command or useful url" s.authors = ["David Kirwan"] s.email = ['00346128@mail.wit.ie'] s.require_paths = ["lib"] @@ -23,7 +24,7 @@ Gem::Specification.new do |s| s.executables << 'usefuldb' s.post_install_message = <<-INSTALL -usefuldb - simple commands and or urls database for storage of useful information. +usefuldb - simple database for storage of useful commands and or urls. usefuldb is released under the creative commons attribution-sharealike 3.0 unported (cc by-sa 3.0) licence. for more information see: http://creativecommons.org/licenses/by-sa/3.0/