Permalink
Browse files

utilise Garlic::Generator in tabtab definition

  • Loading branch information...
ianwhite committed Nov 27, 2008
1 parent 915add3 commit 4dd3e6a8091440e759f011d7d94a1b58ab524c1b
Showing with 13 additions and 4 deletions.
  1. +5 −0 History.txt
  2. +2 −2 README.textile
  3. +6 −2 lib/tabtab_definitions/garlic.rb
View
@@ -1,3 +1,8 @@
+== Current
+
+* 1 minor enhancement
+ * utilise Garlic::Generator in tabtab definition
+
== 0.1.6 2008-11-27
* 3 minor enhancements
View
@@ -49,12 +49,12 @@ Install the garlic gem
sudo gem install ianwhite-garlic --source=http://gems.github.com
-(if it's not installing as a gem from github)
+(if you want the very latest version)
git clone git://github.com/ianwhite/garlic
cd garlic
rake package
- sudo gem install pkg/*.gem
+ sudo gem install pkg/garlic-*.gem
h2. Example
@@ -1,11 +1,15 @@
require "garlic/session"
+require "garlic/generator"
TabTab::Definition.register('garlic', :import => '--help') do |g|
Garlic::Session.commands.each do |c|
g.command c
end
- g.command :generate do
- `ls ~/.garlic/templates`.split.map{|t| t.sub('.rb','')}
+ g.command :generate do
+ class << self
+ include Garlic::Generator
+ end
+ available_templates
end
end

0 comments on commit 4dd3e6a

Please sign in to comment.