Fix linter offenses

This commit is contained in:
Frank Lam 2020-04-26 21:31:21 +08:00
parent f2fa2c5d30
commit dabbfe3e3e
No known key found for this signature in database
GPG Key ID: 771022A2327531C7
2 changed files with 28 additions and 28 deletions

View File

@ -125,9 +125,9 @@ module Cask
def outdated_info(greedy, verbose, json) def outdated_info(greedy, verbose, json)
if json if json
{ {
name: token, name: token,
installed_versions: outdated_versions(greedy).join(", "), installed_versions: outdated_versions(greedy).join(", "),
current_version: version current_version: version,
} }
elsif verbose elsif verbose
outdated_info = token << " (#{outdated_versions(greedy).join(", ")})" outdated_info = token << " (#{outdated_versions(greedy).join(", ")})"

View File

@ -93,15 +93,15 @@ describe Cask::Cmd::Outdated, :cask do
it "lists outdated Casks in JSON format" do it "lists outdated Casks in JSON format" do
result = [ result = [
{ {
name: "local-caffeine", name: "local-caffeine",
installed_versions: "1.2.2", installed_versions: "1.2.2",
current_version: "1.2.3" current_version: "1.2.3",
}, },
{ {
name: "local-transmission", name: "local-transmission",
installed_versions: "2.60", installed_versions: "2.60",
current_version: "2.61" current_version: "2.61",
} },
].to_json ].to_json
expect { expect {
@ -114,15 +114,15 @@ describe Cask::Cmd::Outdated, :cask do
it "ignores --quiet and lists outdated Casks in JSON format" do it "ignores --quiet and lists outdated Casks in JSON format" do
result = [ result = [
{ {
name: "local-caffeine", name: "local-caffeine",
installed_versions: "1.2.2", installed_versions: "1.2.2",
current_version: "1.2.3" current_version: "1.2.3",
}, },
{ {
name: "local-transmission", name: "local-transmission",
installed_versions: "2.60", installed_versions: "2.60",
current_version: "2.61" current_version: "2.61",
} },
].to_json ].to_json
expect { expect {
@ -135,25 +135,25 @@ describe Cask::Cmd::Outdated, :cask do
it 'includes the Casks with "auto_updates true" or "version latest" in JSON format' do it 'includes the Casks with "auto_updates true" or "version latest" in JSON format' do
result = [ result = [
{ {
name: "auto-updates", name: "auto-updates",
installed_versions: "2.57", installed_versions: "2.57",
current_version: "2.61" current_version: "2.61",
}, },
{ {
name: "local-caffeine", name: "local-caffeine",
installed_versions: "1.2.2", installed_versions: "1.2.2",
current_version: "1.2.3" current_version: "1.2.3",
}, },
{ {
name: "local-transmission", name: "local-transmission",
installed_versions: "2.60", installed_versions: "2.60",
current_version: "2.61" current_version: "2.61",
}, },
{ {
name: "version-latest-string", name: "version-latest-string",
installed_versions: "latest", installed_versions: "latest",
current_version: "latest" current_version: "latest",
} },
].to_json ].to_json
expect { expect {
@ -167,20 +167,20 @@ describe Cask::Cmd::Outdated, :cask do
result = [ result = [
{ {
name: "local-caffeine", name: "local-caffeine",
installed_versions: "1.2.2", installed_versions: "1.2.2",
current_version: "1.2.3" current_version: "1.2.3",
}, },
{ {
name: "local-transmission", name: "local-transmission",
installed_versions: "2.60", installed_versions: "2.60",
current_version: "2.61" current_version: "2.61",
}, },
{ {
name: "version-latest-string", name: "version-latest-string",
installed_versions: "latest", installed_versions: "latest",
current_version: "latest" current_version: "latest",
} },
].to_json ].to_json
expect { expect {