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

Fork #1

Merged
merged 7 commits into from
Feb 16, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "PathKit",
"image": "swift:5.8",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "false"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "os-provided",
"ppa": "false"
}
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"lldb.library": "/usr/lib/liblldb.so"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"sswg.swift-lang"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "swift --version",

// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ci

on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
lint:
runs-on: macos-14
environment: default
steps:
- uses: actions/checkout@v3
- name: SwiftFormat version
run: swiftformat --version
- name: Format lint
run: swiftformat --lint .
- name: Install SwiftLint
run: brew install swiftlint
- name: SwiftLint version
run: swiftlint --version
- name: Lint
run: swiftlint lint --quiet
macos-test:
runs-on: macos-14
environment: default
strategy:
matrix:
xcode: ['14.3.1', '15.2']
# Swift: 5.8.1 , 5.9.2
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run Tests
run: TEMP_DIR=${{ runner.temp }} swift test --enable-code-coverage
linux-test:
runs-on: ubuntu-latest
environment: default

steps:
- uses: actions/checkout@v3
- name: Run Tests
run: TEMP_DIR=${{ runner.temp }} swift test
7 changes: 0 additions & 7 deletions .github/workflows/main.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.build/
Packages/
Package.resolved
.DS_Store
/.build
/.swiftpm
/*.xcodeproj
xcuserdata/
/.default.profraw
8 changes: 8 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--extensionacl on-declarations
--redundanttype explicit
--swiftversion 5.8
--maxwidth 120
--header "{file}\nPathKit\n\nCopyright (c) 2014, Kyle Fuller\nAll rights reserved.\nVersion 1.0.1\n\nCopyright © {year} MFB Technologies, Inc. All rights reserved.\nAfter Version 1.0.1\n\nThis source code is licensed under the BSD-2-Clause License found in the\nLICENSE file in the root directory of this source tree.""
--allman false
--wraparguments before-first
--wrapcollections before-first
17 changes: 17 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
disabled_rules:
- multiple_closures_with_trailing_closure # by SwiftUI
- trailing_comma # conflicts with SwiftFormat
- opening_brace # conflicts with SwiftFormat
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
- .build/*
- output
- ./**/*Tests/*
- Previews
identifier_name:
allowed_symbols: "_"
type_name:
allowed_symbols: "_"
excluded:
- ID
5 changes: 4 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Copyright (c) 2014, Kyle Fuller
All rights reserved.
Version 1.0.1

Copyright © 2024 MFB Technologies, Inc. All rights reserved.
After Version 1.0.1

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand All @@ -20,4 +24,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

42 changes: 30 additions & 12 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
// swift-tools-version:4.2
// swift-tools-version:5.8
import PackageDescription

let package = Package(
name: "PathKit",
products: [
.library(name: "PathKit", targets: ["PathKit"]),
],
dependencies: [
.package(url:"https://github.com/kylef/Spectre.git", .upToNextMinor(from:"0.10.0"))
],
targets: [
.target(name: "PathKit", dependencies: [], path: "Sources"),
.testTarget(name: "PathKitTests", dependencies: ["PathKit", "Spectre"], path:"Tests/PathKitTests")
]
name: "PathKit",
platforms: [.iOS(.v12), .macOS(.v10_13), .watchOS(.v4), .tvOS(.v12), .macCatalyst(.v13)],
products: [
.library(name: "PathKit", targets: ["PathKit"]),
],
targets: [
.target(
name: "PathKit",
swiftSettings: .swiftSix
),
.testTarget(
name: "PathKitTests",
dependencies: [
"PathKit",
],
swiftSettings: .swiftSix
),
]
)

extension [SwiftSetting] {
static let swiftSix: [SwiftSetting] = [
.enableUpcomingFeature("BareSlashRegexLiterals"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("ImplicitOpenExistentials"),
.enableUpcomingFeature("StrictConcurrency"),
]
}
15 changes: 0 additions & 15 deletions PathKit.podspec

This file was deleted.

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PathKit

[![Build Status](https://travis-ci.org/kylef/PathKit.svg)](https://travis-ci.org/kylef/PathKit)
Fork of [https://github.com/kylef/PathKit](https://github.com/kylef/PathKit)

Effortless path operations in Swift.

Expand Down Expand Up @@ -105,13 +105,6 @@ path.write("Hello World!")
let paths = Path.glob("*.swift")
```

### Contact

Kyle Fuller

- https://fuller.li
- https://twitter.com/kylefuller

### License

PathKit is licensed under the [BSD License](LICENSE).
Expand Down
Loading
Loading