Skip to content

Commit

Permalink
Merge pull request #1 from eduarenas/swift-pm
Browse files Browse the repository at this point in the history
Convert to Swift PM
  • Loading branch information
Eduardo Arenas committed Apr 19, 2018
2 parents 5c24ecf + 3371988 commit f82782f
Show file tree
Hide file tree
Showing 45 changed files with 1,754 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -65,3 +65,5 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

.DS_Store
25 changes: 25 additions & 0 deletions GitHubClient.xcodeproj/GitHubClientTests_Info.plist
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
25 changes: 25 additions & 0 deletions GitHubClient.xcodeproj/GitHubClient_Info.plist
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
25 changes: 25 additions & 0 deletions GitHubClient.xcodeproj/RxSwift_Info.plist
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
1,479 changes: 1,479 additions & 0 deletions GitHubClient.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.

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "9999"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GitHubClient::GitHubClient"
BuildableName = "GitHubClient.framework"
BlueprintName = "GitHubClient"
ReferencedContainer = "container:GitHubClient.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RxSwift::RxSwift"
BuildableName = "RxSwift.framework"
BlueprintName = "RxSwift"
ReferencedContainer = "container:GitHubClient.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GitHubClient::GitHubClientTests"
BuildableName = "GitHubClientTests.xctest"
BlueprintName = "GitHubClientTests"
ReferencedContainer = "container:GitHubClient.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GitHubClient::GitHubClient"
BuildableName = "GitHubClient.framework"
BlueprintName = "GitHubClient"
ReferencedContainer = "container:GitHubClient.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>GitHubClient-Package.xcscheme</key>
<dict></dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict></dict>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Package.resolved
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
"state": {
"branch": null,
"revision": "3e848781c7756accced855a6317a4c2ff5e8588b",
"version": "4.1.2"
}
}
]
},
"version": 1
}
27 changes: 27 additions & 0 deletions Package.swift
@@ -0,0 +1,27 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "GitHubClient",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "GitHubClient",
targets: ["GitHubClient"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", "4.0.0" ..< "5.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.
.target(
name: "GitHubClient",
dependencies: ["RxSwift"]),
.testTarget(
name: "GitHubClientTests",
dependencies: ["GitHubClient"]),
]
)
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,6 +6,7 @@
// Copyright © 2017 GameChanger. All rights reserved.
//

import Foundation
import RxSwift

public class ApiClient {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2017 GameChanger. All rights reserved.
//

import Foundation

import RxSwift

extension HTTPService {
Expand Down
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2017 GameChanger. All rights reserved.
//

import Foundation

enum HTTPServiceError: Error {
case invalidUrl(url: String)
case invalidResponse
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.
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2018 GameChanger. All rights reserved.
//

import Foundation

public struct Authorization: Decodable {
public let id: Int
public let url: String
Expand Down
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2018 GameChanger. All rights reserved.
//

import Foundation

public struct Invitation: Decodable {
let id: Int
let repository: Repository
Expand Down
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2017 GameChanger. All rights reserved.
//

import Foundation

public struct Issue: Decodable {

let id: Int
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2017 GameChanger. All rights reserved.
//

import Foundation

public struct Repository: Decodable {
public let id: Int
public let owner: User
Expand Down
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2017 GameChanger. All rights reserved.
//

import Foundation

public struct User: Decodable {

public let login: String
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2018 GameChanger. All rights reserved.
//

import Foundation

struct PageLinks {
let first: String?
let previous: String?
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions Tests/GitHubClientTests/GitHubClientTests.swift
@@ -0,0 +1,16 @@
import XCTest
@testable import GitHubClient

class GitHubClientTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(GitHubClient().text, "Hello, World!")
}


static var allTests = [
("testExample", testExample),
]
}
6 changes: 6 additions & 0 deletions Tests/LinuxMain.swift
@@ -0,0 +1,6 @@
import XCTest
@testable import GitHubClientTests

XCTMain([
testCase(GitHubClientTests.allTests),
])

0 comments on commit f82782f

Please sign in to comment.