Github user vladimir-kotikov commented on a diff in the pull request:
https://github.com/apache/cordova-paramedic/pull/17#discussion_r81724529
--- Diff: lib/PluginsManager.js ---
@@ -41,16 +43,31 @@ PluginsManager.prototype.installTestsForExistingPlugins
= function () {
installedPlugins.forEach(function(plugin) {
// there is test plugin available
if (fs.existsSync(path.join(plugin.dir, 'tests', 'plugin.xml'))) {
- me.installSinglePlugin(path.join(plugin.dir, 'tests'));
+ var additionalArgs = '';
+ if (plugin.id.indexOf('cordova-plugin-file-transfer') >= 0) {
+ var fileServerUrl =
Server.prototype.getConnectionAddress.bind({
+ externalServerUrl: me.config.getExternalServerUrl()
+ }, me.config.getPlatformId())() + ':5000';
+ additionalArgs += ' --variable
FILETRANSFER_SERVER_ADDRESS=' + fileServerUrl;
+ }
+ me.installSinglePlugin(path.join(plugin.dir, 'tests') +
additionalArgs);
}
});
// this will list installed plugins and their versions
this.showPluginsVersions();
};
PluginsManager.prototype.installSinglePlugin = function (plugin) {
- if (fs.existsSync(path.resolve(this.storedCWD, plugin))) {
- plugin = path.resolve(this.storedCWD, plugin);
+ var pluginPath = plugin;
+ var args = '';
+ // separate plugin name from args
+ var argsIndex = plugin.indexOf(' --');
--- End diff --
Ah, I see. I think you can leave it here but it's worth documenting. Also
please add a note to 'paramedic.js', clarifying that we now support passing
args to `cordova plugin add`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]