Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis & Linux tests #73

Merged
merged 17 commits into from
Feb 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions .XcodeProject/Tests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
821 changes: 821 additions & 0 deletions .XcodeProject/Vapor.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES"
hideIssues = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3A91D3CB1C7F6AF900EA3CA0"
BuildableName = "Vapor.framework"
BlueprintName = "Vapor"
ReferencedContainer = "container:Vapor.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3A91D3CB1C7F6AF900EA3CA0"
BuildableName = "Vapor.framework"
BlueprintName = "Vapor"
ReferencedContainer = "container:Vapor.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3A91D3CB1C7F6AF900EA3CA0"
BuildableName = "Vapor.framework"
BlueprintName = "Vapor"
ReferencedContainer = "container:Vapor.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.8">
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -15,9 +15,9 @@
hideIssues = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C352E6801C62BB0F00E26467"
BuildableName = "Vapor"
BlueprintName = "Vapor"
BlueprintIdentifier = "3AEEF4491C7F71080099CBAE"
BuildableName = "VaporExample"
BlueprintName = "VaporExample"
ReferencedContainer = "container:Vapor.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -33,9 +33,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C352E6801C62BB0F00E26467"
BuildableName = "Vapor"
BlueprintName = "Vapor"
BlueprintIdentifier = "3AEEF4491C7F71080099CBAE"
BuildableName = "VaporExample"
BlueprintName = "VaporExample"
ReferencedContainer = "container:Vapor.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -56,18 +56,12 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C352E6801C62BB0F00E26467"
BuildableName = "Vapor"
BlueprintName = "Vapor"
BlueprintIdentifier = "3AEEF4491C7F71080099CBAE"
BuildableName = "VaporExample"
BlueprintName = "VaporExample"
ReferencedContainer = "container:Vapor.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "--workDir=$SRCROOT"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand All @@ -81,9 +75,9 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C352E6801C62BB0F00E26467"
BuildableName = "Vapor"
BlueprintName = "Vapor"
BlueprintIdentifier = "3AEEF4491C7F71080099CBAE"
BuildableName = "VaporExample"
BlueprintName = "VaporExample"
ReferencedContainer = "container:Vapor.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand Down
28 changes: 28 additions & 0 deletions .XcodeProject/Vapor/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2016 Tanner Nelson. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
19 changes: 19 additions & 0 deletions .XcodeProject/Vapor/Vapor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Vapor.h
// Vapor
//
// Created by Honza Dvorsky on 2/25/16.
// Copyright © 2016 Tanner Nelson. All rights reserved.
//

#import <Cocoa/Cocoa.h>

//! Project version number for Vapor.
FOUNDATION_EXPORT double VaporVersionNumber;

//! Project version string for Vapor.
FOUNDATION_EXPORT const unsigned char VaporVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Vapor/PublicHeader.h>


4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Packages
.build
Sources/main.swift
Public
Resources

.DS_Store
xcuserdata
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEVELOPMENT-SNAPSHOT-2016-02-25-a
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
#- xctool clean build -project Vapor.xcodeproj -scheme Vapor
#- xctool test -project Vapor.xcodeproj -scheme Tests

os:
- linux
- osx
language: generic

sudo: required
dist: trusty

osx_image: xcode7.3
install:
- mkdir swift
- curl https://swift.org/builds/development/ubuntu1404/swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a/swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a-ubuntu14.04.tar.gz -s | tar xz -C swift &> /dev/null

- curl -sL https://gist.github.com/kylef/5c0475ff02b7c7671d2a/raw/621ef9b29bbb852fdfd2e10ed147b321d792c1e4/swiftenv-install.sh | bash
script:
- env PATH=$(pwd)/swift/swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a-ubuntu14.04/usr/bin:$PATH swift build
- . ~/.swiftenv/init
- swift build
- swift test
14 changes: 13 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,17 @@ import PackageDescription

let package = Package(
name: "Vapor",
dependencies: []
exclude: [],
targets: [
Target(
name: "Vapor",
dependencies: []
),
Target(
name: "VaporDev",
dependencies: [
.Target(name: "Vapor")
]
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Foundation
#endif

public class Application {
public static let VERSION = "0.2.4"
public static let VERSION = "0.2.5"

/**
The router driver is responsible
Expand Down Expand Up @@ -156,7 +156,8 @@ extension Application: ServerDriverDelegate {
return Response(status: .OK, data: array, contentType: .Text)
} else {
handler = { _ in
return Response(error: "Could not open file.")
Log.warning("Could not open file, returning 404")
return Response(status: .NotFound, text: "Page not found")
}
}
} else {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,15 @@ extension Array: CSArrayType {
extension CSArrayType where Generator.Element == UInt8 {

func toHexString() -> String {
return self.lazy.reduce("") { $0 + String(format:"%02x", $1) }
return self.lazy.reduce("") { previous, next in
var converted = String(next, radix: 16)

if converted.characters.count == 1 {
converted = "0" + converted
}

return previous + converted
}
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added Sources/VaporDev/Public/images/vapor-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.