Top Level Namespace

Includes:
Term::ANSIColor

Defined Under Namespace

Modules: Capistrano

Instance Method Summary collapse

Instance Method Details

#local_versions(path, prefix) ⇒ Object

Available local Node versions



6
7
8
9
10
11
12
# File 'lib/capistrano/node.rb', line 6

def local_versions(path, prefix)
  Dir.entries(path).select do |n|
    n[0] != '.'
  end.map do |ver|
    Capistrano::Node.version ver, prefix
  end
end

#remote_versions(path, prefix) ⇒ Object

Available remote Node versions



15
16
17
18
19
# File 'lib/capistrano/node.rb', line 15

def remote_versions(path, prefix)
  capture("ls #{path}").chomp.split("\n").map do |ver|
    Capistrano::Node.version ver, prefix
  end
end