Skip to content

Commit

Permalink
Removed dependency on GZip
Browse files Browse the repository at this point in the history
  • Loading branch information
dagronf committed Apr 7, 2024
1 parent 5684f3a commit ed8c19d
Show file tree
Hide file tree
Showing 8 changed files with 5,880 additions and 52 deletions.
9 changes: 0 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
"version": "3.4.0"
}
},
{
"package": "Gzip",
"repositoryURL": "https://github.com/1024jp/GzipSwift",
"state": {
"branch": null,
"revision": "731037f6cc2be2ec01562f6597c1d0aa3fe6fd05",
"version": "6.0.1"
}
},
{
"package": "TinyCSV",
"repositoryURL": "https://github.com/dagronf/TinyCSV",
Expand Down
8 changes: 2 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/dagronf/DSFRegex", from: "3.3.1"),
.package(url: "https://github.com/dagronf/TinyCSV", .upToNextMinor(from: "1.0.0")),
.package(url: "https://github.com/1024jp/GzipSwift", .upToNextMinor(from: "6.0.1"))
.package(url: "https://github.com/dagronf/TinyCSV", .upToNextMinor(from: "1.0.0"))
],
targets: [
.target(
Expand All @@ -30,10 +29,7 @@ let package = Package(
),
.testTarget(
name: "SwiftSubtitlesTests",
dependencies: [
"SwiftSubtitles",
.product(name: "Gzip", package: "GzipSwift")
],
dependencies: [ "SwiftSubtitles" ],
resources: [
.process("resources"),
]
Expand Down
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ Position,Start time,End Time,Text

* Some VTT functionality is not supported (NOTE, STYLE, REGION). These will be discarded on import.

## Licenses

### SwiftSubtitles
## License

```
MIT License
Expand All @@ -169,31 +167,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

### GzipSwift

Uses GzipSwift for testing purposes only.

```
The MIT License (MIT)
Copyright (c) 2014-2023 1024jp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
2 changes: 1 addition & 1 deletion SwiftSubtitles.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SwiftSubtitles"
s.version = "1.2.0"
s.version = "1.3.0"
s.summary = "A Swift package for reading/writing some common subtitle formats."
s.description = <<-DESC
A Swift package for reading/writing subtitle formats (srt, sbv, sub, vtt, csv).
Expand Down
2 changes: 0 additions & 2 deletions Tests/SwiftSubtitlesTests/CommonTests.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import XCTest
@testable import SwiftSubtitles

import Gzip

final class CommonTests: XCTestCase {

func testTimeSorting() throws {
Expand Down
7 changes: 4 additions & 3 deletions Tests/SwiftSubtitlesTests/SRTTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ Fish and chips
}
}

func testGzippedSrtFile() throws {
let fileURL = Bundle.module.url(forResource: "zorro.srt", withExtension: "gz")!
let data = try Data(contentsOf: fileURL).gunzipped()
func testSRTFileWithBOM() throws {
// This file
let fileURL = Bundle.module.url(forResource: "zorro", withExtension: "srt")!
let data = try Data(contentsOf: fileURL)
let str = String(data: data, encoding: .utf8)!

// This file has a utf8 BOM. Check we detect it ok
Expand Down
Loading

0 comments on commit ed8c19d

Please sign in to comment.