You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2016/01/07 08:42:46 UTC

[1/5] cordova-lib git commit: Add recursive install check and tests to prove it.

Repository: cordova-lib
Updated Branches:
  refs/heads/master 5eb351e08 -> 0d2c2ec17


Add recursive install check and tests to prove it.


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/9b767b5b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/9b767b5b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/9b767b5b

Branch: refs/heads/master
Commit: 9b767b5b1b94823114f1bcb6b2e943b1aeb56a5b
Parents: 0b0dee5
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Jul 22 17:08:48 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jul 22 17:08:48 2015 -0700

----------------------------------------------------------------------
 cordova-lib/spec-plugman/fetch.spec.js          | 16 +++++++++++
 .../plugins/recursivePlug/asset.txt             |  1 +
 .../plugins/recursivePlug/plugin.xml            | 30 ++++++++++++++++++++
 cordova-lib/src/plugman/fetch.js                |  5 ++++
 4 files changed, 52 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9b767b5b/cordova-lib/spec-plugman/fetch.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/fetch.spec.js b/cordova-lib/spec-plugman/fetch.spec.js
index cfc3104..97c6189 100644
--- a/cordova-lib/spec-plugman/fetch.spec.js
+++ b/cordova-lib/spec-plugman/fetch.spec.js
@@ -239,6 +239,22 @@ describe('fetch', function() {
         });
     });
 
+    describe('fetch recursive error CB-8809', function(){
+
+        var srcDir = path.join(__dirname, 'plugins/recursivePlug');
+        var appDir = path.join(__dirname, 'plugins/recursivePlug/demo');
+
+        it('should skip copy to avoid recursive error', function(done) {
+
+            var cp = spyOn(shell, 'cp').andCallFake(function(){});
+
+            wrapper(fetch(srcDir, appDir),done, function() {
+                expect(cp).not.toHaveBeenCalled();
+            });
+        });
+
+    });
+
     describe('registry plugins', function() {
         var pluginId = 'dummyplugin', sFetch;
         var rm, sym, save_metadata;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9b767b5b/cordova-lib/spec-plugman/plugins/recursivePlug/asset.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/recursivePlug/asset.txt b/cordova-lib/spec-plugman/plugins/recursivePlug/asset.txt
new file mode 100644
index 0000000..3ba44e4
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/recursivePlug/asset.txt
@@ -0,0 +1 @@
+//asset file
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9b767b5b/cordova-lib/spec-plugman/plugins/recursivePlug/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/recursivePlug/plugin.xml b/cordova-lib/spec-plugman/plugins/recursivePlug/plugin.xml
new file mode 100644
index 0000000..ea130e5
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/recursivePlug/plugin.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="test-recursive"
+    version="1.0.0">
+
+    <name>test recursive</name>
+
+    <asset src="asset.txt" target="asset.txt" />
+
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9b767b5b/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index 5003611..f1c734b 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -272,6 +272,11 @@ function copyPlugin(pinfo, plugins_dir, link) {
         return altDest;
     }
 
+    if(!link && dest.indexOf(path.resolve(plugin_dir)) == 0) {
+        events.emit('verbose', 'Copy plugin destination is child of src. Forcing --link mode.');
+        link = true;
+    }
+
     shell.rm('-rf', dest);
     if (link) {
         var isRelativePath = plugin_dir.charAt(1) != ':' && plugin_dir.charAt(0) != path.sep;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/5] cordova-lib git commit: Use '===' to compare with '0'

Posted by pu...@apache.org.
Use '===' to compare with '0'


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/3cb42206
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/3cb42206
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/3cb42206

Branch: refs/heads/master
Commit: 3cb42206c003a531730452f33882c8445bf3401e
Parents: 9b767b5
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Jul 22 17:12:16 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jul 22 17:12:16 2015 -0700

----------------------------------------------------------------------
 cordova-lib/src/plugman/fetch.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3cb42206/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index f1c734b..d3a1e72 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -272,7 +272,7 @@ function copyPlugin(pinfo, plugins_dir, link) {
         return altDest;
     }
 
-    if(!link && dest.indexOf(path.resolve(plugin_dir)) == 0) {
+    if(!link && dest.indexOf(path.resolve(plugin_dir)) === 0) {
         events.emit('verbose', 'Copy plugin destination is child of src. Forcing --link mode.');
         link = true;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[5/5] cordova-lib git commit: Cleanup. Close #98. Close #216.

Posted by pu...@apache.org.
Cleanup. Close #98. Close #216.


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/0d2c2ec1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/0d2c2ec1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/0d2c2ec1

Branch: refs/heads/master
Commit: 0d2c2ec17a0c96e17dd5c6c03a72eff47f255b15
Parents: e26d6be
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Jan 6 23:42:37 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jan 6 23:42:37 2016 -0800

----------------------------------------------------------------------

----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[3/5] cordova-lib git commit: add test project config.xml

Posted by pu...@apache.org.
add test project config.xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/abc493d6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/abc493d6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/abc493d6

Branch: refs/heads/master
Commit: abc493d62127225924ab84d8d2d06687e0e7b95d
Parents: 3cb4220
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Jul 23 15:40:56 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Jul 23 15:40:56 2015 -0700

----------------------------------------------------------------------
 .../plugins/recursivePlug/demo/config.xml       | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/abc493d6/cordova-lib/spec-plugman/plugins/recursivePlug/demo/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/plugins/recursivePlug/demo/config.xml b/cordova-lib/spec-plugman/plugins/recursivePlug/demo/config.xml
new file mode 100644
index 0000000..bda996b
--- /dev/null
+++ b/cordova-lib/spec-plugman/plugins/recursivePlug/demo/config.xml
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <name>HelloCordova</name>
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
+        Apache Cordova Team
+    </author>
+    <content src="index.html" />
+    <access origin="*" />
+    <allow-intent href="http://*/*" />
+    <allow-intent href="https://*/*" />
+    <allow-intent href="tel:*" />
+    <allow-intent href="sms:*" />
+    <allow-intent href="mailto:*" />
+    <allow-intent href="geo:*" />
+    <platform name="android">
+        <allow-intent href="market:*" />
+    </platform>
+    <platform name="ios">
+        <allow-intent href="itms:*" />
+        <allow-intent href="itms-apps:*" />
+    </platform>
+</widget>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[4/5] cordova-lib git commit: Merge branch 'CB-8809' of https://github.com/purplecabbage/cordova-lib

Posted by pu...@apache.org.
Merge branch 'CB-8809' of https://github.com/purplecabbage/cordova-lib


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/e26d6be9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/e26d6be9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/e26d6be9

Branch: refs/heads/master
Commit: e26d6be916498b64755279ba9f102b5d30849f51
Parents: 5eb351e abc493d
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Jan 6 23:37:06 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jan 6 23:37:06 2016 -0800

----------------------------------------------------------------------
 cordova-lib/spec-plugman/fetch.spec.js          | 16 +++++++++++
 .../plugins/recursivePlug/asset.txt             |  1 +
 .../plugins/recursivePlug/demo/config.xml       | 25 ++++++++++++++++
 .../plugins/recursivePlug/plugin.xml            | 30 ++++++++++++++++++++
 cordova-lib/src/plugman/fetch.js                |  5 ++++
 5 files changed, 77 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e26d6be9/cordova-lib/spec-plugman/fetch.spec.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e26d6be9/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org