Class: TrustyCms::Extension::Script::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/trusty_cms/extension/script.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = []) ⇒ Help

Returns a new instance of Help.



325
326
327
328
329
# File 'lib/trusty_cms/extension/script.rb', line 325

def initialize(args=[])
  command = args.shift
  command = 'help' unless self.class.instance_methods(false).collect {|im| im.to_s}.include?(command.to_s)
  send(command)
end

Instance Method Details

#helpObject



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/trusty_cms/extension/script.rb', line 331

def help
  $stdout.puts %{Usage:   script/extension command [arguments]

  Available commands:
      #{command_names}

  For help on an individual command:
      script/extension help command

  You may install extensions from another registry by setting the REGISTRY_URL
  By default the REGISTRY_URL is set to http://ext.radiantcms.org

  Code for the registry application may be found at:
  http://github.com/radiant/radiant-extension-registry/
    }
end

#infoObject



362
363
364
365
366
367
# File 'lib/trusty_cms/extension/script.rb', line 362

def info
  $stdout.puts %{Usage:    script/extension info extension_name

  Displays registry information about the extension.
  }
end

#installObject



348
349
350
351
352
353
# File 'lib/trusty_cms/extension/script.rb', line 348

def install
  $stdout.puts %{Usage:    script/extension install extension_name

  Installs an extension from information in the global registry.
  }
end

#uninstallObject



355
356
357
358
359
360
# File 'lib/trusty_cms/extension/script.rb', line 355

def uninstall
  $stdout.puts %{Usage:    script/extension uninstall extension_name

  Removes a previously installed extension from the current project.
    }
end