mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-16 22:06:43 -06:00
and corresponding testing_env.rb. * recast HOMEBREW_BREW_FILE as Hbc.homebrew_executable, defined in Hbc::Locations * recast HOMEBREW_REPOSITORY as Hbc.homebrew_repository * recast HOMEBREW_PREFIX as Hbc.homebrew_prefix * remove HOMEBREW_LIBRARY * recast existing Hbc.tapspath as Hbc.homebrew_tapspath to match new methods fixes #8705
14 lines
414 B
Ruby
14 lines
414 B
Ruby
require 'hbc/source/tapped'
|
|
|
|
class Hbc::Source::TappedQualified < Hbc::Source::Tapped
|
|
def self.me?(query)
|
|
!!Hbc::QualifiedToken::parse(query) and path_for_query(query).exist?
|
|
end
|
|
|
|
def self.path_for_query(query)
|
|
user, repo, token = Hbc::QualifiedToken::parse(query)
|
|
token.sub!(/\.rb$/i,'')
|
|
tap = "#{user}/homebrew-#{repo}"
|
|
Hbc.homebrew_tapspath.join(tap, 'Casks', "#{token}.rb")
|
|
end
|
|
end
|