Top Level Namespace

Defined Under Namespace

Modules: Rugged

Constant Summary collapse

CWD =
File.expand_path(File.dirname(__FILE__))
LIBGIT2_DIR =
File.join(CWD, '..', '..', 'vendor', 'libgit2')

Instance Method Summary collapse

Instance Method Details

#repoObject

Loaded by script/console. Land helpers here.



8
9
10
# File 'lib/rugged/console.rb', line 8

def repo
  Rugged::Repository.new(File.expand_path('../../../', __FILE__))
end

#sys(cmd) ⇒ Object



15
16
17
18
19
20
21
# File 'ext/rugged/extconf.rb', line 15

def sys(cmd)
  puts " -- #{cmd}"
  unless ret = xsystem(cmd)
    raise "ERROR: '#{cmd}' failed"
  end
  ret
end

#windows?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'ext/rugged/extconf.rb', line 23

def windows?
  RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
end