Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
doctor: fix rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Jul 8, 2016
1 parent 7d1f4fc commit 860ffa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/bundler/cli/doctor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ def initialize(options)

def dylibs_darwin(path)
output = `/usr/bin/otool -L "#{path}"`.chomp
dylibs = output.split("\n")[1..-1].map {|l| l.match(DARWIN_REGEX).captures[0]}.uniq
dylibs = output.split("\n")[1..-1].map {|l| l.match(DARWIN_REGEX).captures[0] }.uniq
# ignore @rpath and friends
dylibs.reject {|dylib| dylib.start_with? "@"}
dylibs.reject {|dylib| dylib.start_with? "@" }
end

def dylibs_ldd(path)
output = `/usr/bin/ldd "#{path}"`.chomp
output.split("\n").map {|l|
output.split("\n").map do |l|
match = l.match(LDD_REGEX)
next if match.nil?
match.captures[0]
}.compact
end.compact
end

def dylibs(path)
case RbConfig::CONFIG['host_os']
case RbConfig::CONFIG["host_os"]
when /darwin/
dylibs_darwin(path)
when /(linux|solaris|bsd)/
Expand Down Expand Up @@ -63,7 +63,7 @@ def run

definition.specs.each do |spec|
bundles_for_gem(spec).each do |bundle|
bad_paths = dylibs(bundle).select {|f| !File.exist?(f)}
bad_paths = dylibs(bundle).select {|f| !File.exist?(f) }
if bad_paths.any?
broken_links[spec] ||= []
broken_links[spec].concat(bad_paths)
Expand Down
1 change: 0 additions & 1 deletion spec/commands/doctor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
@stdout.puts message
end
end

end

it "exits with no message if the installed gem has no C extensions" do
Expand Down

0 comments on commit 860ffa2

Please sign in to comment.