summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Clean up spec output on Travisseg-travis-outputSamuel Giddins2016-08-042-2/+5
|
* Silence gem helper spec outputSamuel Giddins2016-08-041-4/+4
|
* [CompactIndex] Avoid initialized variable warningSamuel Giddins2016-08-041-6/+5
|
* Auto merge of #4765 - mistydemeo:linkage, r=indirectHomu2016-08-044-0/+174
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WIP: add command to check dynamic library linkage This new command, linkage, checks for broken dynamic library links in C extensions. I'd heard there was some interest in adding this functionality, so I thought I'd submit a preliminary PR for discussion. In my experience, broken dylib linkage is a common issue with C extensions, so I think having a good way to diagnose it would be valuable. This command scans all of the specifications in the bundle for .bundle files in C extensions. If any of the dynamic libraries linked against no longer exist, bundler will report a message to the console and exit non-0. TODOs: * Add support for non-Darwin OSs * Improve tests A few questions: * Is there a good way to mock functionality in the tests? Doing it in the standard rspec way isn't working since `bundle :command` runs in a subprocess. I'd like to be able to stub out stuff that actually checks dylibs and the like. * Is making this a new command the right approach? I assumed this wouldn't be ideal to include in, say, `check` because it would slow it down.
| * doctor: use Bundler::NULLMisty De Meo2016-08-021-2/+2
| |
| * doctor: gems not being installed isn't fatalMisty De Meo2016-08-022-5/+2
| |
| * bundle.ronn: add doctorMisty De Meo2016-08-021-0/+3
| |
| * doctor: return stub result if no dylib tool installedMisty De Meo2016-08-021-0/+10
| | | | | | | | | | This will eventually support other tests, so the dylib test needs to be able to to meaningfully return an empty result
| * Add command to diagnose common issuesMisty De Meo2016-08-023-0/+164
| | | | | | | | | | | | | | | | | | | | This new command, doctor, checks for common problems. Currently, it looks for broken dynamic library links in C extensions. It scans all of the specifications in the bundle for .bundle files in C extensions. If any of the dynamic libraries linked against no longer exist, bundler will report a message to the console.
* | Auto merge of #4832 - bundler:seg-remove-environment, r=indirectHomu2016-08-048-97/+48
|\ \ | | | | | | | | | | | | | | | Remove Bundler::Environment Pretty straightforward refactoring
| * | Remove 0.9 upgrade compatibilityseg-remove-environmentSamuel Giddins2016-08-034-50/+0
| | |
| * | [Binstubs] Update for Installer not inheriting from EnvironmentSamuel Giddins2016-08-031-1/+1
| | |
| * | Remove Bundler::EnvironmentSamuel Giddins2016-08-035-53/+54
|/ /
* | Auto merge of #4828 - bundler:seg-expect-err, r=indirectHomu2016-08-0328-141/+145
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove expect_err from the specs & print all output on a spec failure This now also appends all executed commands to failed examples, meaning we don't have to scroll up to see the output from a failing test: ``` Failures: 1) The library itself does not contain any warnings Failure/Error: sys_exec!("ruby -w -I.") do |input, _, _| lib_files.each do |f| input.puts "require '#{f}'" end input.puts "abort 'fdsfds'" end RuntimeError: Invoking sys_exec!("ruby -w -I.") failed: fdsfds Commands: $ ruby -w -I. fdsfds # $? => 1 # ./spec/quality_spec.rb:205:in `block (3 levels) in <top (required)>' # ./spec/quality_spec.rb:196:in `chdir' # ./spec/quality_spec.rb:196:in `block (2 levels) in <top (required)>' ```
| * | Update resolving specs for not printing errors immediatelyseg-expect-errSamuel Giddins2016-08-032-11/+7
| | |
| * | Ensure all output is printed at the end of failure/error message tooSamuel Giddins2016-08-031-1/+7
| | |
| * | Remove expect_err from the specs & print all output on a spec failureSamuel Giddins2016-08-0327-131/+133
|/ /
* | Auto merge of #4816 - bundler:seg-unhack-viz, r=indirectHomu2016-08-0365-509/+672
|\ \ | | | | | | | | | [Graph] Remove monkey-patching of Gem::Dependency
| * | Fix precondition negated matchingseg-unhack-vizSamuel Giddins2016-08-022-4/+12
| | |
| * | Use `include_gem` as the matcher nameSamuel Giddins2016-08-0250-397/+398
| | |
| * | [CodeClimate] Ignore RakefileSamuel Giddins2016-08-021-0/+1
| | |
| * | Only expect no gemspec warnings on 2.4+Samuel Giddins2016-08-021-1/+5
| | |
| * | Remove focus from the lockfile specSamuel Giddins2016-08-021-1/+1
| | |
| * | Move the gem_command helper to existing execution infrastructureSamuel Giddins2016-08-024-16/+18
| | |
| * | [Gemspec] Address warning for rdiscount dependencySamuel Giddins2016-08-021-1/+1
| | |
| * | Allow the binstubs to work with multi-part requirementsSamuel Giddins2016-08-023-3/+3
| | |
| * | Change viz spec to plain outputSamuel Giddins2016-08-021-39/+15
| | | | | | | | | | | | Hopefully this will be consistent between machines
| * | [RuboCop] Fix offensesSamuel Giddins2016-08-023-9/+8
| | |
| * | [Gemspec] Depend upon rspec ~> 3.5Samuel Giddins2016-08-022-3/+2
| | |
| * | Remove tabs from the dot output in the viz specSamuel Giddins2016-08-021-37/+37
| | |
| * | [Matchers] Add TheBundle class to make custom matchers more fluentSamuel Giddins2016-08-0253-443/+519
| | |
| * | Add machinery for a matcher having preconditionsSamuel Giddins2016-08-021-10/+54
| | |
| * | [Graph] Remove monkey-patching of Gem::DependencySamuel Giddins2016-08-021-25/+4
| | |
| * | Add viz specs for dot outputSamuel Giddins2016-08-021-4/+70
| | |
| * | Add a matcher for a file have the given contentsSamuel Giddins2016-08-021-3/+11
| |/
* | Auto merge of #4804 - b-ggs:4753-trampoline-ux, r=segiddinsHomu2016-08-032-1/+19
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | Display message showing locked Bundler version is being installed This is for #4753. [This](https://github.com/bundler/bundler/issues/4753#issuecomment-233786976) always showed the installing message whether the locked Bundler version was installed or not, so I moved the line into `lib/bundler/vendor/postit/lib/postit/installer.rb`. I've also added the appropriate specs for this. @RochesterinNYC @segiddins @indirect
| * Remove `= ` from version number, add elipsis after warningBoggs2016-08-022-4/+4
| | | | | | | | Remove bang from `gsub`
| * Update failing specBoggs2016-08-022-1/+2
| | | | | | | | Fix rubocop offense
| * Move message to `stderr`Boggs2016-07-291-3/+3
| | | | | | | | Use `warn`
| * Only run `installer.install!` if `installer.installed?` is falseBoggs2016-07-292-2/+4
| | | | | | | | Move message into non-vendor file
| * Add spec for install messageBoggs2016-07-291-1/+15
| |
| * Display message showing locked Bundler version is being installedBoggs2016-07-291-0/+1
| |
* | Auto merge of #4795 - allenzhao:issue-4771, r=RochesterinNYCHomu2016-08-022-1/+23
|\ \ | | | | | | | | | | | | | | | | | | Add message filter to generate better search URL Fixes #4771 /c @RochesterinNYC @segiddins
| * | Add message filter and spec for better search URLZehan Zhao2016-07-292-1/+23
| | |
* | | Auto merge of #4820 - b-ggs:4752-not-print-version-match, r=RochesterinNYCHomu2016-07-302-0/+8
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | Bundler version warning should not print when versions match Closes #4752 @RochesterinNYC @indirect
| * | Add positive assertionBoggs2016-07-291-1/+3
| | |
| * | Return out of `warn_if_outdated` if installed ver satisfies running verBoggs2016-07-291-0/+1
| | |
| * | Add failing specBoggs2016-07-291-1/+6
|/ /
* | Auto merge of #4812 - NickLaMuro:use_api_timeout_for_net_open_timeout, ↵Homu2016-07-291-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=indirect Add an open_timeout to the fetcher connection Overview -------- When ruby makes an HTTP connection with the `Net::HTTP` library, by default, it has no timeout to setup that connection. ```ruby # excerpts from net/http stdlib def initialize(address, port = nil) @address = address @port = (port || HTTP.default_port) @local_host = nil @local_port = nil @curr_http_version = HTTPVersion @keep_alive_timeout = 2 @last_communicated = nil @close_on_empty_response = false @socket = nil @started = false @open_timeout = nil @read_timeout = 60 # ... end def connect if proxy? then conn_address = proxy_address conn_port = proxy_port else conn_address = address conn_port = port end D "opening connection to #{conn_address}:#{conn_port}..." s = Timeout.timeout(@open_timeout, Net::OpenTimeout) { TCPSocket.open(conn_address, conn_port, @local_host, @local_port) } # ... if use_ssl? # ... Timeout.timeout(@open_timeout, Net::OpenTimeout) { s.connect } end end ``` It can be set by changing the `open_timeout` variable on the connection object, but beyond that, it will attempt a connection unless an error is returned from the server. The Net::HTTP::Persistent library included with bundler also maintains this same interface when dealing with threads, and eventually passes that same value down to the Net::HTTP lib. It is possible to get into a state where bundler is currently attempting to establish a connection indefinitely to rubygems because this timeout is not in place. Using the `Fetcher.api_timeout`, which is just pulled from the `Bundler.settings[:timeout]` value (defaults to 10 sec), we can also provide an `open_timeout` value and prevent this. In most cases, and HTTP connection should be established in less than a second (if not, there is probably a bigger problem), and most uses of the Fecther's connection are also wrapped in a Bundler::Retry, so if it fails do to a network hiccup, it will be attempted again. I was having this happen to me on a pretty consistent basis, and while it is probably more likely my ISP or something fishy with my home network, this seems like a relatively harmless fix. In the code excerpts above from the STDLIB `net/http`, I would consistently have one or two Threads from the `CompactIndex` stall on the `s.connect`, which was while it was attempting to make an https connection. Unfortunately, I can't think of a good way to test or reproduce this consistently (and of course, now I can't even reproduce it locally at all), so this PR is more of posing a question of "Do we want to do this, and why or why not?"
| * | Add an open_timeout to the fetcher connectionNick LaMuro2016-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ruby makes an HTTP connection with the Net::HTTP library, but default, it has no timeout to setup that connection. It can be set by changing the `open_timeout` variable on the connection object, but beyond that, it will attempt a connection unless an error is returned from the server. The Net::HTTP::Persistent library included with bundler also maintains this same interface when dealing with threads, and eventually passes that same value down to the Net::HTTP lib. It is possible to get into a state where bundler is currently attempting to establish a connection indefinitely to rubygems because this timeout is not in place. Using the `Fetcher.api_timeout`, which is just pulled from the `Bundler.settings[:timeout]` value (defaults to 10 sec), we can also provide an `open_timeout` value and prevent this. In most cases, and HTTP connection should be established in less than a second (if not, there is probably a bigger problem), and most uses of the Fecther's connection are also wrapped in a Bundler::Retry, so if it fails do to a network hiccup, it will be attempted again.