Skip to content

Commit

Permalink
Add missing info functionality to api, fix list_strings output
Browse files Browse the repository at this point in the history
  • Loading branch information
Sutto authored and wayneeseguin committed Jul 20, 2010
1 parent e7ac373 commit 0c9b03a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rvm/environment.rb
Expand Up @@ -6,7 +6,7 @@ module RVM
class Environment
extend Forwardable

%w(configuration utility alias list gemset rubies cleanup sets env tools).each do |key|
%w(configuration utility alias list gemset rubies cleanup sets env tools info).each do |key|
require File.join("rvm", "environment", key)
end

Expand Down
13 changes: 13 additions & 0 deletions lib/rvm/environment/info.rb
@@ -0,0 +1,13 @@
require 'yaml'

module RVM
class Environment

def info(*ruby_strings)
ruby_string = normalize_ruby_string(ruby_strings)
res = rvm(:info, ruby_string)
res.successful? ? YAML.load(res.stdout) : {}
end

end
end
2 changes: 1 addition & 1 deletion lib/rvm/environment/list.rb
Expand Up @@ -8,7 +8,7 @@ def list_gemsets

# Returns a raw array list of installed ruby strings, including aliases.
def list_strings
normalize_listing_output rvm(:list, :strings).stdout
normalize_listing_output rvm(:list, :strings).stdout.tr(' ', "\n")
end

# Lists the default ruby (minus gemset)
Expand Down

0 comments on commit 0c9b03a

Please sign in to comment.