diff --git a/bin/run.coffee b/bin/run.coffee index fea8cc3..5842062 100644 --- a/bin/run.coffee +++ b/bin/run.coffee @@ -32,7 +32,7 @@ init = (args) -> clone = (args) -> {org, repo, templates} = args - organization = args._[1] || org + organization = args._[1] || org || args.organization repo = args._[2] || repo if !organization console.error 'Please specify an organization when using the clone command.' diff --git a/lib/clone.coffee b/lib/clone.coffee index 4601ee6..43b82d1 100644 --- a/lib/clone.coffee +++ b/lib/clone.coffee @@ -1,4 +1,4 @@ -fetchGitHubRepo = require("fetch-github-repo") +fetchGitHubRepo = require("rally-fetch-github-repo") _ = require('lodash') fs = require 'fs' path = require 'path' diff --git a/package.json b/package.json index d324fbe..1953a62 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Kyle Morse ", "name": "rally-app-builder", "description": "A node module that assists in the building of Rally Apps", - "version": "1.4.1", + "version": "1.5.1", "homepage": "https://github.com/rallyapps/rally-app-builder", "repository": { "type": "git", @@ -19,13 +19,12 @@ "coffee-script": "1.4.x", "commander": "0.6.x", "express": "4.2.x", - "fetch-github-repo": "0.1.2", - "grunt": "~0.4.5", - "grunt-cli": "~0.1.9", - "grunt-contrib-clean": "0.4.x", - "grunt-contrib-concat": "0.3.x", - "grunt-contrib-jasmine": "0.4.x", - "grunt-contrib-watch": "~0.4.4", + "grunt": "1.0.1", + "grunt-cli": "1.2.0", + "grunt-contrib-clean": "1.0.0", + "grunt-contrib-concat": "1.0.1", + "grunt-contrib-jasmine": "1.1.0", + "grunt-contrib-watch": "1.0.0", "handlebars": "~1.0.11", "jshint": "~2.9.2", "less": "~1.7.0", @@ -34,14 +33,15 @@ "node-watch": "~0.3.4", "open": "~0.0.5", "promise-to-validate": "~0.3.0", + "rally-fetch-github-repo": "0.2.2", "request": "~2.11.4", "shelljs": "^0.3.0", "uglify-js": "2.7.3", "yargs": "4.3.1" }, "devDependencies": { - "mocha": "1.6.x", - "wrench": "1.3.x", + "fs-extra": "2.0.0", + "mocha": "3.2.x", "sinon": "^1.10.2" }, "scripts": { diff --git a/templates/package.json b/templates/package.json index 0651380..32527ee 100644 --- a/templates/package.json +++ b/templates/package.json @@ -3,11 +3,11 @@ "version": "0.1.1", "private": true, "devDependencies": { - "grunt": "~0.4.5", - "grunt-cli": "~0.1.9", + "grunt": "1.0.1", + "grunt-cli": "1.2.0", "grunt-contrib-jasmine": "1.0.3", - "grunt-contrib-jshint": "~0.7.2", - "grunt-contrib-connect": "0.11.2", + "grunt-contrib-jshint": "1.1.0", + "grunt-contrib-connect": "1.0.2", "rally-sdk2-test-utils": "0.1.2" }, "scripts": { diff --git a/test/build.test.coffee b/test/build.test.coffee index 7d84f30..0414190 100644 --- a/test/build.test.coffee +++ b/test/build.test.coffee @@ -1,7 +1,7 @@ assert = require 'assert' rallyAppBuilder = require '../index' fs = require 'fs' -wrench = require 'wrench' +fsextra = require 'fs-extra' path = require 'path' sinon = require 'sinon' shell = require 'shelljs' @@ -18,7 +18,7 @@ sdk2WithExternalStylesDirectory = path.join(tempTestDirectory, 'sdk2WithExternal describe 'Build an App', ()-> before (done)-> try - copy = ()-> wrench.copyDirRecursive(fixturesDirectory, tempTestDirectory, done) + copy = ()-> fsextra.copy(fixturesDirectory, tempTestDirectory, done) fs.mkdir(tempTestDirectory, copy) catch e after (done)-> @@ -205,7 +205,7 @@ describe 'Build an App', ()-> assert(appDebugFileContents.indexOf("http://www.regular.com/stuff.css") >= 0) describe 'with build scripts', -> - + beforeEach -> @config = require('../lib/config') @@ -246,7 +246,7 @@ describe 'Build an App', ()-> afterEach -> @sandbox.restore() - + it 'should push and pop the app path directory', (done)-> rallyAppBuilder.build.runScript {scripts: {prebuild: 'cmd'}}, 'appPath', 'prebuild', (err)-> assert(shell.pushd.calledWith('appPath')) @@ -254,10 +254,10 @@ describe 'Build an App', ()-> assert(shell.popd.called) assert(shell.exec.calledBefore(shell.popd)) done() - + it 'should exec the script step', (done)-> rallyAppBuilder.build.runScript {scripts: {prebuild: 'cmd'}}, 'appPath', 'prebuild', (err)-> - assert(shell.exec.calledWith('cmd')) + assert(shell.exec.calledWith('cmd')) done() it 'should error if attempting and undefined step', (done)-> @@ -270,4 +270,3 @@ describe 'Build an App', ()-> assert(not err?) assert(not shell.exec.called) done() - diff --git a/test/clone.test.coffee b/test/clone.test.coffee index dab539f..4bec950 100644 --- a/test/clone.test.coffee +++ b/test/clone.test.coffee @@ -2,7 +2,7 @@ assert = require 'assert' rallyAppBuilder = require '../index' fs = require 'fs' path = require 'path' -wrench = require 'wrench' +fsextra = require 'fs-extra' if process.env.TRAVIS console.log "Clone tests not ran during Travis build process due to timeouts." return @@ -24,7 +24,7 @@ describe('Clone existing App', ()-> done(e) after ()-> try - wrench.rmdirSyncRecursive(baseDir) + fsextra.removeSync(baseDir) catch e it('should delete the RakeFile', ()-> diff --git a/test/css.test.coffee b/test/css.test.coffee index 62a97c6..a765def 100644 --- a/test/css.test.coffee +++ b/test/css.test.coffee @@ -47,10 +47,10 @@ describe 'CSS', -> describe '#compileInPlace', -> fs = require 'fs' path = require 'path' - wrench = require 'wrench' + fsextra = require 'fs-extra' tempTestDirectory = 'test/buildTemp' beforeEach -> - wrench.rmdirSyncRecursive tempTestDirectory + fsextra.removeSync tempTestDirectory fs.mkdirSync tempTestDirectory it 'should leave a css file alone', (done) -> @@ -70,4 +70,3 @@ describe 'CSS', -> assert content == writtenFile assert fs.existsSync writtenFile done() - diff --git a/test/init.test.coffee b/test/init.test.coffee index c14fcde..db6b5f8 100644 --- a/test/init.test.coffee +++ b/test/init.test.coffee @@ -1,7 +1,7 @@ assert = require 'assert' rallyAppBuilder = require '../index' fs = require 'fs' -wrench = require 'wrench' +fsextra = require 'fs-extra' describe('Init new App', ()-> baseDir = 'test/initTemp' @@ -11,7 +11,7 @@ describe('Init new App', ()-> catch e after ()-> try - wrench.rmdirSyncRecursive(baseDir) + fsextra.removeSync(baseDir) catch e it('tests files created', (done)->