Sha256: 79f90e826dc409a7578dcee999ff815cbf879e01f7f2a377ce8b96003129bc7b

Contents?: true

Size: 973 Bytes

Versions: 1

Compression:

Stored size: 973 Bytes

Contents

require "thor"
require "launchy"
require "hajimeru/generator"
require "hajimeru/version"

module Hajimeru
  class Command < Thor
    register(Generator::GroongaPlugin, "groonga_plugin", "groonga_plugin PLUGIN_NAME", "Scaffold the Groonga plugin")
    register(Generator::JavaScript, "javascript", "javascript PROJECT_NAME", "Scaffold the JavaScript project")
    register(Generator::Sinatra, "sinatra", "sinatra PROJECT_NAME", "Scaffold the Sinatra project")
    register(Generator::Xul, "xul", "xul ADDON_NAME", "Scaffold the XUL add-on")

    desc "version", "Show version"
    def version
      puts(VERSION)
    end

    desc "reference NAME", "Show reference on your browser"
    def reference(name)
      case name
      when "groonga_plugin"
        Launchy.open("http://groonga.org/docs/reference/api/plugin.html")
      else
        $stderr.puts("#{$0} reference: #{name} is not supported yet. Please search yourself on your browser.")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hajimeru-0.1.3 lib/hajimeru/command.rb