Class: Anvil::Rubygems

Inherits:
Object
  • Object
show all
Defined in:
lib/anvil/rubygems.rb

Overview

Rubygems wrapper for common commands

Class Method Summary collapse

Class Method Details

.build(gemspec) ⇒ Object

Runs gem build for a gemspec

Parameters:

  • gemspec (String)

    The gemspec’s filename



12
13
14
15
16
# File 'lib/anvil/rubygems.rb', line 12

def build(gemspec)
  line = Cocaine::CommandLine.new 'gem', 'build :gemspec'

  line.run gemspec: gemspec
end

.install(gem_file) ⇒ Object

Runs gem install for a gem file

Parameters:

  • gem_file (String)

    The gems’ filename



21
22
23
24
25
# File 'lib/anvil/rubygems.rb', line 21

def install(gem_file)
  line = Cocaine::CommandLine.new 'gem', 'install :gem_file'

  line.run gem_file: gem_file
end

.push(gem_file) ⇒ Object



27
28
29
30
31
# File 'lib/anvil/rubygems.rb', line 27

def push(gem_file)
  line = Cocaine::CommandLine.new 'gem', 'push :gem_file'

  line.run gem_file: gem_file
end