Permalink
Browse files

Commands update

  • Loading branch information...
velizarn committed Mar 2, 2012
1 parent 51e3665 commit 123c0cf5bd0dc76ccadcf9ac3b0dfa98048148d2
Showing with 17 additions and 4 deletions.
  1. +13 −1 commands/commands.rb
  2. +4 −3 config.yml
View
@@ -1,11 +1,23 @@
require 'ruble'
+require 'ruble/ui'
+require 'yaml'
+require 'yaml/store'
+
+def getconfig (key)
+
+ config = YAML.load_file(ENV['TM_BUNDLE_PATH']+"/config.yml")
+
+ return config[key].to_s
+
+end
command 'MySQL Documentation' do |cmd|
cmd.scope = :all
cmd.output = :discard
cmd.input = :none
cmd.invoke do |context|
- context.browser.open 'http://dev.mysql.com/doc/'
+ version = getconfig("current_version")
+ context.browser.open 'http://dev.mysql.com/doc/refman/'+version+'/en/'
end
end
View
@@ -1,8 +1,9 @@
---
docurl: http://dev.mysql.com/doc/
versions:
- - 5.0
- - 5.1
- - 5.5
- 5.6
+ - 5.5
+ - 5.1
+ - 5.0
+ - 4.1
current_version: 5.1

0 comments on commit 123c0cf

Please sign in to comment.