Skip to content

Commit

Permalink
feat: change the API for inspect()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dror Ben-Gai authored and darscan committed Jun 19, 2017
1 parent 1ae1bbe commit f2398cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module.exports = {
inspect: inspect,
};

function inspect(root, targetFile, args, options) {
function inspect(root, targetFile, options) {
if (!options) { options = {}; }
var command = options.command || 'python';
return Promise.all([
getMetaData(command, root),
getDependencies(command, root, targetFile, args),
getDependencies(command, root, targetFile, options.args),
])
.then(function (result) {
return {
Expand Down
2 changes: 1 addition & 1 deletion test/inspect.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ test('uses provided exec command', function (t) {
execute.onSecondCall().returns(Promise.resolve('{}'));
t.teardown(execute.restore);

return plugin.inspect('.', 'requirements.txt', null, {
return plugin.inspect('.', 'requirements.txt', {
command: command,
})
.then(function () {
Expand Down

0 comments on commit f2398cb

Please sign in to comment.