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
|
def artifacts_list
|
||||||
artifacts.map do |artifact|
|
artifacts.map do |artifact|
|
||||||
if artifact.is_a? Artifact::AbstractFlightBlock
|
key, value = if artifact.is_a? Artifact::AbstractFlightBlock
|
||||||
{ type: artifact.summarize }
|
artifact.summarize
|
||||||
else
|
else
|
||||||
{
|
[artifact.class.dsl_key, to_h_gsubs(artifact.to_args)]
|
||||||
type: artifact.class.dsl_key,
|
|
||||||
args: to_h_gsubs(artifact.to_args),
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
{ key => value }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -107,14 +107,12 @@ describe Cask::Cmd::List, :cask do
|
|||||||
"sha256": "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",
|
"sha256": "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",
|
||||||
"artifacts": [
|
"artifacts": [
|
||||||
{
|
{
|
||||||
"type": "app",
|
"app": [
|
||||||
"args": [
|
|
||||||
"Caffeine.app"
|
"Caffeine.app"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "zap",
|
"zap": [
|
||||||
"args": [
|
|
||||||
{
|
{
|
||||||
"trash": "$HOME/support/fixtures/cask/caffeine/org.example.caffeine.plist"
|
"trash": "$HOME/support/fixtures/cask/caffeine/org.example.caffeine.plist"
|
||||||
}
|
}
|
||||||
@ -147,8 +145,7 @@ describe Cask::Cmd::List, :cask do
|
|||||||
"sha256": "e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68",
|
"sha256": "e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68",
|
||||||
"artifacts": [
|
"artifacts": [
|
||||||
{
|
{
|
||||||
"type": "app",
|
"app": [
|
||||||
"args": [
|
|
||||||
"Transmission.app"
|
"Transmission.app"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -182,8 +179,7 @@ describe Cask::Cmd::List, :cask do
|
|||||||
"sha256": "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",
|
"sha256": "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",
|
||||||
"artifacts": [
|
"artifacts": [
|
||||||
{
|
{
|
||||||
"type": "app",
|
"app": [
|
||||||
"args": [
|
|
||||||
"Caffeine.app"
|
"Caffeine.app"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -214,8 +210,7 @@ describe Cask::Cmd::List, :cask do
|
|||||||
"sha256": "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b",
|
"sha256": "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b",
|
||||||
"artifacts": [
|
"artifacts": [
|
||||||
{
|
{
|
||||||
"type": "app",
|
"app": [
|
||||||
"args": [
|
|
||||||
"ThirdParty.app"
|
"ThirdParty.app"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user