-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Structural output orientations
- Loading branch information
Piotr Adamczyk
authored and
mergify-bot
committed
May 11, 2021
1 parent
66e796c
commit 3e10854
Showing
6 changed files
with
32 additions
and
20 deletions.
There are no files selected for viewing
15 changes: 6 additions & 9 deletions
15
test_runner/src/main/kotlin/ftl/domain/ListAndroidOrientations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
package ftl.domain | ||
|
||
import flank.common.logLn | ||
import ftl.api.Platform | ||
import ftl.api.fetchOrientation | ||
import ftl.args.AndroidArgs | ||
import ftl.environment.common.toCliTable | ||
import ftl.presentation.Output | ||
import java.nio.file.Paths | ||
|
||
interface ListAndroidOrientations { | ||
interface ListAndroidOrientations : Output { | ||
val configPath: String | ||
} | ||
|
||
operator fun ListAndroidOrientations.invoke() { | ||
logLn( | ||
fetchOrientation( | ||
AndroidArgs.loadOrDefault(Paths.get(configPath)).project, | ||
Platform.ANDROID | ||
).toCliTable() | ||
) | ||
fetchOrientation( | ||
AndroidArgs.loadOrDefault(Paths.get(configPath)).project, | ||
Platform.ANDROID | ||
).out() | ||
} |
16 changes: 6 additions & 10 deletions
16
test_runner/src/main/kotlin/ftl/domain/ListIosOrientations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
package ftl.domain | ||
|
||
import flank.common.logLn | ||
import ftl.api.Platform | ||
import ftl.api.fetchOrientation | ||
import ftl.args.IosArgs | ||
import ftl.environment.common.toCliTable | ||
import ftl.presentation.Output | ||
import java.nio.file.Paths | ||
|
||
interface ListIosOrientations { | ||
interface ListIosOrientations : Output { | ||
var configPath: String | ||
} | ||
|
||
operator fun ListIosOrientations.invoke() { | ||
// TODO move toCliTable() to presentation layer during refactor of presentation after #1728 | ||
logLn( | ||
fetchOrientation( | ||
IosArgs.loadOrDefault(Paths.get(configPath)).project, | ||
Platform.IOS | ||
).toCliTable() | ||
) | ||
fetchOrientation( | ||
IosArgs.loadOrDefault(Paths.get(configPath)).project, | ||
Platform.IOS | ||
).out() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tl/environment/common/ListOrientations.kt → .../android/orientations/ListOrientations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters