-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct case on commands for case-sensitive filesystems (#235)
This corrects the renaming of command modules for case-sensitive filesystems.
- Loading branch information
1 parent
ffd08ca
commit 5219269
Showing
63 changed files
with
2,822 additions
and
2,158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,8 @@ test.zip | |
testdir.zip | ||
.idea | ||
*.iml | ||
notes--DO-NOT-COMMIT.txt | ||
|
||
**/*.*~ | ||
**/#*.*# | ||
**/node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,45 @@ | ||
/* jshint node: true */ | ||
'use strict'; | ||
"use strict"; | ||
|
||
const util = require('util'), | ||
defaults = require('../defaults'), | ||
options = require('../options'), | ||
command_utils = require('./command-utils'); | ||
const util = require("util"), | ||
defaults = require("../defaults"), | ||
options = require("../options"), | ||
command_utils = require("./command-utils"); | ||
|
||
var descriptor = defaults.defaultDescriptor({ | ||
roleName: { | ||
name: 'Role Name', | ||
name: "Role Name", | ||
required: true, | ||
prompt: true | ||
}, | ||
email: { | ||
name: 'Developer email', | ||
name: "Developer email", | ||
required: true, | ||
prompt: true | ||
} | ||
}); | ||
|
||
module.exports.descriptor = descriptor; | ||
|
||
module.exports.run = function(opts, cb) { | ||
module.exports.run = function (opts, cb) { | ||
options.validateSync(opts, descriptor); | ||
if (opts.debug) { | ||
console.log('assignUserRole: %j', opts); | ||
console.log("assignUserRole: %j", opts); | ||
} | ||
|
||
let body = util.format('id=%s', encodeURIComponent(opts.email)); | ||
let uri = util.format('%s/v1/o/%s/userroles/%s/users', opts.baseuri, opts.organization, opts.roleName); | ||
let body = util.format("id=%s", encodeURIComponent(opts.email)); | ||
let uri = util.format( | ||
"%s/v1/o/%s/userroles/%s/users", | ||
opts.baseuri, | ||
opts.organization, | ||
opts.roleName | ||
); | ||
let requestOptions = { | ||
uri, | ||
method:'POST', | ||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, | ||
body, | ||
json:true | ||
}; | ||
command_utils.run('assignUserRole', opts,requestOptions, cb); | ||
uri, | ||
method: "POST", | ||
headers: { "Content-Type": "application/x-www-form-urlencoded" }, | ||
body, | ||
json: true | ||
}; | ||
command_utils.run("assignUserRole", opts, requestOptions, cb); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.