Exception: EY::AmbiguousEnvironmentGitUriError

Inherits:
ResolverError show all
Defined in:
lib/engineyard/error.rb

Instance Method Summary collapse

Constructor Details

#initialize(environments) ⇒ AmbiguousEnvironmentGitUriError

Returns a new instance of AmbiguousEnvironmentGitUriError.



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/engineyard/error.rb', line 22

def initialize(environments)
  message = "The repository url in this directory is ambiguous.\n"
  message << "Please use -e <envname> to specify one of the following environments:\n"
  environments.sort do |a, b|
    if a. == b.
      a.name <=> b.name
    else
      a..name <=> b..name
    end
  end.each { |env| message << "\t#{env.name} (#{env..name})\n" }
  super message
end