Permalink
Browse files

wip openssl error

  • Loading branch information...
indirect committed Mar 18, 2012
1 parent 3948d39 commit b2bb2607e847e99dd1c2d1ca1b482d5e9ddb77c3
Showing with 19 additions and 0 deletions.
  1. +7 −0 lib/bundler/fetcher.rb
  2. +12 −0 spec/install/gems/dependency_api_spec.rb
View
@@ -84,6 +84,13 @@ def specs(gem_names, source)
Bundler.ui.info "Fetching full source index from #{strip_user_pass_from_uri(@remote_uri)}"
specs = fetch_all_remote_specs
+ rescue LoadError => e
+ if e.message.include?("cannot load such file -- openssl")
+ raise Bundler::HTTPError, "Could not load OpenSSL. You must" \
+ " install OpenSSL or change your gem sources from HTTPS to HTTP."
+ else
+ raise e
+ end
else
# new line now that the dots are over
Bundler.ui.info "" unless Bundler.ui.debug?
@@ -376,4 +376,16 @@
out.should_not include("#{user}:#{password}")
end
end
+
+ context "when openssl has not been installed" do
+ it "explains that ruby needs OpenSSL" do
+
+ end
+ end
+
+ context "when openssl has been installed" do
+ it "raises a normal LoadError" do
+
+ end
+ end
end

0 comments on commit b2bb260

Please sign in to comment.