Skip to content

Commit

Permalink
Added a few TODOs and corrected spelling of GitHub.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdoe committed Jan 6, 2024
1 parent eb5b730 commit 0e01bbb
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 30 deletions.
26 changes: 13 additions & 13 deletions CCMenu.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
03CC11F02652F70800130833 /* CCTrayFeedReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CC11EF2652F70800130833 /* CCTrayFeedReader.swift */; };
03CC11F2265467C200130833 /* CCTrayResponseParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CC11F1265467C200130833 /* CCTrayResponseParser.swift */; };
03D4BB012659A1120023F4CB /* PipelineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D4BB002659A1120023F4CB /* PipelineTests.swift */; };
03D4BB03265EE5840023F4CB /* GithubFeedReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D4BB02265EE5840023F4CB /* GithubFeedReader.swift */; };
03D4BB05265EE6B50023F4CB /* GithubResponseParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D4BB04265EE6B50023F4CB /* GithubResponseParser.swift */; };
03D4BB03265EE5840023F4CB /* GitHubFeedReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D4BB02265EE5840023F4CB /* GitHubFeedReader.swift */; };
03D4BB05265EE6B50023F4CB /* GitHubResponseParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D4BB04265EE6B50023F4CB /* GitHubResponseParser.swift */; };
03DA98DC2B4498BB0073F5BB /* GitHubRepositoryList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03DA98DB2B4498BB0073F5BB /* GitHubRepositoryList.swift */; };
03DA98DE2B44B7320073F5BB /* GitHubWorkflowList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03DA98DD2B44B7320073F5BB /* GitHubWorkflowList.swift */; };
03DA98E02B44BF620073F5BB /* GitHubPipelineBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03DA98DF2B44BF620073F5BB /* GitHubPipelineBuilder.swift */; };
Expand All @@ -60,7 +60,7 @@
03F9B896297D486C00FA866E /* Pipeline.Feed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F9B895297D486C00FA866E /* Pipeline.Feed.swift */; };
03F9B898297D4D8F00FA866E /* MenuItemViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F9B897297D4D8F00FA866E /* MenuItemViewModel.swift */; };
03F9B89A297D930A00FA866E /* CCTrayFeedReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03F9B899297D930A00FA866E /* CCTrayFeedReaderTests.swift */; };
2FA2827139B00E15C5CD2E7F /* GithubResponseParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2833D541ABE8B0D2E7615 /* GithubResponseParserTests.swift */; };
2FA2827139B00E15C5CD2E7F /* GitHubResponseParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2833D541ABE8B0D2E7615 /* GitHubResponseParserTests.swift */; };
2FA28718B9A6BD8E1C32FF55 /* CCTrayResponseParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28075764358E9D929CECD /* CCTrayResponseParserTests.swift */; };
2FA28FBCC0398D63EF2D2C16 /* ImageManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28CB152CE8C0CFD6EE3A8 /* ImageManagerTests.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -124,8 +124,8 @@
03CC11EF2652F70800130833 /* CCTrayFeedReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CCTrayFeedReader.swift; sourceTree = "<group>"; };
03CC11F1265467C200130833 /* CCTrayResponseParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CCTrayResponseParser.swift; sourceTree = "<group>"; };
03D4BB002659A1120023F4CB /* PipelineTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PipelineTests.swift; sourceTree = "<group>"; };
03D4BB02265EE5840023F4CB /* GithubFeedReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GithubFeedReader.swift; sourceTree = "<group>"; };
03D4BB04265EE6B50023F4CB /* GithubResponseParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GithubResponseParser.swift; sourceTree = "<group>"; };
03D4BB02265EE5840023F4CB /* GitHubFeedReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubFeedReader.swift; sourceTree = "<group>"; };
03D4BB04265EE6B50023F4CB /* GitHubResponseParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubResponseParser.swift; sourceTree = "<group>"; };
03DA98DB2B4498BB0073F5BB /* GitHubRepositoryList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubRepositoryList.swift; sourceTree = "<group>"; };
03DA98DD2B44B7320073F5BB /* GitHubWorkflowList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubWorkflowList.swift; sourceTree = "<group>"; };
03DA98DF2B44BF620073F5BB /* GitHubPipelineBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubPipelineBuilder.swift; sourceTree = "<group>"; };
Expand All @@ -143,7 +143,7 @@
03F9B897297D4D8F00FA866E /* MenuItemViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuItemViewModel.swift; sourceTree = "<group>"; };
03F9B899297D930A00FA866E /* CCTrayFeedReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CCTrayFeedReaderTests.swift; sourceTree = "<group>"; };
2FA28075764358E9D929CECD /* CCTrayResponseParserTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCTrayResponseParserTests.swift; sourceTree = "<group>"; };
2FA2833D541ABE8B0D2E7615 /* GithubResponseParserTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GithubResponseParserTests.swift; sourceTree = "<group>"; };
2FA2833D541ABE8B0D2E7615 /* GitHubResponseParserTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GitHubResponseParserTests.swift; sourceTree = "<group>"; };
2FA28CB152CE8C0CFD6EE3A8 /* ImageManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageManagerTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -181,7 +181,6 @@
03DA98DD2B44B7320073F5BB /* GitHubWorkflowList.swift */,
03DA98DF2B44BF620073F5BB /* GitHubPipelineBuilder.swift */,
03DA98E12B44CE1A0073F5BB /* GitHubAuthenticator.swift */,
03E6A9F62B2651C200284138 /* GitHubAPI.swift */,
);
path = "GitHub Sheets";
sourceTree = "<group>";
Expand Down Expand Up @@ -237,7 +236,7 @@
03CC11EB2652F58B00130833 /* ServerMonitorTests.swift */,
03F9B899297D930A00FA866E /* CCTrayFeedReaderTests.swift */,
2FA28075764358E9D929CECD /* CCTrayResponseParserTests.swift */,
2FA2833D541ABE8B0D2E7615 /* GithubResponseParserTests.swift */,
2FA2833D541ABE8B0D2E7615 /* GitHubResponseParserTests.swift */,
03F9B88F297C6EEC00FA866E /* CompactRelativeFormatStyleTests.swift */,
2FA28CB152CE8C0CFD6EE3A8 /* ImageManagerTests.swift */,
03BD7EA02598E57A000F9495 /* Info.plist */,
Expand Down Expand Up @@ -354,8 +353,9 @@
03CC11ED2652F6B900130833 /* FeedReader.swift */,
03CC11EF2652F70800130833 /* CCTrayFeedReader.swift */,
03CC11F1265467C200130833 /* CCTrayResponseParser.swift */,
03D4BB02265EE5840023F4CB /* GithubFeedReader.swift */,
03D4BB04265EE6B50023F4CB /* GithubResponseParser.swift */,
03D4BB02265EE5840023F4CB /* GitHubFeedReader.swift */,
03D4BB04265EE6B50023F4CB /* GitHubResponseParser.swift */,
03E6A9F62B2651C200284138 /* GitHubAPI.swift */,
);
path = "Server Monitor";
sourceTree = "<group>";
Expand Down Expand Up @@ -542,10 +542,10 @@
03825DE8259D005B00DEB003 /* PipelineModel.swift in Sources */,
03CC11EA2652F49100130833 /* ServerMonitor.swift in Sources */,
03F682FD25C73584005D56D9 /* EditPipelineSheet.swift in Sources */,
03D4BB03265EE5840023F4CB /* GithubFeedReader.swift in Sources */,
03D4BB03265EE5840023F4CB /* GitHubFeedReader.swift in Sources */,
03DA98DC2B4498BB0073F5BB /* GitHubRepositoryList.swift in Sources */,
03F9B898297D4D8F00FA866E /* MenuItemViewModel.swift in Sources */,
03D4BB05265EE6B50023F4CB /* GithubResponseParser.swift in Sources */,
03D4BB05265EE6B50023F4CB /* GitHubResponseParser.swift in Sources */,
03CC11F02652F70800130833 /* CCTrayFeedReader.swift in Sources */,
0336DBAC29848FE200E5811C /* AddCCTrayPipeline.swift in Sources */,
0329F89E25B0F0F10043FAB1 /* AppearanceSettings.swift in Sources */,
Expand All @@ -566,7 +566,7 @@
2FA28FBCC0398D63EF2D2C16 /* ImageManagerTests.swift in Sources */,
03B021252A5D9F9D00B889BE /* MenuExtraModelTests.swift in Sources */,
2FA28718B9A6BD8E1C32FF55 /* CCTrayResponseParserTests.swift in Sources */,
2FA2827139B00E15C5CD2E7F /* GithubResponseParserTests.swift in Sources */,
2FA2827139B00E15C5CD2E7F /* GitHubResponseParserTests.swift in Sources */,
03B1D75F2A6079CD007BCB8A /* MenuItemModelTests.swift in Sources */,
03F9B89A297D930A00FA866E /* CCTrayFeedReaderTests.swift in Sources */,
03B1D7632A6085F1007BCB8A /* ListRowModelTests.swift in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion CCMenu/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2007-2023 Erik Doernenburg and contributors. All rights reserved.</string>
<string>Copyright © 2007-2024 Erik Doernenburg and contributors. All rights reserved.</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand Down
2 changes: 1 addition & 1 deletion CCMenu/Source/Miscellaneous/ImageManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import AppKit


// TODO: find a better pattern for making this logic available (and testable)
class ImageManager {

public lazy var defaultImage = image(forResult: .other, activity: .other)
Expand Down
2 changes: 1 addition & 1 deletion CCMenu/Source/Miscellaneous/UserSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import AppKit
import Combine


// TODO: consider making this a BindableObject
final class UserSettings: ObservableObject {

private static let pipelineList = "pipelines"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import SwiftUI
import Combine


struct AddGithubPipelineSheet: View {
struct AddGitHubPipelineSheet: View {
@State private var owner = ""
@StateObject private var repositoryList = GitHubRepositoryList()
@StateObject private var workflowList = GitHubWorkflowList()
Expand Down
2 changes: 1 addition & 1 deletion CCMenu/Source/Pipeline Window/PipelineListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct PipelineListView: View {
case .cctray:
AddCCTrayPipelineSheet(model: model)
case .github:
AddGithubPipelineSheet(model: model)
AddGitHubPipelineSheet(model: model)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import Foundation


class GithubFeedReader {
class GitHubFeedReader {

private(set) var pipeline: Pipeline

Expand Down Expand Up @@ -45,15 +45,15 @@ class GithubFeedReader {
}
if let rll = response.allHeaderFields["x-ratelimit-limit"] as? String,
let rlu = response.allHeaderFields["x-ratelimit-used"] as? String {
debugPrint("received response from Github; rate limit \(rlu)/\(rll)")
debugPrint("received response from GitHub; rate limit \(rlu)/\(rll)")
} else {
debugPrint("received response from Github")
debugPrint("received response from GitHub")
}
guard response.statusCode == 200 else {
let httpError = HTTPURLResponse.localizedString(forStatusCode: response.statusCode)
return (nil, httpError)
}
let parser = GithubResponseParser()
let parser = GitHubResponseParser()
try parser.parseResponse(data)
let status = parser.pipelineStatus(name: pipeline.name)
return (status, nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import Foundation

class GithubResponseParser {
class GitHubResponseParser {

var runList: [Dictionary<String, Any>] = []

Expand Down
2 changes: 1 addition & 1 deletion CCMenu/Source/Server Monitor/ServerMonitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ServerMonitor {
await reader.updatePipelineStatus()
reader.pipelines.forEach({ model.update(pipeline: $0) })
case .github:
let reader = GithubFeedReader(for: p)
let reader = GitHubFeedReader(for: p)
await reader.updatePipelineStatus()
model.update(pipeline: reader.pipeline)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import XCTest
@testable import CCMenu

class GithubResponseParserTests: XCTestCase {
class GitHubResponseParserTests: XCTestCase {

func testParsesJSON() throws {
let json = "{ \"workflow_runs\": [ { \"name\": \"Rust\", \"conclusion\": \"success\" } ] }\n"
let parser = GithubResponseParser()
let parser = GitHubResponseParser()

try parser.parseResponse(json.data(using: .ascii)!)

Expand All @@ -22,7 +22,7 @@ class GithubResponseParserTests: XCTestCase {

func testThrowsForMalformedJSON() throws {
let json = " \"workflow_runs\": [ { \"name\": \"Rust\" deliberately broken"
let parser = GithubResponseParser()
let parser = GitHubResponseParser()

XCTAssertThrowsError(try parser.parseResponse(json.data(using: .ascii)!))
}
Expand All @@ -44,7 +44,7 @@ class GithubResponseParserTests: XCTestCase {
}
}]}
"""
let parser = GithubResponseParser()
let parser = GitHubResponseParser()
try parser.parseResponse(json.data(using: .ascii)!)

let status = parser.pipelineStatus(name: "quvyn:rust.yml")!
Expand Down Expand Up @@ -94,7 +94,7 @@ class GithubResponseParserTests: XCTestCase {
}
]}
"""
let parser = GithubResponseParser()
let parser = GitHubResponseParser()
try parser.parseResponse(json.data(using: .ascii)!)

let status = parser.pipelineStatus(name: "quvyn:Rust")!
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a complete rewrite of [CCMenu](https://github.com/erikdoe/ccmenu).

There will be a number of pre-releases via Github before it replaces the old version in the AppStore.
There will be a number of pre-releases via GitHub before it replaces the old version in the AppStore.

Significant known issues are filed as bugs.

Expand Down Expand Up @@ -30,6 +30,7 @@ For now the roadmap is tracked in this readme file.
### Pre-release 3

- [ ] Basic auth login for CCTray feeds
- [ ] Optimised CCTray reader requests
- [ ] Edit pipelines

### Later
Expand Down

0 comments on commit 0e01bbb

Please sign in to comment.