You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2013/05/07 17:18:46 UTC
[09/30] git commit: [ios] remove external hosts fix
[ios] remove external hosts fix
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/33d79bab
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/33d79bab
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/33d79bab
Branch: refs/heads/future
Commit: 33d79bab5020d9de1e04dd51ebdaff937600f2cc
Parents: 375459c
Author: Brett Rudd <br...@gmail.com>
Authored: Wed Apr 17 14:19:44 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 22 16:28:05 2013 -0700
----------------------------------------------------------------------
platforms/ios.js | 3 ++-
test/android-one-install.js | 4 ++--
test/android-two-install.js | 2 +-
test/ios-plist-install.js | 2 +-
test/ios-plist-uninstall.js | 4 +---
test/plugins/ChildBrowser/plugin.xml | 2 +-
6 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/33d79bab/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index 8b13d4a..a1e5b57 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -273,10 +273,11 @@ function updatePlistFile(action, config_path, plugin_et) {
for(i=0; i < plistObj.ExternalHosts.length;i++) {
matched = false;
hosts && hosts.forEach(function(host) {
- if(host === plistObj.ExternalHosts[i]) {
+ if(host.attrib.origin === plistObj.ExternalHosts[i]) {
matched = true;
}
});
+
if (!matched) {
external_hosts.push(plistObj.ExternalHosts[i]);
}
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/33d79bab/test/android-one-install.js
----------------------------------------------------------------------
diff --git a/test/android-one-install.js b/test/android-one-install.js
index bb8b2a6..8c889f4 100644
--- a/test/android-one-install.js
+++ b/test/android-one-install.js
@@ -140,7 +140,7 @@ exports['should add whitelist hosts'] = function (test) {
test.equal(pluginsDoc.findall("access").length, 2, "/access");
test.equal(pluginsDoc.findall("access")[0].attrib["origin"], "build.phonegap.com")
- test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "12345.s3.amazonaws.com")
+ test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "s3.amazonaws.com")
test.done();
}
@@ -153,7 +153,7 @@ exports['should search/replace plugin.xml'] = function (test) {
test.equal(pluginsDoc.findall("access").length, 2, "/access");
test.equal(pluginsDoc.findall("access")[0].attrib["origin"], "build.phonegap.com")
- test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "12345.s3.amazonaws.com")
+ test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "s3.amazonaws.com")
test.done();
}
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/33d79bab/test/android-two-install.js
----------------------------------------------------------------------
diff --git a/test/android-two-install.js b/test/android-two-install.js
index b8b4c9d..cdc6807 100644
--- a/test/android-two-install.js
+++ b/test/android-two-install.js
@@ -152,6 +152,6 @@ exports['should add whitelist hosts'] = function (test) {
test.equal(pluginsDoc.findall("access").length, 3, "/access");
test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "build.phonegap.com")
- test.equal(pluginsDoc.findall("access")[2].attrib["origin"], "12345.s3.amazonaws.com")
+ test.equal(pluginsDoc.findall("access")[2].attrib["origin"], "s3.amazonaws.com")
test.done();
}
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/33d79bab/test/ios-plist-install.js
----------------------------------------------------------------------
diff --git a/test/ios-plist-install.js b/test/ios-plist-install.js
index 12e0791..5adcfb5 100644
--- a/test/ios-plist-install.js
+++ b/test/ios-plist-install.js
@@ -134,7 +134,7 @@ exports['should edit PhoneGap.plist'] = function (test) {
test.equal(obj.ExternalHosts.length, 2)
test.equal(obj.ExternalHosts[0], "build.phonegap.com")
- test.equal(obj.ExternalHosts[1], "12345.s3.amazonaws.com")
+ test.equal(obj.ExternalHosts[1], "s3.amazonaws.com")
test.done();
}
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/33d79bab/test/ios-plist-uninstall.js
----------------------------------------------------------------------
diff --git a/test/ios-plist-uninstall.js b/test/ios-plist-uninstall.js
index fd6ed9e..598c439 100644
--- a/test/ios-plist-uninstall.js
+++ b/test/ios-plist-uninstall.js
@@ -134,9 +134,7 @@ exports['should edit PhoneGap.plist'] = function (test) {
test.notEqual(obj.Plugins['com.phonegap.plugins.childbrowser'],
'ChildBrowserCommand');
- test.equal(obj.ExternalHosts.length, 2)
- test.equal(obj.ExternalHosts[0], "build.phonegap.com")
- test.equal(obj.ExternalHosts[1], "12345.s3.amazonaws.com")
+ test.equal(obj.ExternalHosts.length, 0)
test.done();
}
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/33d79bab/test/plugins/ChildBrowser/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/ChildBrowser/plugin.xml b/test/plugins/ChildBrowser/plugin.xml
index fef4bdd..25524e2 100644
--- a/test/plugins/ChildBrowser/plugin.xml
+++ b/test/plugins/ChildBrowser/plugin.xml
@@ -29,7 +29,7 @@
<asset src="www/childbrowser" target="childbrowser" />
<access origin="build.phonegap.com" />
- <access origin="$APP_ID.s3.amazonaws.com" />
+ <access origin="s3.amazonaws.com" />
<!-- android -->
<platform name="android">