bundler/spec/support/builders.rb
# Returns a number smaller than the size of the index. Useful for specs that
# need the API request limit to be reached for some reason.
Returns a number smaller than the size of the index. Useful for specs that
need the API request limit to be reached for some reason.
Returns a number smaller than the size of the index . Useful for specs that need the API request limit to be reached for some reason .
def low_api_request_limit_for(gem_repo)
      all_gems = Dir[gem_repo.join("gems/*.gem")]
      all_gem_names = all_gems.map do |file|
        File.basename(file, ".gem").match(/\A(?<gem_name>[^-]+)-.*\z/)[:gem_name]
      end.uniq
      (all_gem_names - ["bundler"]).size
    end
def low_api_request_limit_for ( gem_repo ) all_gems = Dir [ gem_repo . join ( "gems/*.gem" ) ] all_gem_names = all_gems . map do | file | File . basename ( file , ".gem" ) . match ( / \A (?<gem_name>[^-]+)-.* \z / ) [ :gem_name ] end . uniq ( all_gem_names - [ "bundler" ] ) . size end
Returns a number smaller than the size of the index.
Returns a number smaller than the size of the index .
gem_repo
<not_specific>