Skip to content

Commit 7b90d2c

Browse files
committed
Rename verbose to verboseOutput
Using a more descriptive name in our options. Overall even though its longer it seems more consistent with the other option.
1 parent 99cf9c3 commit 7b90d2c

File tree

11 files changed

+24
-16
lines changed

11 files changed

+24
-16
lines changed

ModuloKit/Commands/AddCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ open class AddCommand: NSObject, Command {
3131
}
3232
open var failOnUnrecognizedOptions: Bool { return true }
3333

34-
open var verbose: Bool = State.instance.options.verbose
34+
open var verbose: Bool = State.instance.options.verboseOutput
3535
open var quiet: Bool = false
3636

3737
open func configureOptions() {

ModuloKit/Commands/DefaultsCommand.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ open class DefaultsCommand: NSObject, Command {
3636

3737
public var failOnUnrecognizedOptions: Bool { return true }
3838

39-
public var verbose: Bool = State.instance.options.verbose
39+
public var verbose: Bool = State.instance.options.verboseOutput
4040
public var quiet: Bool = false
4141

4242
public func execute(_ otherParams: Array<String>?) -> Int {
@@ -58,8 +58,8 @@ open class DefaultsCommand: NSObject, Command {
5858
newValue = false
5959
}
6060

61-
spec.options.verbose = newValue
62-
State.instance.options.verbose = newValue
61+
spec.options.verboseOutput = newValue
62+
State.instance.options.verboseOutput = newValue
6363
}
6464
if let moduleFolderPath = moduleFolderPath,
6565
!moduleFolderPath.isEmpty {
@@ -69,7 +69,7 @@ open class DefaultsCommand: NSObject, Command {
6969
spec.save()
7070
} else {
7171
if toggleVerbose {
72-
writeln(.stdout, "Verbose - \(spec.options.verbose)")
72+
writeln(.stdout, "VerboseOutput - \(spec.options.verboseOutput)")
7373
}
7474
if moduleFolderPath != nil {
7575
writeln(.stdout, "depdencyInstallationPath - \(spec.options.depdencyInstallationPath)")

ModuloKit/Commands/InitCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ open class InitCommand: NSObject, Command {
2525
}
2626
open var failOnUnrecognizedOptions: Bool { return true }
2727

28-
open var verbose: Bool = State.instance.options.verbose
28+
open var verbose: Bool = State.instance.options.verboseOutput
2929
open var quiet: Bool = false
3030

3131
open func configureOptions() {

ModuloKit/Commands/MapCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ open class MapCommand: NSObject, Command {
2121
}
2222
open var failOnUnrecognizedOptions: Bool { return true }
2323

24-
open var verbose: Bool = State.instance.options.verbose
24+
open var verbose: Bool = State.instance.options.verboseOutput
2525
open var quiet: Bool = false
2626

2727
fileprivate var simple = false

ModuloKit/Commands/RemoveCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ open class RemoveCommand: NSObject, Command {
2121
}
2222
open var failOnUnrecognizedOptions: Bool { return true }
2323

24-
open var verbose: Bool = State.instance.options.verbose
24+
open var verbose: Bool = State.instance.options.verboseOutput
2525
open var quiet: Bool = false
2626

2727
open func configureOptions() {

ModuloKit/Commands/SetCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ open class SetCommand: NSObject, Command {
2121
}
2222
open var failOnUnrecognizedOptions: Bool { return true }
2323

24-
open var verbose: Bool = State.instance.options.verbose
24+
open var verbose: Bool = State.instance.options.verboseOutput
2525
open var quiet: Bool = false
2626

2727
// subcommands

ModuloKit/Commands/StatusCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ open class StatusCommand: NSObject, Command {
2323
open var failOnUnrecognizedOptions: Bool { return true }
2424
open var ignoreMain: Bool = false
2525

26-
open var verbose: Bool = State.instance.options.verbose
26+
open var verbose: Bool = State.instance.options.verboseOutput
2727
open var quiet: Bool = false
2828

2929
open func configureOptions() {

ModuloKit/Commands/UpdateCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ open class UpdateCommand: NSObject, Command {
2929
}
3030
open var failOnUnrecognizedOptions: Bool { return true }
3131

32-
open var verbose: Bool = State.instance.options.verbose
32+
open var verbose: Bool = State.instance.options.verboseOutput
3333
open var quiet: Bool = false
3434

3535
open func configureOptions() {

ModuloKit/Specs/OptionsSpec.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import Foundation
1414

1515
public struct OptionsSpec {
1616
/// Should we have `verbose` on all commands
17-
var verbose: Bool = false
17+
var verboseOutput: Bool = false
1818
/// Path to store our 'modules'/dependencies in
1919
var depdencyInstallationPath: String = "modules"
2020
}
2121

2222
extension OptionsSpec: ELDecodable {
2323
public static func decode(_ json: JSON?) throws -> OptionsSpec {
2424
return try OptionsSpec(
25-
verbose: json ==> "verbose",
25+
verboseOutput: json ==> "verboseOutput",
2626
depdencyInstallationPath: json ==> "depdencyInstallationPath"
2727
)
2828
}
@@ -31,7 +31,7 @@ extension OptionsSpec: ELDecodable {
3131
extension OptionsSpec: ELEncodable {
3232
public func encode() throws -> JSON {
3333
return try encodeToJSON([
34-
"verbose" <== verbose,
34+
"verboseOutput" <== verboseOutput,
3535
"depdencyInstallationPath" <== depdencyInstallationPath
3636
])
3737
}

ModuloKitTests/TestDefaults.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@
66
// Copyright © 2018 TheHolyGrail. All rights reserved.
77
//
88

9-
import Foundation
9+
import XCTest
10+
import ELCLI
11+
import ELFoundation
12+
@testable import ModuloKit
13+
14+
class TestDefaults: XCTestCase {
15+
let modulo = Modulo()
16+
17+
}

0 commit comments

Comments
 (0)