From fcee42c09f6b48b0274d46b5f615258e39a0a502 Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Wed, 26 May 2021 10:24:54 +0100 Subject: [PATCH 1/9] Support working directory changes --- src/Mockingbird/UI/View/OptionsView.swift | 15 ++++++++ src/Mockingbird/Utils/Default.swift | 44 +++++++++++++++++++++-- src/Mockingbird/Utils/Util.swift | 21 +++++++++++ 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/src/Mockingbird/UI/View/OptionsView.swift b/src/Mockingbird/UI/View/OptionsView.swift index 393f126..c4e59ae 100644 --- a/src/Mockingbird/UI/View/OptionsView.swift +++ b/src/Mockingbird/UI/View/OptionsView.swift @@ -41,6 +41,21 @@ public class OptionsView { } } } + + NewLine() + + Divider() + + Tree("WORKING DIRECTORY: \(Default.Folder.mockedDataDirectory)", options: .defaultOpen) { + + LargeButton("CHANGE DIRECTORY") { + + if let newDirectory = Util.chooseFolder() { + + Default.Folder.mockedDataDirectory = newDirectory + } + } + } } } } diff --git a/src/Mockingbird/Utils/Default.swift b/src/Mockingbird/Utils/Default.swift index 1846623..2ef55c3 100644 --- a/src/Mockingbird/Utils/Default.swift +++ b/src/Mockingbird/Utils/Default.swift @@ -7,6 +7,7 @@ // import Foundation +import Files final class Default { @@ -24,10 +25,47 @@ final class Default { public enum Folder { static var main = "/Users/" + NSUserName() + "/.mockingbird" - static var capture: String { main + "/capture" } - static var data: String { main + "/data" } static var mitm: String { main + "/mitmproxy" } + static var capture: String { main + "/capture" } static var record: String { main + "/record" } - static var test: String { main + "/test" } + static var data: String { mockedDataDirectory + "/data" } + static var test: String { mockedDataDirectory + "/test" } + + static var mockedDataDirectory: String { + + get { + + guard let file = try? File(path: "\(Default.Folder.main)/dataFolder.json"), + let fileData = try? file.readAsString(), + let startRange = fileData.range(of: "=")?.upperBound else { + + return "/Users/" + NSUserName() + "/.mockingbird" + } + + return String(fileData.suffix(from: startRange)) + } + + set { + + if let file = try? File(path: "\(Default.Folder.main)/dataFolder.json") { + + let writeData = "dataFolder="+newValue + + try? file.write(writeData) + + } else { + + guard let mainFolder = try? Files.Folder(path: Default.Folder.main), + let dataFolderFile = try? mainFolder.createFile(named: "dataFolder") else { + + return + } + + let writeData = "dataFolder="+newValue + + try? dataFolderFile.write(writeData) + } + } + } } } diff --git a/src/Mockingbird/Utils/Util.swift b/src/Mockingbird/Utils/Util.swift index ccdb09e..aad8155 100644 --- a/src/Mockingbird/Utils/Util.swift +++ b/src/Mockingbird/Utils/Util.swift @@ -22,6 +22,27 @@ class Util { NSWorkspace.shared.selectFile(nil, inFileViewerRootedAtPath: folder) } + static func chooseFolder() -> String? { + + let dialog = NSOpenPanel() + + dialog.title = "Choose mocked data directory" + dialog.showsResizeIndicator = true + dialog.showsHiddenFiles = false + dialog.canChooseFiles = false + dialog.canChooseDirectories = true + + if (dialog.runModal() == NSApplication.ModalResponse.OK) { + + let result = dialog.url + return result?.path + + } else { + + return nil + } + } + static func openURL(url: String) { if let url = URL(string: url) { From f1f4e31ca875d44b7afbed2dc0c7b67207fc6c27 Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Wed, 26 May 2021 10:37:17 +0100 Subject: [PATCH 2/9] Adjustments to Options screen --- src/Mockingbird/UI/View/OptionsView.swift | 31 +++++++++++------------ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/Mockingbird/UI/View/OptionsView.swift b/src/Mockingbird/UI/View/OptionsView.swift index c4e59ae..9e7bf9e 100644 --- a/src/Mockingbird/UI/View/OptionsView.swift +++ b/src/Mockingbird/UI/View/OptionsView.swift @@ -15,13 +15,27 @@ public class OptionsView { Group { - Tree("Server Context", options: .defaultOpen) { + Tree("Setup", options: .defaultOpen) { + Text("Server Context") RadioButtonGroup(state.contextTitles, selectedIndexState: state.currentContextIndex) { val in ContextManager.shared.setContext(index: val) } NewLine() + + Text("WORKING DIRECTORY: \(Default.Folder.mockedDataDirectory)") + LargeButton("CHANGE DIRECTORY") { + + if let newDirectory = Util.chooseFolder() { + + Default.Folder.mockedDataDirectory = newDirectory + + AppStore.data.dispatch(DataAction.initialize) + AppStore.test.dispatch(TestAction.initialize) + } + } + NewLine() } Divider() @@ -41,21 +55,6 @@ public class OptionsView { } } } - - NewLine() - - Divider() - - Tree("WORKING DIRECTORY: \(Default.Folder.mockedDataDirectory)", options: .defaultOpen) { - - LargeButton("CHANGE DIRECTORY") { - - if let newDirectory = Util.chooseFolder() { - - Default.Folder.mockedDataDirectory = newDirectory - } - } - } } } } From 300a5a0c14f84dd50c6312a43b515f2b5e0a4931 Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Wed, 26 May 2021 11:42:18 +0100 Subject: [PATCH 3/9] Unit tests correction --- src/Mockingbird/AppDelegate.swift | 2 ++ src/Mockingbird/UI/View/OptionsView.swift | 5 +++-- src/Mockingbird/Utils/Default.swift | 12 +++++++----- src/MockingbirdTests/Utils/DataHelper.swift | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/Mockingbird/AppDelegate.swift b/src/Mockingbird/AppDelegate.swift index 7ed3418..1098894 100644 --- a/src/Mockingbird/AppDelegate.swift +++ b/src/Mockingbird/AppDelegate.swift @@ -20,6 +20,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { Tracking.initialize() + Default.Folder.workingDirectory = Default.Folder.savedWorkingDirectory + AppStore.data.dispatch(DataAction.initialize) AppStore.record.dispatch(RecordAction.initialize) AppStore.test.dispatch(TestAction.initialize) diff --git a/src/Mockingbird/UI/View/OptionsView.swift b/src/Mockingbird/UI/View/OptionsView.swift index 9e7bf9e..036337e 100644 --- a/src/Mockingbird/UI/View/OptionsView.swift +++ b/src/Mockingbird/UI/View/OptionsView.swift @@ -24,12 +24,13 @@ public class OptionsView { } NewLine() - Text("WORKING DIRECTORY: \(Default.Folder.mockedDataDirectory)") + Text("WORKING DIRECTORY: \(Default.Folder.workingDirectory)") LargeButton("CHANGE DIRECTORY") { if let newDirectory = Util.chooseFolder() { - Default.Folder.mockedDataDirectory = newDirectory + Default.Folder.savedWorkingDirectory = newDirectory + Default.Folder.workingDirectory = newDirectory AppStore.data.dispatch(DataAction.initialize) AppStore.test.dispatch(TestAction.initialize) diff --git a/src/Mockingbird/Utils/Default.swift b/src/Mockingbird/Utils/Default.swift index 2ef55c3..48a1777 100644 --- a/src/Mockingbird/Utils/Default.swift +++ b/src/Mockingbird/Utils/Default.swift @@ -26,12 +26,14 @@ final class Default { static var main = "/Users/" + NSUserName() + "/.mockingbird" static var mitm: String { main + "/mitmproxy" } - static var capture: String { main + "/capture" } - static var record: String { main + "/record" } - static var data: String { mockedDataDirectory + "/data" } - static var test: String { mockedDataDirectory + "/test" } + static var capture: String { workingDirectory + "/capture" } + static var record: String { workingDirectory + "/record" } + static var data: String { workingDirectory + "/data" } + static var test: String { workingDirectory + "/test" } - static var mockedDataDirectory: String { + static var workingDirectory = "" + + static var savedWorkingDirectory: String { get { diff --git a/src/MockingbirdTests/Utils/DataHelper.swift b/src/MockingbirdTests/Utils/DataHelper.swift index ae6c6e5..7139b8f 100644 --- a/src/MockingbirdTests/Utils/DataHelper.swift +++ b/src/MockingbirdTests/Utils/DataHelper.swift @@ -99,7 +99,7 @@ private extension DataHelper { } } - Default.Folder.main = resourcePath + Default.Folder.workingDirectory = resourcePath } catch { From dd001353457333fc082d2a7a52f3135a464ead9c Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Wed, 26 May 2021 13:12:58 +0100 Subject: [PATCH 4/9] Wrap configurations in a struct --- src/Mockingbird.xcodeproj/project.pbxproj | 4 ++++ src/Mockingbird/Utils/Configurations.swift | 12 ++++++++++++ src/Mockingbird/Utils/Default.swift | 16 +++++++++------- 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 src/Mockingbird/Utils/Configurations.swift diff --git a/src/Mockingbird.xcodeproj/project.pbxproj b/src/Mockingbird.xcodeproj/project.pbxproj index af38a88..9c05652 100644 --- a/src/Mockingbird.xcodeproj/project.pbxproj +++ b/src/Mockingbird.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 216DC9708C747E4014C763B8 /* Pods_Mockingbird.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4287C41673FEE0A7D53CFC08 /* Pods_Mockingbird.framework */; }; 737203AC4CFCF605F6FF30D3 /* Pods_MockingbirdTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8952BC9226AA3B164321E36D /* Pods_MockingbirdTests.framework */; }; + 8F56D1E2265E7139005159E1 /* Configurations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F56D1E1265E7139005159E1 /* Configurations.swift */; }; B63AA30E2469D15200D6026B /* ServerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63AA30D2469D15200D6026B /* ServerTests.swift */; }; B63AA3102469D76D00D6026B /* UtilTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63AA30F2469D76D00D6026B /* UtilTests.swift */; }; B640167E245B50FF009EDBBF /* DataHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = B640167D245B50FF009EDBBF /* DataHelper.swift */; }; @@ -118,6 +119,7 @@ 83434BFCBF135F5C552864E6 /* Pods-Mockingbird-MockingbirdUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mockingbird-MockingbirdUITests.debug.xcconfig"; path = "Target Support Files/Pods-Mockingbird-MockingbirdUITests/Pods-Mockingbird-MockingbirdUITests.debug.xcconfig"; sourceTree = ""; }; 83BCB3BAD6AC4B8D47908BEF /* Pods-Mockingbird-MockingbirdUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mockingbird-MockingbirdUITests.release.xcconfig"; path = "Target Support Files/Pods-Mockingbird-MockingbirdUITests/Pods-Mockingbird-MockingbirdUITests.release.xcconfig"; sourceTree = ""; }; 8952BC9226AA3B164321E36D /* Pods_MockingbirdTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MockingbirdTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8F56D1E1265E7139005159E1 /* Configurations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configurations.swift; sourceTree = ""; }; 95E8B10A50D0E77C0D935628 /* Pods-MockingbirdTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MockingbirdTests.release.xcconfig"; path = "Target Support Files/Pods-MockingbirdTests/Pods-MockingbirdTests.release.xcconfig"; sourceTree = ""; }; B63AA30D2469D15200D6026B /* ServerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerTests.swift; sourceTree = ""; }; B63AA30F2469D76D00D6026B /* UtilTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilTests.swift; sourceTree = ""; }; @@ -423,6 +425,7 @@ B6736AEC23981D310040B29D /* Router.swift */, B65572C823D094D400D5056A /* Tracking.swift */, B69F01C723EE29B6005C8B26 /* Util.swift */, + 8F56D1E1265E7139005159E1 /* Configurations.swift */, ); path = Utils; sourceTree = ""; @@ -1028,6 +1031,7 @@ B6736B2D23981D320040B29D /* DataView.swift in Sources */, B69F01AE23EE064A005C8B26 /* DataStore.swift in Sources */, B6736B1923981D320040B29D /* URLMatcher.swift in Sources */, + 8F56D1E2265E7139005159E1 /* Configurations.swift in Sources */, B6736B1823981D320040B29D /* URLConvertible.swift in Sources */, B69F01AA23EE0639005C8B26 /* DataActions.swift in Sources */, B683949B23F1CFC600882648 /* Default.swift in Sources */, diff --git a/src/Mockingbird/Utils/Configurations.swift b/src/Mockingbird/Utils/Configurations.swift new file mode 100644 index 0000000..e732386 --- /dev/null +++ b/src/Mockingbird/Utils/Configurations.swift @@ -0,0 +1,12 @@ +// +// Configurations.swift +// Mockingbird +// +// Created by Guilherme Faria on 26/05/2021. +// Copyright © 2021 Farfetch. All rights reserved. +// + +struct Configuration: Codable { + + let dataFolder: String +} diff --git a/src/Mockingbird/Utils/Default.swift b/src/Mockingbird/Utils/Default.swift index 48a1777..e978241 100644 --- a/src/Mockingbird/Utils/Default.swift +++ b/src/Mockingbird/Utils/Default.swift @@ -37,7 +37,7 @@ final class Default { get { - guard let file = try? File(path: "\(Default.Folder.main)/dataFolder.json"), + guard let file = try? File(path: "\(Default.Folder.main)/configurations.json"), let fileData = try? file.readAsString(), let startRange = fileData.range(of: "=")?.upperBound else { @@ -49,23 +49,25 @@ final class Default { set { - if let file = try? File(path: "\(Default.Folder.main)/dataFolder.json") { + if let configurationsFile = try? File(path: "\(Default.Folder.main)/configurations.json") { - let writeData = "dataFolder="+newValue + let configurations = Configuration(dataFolder: newValue) + guard let writeData = try? configurations.jsonData() else { return } - try? file.write(writeData) + try? configurationsFile.write(writeData) } else { guard let mainFolder = try? Files.Folder(path: Default.Folder.main), - let dataFolderFile = try? mainFolder.createFile(named: "dataFolder") else { + let configurationsFolderFile = try? mainFolder.createFile(named: "configurations.json") else { return } - let writeData = "dataFolder="+newValue + let configurations = Configuration(dataFolder: newValue) + guard let writeData = try? configurations.jsonData() else { return } - try? dataFolderFile.write(writeData) + try? configurationsFolderFile.write(writeData) } } } From 826d23234f6d4fda4ff1b4f12adfad6f1bce93eb Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Wed, 26 May 2021 14:45:57 +0100 Subject: [PATCH 5/9] Change copyright header --- src/Mockingbird/Utils/Configurations.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mockingbird/Utils/Configurations.swift b/src/Mockingbird/Utils/Configurations.swift index e732386..c3791f3 100644 --- a/src/Mockingbird/Utils/Configurations.swift +++ b/src/Mockingbird/Utils/Configurations.swift @@ -1,9 +1,9 @@ // -// Configurations.swift -// Mockingbird +// Copyright (c) 2021, Farfetch. +// All rights reserved. // -// Created by Guilherme Faria on 26/05/2021. -// Copyright © 2021 Farfetch. All rights reserved. +// This source code is licensed under the MIT-style license found in the +// LICENSE file in the root directory of this source tree. // struct Configuration: Codable { From b6b808492eb1fcd333ee644cfe40119478bfd59d Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Wed, 26 May 2021 17:07:36 +0100 Subject: [PATCH 6/9] Code review --- src/Mockingbird/AppDelegate.swift | 2 -- src/Mockingbird/Utils/Default.swift | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mockingbird/AppDelegate.swift b/src/Mockingbird/AppDelegate.swift index 1098894..7ed3418 100644 --- a/src/Mockingbird/AppDelegate.swift +++ b/src/Mockingbird/AppDelegate.swift @@ -20,8 +20,6 @@ class AppDelegate: NSObject, NSApplicationDelegate { Tracking.initialize() - Default.Folder.workingDirectory = Default.Folder.savedWorkingDirectory - AppStore.data.dispatch(DataAction.initialize) AppStore.record.dispatch(RecordAction.initialize) AppStore.test.dispatch(TestAction.initialize) diff --git a/src/Mockingbird/Utils/Default.swift b/src/Mockingbird/Utils/Default.swift index e978241..9bce05e 100644 --- a/src/Mockingbird/Utils/Default.swift +++ b/src/Mockingbird/Utils/Default.swift @@ -31,7 +31,7 @@ final class Default { static var data: String { workingDirectory + "/data" } static var test: String { workingDirectory + "/test" } - static var workingDirectory = "" + static var workingDirectory = Default.Folder.savedWorkingDirectory static var savedWorkingDirectory: String { @@ -39,16 +39,18 @@ final class Default { guard let file = try? File(path: "\(Default.Folder.main)/configurations.json"), let fileData = try? file.readAsString(), - let startRange = fileData.range(of: "=")?.upperBound else { + let configuration = try? Configuration(fileData) else { return "/Users/" + NSUserName() + "/.mockingbird" } - return String(fileData.suffix(from: startRange)) + return configuration.dataFolder } set { + Default.Folder.workingDirectory = newValue + if let configurationsFile = try? File(path: "\(Default.Folder.main)/configurations.json") { let configurations = Configuration(dataFolder: newValue) From e3a7030b0f779593d67b78758a42edfe121927fd Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Wed, 26 May 2021 17:13:24 +0100 Subject: [PATCH 7/9] Code review --- src/Mockingbird/Utils/Default.swift | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Mockingbird/Utils/Default.swift b/src/Mockingbird/Utils/Default.swift index 9bce05e..0b38ffd 100644 --- a/src/Mockingbird/Utils/Default.swift +++ b/src/Mockingbird/Utils/Default.swift @@ -53,25 +53,28 @@ final class Default { if let configurationsFile = try? File(path: "\(Default.Folder.main)/configurations.json") { - let configurations = Configuration(dataFolder: newValue) - guard let writeData = try? configurations.jsonData() else { return } - - try? configurationsFile.write(writeData) + Self.write(newDirectory: newValue, toFile: configurationsFile) } else { guard let mainFolder = try? Files.Folder(path: Default.Folder.main), - let configurationsFolderFile = try? mainFolder.createFile(named: "configurations.json") else { + let configurationsFile = try? mainFolder.createFile(named: "configurations.json") else { return } - let configurations = Configuration(dataFolder: newValue) - guard let writeData = try? configurations.jsonData() else { return } - - try? configurationsFolderFile.write(writeData) + Self.write(newDirectory: newValue, toFile: configurationsFile) } } } + + private static func write(newDirectory: String, + toFile file: File) { + + let configurations = Configuration(dataFolder: newDirectory) + guard let writeData = try? configurations.jsonData() else { return } + + try? file.write(writeData) + } } } From 185472220729de8c987f8fd1dc9ff6db48cd7883 Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Thu, 27 May 2021 10:59:03 +0100 Subject: [PATCH 8/9] Remove unnecessary line --- src/Mockingbird/UI/View/OptionsView.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Mockingbird/UI/View/OptionsView.swift b/src/Mockingbird/UI/View/OptionsView.swift index 036337e..5888fc3 100644 --- a/src/Mockingbird/UI/View/OptionsView.swift +++ b/src/Mockingbird/UI/View/OptionsView.swift @@ -30,7 +30,6 @@ public class OptionsView { if let newDirectory = Util.chooseFolder() { Default.Folder.savedWorkingDirectory = newDirectory - Default.Folder.workingDirectory = newDirectory AppStore.data.dispatch(DataAction.initialize) AppStore.test.dispatch(TestAction.initialize) From b647376815d2e3fab62c8194557d575a30f778fa Mon Sep 17 00:00:00 2001 From: Guilherme Faria Date: Thu, 27 May 2021 17:04:43 +0100 Subject: [PATCH 9/9] Rename Configuration file --- src/Mockingbird.xcodeproj/project.pbxproj | 8 ++++---- .../Utils/{Configurations.swift => Configuration.swift} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename src/Mockingbird/Utils/{Configurations.swift => Configuration.swift} (100%) diff --git a/src/Mockingbird.xcodeproj/project.pbxproj b/src/Mockingbird.xcodeproj/project.pbxproj index 9c05652..41124de 100644 --- a/src/Mockingbird.xcodeproj/project.pbxproj +++ b/src/Mockingbird.xcodeproj/project.pbxproj @@ -9,7 +9,7 @@ /* Begin PBXBuildFile section */ 216DC9708C747E4014C763B8 /* Pods_Mockingbird.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4287C41673FEE0A7D53CFC08 /* Pods_Mockingbird.framework */; }; 737203AC4CFCF605F6FF30D3 /* Pods_MockingbirdTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8952BC9226AA3B164321E36D /* Pods_MockingbirdTests.framework */; }; - 8F56D1E2265E7139005159E1 /* Configurations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F56D1E1265E7139005159E1 /* Configurations.swift */; }; + 8F56D1E2265E7139005159E1 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F56D1E1265E7139005159E1 /* Configuration.swift */; }; B63AA30E2469D15200D6026B /* ServerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63AA30D2469D15200D6026B /* ServerTests.swift */; }; B63AA3102469D76D00D6026B /* UtilTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63AA30F2469D76D00D6026B /* UtilTests.swift */; }; B640167E245B50FF009EDBBF /* DataHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = B640167D245B50FF009EDBBF /* DataHelper.swift */; }; @@ -119,7 +119,7 @@ 83434BFCBF135F5C552864E6 /* Pods-Mockingbird-MockingbirdUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mockingbird-MockingbirdUITests.debug.xcconfig"; path = "Target Support Files/Pods-Mockingbird-MockingbirdUITests/Pods-Mockingbird-MockingbirdUITests.debug.xcconfig"; sourceTree = ""; }; 83BCB3BAD6AC4B8D47908BEF /* Pods-Mockingbird-MockingbirdUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mockingbird-MockingbirdUITests.release.xcconfig"; path = "Target Support Files/Pods-Mockingbird-MockingbirdUITests/Pods-Mockingbird-MockingbirdUITests.release.xcconfig"; sourceTree = ""; }; 8952BC9226AA3B164321E36D /* Pods_MockingbirdTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MockingbirdTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8F56D1E1265E7139005159E1 /* Configurations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configurations.swift; sourceTree = ""; }; + 8F56D1E1265E7139005159E1 /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; 95E8B10A50D0E77C0D935628 /* Pods-MockingbirdTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MockingbirdTests.release.xcconfig"; path = "Target Support Files/Pods-MockingbirdTests/Pods-MockingbirdTests.release.xcconfig"; sourceTree = ""; }; B63AA30D2469D15200D6026B /* ServerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerTests.swift; sourceTree = ""; }; B63AA30F2469D76D00D6026B /* UtilTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilTests.swift; sourceTree = ""; }; @@ -425,7 +425,7 @@ B6736AEC23981D310040B29D /* Router.swift */, B65572C823D094D400D5056A /* Tracking.swift */, B69F01C723EE29B6005C8B26 /* Util.swift */, - 8F56D1E1265E7139005159E1 /* Configurations.swift */, + 8F56D1E1265E7139005159E1 /* Configuration.swift */, ); path = Utils; sourceTree = ""; @@ -1031,7 +1031,7 @@ B6736B2D23981D320040B29D /* DataView.swift in Sources */, B69F01AE23EE064A005C8B26 /* DataStore.swift in Sources */, B6736B1923981D320040B29D /* URLMatcher.swift in Sources */, - 8F56D1E2265E7139005159E1 /* Configurations.swift in Sources */, + 8F56D1E2265E7139005159E1 /* Configuration.swift in Sources */, B6736B1823981D320040B29D /* URLConvertible.swift in Sources */, B69F01AA23EE0639005C8B26 /* DataActions.swift in Sources */, B683949B23F1CFC600882648 /* Default.swift in Sources */, diff --git a/src/Mockingbird/Utils/Configurations.swift b/src/Mockingbird/Utils/Configuration.swift similarity index 100% rename from src/Mockingbird/Utils/Configurations.swift rename to src/Mockingbird/Utils/Configuration.swift