[
https://issues.apache.org/jira/browse/CB-8239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276068#comment-14276068
]
ASF GitHub Bot commented on CB-8239:
------------------------------------
Github user jsoref commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/148#discussion_r22900311
--- Diff: cordova-lib/spec-cordova/platform.spec.js ---
@@ -354,22 +359,94 @@ describe('add function', function () {
});
});
- it('fails if there is an error while getting the platform details',
function (done) {
+ it('tries to git-clone if there is an error while getting the platform
details as specified from the command line', function (done) {
- var targets = ['C:\\Projects\\cordova-projects\\cordova-android'];
+ var targets = ['https://github.com/apache/cordova-android'],
+ targetPlatform = 'android',
+ libDir =
'C:\\Projects\\cordova-projects\\cordova-android-clone-directory';
+
+ var cloneGitRepoMock = jasmine.createSpy().andReturn(Q({
+ platform: targetPlatform,
+ libDir: libDir
+ }));
+ platform.__set__('cloneGitRepo', cloneGitRepoMock);
--- End diff --
you're inserting some tabs.
in general, tabs are frowned upon.
> Add support for git urls to 'cordova platform add'
> --------------------------------------------------
>
> Key: CB-8239
> URL: https://issues.apache.org/jira/browse/CB-8239
> Project: Apache Cordova
> Issue Type: New Feature
> Components: CLI, CordovaLib
> Reporter: Omar Mefire
>
> Allow the following scenarios:
> - users can issue 'cordova platform add
> https://github.com/apache/cordova-android.git' and the git repo will be
> cloned and used.
> - users can issue 'cordova platform add
> android@https://github.com/apache/cordova-android.git' and the git repo will
> be cloned and used.
> - users can issue 'cordova platform add android' and if their config.xml file
> contains: '<engine id='android'
> version='https://github.com/apache/cordova-android.git' />, then the git repo
> pointed to by config.xml will be cloned and used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]