diff options
author | Andre Arko <andre@arko.net> | 2012-12-10 22:36:18 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2012-12-10 22:36:18 -0800 |
commit | aabdb3387e889396a5f2020e1a00e57b91928917 (patch) | |
tree | 51cb919dd1d29e6e33d25a01eed09968abaef372 | |
parent | 27d08ca13793f656a3b8c55dfa794dfa7f0c83f1 (diff) | |
download | bundler-aabdb3387e889396a5f2020e1a00e57b91928917.tar.gz |
DslError duplicates GemfileError needlessly
-rw-r--r-- | lib/bundler.rb | 4 | ||||
-rw-r--r-- | lib/bundler/dsl.rb | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index c3a93879ab..19f848707a 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -55,13 +55,11 @@ module Bundler class GitError < BundlerError; status_code(11) ; end class DeprecatedError < BundlerError; status_code(12) ; end class GemspecError < BundlerError; status_code(14) ; end - class DslError < BundlerError; status_code(15) ; end + class InvalidOption < BundlerError; status_code(2) ; end class ProductionError < BundlerError; status_code(16) ; end - class InvalidOption < DslError ; end class HTTPError < BundlerError; status_code(17) ; end class RubyVersionMismatch < BundlerError; status_code(18) ; end - WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)! FREEBSD = RbConfig::CONFIG["host_os"] =~ /bsd/ NULL = WINDOWS ? "NUL" : "/dev/null" diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index a865a7e57a..78573941e3 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -80,7 +80,7 @@ module Bundler elsif dep.type == :development return else - raise DslError, "You cannot specify the same gem twice with different version requirements. \n" \ + raise GemfileEror, "You cannot specify the same gem twice with different version requirements. \n" \ "You specified: #{current.name} (#{current.requirement}) and " \ "#{dep.name} (#{dep.requirement})\n" end @@ -92,7 +92,7 @@ module Bundler elsif dep.type == :development return else - raise DslError, "You cannot specify the same gem twice coming from different sources.\n" \ + raise GemfileEror, "You cannot specify the same gem twice coming from different sources.\n" \ "You specified that #{dep.name} (#{dep.requirement}) should come from " \ "#{current.source || 'an unspecified source'} and #{dep.source}\n" end @@ -227,7 +227,7 @@ module Bundler platforms.map! { |p| p.to_sym } platforms.each do |p| next if VALID_PLATFORMS.include?(p) - raise DslError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}" + raise GemfileError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}" end if github = opts.delete("github") |