Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Fix all Tests #6

Merged
merged 3 commits into from
Mar 12, 2023
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
2 changes: 1 addition & 1 deletion lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Notifications =
message = message.replace('Uncaught BufferedProcessError: ', '')
atom.notifications.addError(message, dismissable: true)

else if originalError.code is 'ENOENT' and not /\/atom/i.test(message) and match = /spawn (.+) ENOENT/.exec(message)
else if originalError.code is 'ENOENT' and not /\/pulsar/i.test(message) and match = /spawn (.+) ENOENT/.exec(message)
message = """
'#{match[1]}' could not be spawned.
Is it installed and on your path?
Expand Down
12 changes: 6 additions & 6 deletions lib/notification-issue.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NotificationIssue

findSimilarIssues: ->
repoUrl = @getRepoUrl()
repoUrl = 'atom/atom' unless repoUrl?
repoUrl = 'pulsar-edit/pulsar' unless repoUrl?
repo = repoUrl.replace /http(s)?:\/\/(\d+\.)?github.com\//gi, ''
issueTitle = @getIssueTitle()
query = "#{issueTitle} repo:#{repo}"
Expand Down Expand Up @@ -196,16 +196,16 @@ class NotificationIssue
getPackageNameFromFilePath: (filePath) ->
return unless filePath

packageName = /\/\.atom\/dev\/packages\/([^\/]+)\//.exec(filePath)?[1]
packageName = /\/\.pulsar\/dev\/packages\/([^\/]+)\//.exec(filePath)?[1]
return packageName if packageName

packageName = /\\\.atom\\dev\\packages\\([^\\]+)\\/.exec(filePath)?[1]
packageName = /\\\.pulsar\\dev\\packages\\([^\\]+)\\/.exec(filePath)?[1]
return packageName if packageName

packageName = /\/\.atom\/packages\/([^\/]+)\//.exec(filePath)?[1]
packageName = /\/\.pulsar\/packages\/([^\/]+)\//.exec(filePath)?[1]
return packageName if packageName

packageName = /\\\.atom\\packages\\([^\\]+)\\/.exec(filePath)?[1]
packageName = /\\\.pulsar\\packages\\([^\\]+)\\/.exec(filePath)?[1]
return packageName if packageName

getPackageName: ->
Expand All @@ -216,7 +216,7 @@ class NotificationIssue

packagePaths = @getPackagePathsByPackageName()
for packageName, packagePath of packagePaths
if packagePath.indexOf(path.join('.atom', 'dev', 'packages')) > -1 or packagePath.indexOf(path.join('.atom', 'packages')) > -1
if packagePath.indexOf(path.join('.pulsar', 'dev', 'packages')) > -1 or packagePath.indexOf(path.join('.pulsar', 'packages')) > -1
packagePaths[packageName] = fs.realpathSync(packagePath)

getPackageName = (filePath) =>
Expand Down
4 changes: 2 additions & 2 deletions lib/user-utilities.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports =
accept: 'application/vnd.github.v3+json',
contentType: "application/json"
})
fetch 'https://atom.io/api/updates', {headers: githubHeaders} ### needs modification ###
fetch 'https://api.pulsar-edit.dev/api/updates', {headers: githubHeaders}
.then (r) -> if r.ok then r.json() else Promise.reject r.statusCode

checkAtomUpToDate: ->
Expand All @@ -130,7 +130,7 @@ module.exports =
accept: 'application/vnd.github.v3+json',
contentType: "application/json"
})
fetch "https://web.pulsar-edit.dev/packages/#{packageName}", {headers: githubHeaders}
fetch "https://api.pulsar-edit.dev/api/packages/#{packageName}", {headers: githubHeaders}
.then (r) -> if r.ok then r.json() else Promise.reject r.statusCode

checkPackageUpToDate: (packageName) ->
Expand Down
Loading