Use the as_flags method instead of map
This commit is contained in:
parent
4c4193e905
commit
c7444d34f7
@ -453,7 +453,7 @@ class Formula
|
||||
|
||||
hsh["installed"] << {
|
||||
"version" => keg.version.to_s,
|
||||
"used_options" => tab.used_options.map(&:flag),
|
||||
"used_options" => tab.used_options.as_flags,
|
||||
"built_as_bottle" => tab.built_bottle,
|
||||
"poured_from_bottle" => tab.poured_from_bottle
|
||||
}
|
||||
|
@ -11,8 +11,8 @@ class Tab < OpenStruct
|
||||
FILENAME = 'INSTALL_RECEIPT.json'
|
||||
|
||||
def self.create(formula, compiler, stdlib, build)
|
||||
Tab.new :used_options => build.used_options.map(&:to_s),
|
||||
:unused_options => build.unused_options.map(&:to_s),
|
||||
Tab.new :used_options => build.used_options.as_flags,
|
||||
:unused_options => build.unused_options.as_flags,
|
||||
:tabfile => formula.prefix.join(FILENAME),
|
||||
:built_as_bottle => !!ARGV.build_bottle?,
|
||||
:poured_from_bottle => false,
|
||||
@ -122,8 +122,8 @@ class Tab < OpenStruct
|
||||
|
||||
def to_json
|
||||
Utils::JSON.dump({
|
||||
:used_options => used_options.map(&:to_s),
|
||||
:unused_options => unused_options.map(&:to_s),
|
||||
:used_options => used_options.as_flags,
|
||||
:unused_options => unused_options.as_flags,
|
||||
:built_as_bottle => built_as_bottle,
|
||||
:poured_from_bottle => poured_from_bottle,
|
||||
:tapped_from => tapped_from,
|
||||
|
@ -8,8 +8,8 @@ class TabTests < Homebrew::TestCase
|
||||
@unused = Options.create(%w(--with-baz --without-qux))
|
||||
|
||||
@tab = Tab.new({
|
||||
:used_options => @used.map(&:to_s),
|
||||
:unused_options => @unused.map(&:to_s),
|
||||
:used_options => @used.as_flags,
|
||||
:unused_options => @unused.as_flags,
|
||||
:built_as_bottle => false,
|
||||
:poured_from_bottle => true,
|
||||
:tapped_from => "Homebrew/homebrew",
|
||||
|
Loading…
x
Reference in New Issue
Block a user