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

Parse “Package.resolved” files for SPM #102

Merged
merged 29 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
08ba606
Update Acknow struct, add package parser, rename pod parser
vtourraine May 3, 2022
269560b
Update for new pod parser
vtourraine May 4, 2022
b65fc52
Update AcknowListViewController to open repository URL
vtourraine May 4, 2022
daaed68
Update SPM Example project to present parsed packages
vtourraine May 4, 2022
6dd9571
Add default AcknowPackageParser parse method
vtourraine May 6, 2022
63e93db
Add AcknowPodParser initializer with file URL
vtourraine May 6, 2022
4b770e8
Rename methods
vtourraine May 6, 2022
078f137
Update comments
vtourraine May 6, 2022
73efa60
Rename AcknowPackageParser to AcknowPackageDecoder
vtourraine May 6, 2022
112e257
Refactor AcknowPodParser into AcknowPodDecoder
vtourraine May 9, 2022
fb6cb12
Refactor acknowledgements sorting
vtourraine May 10, 2022
44b9a23
Move filterOutPrematureLineBreaks
vtourraine May 10, 2022
a7af965
Refactor decoder to use data as parameter
vtourraine May 13, 2022
73bc950
Update documentation
vtourraine May 13, 2022
f91d189
Refactoring
vtourraine May 17, 2022
a4fc1cf
Update example projects
vtourraine May 17, 2022
8f98409
Add AcknowList plus operator
vtourraine May 17, 2022
d12743b
Add default acknow list
vtourraine May 18, 2022
70caea4
Refactor with file URLs as parameters
vtourraine May 19, 2022
509525b
Update documentation
vtourraine May 19, 2022
2464730
Update documentation
vtourraine May 19, 2022
e9929c7
Update documentation
vtourraine May 19, 2022
38d5120
Update documentation
vtourraine May 19, 2022
5669a23
Update documentation
vtourraine May 19, 2022
61dd880
Update documentation
vtourraine May 19, 2022
ee9d1d2
Merge branch 'main' into parse-packages
vtourraine May 24, 2022
db92519
Enable navigation for http/https repository URLs only #102
vtourraine Jun 10, 2022
184c176
Update changelog
vtourraine Jul 20, 2022
f790cf0
Merge branch 'main' into parse-packages
vtourraine Jul 20, 2022
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
18 changes: 15 additions & 3 deletions AcknowList.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
D738F2AE2640342B001BA008 /* AcknowListSwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = D738F2AD2640342B001BA008 /* AcknowListSwiftUI.swift */; };
D7527EE425CAFDB000378FB8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D7527EE225CAFDB000378FB8 /* Localizable.strings */; };
D78335EF2628934800A380A3 /* AcknowSwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78335EE2628934800A380A3 /* AcknowSwiftUI.swift */; };
D7A68B452833C2C90064C2C0 /* AcknowList.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A68B442833C2C90064C2C0 /* AcknowList.swift */; };
D7A68B482833C2D30064C2C0 /* AcknowPodDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A68B462833C2D30064C2C0 /* AcknowPodDecoder.swift */; };
D7A68B492833C2D30064C2C0 /* AcknowPackageDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A68B472833C2D30064C2C0 /* AcknowPackageDecoder.swift */; };
D7CCBD131D22624B0013F696 /* Pods-acknowledgements-multi.plist in Resources */ = {isa = PBXBuildFile; fileRef = D7CCBD121D22624B0013F696 /* Pods-acknowledgements-multi.plist */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -81,6 +84,9 @@
D7527EF225CAFE0000378FB8 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
D7527EF325CAFE0700378FB8 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = "<group>"; };
D78335EE2628934800A380A3 /* AcknowSwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcknowSwiftUI.swift; sourceTree = "<group>"; };
D7A68B442833C2C90064C2C0 /* AcknowList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcknowList.swift; sourceTree = "<group>"; };
D7A68B462833C2D30064C2C0 /* AcknowPodDecoder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcknowPodDecoder.swift; sourceTree = "<group>"; };
D7A68B472833C2D30064C2C0 /* AcknowPackageDecoder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcknowPackageDecoder.swift; sourceTree = "<group>"; };
D7CCBD121D22624B0013F696 /* Pods-acknowledgements-multi.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements-multi.plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -166,13 +172,16 @@
isa = PBXGroup;
children = (
32A5DE3A25C7DD3D00ED11BB /* Resources */,
32A5DE3C25C7DD3D00ED11BB /* AcknowParser.swift */,
32A5DE3D25C7DD3D00ED11BB /* Acknow.swift */,
32A5DE3E25C7DD3D00ED11BB /* AcknowViewController.swift */,
D7A68B442833C2C90064C2C0 /* AcknowList.swift */,
D738F2AD2640342B001BA008 /* AcknowListSwiftUI.swift */,
32A5DE3F25C7DD3D00ED11BB /* AcknowListViewController.swift */,
32A5DE4125C7DD3D00ED11BB /* AcknowLocalization.swift */,
D7A68B472833C2D30064C2C0 /* AcknowPackageDecoder.swift */,
32A5DE3C25C7DD3D00ED11BB /* AcknowParser.swift */,
D7A68B462833C2D30064C2C0 /* AcknowPodDecoder.swift */,
D78335EE2628934800A380A3 /* AcknowSwiftUI.swift */,
D738F2AD2640342B001BA008 /* AcknowListSwiftUI.swift */,
32A5DE3E25C7DD3D00ED11BB /* AcknowViewController.swift */,
D705FE2A268A0B0600B501D7 /* AcknowList.docc */,
);
name = Sources;
Expand Down Expand Up @@ -338,8 +347,11 @@
32A5DE4425C7DD3D00ED11BB /* Acknow.swift in Sources */,
32A5DE4325C7DD3D00ED11BB /* AcknowParser.swift in Sources */,
32A5DE4625C7DD3D00ED11BB /* AcknowListViewController.swift in Sources */,
D7A68B482833C2D30064C2C0 /* AcknowPodDecoder.swift in Sources */,
D705FE2B268A0B0600B501D7 /* AcknowList.docc in Sources */,
D738F2AE2640342B001BA008 /* AcknowListSwiftUI.swift in Sources */,
D7A68B452833C2C90064C2C0 /* AcknowList.swift in Sources */,
D7A68B492833C2D30064C2C0 /* AcknowPackageDecoder.swift in Sources */,
D78335EF2628934800A380A3 /* AcknowSwiftUI.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 3.0.0 (work in progress)

- Add `AcknowList` struct to represent list model
- Add `AcknowPackageDecoder` to parse “Package.resolved” files (Swift Package Manager)
- Refactor plist file parser into `AcknowPodDecoder`
- Refactor `AcknowParser` to manage parsing different file types
- Refactor file paths parameters (`String`) into file URLs (`URL`) instead
- Update `AcknowListViewController` to load acknowledgements from “Package.resolved” by default


## 2.1.1 (15 June 2022)

- Follow readable content guides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class ViewController: UIViewController {
}

@IBAction func presentAcknowledgementsSwiftUI(_ sender: UIButton) {
guard let path = Bundle.main.path(forResource: "Pods-AcknowExampleCocoaPods-acknowledgements", ofType: "plist") else {
guard let url = Bundle.main.url(forResource: "Pods-AcknowExampleCocoaPods-acknowledgements", withExtension: "plist") else {
return
}

let viewController = UIHostingController(rootView: NavigationView { AcknowListSwiftUIView(plistPath: path) })
let viewController = UIHostingController(rootView: NavigationView { AcknowListSwiftUIView(plistFileURL: url) })
present(viewController, animated: true)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/AcknowExampleCocoaPods/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '9.0'
platform :ios, '13.0'

target 'AcknowExampleCocoaPods' do
pod 'AcknowList', :path => '../../'
Expand Down
8 changes: 4 additions & 4 deletions Examples/AcknowExampleCocoaPods/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- AcknowList (2.0.1)
- AcknowList (2.1.0)

DEPENDENCIES:
- AcknowList (from `../../`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../../"

SPEC CHECKSUMS:
AcknowList: 31c554dd38de97596be2c64a72b44c9eacf87108
AcknowList: bb4f8090d41d1d59302c8159fa31b17b442a4749

PODFILE CHECKSUM: 46635e41a4f934ddec0a6f178b469fb26fcdbd3e
PODFILE CHECKSUM: 785e580706c8943b9e7a6a558abe7a43d9e8400e

COCOAPODS: 1.10.0
COCOAPODS: 1.11.3

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

8 changes: 4 additions & 4 deletions Examples/AcknowExampleCocoaPods/Pods/Manifest.lock

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

Loading