Class: GGem::CLI::InstallCommand

Inherits:
Object
  • Object
show all
Includes:
GemspecCommand
Defined in:
lib/ggem/cli/commands.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ InstallCommand

Returns a new instance of InstallCommand.



205
206
207
208
# File 'lib/ggem/cli/commands.rb', line 205

def initialize(*args)
  super
  @build_command = BuildCommand.new(*args)
end

Instance Method Details

#helpObject



223
224
225
226
227
228
# File 'lib/ggem/cli/commands.rb', line 223

def help
  "Usage: ggem install [options]\n\n" \
  "Options: #{@clirb}\n" \
  "Description:\n" \
  "  #{summary}"
end

#run(argv, *args) ⇒ Object



210
211
212
213
214
215
216
217
# File 'lib/ggem/cli/commands.rb', line 210

def run(argv, *args)
  super
  @build_command.run([])

  notify("#{@spec.name} #{@spec.version} installed to system gems") do
    @spec.run_install_cmd
  end
end

#summaryObject



219
220
221
# File 'lib/ggem/cli/commands.rb', line 219

def summary
  "Build and install #{@spec.gem_file_name} into system gems"
end