From 73572f3eabbf1411ce198046c0f284cf18edff66 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 18 Sep 2013 15:43:12 -0700 Subject: [PATCH 1/3] Remove unused require --- spec/github-file-spec.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/github-file-spec.coffee b/spec/github-file-spec.coffee index ac35605..c1117f6 100644 --- a/spec/github-file-spec.coffee +++ b/spec/github-file-spec.coffee @@ -1,5 +1,4 @@ GitHubFile = require '../lib/github-file' -Project = require 'project' fsUtils = require 'fs-utils' path = require 'path' From 478e92c69575d008fabc1bb2744553d5b1fafbb0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 18 Sep 2013 15:43:49 -0700 Subject: [PATCH 2/3] Use atom-api for requires --- spec/github-file-spec.coffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/github-file-spec.coffee b/spec/github-file-spec.coffee index c1117f6..5cfea3f 100644 --- a/spec/github-file-spec.coffee +++ b/spec/github-file-spec.coffee @@ -1,5 +1,5 @@ GitHubFile = require '../lib/github-file' -fsUtils = require 'fs-utils' +{fs} = require 'atom-api' path = require 'path' describe "GitHubFile", -> @@ -12,14 +12,14 @@ describe "GitHubFile", -> path.join(__dirname, "fixtures", "#{fixtureName}.git") setupWorkingDir = (fixtureName) -> - fsUtils.makeTree workingDirPath - fsUtils.move fixturePath(fixtureName), path.join(workingDirPath, '.git') + fs.makeTree workingDirPath + fs.move fixturePath(fixtureName), path.join(workingDirPath, '.git') subdirectoryPath = path.join(workingDirPath, 'some-dir') - fsUtils.makeTree subdirectoryPath + fs.makeTree subdirectoryPath filePath = path.join(subdirectoryPath, 'some-file.md') - fsUtils.writeSync filePath, 'some file content' + fs.writeSync filePath, 'some file content' setupGithubFile = -> project.setPath(workingDirPath) @@ -27,8 +27,8 @@ describe "GitHubFile", -> githubFile = GitHubFile.fromPath(editSession.getPath()) teardownWorkingDirAndRestoreFixture = (fixtureName) -> - fsUtils.move path.join(workingDirPath, '.git'), fixturePath(fixtureName) - fsUtils.remove workingDirPath + fs.move path.join(workingDirPath, '.git'), fixturePath(fixtureName) + fs.remove workingDirPath describe "open", -> describe "when the file is openable on GitHub.com", -> From 081ddf15b1cfead6bd04494e1b5f4262846a290a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 19 Sep 2013 13:40:10 -0700 Subject: [PATCH 3/3] Rename require from atom-api to atom --- spec/github-file-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/github-file-spec.coffee b/spec/github-file-spec.coffee index 5cfea3f..414d464 100644 --- a/spec/github-file-spec.coffee +++ b/spec/github-file-spec.coffee @@ -1,5 +1,5 @@ GitHubFile = require '../lib/github-file' -{fs} = require 'atom-api' +{fs} = require 'atom' path = require 'path' describe "GitHubFile", ->