Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
helje5 committed Mar 16, 2019
2 parents e0b1bfb + aae9d9e commit 943277d
Show file tree
Hide file tree
Showing 59 changed files with 385 additions and 403 deletions.
10 changes: 9 additions & 1 deletion .travis.yml
Expand Up @@ -19,7 +19,11 @@ matrix:
sudo: required
- os: Linux
dist: trusty
env: SWIFT_SNAPSHOT_NAME="https://swift.org/builds/swift-4.2-branch/ubuntu1404/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-07-24-a/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-07-24-a-ubuntu14.04.tar.gz"
env: SWIFT_SNAPSHOT_NAME="https://swift.org/builds/swift-4.2.3-release/ubuntu1404/swift-4.2.3-RELEASE/swift-4.2.3-RELEASE-ubuntu14.04.tar.gz"
sudo: required
- os: Linux
dist: trusty
env: SWIFT_SNAPSHOT_NAME="https://swift.org/builds/swift-5.0-branch/ubuntu1404/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a-ubuntu14.04.tar.gz"
sudo: required
- os: osx
osx_image: xcode8.3
Expand All @@ -29,6 +33,10 @@ matrix:
osx_image: xcode9.3
- os: osx
osx_image: xcode9.4
- os: osx
osx_image: xcode10.1
- os: osx
osx_image: xcode10.2

before_install:
- ./.travis.d/before-install.sh
Expand Down
157 changes: 1 addition & 156 deletions Noze.io.xcodeproj/project.pbxproj
Expand Up @@ -5220,7 +5220,7 @@
};
buildConfigurationList = E835BFAB1B4D4CFB00288839 /* Build configuration list for PBXProject "Noze.io" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -7578,195 +7578,40 @@
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_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
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;
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.noze.tests.NozeCryptoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = AppKitDebug;
};
E8978F301D8A260D00ED4558 /* UIKitDebug */ = {
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_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
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;
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = io.noze.tests.NozeCryptoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = UIKitDebug;
};
E8978F311D8A260D00ED4558 /* AppKitRelease */ = {
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_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
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;
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = io.noze.tests.NozeCryptoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = AppKitRelease;
};
E8978F321D8A260D00ED4558 /* UIKitRelease */ = {
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_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
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;
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = io.noze.tests.NozeCryptoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = UIKitRelease;
};
Expand Down
74 changes: 74 additions & 0 deletions Package@swift-5.swift
@@ -0,0 +1,74 @@
// swift-tools-version:5.0
import PackageDescription

let package = Package(
name: "NozeIO",
products: [
.library(name: "Freddy", targets: ["Freddy"]),
.library(name: "CryptoSwift", targets: ["CryptoSwift"]),
.library(name: "http_parser", targets: ["http_parser"]),
.library(name: "base64", targets: ["base64"]),
.library(name: "mustache", targets: ["mustache"]),
.library(name: "xsys", targets: ["xsys"]),
.library(name: "core", targets: ["core"]),
.library(name: "leftpad", targets: ["leftpad"]),
.library(name: "events", targets: ["events"]),
.library(name: "streams", targets: ["streams"]),
.library(name: "json", targets: ["json"]),
.library(name: "fs", targets: ["fs"]),
.library(name: "crypto", targets: ["crypto"]),
.library(name: "dns", targets: ["dns"]),
.library(name: "net", targets: ["net"]),
.library(name: "dgram", targets: ["dgram"]),
.library(name: "process", targets: ["process"]),
.library(name: "console", targets: ["console"]),
.library(name: "http", targets: ["http"]),
.library(name: "child_process", targets: ["child_process"]),
.library(name: "connect", targets: ["connect"]),
.library(name: "express", targets: ["express"]),
.library(name: "redis", targets: ["redis"]),
.library(name: "cows", targets: ["cows"]),
],
dependencies: [],
targets: [
.target(name:"Freddy"),
.target(name:"CryptoSwift"),
.target(name:"http_parser"),
.target(name:"base64"),
.target(name:"mustache"),

.target(name:"xsys"),
.target(name:"core", dependencies: [ "xsys" ]),
.target(name:"leftpad", dependencies: [ "core" ]),
.target(name:"events", dependencies: [ "core" ]),
.target(name:"streams", dependencies: [ "core", "events" ]),
.target(name:"json", dependencies: [ "core", "streams", "Freddy","fs" ]),
.target(name:"fs", dependencies: [ "core", "xsys", "events", "streams" ]),
.target(name:"crypto",
dependencies: [ "core", "xsys", "events", "streams", "CryptoSwift"]),
.target(name:"dns", dependencies: [ "core", "xsys" ]),
.target(name:"net",
dependencies: [ "core", "xsys", "events", "streams", "fs", "dns" ]),
.target(name: "dgram", dependencies: [ "net" ]),
.target(name: "process",
dependencies: [ "core", "xsys", "streams", "fs" ]),
.target(name: "console",
dependencies: [ "core", "xsys", "events", "streams", "process" ]),
.target(name: "http",
dependencies: [ "http_parser", "core", "events", "streams", "net",
"console" ]),
.target(name: "child_process",
dependencies: [ "core", "xsys", "streams", "process", "fs" ]),
.target(name: "connect",
dependencies: [ "core", "xsys", "events", "streams", "http",
"console", "Freddy", "json", "leftpad" ]),
.target(name: "express",
dependencies: [ "core", "xsys", "events", "streams", "http",
"connect", "mustache" ]),
.target(name: "redis",
dependencies: [ "core", "xsys", "events", "streams", "net",
"console" ]),
.target(name: "cows", dependencies: [ "core", "xsys" ])
]
)

1 change: 1 addition & 0 deletions README.md
Expand Up @@ -5,6 +5,7 @@

![Swift3](https://img.shields.io/badge/swift-3-blue.svg)
![Swift4](https://img.shields.io/badge/swift-4-blue.svg)
![Swift5](https://img.shields.io/badge/swift-5-blue.svg)
![macOS](https://img.shields.io/badge/os-macOS-green.svg?style=flat)
![iOS](https://img.shields.io/badge/os-iOS-green.svg?style=flat)
![Linux](https://img.shields.io/badge/os-tuxOS-green.svg?style=flat)
Expand Down
6 changes: 5 additions & 1 deletion Samples/miniirc/Channel.swift
Expand Up @@ -48,7 +48,11 @@ class Channel {
}

func part(session s: Session) {
let idxO = sessions.index(where: { $0 === s })
#if swift(>=5)
let idxO = sessions.firstIndex(where: { $0 === s })
#else
let idxO = sessions.index(where: { $0 === s })
#endif
if let idx = idxO {
print("leaving channel \(name): \(s)")
sessions.remove(at: idx)
Expand Down
13 changes: 10 additions & 3 deletions Samples/miniirc/Session.swift
Expand Up @@ -115,9 +115,16 @@ class Session {
for channelName in channels {
if let channel = nameToChannel[channelName] {
channel.part(session: self)
if let idx = channelsJoined.index(where: { $0 === channel }) {
channelsJoined.remove(at: idx)
}
#if swift(>=5)
if let idx = channelsJoined.firstIndex(where: { $0 === channel })
{
channelsJoined.remove(at: idx)
}
#else
if let idx = channelsJoined.index(where: { $0 === channel }) {
channelsJoined.remove(at: idx)
}
#endif
}
}

Expand Down

0 comments on commit 943277d

Please sign in to comment.