Skip to content

Commit

Permalink
Fix: identifiers with slashes are now permitted
Browse files Browse the repository at this point in the history
  • Loading branch information
branneman committed Jan 4, 2016
1 parent 0db3442 commit 2b3c56b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions app/action-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ module.exports = function add(id) {
var success = true;
var shots = 0;

id = id.replace('/', '-');

var baseDir = config.base + '/' + id;
if (util.directoryExists(baseDir)) {
rimraf.sync(baseDir);
Expand Down
3 changes: 0 additions & 3 deletions app/action-compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ module.exports = function compare(id1, id2, cb) {

var config = cfgLoader.getConfig();

id1 = id1.replace('/', '-');
id2 = id2.replace('/', '-');

var diffDirectory = config.base + '/diff_' + id1 + '_' + id2;
var dir1 = glob.sync(config.base + '/' + id1 + '/**/*.png');
var dir2 = glob.sync(config.base + '/' + id2 + '/**/*.png');
Expand Down
3 changes: 3 additions & 0 deletions app/configLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,14 @@ function _parseCliPositionalArguments(argv) {

// `argus-eyes add develop`
if (posArgs.length === 2 && posArgs[0] === 'add') {
posArgs[1] = posArgs[1].replace('/', '-');
return ['add', posArgs[1]];
}

// `argus-eyes compare develop current`
if (posArgs.length === 3 && posArgs[0] === 'compare') {
posArgs[1] = posArgs[1].replace('/', '-');
posArgs[2] = posArgs[2].replace('/', '-');
if (posArgs[1] === posArgs[2]) {
throw new Error('You cannot compare a set with itself');
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "argus-eyes",
"version": "0.3.2",
"version": "0.3.3",
"description": "A cli tool for taking and comparing screenshots, useful for visual regression testing",
"main": "bin/argus-eyes.js",
"bin": {
Expand Down

0 comments on commit 2b3c56b

Please sign in to comment.