You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2015/03/17 20:51:41 UTC

[1/2] cordova-lib git commit: CB-7747 Add `` for App Store on iOS

Repository: cordova-lib
Updated Branches:
  refs/heads/master c217747a9 -> 57d32188f


CB-7747 Add `<allow-intent>` for App Store on iOS


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

Branch: refs/heads/master
Commit: 13ebd31dac87c8ca78f62f325f38e82e915d124a
Parents: c217747
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Mar 5 22:51:10 2015 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Mar 17 15:39:26 2015 -0400

----------------------------------------------------------------------
 cordova-lib/templates/config.xml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/13ebd31d/cordova-lib/templates/config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/config.xml b/cordova-lib/templates/config.xml
index d77e57d..165ba08 100644
--- a/cordova-lib/templates/config.xml
+++ b/cordova-lib/templates/config.xml
@@ -27,5 +27,12 @@
     <allow-intent href="sms:*" />
     <allow-intent href="mailto:*" />
     <allow-intent href="geo:*" />
-    <allow-intent href="market:*" />
+
+    <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


[2/2] cordova-lib git commit: CB-8696 Fix fetching of dependencies with semver constraints rather than exact versions

Posted by ag...@apache.org.
CB-8696 Fix fetching of dependencies with semver constraints rather than exact versions


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

Branch: refs/heads/master
Commit: 57d32188fec3a2f9e078c6c42b362aa01f8993c9
Parents: 13ebd31
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Mar 17 15:51:13 2015 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Mar 17 15:51:13 2015 -0400

----------------------------------------------------------------------
 cordova-lib/spec-plugman/fetch.spec.js | 16 ++++++++--------
 cordova-lib/src/plugman/fetch.js       | 16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/57d32188/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 6b44195..240a37e 100644
--- a/cordova-lib/spec-plugman/fetch.spec.js
+++ b/cordova-lib/spec-plugman/fetch.spec.js
@@ -81,7 +81,7 @@ describe('fetch', function() {
             .then(function() {
                 expect('this call').toBe('fail');
             }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got');
+                expect(''+err).toContain('Expected plugin to have ID "wrongID" but got');
             }).fin(done);
         });
         it('should succeed when the expected ID is correct', function(done) {
@@ -90,11 +90,11 @@ describe('fetch', function() {
             });
         });
         it('should fail when the expected ID with version specified doesn\'t match', function(done) {
-            fetch(test_plugin, temp, { expected_id: 'id@wrongVersion' })
+            fetch(test_plugin, temp, { expected_id: test_plugin_id + '@wrongVersion' })
             .then(function() {
                 expect('this call').toBe('fail');
             }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "id@wrongVersion" but got');
+                expect(''+err).toContain('to satisfy version "wrongVersion" but got');
             }).fin(done);
         });
         it('should succeed when the plugin version specified is correct', function(done) {
@@ -194,7 +194,7 @@ describe('fetch', function() {
             .then(function() {
                 expect('this call').toBe('fail');
             }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got');
+                expect(''+err).toContain('Expected plugin to have ID "wrongID" but got');
             }).fin(done);
         });
         it('should fail when the expected ID with version specified doesn\'t match', function(done) {
@@ -202,7 +202,7 @@ describe('fetch', function() {
             .then(function() {
                 expect('this call').toBe('fail');
             }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "id@wrongVersion" but got');
+                expect(''+err).toContain('Expected plugin to have ID "id" but got');
             }).fin(done);
         });
         it('should succeed when the expected ID is correct', function(done) {
@@ -233,15 +233,15 @@ describe('fetch', function() {
             .then(function() {
                 expect('this call').toBe('fail');
             }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "wrongID" but got');
+                expect(''+err).toContain('Expected plugin to have ID "wrongID" but got');
             }).fin(done);
         });
         it('should fail when the expected ID with version specified doesn\'t match', function(done) {
-            fetch(pluginId, temp, { expected_id: 'id@wrongVersion' })
+            fetch(pluginId, temp, { expected_id: test_plugin_id + '@wrongVersion' })
             .then(function() {
                 expect('this call').toBe('fail');
             }, function(err) {
-                expect(''+err).toContain('Expected fetched plugin to have ID "id@wrongVersion" but got');
+                expect(''+err).toContain('to satisfy version "wrongVersion" but got');
             }).fin(done);
         });
         it('should succeed when the expected ID is correct', function(done) {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/57d32188/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index a5b140c..0d7293e 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -154,15 +154,15 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
 
 
 // Helper function for checking expected plugin IDs against reality.
-function checkID(expected_id, pinfo) {
-    if (!expected_id) return;
-    var id = pinfo.id;
-    // if id with specific version provided, append version to id
-    if (expected_id.split('@').length > 1) {
-        id = id + '@' + pinfo.version;
+function checkID(expectedIdAndVersion, pinfo) {
+    if (!expectedIdAndVersion) return;
+    var expectedId = expectedIdAndVersion.split('@')[0];
+    var expectedVersion = expectedIdAndVersion.split('@')[1];
+    if (expectedId != pinfo.id) {
+        throw new Error('Expected plugin to have ID "' + expectedId + '" but got "' + pinfo.id + '".');
     }
-    if (expected_id != id) {
-        throw new Error('Expected fetched plugin to have ID "' + expected_id + '" but got "' + id + '".');
+    if (expectedVersion && !semver.satisfies(pinfo.version, expectedVersion)) {
+        throw new Error('Expected plugin ' + pinfo.id + ' to satisfy version "' + expectedVersion + '" but got "' + pinfo.version + '".');
     }
 }
 


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