Class: Doubleshot::CLI::Commands::Install

Inherits:
Doubleshot::CLI show all
Defined in:
lib/doubleshot/commands/install.rb

Constant Summary

Constants inherited from Doubleshot::CLI

USAGE

Class Method Summary collapse

Methods inherited from Doubleshot::CLI

commands, detect, inherited, task_name, usage

Class Method Details

.optionsObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/doubleshot/commands/install.rb', line 9

def self.options
  Options.new do |options|
    options.banner = "Usage: doubleshot install"
    options.separator ""
    options.separator "Options"

    options.test = true
    options.on "--no-test", "Disable testing as a packaging prerequisite." do
      options.test = false
    end

    options.separator ""
    options.separator "Summary: #{summary}"
  end
end

.start(args) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/doubleshot/commands/install.rb', line 25

def self.start(args)
  Doubleshot::CLI::Commands::Gem.start(args)

  require "rubygems/dependency_installer"

  installer = ::Gem::DependencyInstaller.new
  installer.install Doubleshot::current.config.gemspec.file_name

  return 0
end

.summaryObject



3
4
5
6
7
# File 'lib/doubleshot/commands/install.rb', line 3

def self.summary
  <<-EOS.margin
    Install your project as a Rubygem.
  EOS
end