Manual brew style
fixes.
This commit is contained in:
parent
737b84b54b
commit
549b02f20a
@ -327,7 +327,7 @@ class Formula
|
||||
active_spec == head
|
||||
end
|
||||
|
||||
delegate [
|
||||
delegate [ # rubocop:disable Layout/AlignHash
|
||||
:bottle_unneeded?,
|
||||
:bottle_disabled?,
|
||||
:bottle_disable_reason,
|
||||
@ -335,7 +335,7 @@ class Formula
|
||||
:bottled?,
|
||||
:bottle_specification,
|
||||
:downloader,
|
||||
] => :active_spec
|
||||
] => :active_spec
|
||||
|
||||
# The Bottle object for the currently active {SoftwareSpec}.
|
||||
# @private
|
||||
@ -1615,10 +1615,20 @@ class Formula
|
||||
"bottle" => {},
|
||||
"keg_only" => keg_only?,
|
||||
"options" => [],
|
||||
"build_dependencies" => dependencies.select(&:build?).map(&:name).uniq,
|
||||
"dependencies" => dependencies.reject(&:optional?).reject(&:recommended?).reject(&:build?).map(&:name).uniq,
|
||||
"recommended_dependencies" => dependencies.select(&:recommended?).map(&:name).uniq,
|
||||
"optional_dependencies" => dependencies.select(&:optional?).map(&:name).uniq,
|
||||
"build_dependencies" => dependencies.select(&:build?)
|
||||
.map(&:name)
|
||||
.uniq,
|
||||
"dependencies" => dependencies.reject(&:optional?)
|
||||
.reject(&:recommended?)
|
||||
.reject(&:build?)
|
||||
.map(&:name)
|
||||
.uniq,
|
||||
"recommended_dependencies" => dependencies.select(&:recommended?)
|
||||
.map(&:name)
|
||||
.uniq,
|
||||
"optional_dependencies" => dependencies.select(&:optional?)
|
||||
.map(&:name)
|
||||
.uniq,
|
||||
"requirements" => [],
|
||||
"conflicts_with" => conflicts.map(&:name),
|
||||
"caveats" => caveats,
|
||||
@ -1641,9 +1651,10 @@ class Formula
|
||||
}
|
||||
bottle_info["files"] = {}
|
||||
bottle_spec.collector.keys.each do |os|
|
||||
bottle_url = "#{bottle_spec.root_url}/#{Bottle::Filename.create(self, os, bottle_spec.rebuild).bintray}"
|
||||
checksum = bottle_spec.collector[os]
|
||||
bottle_info["files"][os] = {
|
||||
"url" => "#{bottle_spec.root_url}/#{Bottle::Filename.create(self, os, bottle_spec.rebuild).bintray}",
|
||||
"url" => bottle_url,
|
||||
checksum.hash_type.to_s => checksum.hexdigest,
|
||||
}
|
||||
end
|
||||
|
@ -104,8 +104,10 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
HOMEBREW_PULL_API_REGEX = %r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}.freeze
|
||||
HOMEBREW_PULL_OR_COMMIT_URL_REGEX = %r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})].freeze
|
||||
HOMEBREW_PULL_API_REGEX =
|
||||
%r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}.freeze
|
||||
HOMEBREW_PULL_OR_COMMIT_URL_REGEX =
|
||||
%r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})].freeze
|
||||
|
||||
require "forwardable"
|
||||
require "PATH"
|
||||
|
@ -32,11 +32,12 @@ describe RuboCop::Cop::FormulaAudit::Homepage do
|
||||
end
|
||||
RUBY
|
||||
|
||||
expected_offenses = [{ message: "The homepage should start with http or https (URL is ftp://example.com/foo).",
|
||||
severity: :convention,
|
||||
line: 2,
|
||||
column: 2,
|
||||
source: source }]
|
||||
expected_offenses = [{ message: "The homepage should start with http or " \
|
||||
"https (URL is ftp://example.com/foo).",
|
||||
severity: :convention,
|
||||
line: 2,
|
||||
column: 2,
|
||||
source: source }]
|
||||
|
||||
inspect_source(source)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user