Condense artifact entries
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
90d22bc7b1
commit
5c7e7eebe4
@ -283,14 +283,13 @@ module Cask
|
||||
|
||||
def artifacts_list
|
||||
artifacts.map do |artifact|
|
||||
if artifact.is_a? Artifact::AbstractFlightBlock
|
||||
{ type: artifact.summarize }
|
||||
key, value = if artifact.is_a? Artifact::AbstractFlightBlock
|
||||
artifact.summarize
|
||||
else
|
||||
{
|
||||
type: artifact.class.dsl_key,
|
||||
args: to_h_gsubs(artifact.to_args),
|
||||
}
|
||||
[artifact.class.dsl_key, to_h_gsubs(artifact.to_args)]
|
||||
end
|
||||
|
||||
{ key => value }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -107,14 +107,12 @@ describe Cask::Cmd::List, :cask do
|
||||
"sha256": "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",
|
||||
"artifacts": [
|
||||
{
|
||||
"type": "app",
|
||||
"args": [
|
||||
"app": [
|
||||
"Caffeine.app"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "zap",
|
||||
"args": [
|
||||
"zap": [
|
||||
{
|
||||
"trash": "$HOME/support/fixtures/cask/caffeine/org.example.caffeine.plist"
|
||||
}
|
||||
@ -147,8 +145,7 @@ describe Cask::Cmd::List, :cask do
|
||||
"sha256": "e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68",
|
||||
"artifacts": [
|
||||
{
|
||||
"type": "app",
|
||||
"args": [
|
||||
"app": [
|
||||
"Transmission.app"
|
||||
]
|
||||
}
|
||||
@ -182,8 +179,7 @@ describe Cask::Cmd::List, :cask do
|
||||
"sha256": "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",
|
||||
"artifacts": [
|
||||
{
|
||||
"type": "app",
|
||||
"args": [
|
||||
"app": [
|
||||
"Caffeine.app"
|
||||
]
|
||||
}
|
||||
@ -214,8 +210,7 @@ describe Cask::Cmd::List, :cask do
|
||||
"sha256": "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b",
|
||||
"artifacts": [
|
||||
{
|
||||
"type": "app",
|
||||
"args": [
|
||||
"app": [
|
||||
"ThirdParty.app"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user