diff options
| author | Andre Arko <andre@arko.net> | 2013-07-28 19:37:19 -0700 |
|---|---|---|
| committer | Andre Arko <andre@arko.net> | 2013-07-28 19:37:19 -0700 |
| commit | 5024238df342b791d3c19b1448c7a797615cc938 (patch) | |
| tree | 63d70d9f673c77af5c4289d8658b2f53cbe15def | |
| parent | 9ffd8882d04ff9458793b51ac51a9cb4e04a238a (diff) | |
| download | bundler-5024238df342b791d3c19b1448c7a797615cc938.tar.gz | |
clarify circular language
| -rw-r--r-- | lib/bundler/spec_set.rb | 12 | ||||
| -rw-r--r-- | spec/resolver/basic_spec.rb | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 9292511481..1746f6d0df 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -112,18 +112,18 @@ module Bundler begin @sorted ||= ([rake] + tsort).compact.uniq rescue TSort::Cyclic => error - gemstr = extract_circular_gems(error) - raise CyclicDependencyError, "Your Gemfile includes gems #{gemstr}" \ - " that each depend on other, so it's not possible to to install this" \ - " bundle. Remove one of the gems from your Gemfile to continue." + cgems = extract_circular_gems(error) + raise CyclicDependencyError, "Your Gemfile requires gems that depend" \ + " depend on each other, creating an infinite loop. Please remove" \ + " either gem '#{cgems[1]}' or gem '#{cgems[0]}' and try again." end end def extract_circular_gems(error) if Bundler.current_ruby.mri? && Bundler.current_ruby.on_19? - error.message.scan(/(\w+) \([^)]/).flatten.join(" and ") + error.message.scan(/(\w+) \([^)]/).flatten else - error.message.scan(/@name="(.*?)"/).flatten.join(" and ") + error.message.scan(/@name="(.*?)"/).flatten end end diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb index 5163fc639b..22dc2f0fbe 100644 --- a/spec/resolver/basic_spec.rb +++ b/spec/resolver/basic_spec.rb @@ -31,6 +31,7 @@ describe "Resolving" do got = resolve expect { got = got.map { |s| s.full_name }.sort - }.to raise_error(Bundler::CyclicDependencyError, /Your Gemfile includes gems bar and foo/) + }.to raise_error(Bundler::CyclicDependencyError, /please remove either gem 'foo' or gem 'bar'/i) end + end |
