Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
356 changes: 356 additions & 0 deletions Roman/Roman.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
271BE6611CA5D360003965B7 /* RomanNumeralsConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271BE6601CA5D360003965B7 /* RomanNumeralsConverter.swift */; };
271BE6631CA5D3DE003965B7 /* RomanNumeralsConverterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271BE6621CA5D3DE003965B7 /* RomanNumeralsConverterTests.swift */; };
271BE6641CA5D476003965B7 /* RomanNumeralsConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271BE6601CA5D360003965B7 /* RomanNumeralsConverter.swift */; };
271BE66A1CA600B2003965B7 /* KeyboardUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 271BE6691CA600B2003965B7 /* KeyboardUtils.swift */; };
4DCD25D91CA402C000000D07 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DCD25D81CA402C000000D07 /* main.swift */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
4DCD25D31CA402C000000D07 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
271BE6601CA5D360003965B7 /* RomanNumeralsConverter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RomanNumeralsConverter.swift; sourceTree = "<group>"; };
271BE6621CA5D3DE003965B7 /* RomanNumeralsConverterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RomanNumeralsConverterTests.swift; sourceTree = "<group>"; };
271BE6691CA600B2003965B7 /* KeyboardUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardUtils.swift; sourceTree = "<group>"; };
4DCD25D51CA402C000000D07 /* Roman */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Roman; sourceTree = BUILT_PRODUCTS_DIR; };
4DCD25D81CA402C000000D07 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
4DCD25E31CA402D700000D07 /* RomanTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RomanTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4DCD25E71CA402D700000D07 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4DCD25EB1CA4031400000D07 /* roman-numbers.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = "roman-numbers.playground"; path = "../roman-numbers.playground"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
4DCD25D21CA402C000000D07 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
4DCD25E01CA402D700000D07 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
4DCD25CC1CA402C000000D07 = {
isa = PBXGroup;
children = (
4DCD25EB1CA4031400000D07 /* roman-numbers.playground */,
4DCD25D71CA402C000000D07 /* Roman */,
4DCD25E41CA402D700000D07 /* RomanTests */,
4DCD25D61CA402C000000D07 /* Products */,
);
sourceTree = "<group>";
};
4DCD25D61CA402C000000D07 /* Products */ = {
isa = PBXGroup;
children = (
4DCD25D51CA402C000000D07 /* Roman */,
4DCD25E31CA402D700000D07 /* RomanTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
4DCD25D71CA402C000000D07 /* Roman */ = {
isa = PBXGroup;
children = (
4DCD25D81CA402C000000D07 /* main.swift */,
271BE6601CA5D360003965B7 /* RomanNumeralsConverter.swift */,
271BE6691CA600B2003965B7 /* KeyboardUtils.swift */,
);
path = Roman;
sourceTree = "<group>";
};
4DCD25E41CA402D700000D07 /* RomanTests */ = {
isa = PBXGroup;
children = (
4DCD25E71CA402D700000D07 /* Info.plist */,
271BE6621CA5D3DE003965B7 /* RomanNumeralsConverterTests.swift */,
);
path = RomanTests;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
4DCD25D41CA402C000000D07 /* Roman */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4DCD25DC1CA402C000000D07 /* Build configuration list for PBXNativeTarget "Roman" */;
buildPhases = (
4DCD25D11CA402C000000D07 /* Sources */,
4DCD25D21CA402C000000D07 /* Frameworks */,
4DCD25D31CA402C000000D07 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = Roman;
productName = Roman;
productReference = 4DCD25D51CA402C000000D07 /* Roman */;
productType = "com.apple.product-type.tool";
};
4DCD25E21CA402D700000D07 /* RomanTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4DCD25E81CA402D700000D07 /* Build configuration list for PBXNativeTarget "RomanTests" */;
buildPhases = (
4DCD25DF1CA402D700000D07 /* Sources */,
4DCD25E01CA402D700000D07 /* Frameworks */,
4DCD25E11CA402D700000D07 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = RomanTests;
productName = RomanTests;
productReference = 4DCD25E31CA402D700000D07 /* RomanTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
4DCD25CD1CA402C000000D07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = Hotels.com;
TargetAttributes = {
4DCD25D41CA402C000000D07 = {
CreatedOnToolsVersion = 7.3;
};
4DCD25E21CA402D700000D07 = {
CreatedOnToolsVersion = 7.3;
};
};
};
buildConfigurationList = 4DCD25D01CA402C000000D07 /* Build configuration list for PBXProject "Roman" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 4DCD25CC1CA402C000000D07;
productRefGroup = 4DCD25D61CA402C000000D07 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
4DCD25D41CA402C000000D07 /* Roman */,
4DCD25E21CA402D700000D07 /* RomanTests */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
4DCD25E11CA402D700000D07 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
4DCD25D11CA402C000000D07 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
271BE6611CA5D360003965B7 /* RomanNumeralsConverter.swift in Sources */,
271BE66A1CA600B2003965B7 /* KeyboardUtils.swift in Sources */,
4DCD25D91CA402C000000D07 /* main.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4DCD25DF1CA402D700000D07 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
271BE6631CA5D3DE003965B7 /* RomanNumeralsConverterTests.swift in Sources */,
271BE6641CA5D476003965B7 /* RomanNumeralsConverter.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
4DCD25DA1CA402C000000D07 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
4DCD25DB1CA402C000000D07 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
4DCD25DD1CA402C000000D07 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
4DCD25DE1CA402C000000D07 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
4DCD25E91CA402D700000D07 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RomanTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.hotels.RomanTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
4DCD25EA1CA402D700000D07 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RomanTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.hotels.RomanTests;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
4DCD25D01CA402C000000D07 /* Build configuration list for PBXProject "Roman" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4DCD25DA1CA402C000000D07 /* Debug */,
4DCD25DB1CA402C000000D07 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4DCD25DC1CA402C000000D07 /* Build configuration list for PBXNativeTarget "Roman" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4DCD25DD1CA402C000000D07 /* Debug */,
4DCD25DE1CA402C000000D07 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4DCD25E81CA402D700000D07 /* Build configuration list for PBXNativeTarget "RomanTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4DCD25E91CA402D700000D07 /* Debug */,
4DCD25EA1CA402D700000D07 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 4DCD25CD1CA402C000000D07 /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions Roman/Roman/KeyboardUtils.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// KeyboardUtils.swift
// Roman
//
// Created by Michael Voong on 25/03/2016.
// Copyright © 2016 Hotels.com. All rights reserved.
//

import Foundation

func getKeyboardInput() -> String {
let keyboard = NSFileHandle.fileHandleWithStandardInput()
let inputData = keyboard.availableData
let string = NSString(data: inputData, encoding:NSUTF8StringEncoding) as! String

return string.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
}
Loading