Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
[Swift] Rename higher-order-functions to secret-agent (#2580)
Browse files Browse the repository at this point in the history
* Renamed higher-order-functions to secret-agent to reflect concept -> exercise switch

* fix dead links and added new editor key to config
  • Loading branch information
wneumann authored Oct 31, 2020
1 parent 78dd6ab commit 9387ca8
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 34 deletions.
12 changes: 6 additions & 6 deletions languages/swift/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@
"concepts": ["dictionaries"],
"prerequisites": ["functions", "optionals"]
},
{
"slug": "higher-order-functions",
"uuid": "eb8ccbb6-79af-4417-b934-e07fb496aaf2",
"concepts": ["escaping-functions", "higher-order-functions"],
"prerequisites": ["functions"]
},
{
"slug": "lasagna",
"uuid": "44ae5892-40a5-4483-a181-28e1c38645d6",
Expand Down Expand Up @@ -117,6 +111,12 @@
"concepts": ["tuples"],
"prerequisites": ["arrays", "strings"]
},
{
"slug": "secret-agent",
"uuid": "eb8ccbb6-79af-4417-b934-e07fb496aaf2",
"concepts": ["escaping-functions", "higher-order-functions"],
"prerequisites": ["functions"]
},
{
"slug": "structs-and-classes",
"uuid": "bfb16db1-f419-48e9-91bc-defebc0ae9ac",
Expand Down

This file was deleted.

This file was deleted.

12 changes: 12 additions & 0 deletions languages/swift/exercises/concept/secret-agent/.meta/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"authors": [
{
"github_username": "wneumann",
"exercism_username": "wneumann"
}
],
"editor": {
"solution_files": ["Sources/SecretAgent/SecretAgent.swift"],
"test_files": ["Tests/SecretAgentTests/SecretAgentTests.swift"]
}
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// swift-tools-version:5.2
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "HigherOrderFunctions",
name: "SecretAgent",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "HigherOrderFunctions",
targets: ["HigherOrderFunctions"]),
name: "SecretAgent",
targets: ["SecretAgent"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "HigherOrderFunctions",
name: "SecretAgent",
dependencies: []),
.testTarget(
name: "HigherOrderFunctionsTests",
dependencies: ["HigherOrderFunctions"]),
name: "SecretAgentTests",
dependencies: ["SecretAgent"]),
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import SecretAgentTests
import XCTest

var tests = [XCTestCaseEntry]()
tests += SecretAgentTests.allTests()
XCTMain(tests)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import XCTest

@testable import HigherOrderFunctions
@testable import SecretAgent

final class HigherOrderFunctionsTests: XCTestCase {
final class SecretAgentTests: XCTestCase {
let runAll = Bool(ProcessInfo.processInfo.environment["RUNALL", default: "false"]) ?? false
let protected = protectSecret(
"UMBRA will fill everyone's sugar bowls with salt!", withPassword: "P455w0rd")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(HigherOrderFunctionsTests.allTests)
testCase(SecretAgentTests.allTests)
]
}
#endif
2 changes: 1 addition & 1 deletion reference/concepts/higher_order_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ A function that takes one or more functions as its input value(s) or returns a f
- [Swift][implementation-swift]

[implementation-elixir]: ../../languages/elixir/exercises/concept/secrets/.docs/introduction.md
[implementation-swift]: ../../languages/swift/exercises/concept/higher-order-functions/.docs/instructions.md
[implementation-swift]: ../../languages/swift/exercises/concept/secret-agent/.docs/instructions.md
2 changes: 1 addition & 1 deletion reference/stories/higher-order-functions.secret-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ The story facilitates defining [higher-order functions][concepts-higher_order_fu
- [`concepts/higher_order_functions`][concepts-higher_order_functions]

[concepts-higher_order_functions]: ../concepts/higher_order_functions.md
[implementation-swift]: ../../languages/swift/exercises/concept/higher-order-functions/.docs/instructions.md
[implementation-swift]: ../../languages/swift/exercises/concept/secret-agent/.docs/instructions.md

0 comments on commit 9387ca8

Please sign in to comment.