[1/6] js commit: CB-10424 Incremented package version to -dev

2016-03-18 Thread steven
Repository: cordova-js
Updated Branches:
  refs/heads/4.1.x 291aa8a0d -> 1482f4b4d
  refs/heads/master c517ca811 -> 2fd4bcb84


CB-10424 Incremented package version to -dev


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

Branch: refs/heads/4.1.x
Commit: 533e1bfdbc57d54106ca39a02b21a1909f84fda7
Parents: 291aa8a
Author: Steve Gill 
Authored: Mon Jan 25 16:16:53 2016 -0800
Committer: Steve Gill 
Committed: Mon Jan 25 16:16:53 2016 -0800

--
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/533e1bfd/package.json
--
diff --git a/package.json b/package.json
index 4073ee7..60d7043 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "author": "Gord Tanner  (http://github.com/gtanner)",
   "name": "cordova-js",
   "description": "Cordova JavaScript: a unified JavaScript layer for the 
Cordova suite of projects enabling cross-platform native mobile development of 
applications using HTML, CSS and JavaScript.",
-  "version": "4.1.3",
+  "version": "4.1.4-dev",
   "homepage": "http://cordova.apache.org;,
   "repository": {
 "type": "git",


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



[3/3] cordova-lib git commit: CB-10902 Incremented package version to -dev

2016-03-18 Thread steven
CB-10902 Incremented package version to -dev


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

Branch: refs/heads/master
Commit: 9c7dead50a5a32ff2910903b5d6da6ec96844944
Parents: 31b58d0
Author: Steve Gill 
Authored: Fri Mar 18 12:51:50 2016 -0700
Committer: Steve Gill 
Committed: Fri Mar 18 12:51:50 2016 -0700

--
 cordova-lib/package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9c7dead5/cordova-lib/package.json
--
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 193c226..50dc8f5 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
   "author": "Apache Software Foundation",
   "name": "cordova-lib",
   "description": "Apache Cordova tools core lib and API",
-  "version": "6.1.0",
+  "version": "6.1.1-dev",
   "repository": {
 "type": "git",
 "url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"


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



cordova-plugin-media git commit: Dummy commit, to initiate a CI run on ci.cordova.io

2016-03-18 Thread omefire
Repository: cordova-plugin-media
Updated Branches:
  refs/heads/master 65aa29a6d -> 9b2e3ae65


Dummy commit, to initiate a CI run on ci.cordova.io


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

Branch: refs/heads/master
Commit: 9b2e3ae65913ab6f6d7fe2fead5d6ff0b38e105d
Parents: 65aa29a
Author: Omar Mefire 
Authored: Wed Mar 16 21:51:29 2016 -0700
Committer: Omar Mefire 
Committed: Wed Mar 16 21:51:29 2016 -0700

--
 www/Media.js | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/9b2e3ae6/www/Media.js
--
diff --git a/www/Media.js b/www/Media.js
index 6f496a1..57e4f76 100644
--- a/www/Media.js
+++ b/www/Media.js
@@ -233,4 +233,3 @@ if (cordova.platformId === 'android' || cordova.platformId 
=== 'amazon-fireos' |
 channel.initializationComplete('onMediaPluginReady');
 });
 }
-


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



[1/2] cordova-cli git commit: CB-10902 Updated version and RELEASENOTES.md for release 6.1.0

2016-03-18 Thread steven
Repository: cordova-cli
Updated Branches:
  refs/heads/master b639c693d -> c73f795af


CB-10902 Updated version and RELEASENOTES.md for release 6.1.0


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

Branch: refs/heads/master
Commit: 7b52ffccfbb999a2da8df8e4fd5ddd9e0b25dae6
Parents: b639c69
Author: Steve Gill 
Authored: Thu Mar 17 19:31:11 2016 -0700
Committer: Steve Gill 
Committed: Thu Mar 17 19:31:11 2016 -0700

--
 RELEASENOTES.md | 16 
 package.json|  4 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/7b52ffcc/RELEASENOTES.md
--
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 25f68a2..d4d5155 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,22 @@
 -->
 # Cordova-cli Release Notes
 
+### 6.1.0 (Mar 17, 2016)
+* CB-10902 Updated cordova-lib dependency to 6.1.0
+* Simplify cordova CLI readme
+* CB-10860 avoid node complaining of too many event listener added when 
running tests
+* Fix readme.md - directory structure
+* CB-10673 add `plugin add --force` option.
+* Add Travis CI badge
+* Specify valid `SPDX` license in `package.json`
+* CB-10748 Use `cordova-common.CordovaLogger` in CLI
+* Adding and fixing some whitespace in CLI docs.
+* CB-10348 Update formatting of CLI reference readme
+* CB-10348 CLI reference readme
+* CB-10482 Remove references to **windows8** from cordova-lib/cli
+* CB-10348 CLI doc output tweaks
+* Update help docs - add examples and make them consistent
+
 ### 6.0.0 (Jan 25, 2016)
 * CB-10424 Updated cordova-lib dependency to 6.0.0
 * Remove browserify from experimental flags list

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/7b52ffcc/package.json
--
diff --git a/package.json b/package.json
index 2bbde6f..62b57d0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova",
-  "version": "6.0.1-dev",
+  "version": "6.1.0",
   "preferGlobal": "true",
   "description": "Cordova command line interface tool",
   "main": "cordova",
@@ -30,7 +30,7 @@
   ],
   "dependencies": {
 "ansi": "^0.3.0",
-"cordova-lib": "6.0.0",
+"cordova-lib": "6.1.0",
 "cordova-common": "^1.1.0",
 "q": "1.0.1",
 "nopt": "3.0.1",


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



cordova-plugin-file git commit: CB-10798, CB-10384: Fixing permissions for Marshmallow. This closes #170

2016-03-18 Thread rakatyal
Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 61c0f76f1 -> 1e2593f42


CB-10798, CB-10384: Fixing permissions for Marshmallow. This closes #170


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/1e2593f4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/1e2593f4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/1e2593f4

Branch: refs/heads/master
Commit: 1e2593f42455aa78d7fff7400a834beb37a0683c
Parents: 61c0f76
Author: Raghav Katyal 
Authored: Fri Mar 11 11:03:30 2016 -0800
Committer: Raghav Katyal 
Committed: Fri Mar 18 18:54:33 2016 -0700

--
 src/android/FileUtils.java | 121 ++--
 1 file changed, 90 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/1e2593f4/src/android/FileUtils.java
--
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index aa81fa0..e9169bc 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -73,8 +73,11 @@ public class FileUtils extends CordovaPlugin {
  * Permission callback codes
  */
 
-public static final int READ_PERM = 0;
-public static final int WRITE_PERM = 1;
+public static final int GET_FILE_CALLBACK_CODE = 0;
+public static final int WRITE_CALLBACK_CODE = 1;
+public static final int GET_DIRECTORY_CALLBACK_CODE = 2;
+public static final int WRITE = 3;
+public static final int READ = 4;
 
 public static int UNKNOWN_ERR = 1000;
 
@@ -347,19 +350,17 @@ public class FileUtils extends CordovaPlugin {
 threadhelper( new FileOp( ){
 public void run(JSONArray args) throws JSONException, 
FileNotFoundException, IOException, NoModificationAllowedException {
 String fname=args.getString(0);
+String nativeURL = 
resolveLocalFileSystemURI(fname).getString("nativeURL");
 String data=args.getString(1);
 int offset=args.getInt(2);
 Boolean isBinary=args.getBoolean(3);
-/*
- * If we don't have the package name in the path, we're 
reading and writing to places we need permission for
- */
-if(fname.contains(cordova.getActivity().getPackageName()) 
||
-hasReadPermission()) {
-long fileSize = write(fname, data, offset, isBinary);
-callbackContext.sendPluginResult(new 
PluginResult(PluginResult.Status.OK, fileSize));
+
+if(needPermission(nativeURL, WRITE)) {
+getWritePermission();
 }
 else {
-getWritePermission();
+long fileSize = write(fname, data, offset, isBinary);
+callbackContext.sendPluginResult(new 
PluginResult(PluginResult.Status.OK, fileSize));
 }
 
 }
@@ -433,28 +434,41 @@ public class FileUtils extends CordovaPlugin {
 else if (action.equals("getDirectory")) {
 threadhelper( new FileOp( ){
 public void run(JSONArray args) throws FileExistsException, 
IOException, TypeMismatchException, EncodingException, JSONException {
-String dirname=args.getString(0);
-String path=args.getString(1);
-JSONObject obj = getFile(dirname, path, 
args.optJSONObject(2), true);
-callbackContext.success(obj);
+String dirname = args.getString(0);
+String path = args.getString(1);
+String nativeURL = 
resolveLocalFileSystemURI(dirname).getString("nativeURL");
+boolean containsCreate = (args.isNull(2)) ? false : 
args.getJSONObject(2).optBoolean("create", false);
+
+if(containsCreate && needPermission(nativeURL, WRITE)) {
+getPermissionDir(WRITE);
+}
+else if(!containsCreate && needPermission(nativeURL, 
READ)) {
+getPermissionDir(READ);
+}
+else {
+JSONObject obj = getFile(dirname, path, 
args.optJSONObject(2), true);
+callbackContext.success(obj);
+}
 }
 }, rawArgs, callbackContext);
 }
 else if (action.equals("getFile")) {
 threadhelper( new FileOp( ){
 public void run(JSONArray args) throws 

[3/5] docs commit: Converted all markdown code blocks in dev to GFM fenced blocks

2016-03-18 Thread dblotsky
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/a65e8109/www/docs/en/dev/plugin_ref/spec.md
--
diff --git a/www/docs/en/dev/plugin_ref/spec.md 
b/www/docs/en/dev/plugin_ref/spec.md
index 3d06e6c..e4d99cd 100644
--- a/www/docs/en/dev/plugin_ref/spec.md
+++ b/www/docs/en/dev/plugin_ref/spec.md
@@ -35,7 +35,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   version(string) | *Required*  A version number for the plugin. 
[Semver](http://semver.org/) syntax is supported.
 
   Example:
-  ```
+  ```xml
   
   http://apache.org/cordova/ns/plugins/1.0;
   xmlns:android="http://schemas.android.com/apk/res/android;
@@ -55,21 +55,21 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   platform(string) | **For custom frameworks only**  *Required*  The 
platforms your framework supports. You may use the wildcard `*` to say 
supported for all platforms, specify multiple with a pipe character like 
`android|ios|blackberry10` or just a single platform like `android`.
 
   Examples:
-  ```
+  ```xml
   
 
   
   ```
 
   Engine elements may also specify fuzzy matches using '>', '>=' etc. to avoid 
repetition, and to reduce maintenance when the underlying platform is updated.
-  ```
+  ```xml
   
 
-
+  
   ```
 
   The `` tags also has default support for all of the main platforms 
Cordova exists on. Specifying the cordova engine tag means that all versions of 
Cordova on any platform must satisfy the engine version attribute. You may also 
list specific platforms and their versions in order to override the catch-all 
cordova engine:
-  ```
+  ```xml
   
 
 
@@ -78,7 +78,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   ```
 
   Custom frameworks example:
-  ```
+  ```xml
   
 
 
@@ -91,7 +91,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   The `name` element is used to specify the name of the plugin. This element 
does not (yet) handle localization.
 
   Example:
-  ```
+  ```xml
   Foo
   ```
 
@@ -100,7 +100,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   The `description` element is used to specify the description of the plugin. 
This element does not (yet) handle localization.
 
   Example:
-  ```
+  ```xml
   Foo plugin description
   ```
 
@@ -109,7 +109,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   The content of the `author` element contains the name of the plugin author.
 
   Example:
-  ```
+  ```xml
   Foo plugin author
   ```
 
@@ -118,7 +118,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   The content of the `keywords` element contains comma separated keywords to 
describe the plugin.
 
   Example:
-  ```
+  ```xml
   foo,bar
   ```
 
@@ -127,7 +127,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   This element is used to specify the license of the plugin.
 
   Example:
-  ```
+  ```xml
   Apache 2.0 License
   ```
 
@@ -140,8 +140,8 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   src(string) | *Required*   Where the file or directory is located in 
the plugin package, relative to the `plugin.xml` document. If a file does not 
exist at the specified src location, the CLI stops and reverses the 
installation process, issues a notification about the conflict, and exits with 
a non-zero code.
   target(string) | *Required*  Where the file or directory should be 
located in the Cordova app, relative to the `www` directory. If a file already 
exists at the target location, the CLI stops and reverses the installation 
process, issues a notification about the conflict, and exits with a non-zero 
code.
 
-  Examples: 
-  ```
+  Examples:
+  ```xml
   
   
   
@@ -149,7 +149,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   ```
 
   Assets can be targeted to subdirectories as well. This will create the 
`js/experimental` directory within the `www` directory, unless already present, 
and copy the `new-foo.js` file and renames it to `foo.js`.
-  ```
+  ```xml
   
   ```
 
@@ -165,7 +165,7 @@ Plugin.xml file defines the structure and settings required 
for your plugin. It
   Example:
 
   When installing a plugin with the example below, socket.js is copied to 
`www/plugins/my-plugin-id/socket.js`, and added as an entry to 
`www/cordova_plugins.js`. At load time, code in `cordova.js` uses XHR to read 
each file and inject a 

docs commit: CB-10907: Removing prettify reference in index.js

2016-03-18 Thread rknoll
Repository: cordova-docs
Updated Branches:
  refs/heads/master 4d62f605f -> de821170a


CB-10907: Removing prettify reference in index.js

This closes #563


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

Branch: refs/heads/master
Commit: de821170ae22ac67c57bea49649a9a7b7a543fb1
Parents: 4d62f60
Author: Richard Knoll 
Authored: Fri Mar 18 17:06:19 2016 -0700
Committer: Richard Knoll 
Committed: Fri Mar 18 18:24:03 2016 -0700

--
 www/static/js/index.js | 7 ---
 1 file changed, 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/de821170/www/static/js/index.js
--
diff --git a/www/static/js/index.js b/www/static/js/index.js
index 06230be..faf85cb 100644
--- a/www/static/js/index.js
+++ b/www/static/js/index.js
@@ -206,11 +206,4 @@ $(document).ready(function () {
 submitJiraSearchForm();
 }
 });
-
-// add prettyprint class to code blocks for prettify.js
-var all_code = $('pre');
-all_code.attr('class', 'prettyprint');
-
-// run syntax highlighter
-prettyPrint();
 });


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



[17/37] cordova-lib git commit: CB-10314 avoid fetching plugins when oldId is already fetched

2016-03-18 Thread steven
CB-10314 avoid fetching plugins when oldId is already fetched

This closes #396


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

Branch: refs/heads/common-1.1.x
Commit: 618eeca9583defa81054158ac456674fe5c5b1d0
Parents: 8f15136
Author: Byoungro So 
Authored: Sat Feb 20 21:48:13 2016 -0800
Committer: Vladimir Kotikov 
Committed: Sat Mar 5 14:24:40 2016 +0300

--
 cordova-lib/src/plugman/fetch.js   | 45 ++-
 cordova-lib/src/plugman/install.js | 54 ++---
 2 files changed, 60 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/618eeca9/cordova-lib/src/plugman/fetch.js
--
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index 8a48626..a6f5eda 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -135,13 +135,33 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
 var splitVersion = plugin_src.split('@');
 var newID = pluginMapperotn[splitVersion[0]];
 if(newID) {
-events.emit('warn', 'Notice: ' + splitVersion[0] + ' has been 
automatically converted to ' + newID + ' to be fetched from npm. This is due to 
our old plugins registry shutting down.');
 plugin_src = newID;
 if (splitVersion[1]) {
 plugin_src += '@'+splitVersion[1];
 }
-} 
-return registry.fetch([plugin_src])
+}
+var P, skipCopyingPlugin;
+plugin_dir = path.join(plugins_dir, splitVersion[0]);
+// if the plugin has already been fetched, use it.
+if (fs.existsSync(plugin_dir)) {
+P = Q(plugin_dir);
+skipCopyingPlugin = true;
+} else {
+// if the plugin alias has already been fetched, use it.
+var alias = pluginMappernto[splitVersion[0]] || newID;
+if (alias && fs.existsSync(path.join(plugins_dir, alias))) {
+events.emit('warn', 'Found '+alias+' is already fetched. 
Skipped fetching '+splitVersion[0]);
+P = Q(path.join(plugins_dir, alias));
+skipCopyingPlugin = true;
+} else {
+if (newID) {
+events.emit('warn', 'Notice: ' + splitVersion[0] + ' 
has been automatically converted to ' + newID + ' to be fetched from npm. This 
is due to our old plugins registry shutting down.');
+}
+P = registry.fetch([plugin_src]);
+skipCopyingPlugin = false;
+}
+}
+return P
 .fail(function (error) {
 var message = 'Failed to fetch plugin ' + plugin_src + ' via 
registry.' +
 '\nProbably this is either a connection problem, or plugin 
spec is incorrect.' +
@@ -151,17 +171,23 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
 })
 .then(function(dir) {
 return {
-pinfo: pluginInfoProvider.get(dir),
+pinfo: pluginInfoProvider.get(dir),
 fetchJsonSource: {
 type: 'registry',
 id: plugin_src
-}
+},
+skipCopyingPlugin: skipCopyingPlugin
 };
 });
 }).then(function(result) {
 options.plugin_src_dir = result.pinfo.dir;
-return Q.when(copyPlugin(result.pinfo, plugins_dir, options.link 
&& result.fetchJsonSource.type == 'local'))
-.then(function(dir) {
+var P;
+if (result.skipCopyingPlugin) {
+P = Q(options.plugin_src_dir);
+} else {
+P = Q.when(copyPlugin(result.pinfo, plugins_dir, options.link 
&& result.fetchJsonSource.type == 'local'));
+}
+return P.then(function(dir) {
 result.dest = dir;
 return result;
 });
@@ -182,7 +208,10 @@ function checkID(expectedIdAndVersion, pinfo) {
 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 + '".');
+var alias = 

[13/37] cordova-lib git commit: CB-10622 fix target attribute being ignored for images in config.xml. This closes #392

2016-03-18 Thread steven
CB-10622 fix target attribute being ignored for images in config.xml. This 
closes #392


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

Branch: refs/heads/common-1.1.x
Commit: 84d4ea0c04b57e0907a9b68a1e9063792a95817b
Parents: 8a5bd8f
Author: Andor Polgari 
Authored: Tue Feb 16 11:17:27 2016 +0100
Committer: Vladimir Kotikov 
Committed: Fri Feb 26 16:22:15 2016 +0300

--
 cordova-common/src/ConfigParser/ConfigParser.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/84d4ea0c/cordova-common/src/ConfigParser/ConfigParser.js
--
diff --git a/cordova-common/src/ConfigParser/ConfigParser.js 
b/cordova-common/src/ConfigParser/ConfigParser.js
index 7abddf6..aae59db 100644
--- a/cordova-common/src/ConfigParser/ConfigParser.js
+++ b/cordova-common/src/ConfigParser/ConfigParser.js
@@ -186,6 +186,7 @@ ConfigParser.prototype = {
 staticResources.forEach(function (elt) {
 var res = {};
 res.src = elt.attrib.src;
+res.target = elt.attrib.target || undefined;
 res.density = elt.attrib['density'] || 
elt.attrib[that.cdvNamespacePrefix+':density'] || elt.attrib['gap:density'];
 res.platform = elt.platform || null; // null means icon represents 
default icon (shared between platforms)
 res.width = +elt.attrib.width || undefined;


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



[06/37] cordova-lib git commit: CB-10641 Adds tests for order of operations in platform add

2016-03-18 Thread steven
CB-10641 Adds tests for order of operations in platform add


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

Branch: refs/heads/common-1.1.x
Commit: b04db5feaf5516836c8a157cc3331b75d6dca0eb
Parents: 3b9face
Author: Vladimir Kotikov 
Authored: Thu Feb 18 13:08:47 2016 +0300
Committer: Vladimir Kotikov 
Committed: Thu Feb 18 13:09:02 2016 +0300

--
 cordova-lib/spec-cordova/platform.spec.js | 22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b04db5fe/cordova-lib/spec-cordova/platform.spec.js
--
diff --git a/cordova-lib/spec-cordova/platform.spec.js 
b/cordova-lib/spec-cordova/platform.spec.js
index de3631a..2c99b4a 100644
--- a/cordova-lib/spec-cordova/platform.spec.js
+++ b/cordova-lib/spec-cordova/platform.spec.js
@@ -26,6 +26,7 @@ var helpers = require('./helpers'),
 Q = require('q'),
 events = require('cordova-common').events,
 cordova = require('../src/cordova/cordova'),
+plugman = require('../src/plugman/plugman'),
 rewire = require('rewire'),
 platform = rewire('../src/cordova/platform.js');
 
@@ -132,9 +133,6 @@ describe('platform end-to-end', function () {
 .then(function() {
 return cordova.raw.platform('add', [helpers.testPlatform]);
 })
-.then(function () {
-return cordova.raw.prepare([helpers.testPlatform]);
-})
 .then(function() {
 // Check the platform add was successful.
 expect(path.join(project, 'platforms', 
helpers.testPlatform)).toExist();
@@ -146,6 +144,24 @@ describe('platform end-to-end', function () {
 })
 .fin(done);
 });
+
+it('should call prepare after plugins were installed into platform', 
function(done) {
+var order = '';
+var fail = jasmine.createSpy(fail);
+spyOn(plugman.raw, 'install').andCallFake(function() { order += 'I'; 
});
+spyOn(cordova.raw, 'prepare').andCallFake(function() { order += 'P'; 
});
+
+cordova.raw.plugin('add', path.join(pluginsDir, 'test'))
+.then(function() {
+return cordova.raw.platform('add', [helpers.testPlatform]);
+})
+.fail(fail)
+.fin(function() {
+expect(order).toBe('IP'); // Install first, then prepare
+expect(fail).not.toHaveBeenCalled();
+done();
+});
+});
 });
 
 describe('add function', function () {


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



[07/37] cordova-lib git commit: CB-10519 Wrap all sync calls inside of `cordova.raw` methods into promises

2016-03-18 Thread steven
CB-10519 Wrap all sync calls inside of `cordova.raw` methods into promises


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

Branch: refs/heads/common-1.1.x
Commit: 4121b11f050d8421ccd42a55ed21a0474039439a
Parents: b04db5f
Author: Vladimir Kotikov 
Authored: Wed Feb 10 15:45:19 2016 +0300
Committer: Vladimir Kotikov 
Committed: Fri Feb 19 14:06:11 2016 +0300

--
 cordova-lib/spec-cordova/build.spec.js   |   6 +-
 cordova-lib/spec-cordova/compile.spec.js |  30 +-
 cordova-lib/spec-cordova/emulate.spec.js |  33 +-
 cordova-lib/spec-cordova/prepare.spec.js |   4 +-
 cordova-lib/src/cordova/build.js |  29 +-
 cordova-lib/src/cordova/clean.js |  31 +-
 cordova-lib/src/cordova/compile.js   |  89 ++---
 cordova-lib/src/cordova/emulate.js   |  38 +-
 cordova-lib/src/cordova/platform.js  | 121 +++
 cordova-lib/src/cordova/plugin.js| 480 +-
 cordova-lib/src/cordova/prepare.js   |  56 +--
 cordova-lib/src/cordova/requirements.js  |  30 +-
 cordova-lib/src/cordova/run.js   |  99 +++---
 cordova-lib/src/cordova/serve.js |  41 +--
 14 files changed, 567 insertions(+), 520 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4121b11f/cordova-lib/spec-cordova/build.spec.js
--
diff --git a/cordova-lib/spec-cordova/build.spec.js 
b/cordova-lib/spec-cordova/build.spec.js
index f5f1b2b..66f0869 100644
--- a/cordova-lib/spec-cordova/build.spec.js
+++ b/cordova-lib/spec-cordova/build.spec.js
@@ -40,7 +40,8 @@ describe('build command', function() {
 describe('failure', function() {
 it('should not run inside a project with no platforms', function(done) 
{
 list_platforms.andReturn([]);
-Q().then(cordova.raw.build).then(function() {
+cordova.raw.build()
+.then(function() {
 expect('this call').toBe('fail');
 }, function(err) {
 expect(err.message).toEqual(
@@ -52,7 +53,8 @@ describe('build command', function() {
 it('should not run outside of a Cordova-based project', function(done) 
{
 is_cordova.andReturn(false);
 
-Q().then(cordova.raw.build).then(function() {
+cordova.raw.build()
+.then(function() {
 expect('this call').toBe('fail');
 }, function(err) {
 expect(err.message).toEqual(

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4121b11f/cordova-lib/spec-cordova/compile.spec.js
--
diff --git a/cordova-lib/spec-cordova/compile.spec.js 
b/cordova-lib/spec-cordova/compile.spec.js
index 7f4e8f6..9f4040f 100644
--- a/cordova-lib/spec-cordova/compile.spec.js
+++ b/cordova-lib/spec-cordova/compile.spec.js
@@ -26,16 +26,9 @@ var supported_platforms = 
Object.keys(platforms).filter(function(p) { return p !
 
 
 describe('compile command', function() {
-var is_cordova, list_platforms, fire, result, cd_project_root, fail, 
platformApi, getPlatformApi;
+var is_cordova, list_platforms, fire, cd_project_root, fail, platformApi, 
getPlatformApi;
 var project_dir = '/some/path';
 
-function wrapper(f, post) {
-runs(function() {
-Q().then(f).then(function() { result = true; }, function(err) { 
result = err; });
-});
-waitsFor(function() { return result; }, 'promise never resolved', 500);
-runs(post);
-}
 beforeEach(function() {
 is_cordova = spyOn(util, 'isCordova').andReturn(project_dir);
 cd_project_root = spyOn(util, 'cdProjectRoot').andReturn(project_dir);
@@ -46,16 +39,29 @@ describe('compile command', function() {
 fail = function (err) { expect(err.stack).not.toBeDefined(); };
 });
 describe('failure', function() {
-it('should not run inside a Cordova-based project with no added 
platforms by calling util.listPlatforms', function() {
+it('should not run inside a Cordova-based project with no added 
platforms by calling util.listPlatforms', function(done) {
 list_platforms.andReturn([]);
-wrapper(cordova.raw.compile, function() {
+var success = jasmine.createSpy('success');
+cordova.raw.compile()
+.then(success, function(result) {
+expect(result instanceof Error).toBe(true);
 expect('' + result).toContain('No platforms added to this 
project. Please use `cordova platform add 

[28/37] cordova-lib git commit: CB-9264 - Duplicate entries in config.xml

2016-03-18 Thread steven
CB-9264 - Duplicate entries in 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/cc916564
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/cc916564
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/cc916564

Branch: refs/heads/common-1.1.x
Commit: cc9165647197e63de43bab0335d4f8fcd07f9858
Parents: 186eea0
Author: Shazron Abdullah 
Authored: Wed Mar 16 14:02:46 2016 -0700
Committer: Shazron Abdullah 
Committed: Wed Mar 16 14:02:46 2016 -0700

--
 cordova-common/spec/util/xml-helpers.spec.js | 22 ++
 cordova-common/src/util/xml-helpers.js   | 23 +++
 2 files changed, 45 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc916564/cordova-common/spec/util/xml-helpers.spec.js
--
diff --git a/cordova-common/spec/util/xml-helpers.spec.js 
b/cordova-common/spec/util/xml-helpers.spec.js
index 8cc46ca..9d714f0 100644
--- a/cordova-common/spec/util/xml-helpers.spec.js
+++ b/cordova-common/spec/util/xml-helpers.spec.js
@@ -267,5 +267,27 @@ describe('xml-helpers', function(){
 expect(testElements.length).toEqual(2);
 
 });
+
+it('should remove duplicate preferences (by name attribute value)', 
function () {
+var testXml = et.XML(
+'\n' +
+'http://www.w3.org/ns/widgets"\n' +
+'xmlns:cdv = "http://cordova.apache.org/ns/1.0"\n' +
+'id= "io.cordova.hellocordova"\n' +
+'version   = "0.0.1">\n' +
+'\n' +
+'\n' +
+'\n' +
+'\n' +
+'\n' +
+'\n' 
+
+'\n' +
+'\n'
+);
+xml_helpers.mergeXml(testXml, dstXml, 'ios');
+var testElements = 
dstXml.findall('preference[@name="Orientation"]');
+expect(testElements.length).toEqual(1);
+});
+
 });
 });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc916564/cordova-common/src/util/xml-helpers.js
--
diff --git a/cordova-common/src/util/xml-helpers.js 
b/cordova-common/src/util/xml-helpers.js
index 8b02989..85d9799 100644
--- a/cordova-common/src/util/xml-helpers.js
+++ b/cordova-common/src/util/xml-helpers.js
@@ -218,6 +218,9 @@ function mergeXml(src, dest, platform, clobber) {
 
 //Handle children
 src.getchildren().forEach(mergeChild);
+
+//Handle duplicate preference tags (by name attribute)
+removeDuplicatePreferences(dest);
 
 function mergeChild (srcChild) {
 var srcTag = srcChild.tag,
@@ -254,6 +257,26 @@ function mergeXml(src, dest, platform, clobber) {
 dest.append(destChild);
 }
 }
+
+function removeDuplicatePreferences(xml) {
+// reduce preference tags to a hashtable to remove dupes
+var prefHash = 
xml.findall('preference[@name][@value]').reduce(function(previousValue, 
currentValue) {
+previousValue[ currentValue.attrib.name ] = 
currentValue.attrib.value;
+return previousValue;
+}, {});
+
+// remove all preferences
+xml.findall('preference[@name][@value]').forEach(function(pref) {
+xml.remove(pref);
+});
+
+// write new preferences
+Object.keys(prefHash).forEach(function(key, index) {
+var element = et.SubElement(xml, 'preference');
+element.set('name', key);
+element.set('value', this[key]);
+}, prefHash);
+}
 }
 
 // Expose for testing.


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



[18/37] cordova-lib git commit: CB-10328 set top-level property when adding new platforms

2016-03-18 Thread steven
CB-10328 set top-level property when adding new platforms

This closes #402


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

Branch: refs/heads/common-1.1.x
Commit: 114de6cd532e2218c1b302ae61bf8e3f50ec749d
Parents: 618eeca
Author: Byoungro So 
Authored: Fri Mar 4 18:51:43 2016 -0800
Committer: Vladimir Kotikov 
Committed: Sat Mar 5 14:50:39 2016 +0300

--
 cordova-lib/spec-cordova/platform.spec.js | 47 ++
 cordova-lib/src/cordova/platform.js   |  8 +++--
 cordova-lib/src/plugman/install.js|  3 +-
 3 files changed, 54 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/114de6cd/cordova-lib/spec-cordova/platform.spec.js
--
diff --git a/cordova-lib/spec-cordova/platform.spec.js 
b/cordova-lib/spec-cordova/platform.spec.js
index 2c99b4a..a35216f 100644
--- a/cordova-lib/spec-cordova/platform.spec.js
+++ b/cordova-lib/spec-cordova/platform.spec.js
@@ -201,3 +201,50 @@ describe('add function', function () {
 });
 });
 });
+
+describe('platform add plugin rm end-to-end', function () {
+
+var tmpDir = helpers.tmpDir('plugin_rm_test');
+var project = path.join(tmpDir, 'hello');
+var pluginsDir = path.join(project, 'plugins');
+
+beforeEach(function() {
+process.chdir(tmpDir);
+});
+
+afterEach(function() {
+process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on 
Windows.
+shell.rm('-rf', tmpDir);
+});
+
+it('should remove dependency when removing parent plugin', function(done) {
+
+cordova.raw.create('hello')
+.then(function() {
+process.chdir(project);
+return cordova.raw.platform('add', 'ios');
+})
+.then(function() {
+return cordova.raw.plugin('add', 'cordova-plugin-media');
+})
+.then(function() {
+expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
+expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
+return cordova.raw.platform('add', 'android');
+})
+.then(function() {
+expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
+expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
+return cordova.raw.plugin('rm', 'cordova-plugin-media');
+})
+.then(function() {
+expect(path.join(pluginsDir, 
'cordova-plugin-media')).not.toExist();
+expect(path.join(pluginsDir, 'cordova-plugin-file')).not.toExist();
+})
+.fail(function(err) {
+console.error(err);
+expect(err).toBeUndefined();
+})
+.fin(done);
+}, 2);
+});

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/114de6cd/cordova-lib/src/cordova/platform.js
--
diff --git a/cordova-lib/src/cordova/platform.js 
b/cordova-lib/src/cordova/platform.js
index 2dff594..d130772 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -644,6 +644,9 @@ function installPluginsForNewPlatform(platform, 
projectRoot, opts) {
 events.emit('verbose', 'Installing plugin "' + plugin + '" 
following successful platform add of ' + platform);
 plugin = path.basename(plugin);
 
+// Get plugin variables from fetch.json if have any and pass them 
as cli_variables to plugman
+var pluginMetadata = 
fetchMetadata.get_fetch_metadata(path.join(plugins_dir, plugin));
+
 var options = {
 searchpath: opts.searchpath,
 // Set up platform to install asset files/js modules to 
/platform_www dir
@@ -654,11 +657,10 @@ function installPluginsForNewPlatform(platform, 
projectRoot, opts) {
 // NOTE: there is another code path for plugin installation 
(see CB-10274 and the
 // related PR: https://github.com/apache/cordova-lib/pull/360) 
so we need to
 // specify the option below in both places
-usePlatformWww: true
+usePlatformWww: true,
+is_top_level: pluginMetadata.is_top_level
 };
 
-// Get plugin variables from fetch.json if have any and pass them 
as cli_variables to plugman
-var pluginMetadata = 
fetchMetadata.get_fetch_metadata(path.join(plugins_dir, plugin));
 var variables = pluginMetadata && 

[27/37] cordova-lib git commit: CB-10694 - Platform-specific configuration preferences don't override global settings

2016-03-18 Thread steven
CB-10694 - Platform-specific configuration preferences don't override global 
settings

Includes jasmine test.


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

Branch: refs/heads/common-1.1.x
Commit: 11d1380537da46639c6dbbe8d32bcd3fa03e9ad8
Parents: 186eea0
Author: Shazron Abdullah 
Authored: Wed Mar 16 10:42:23 2016 -0700
Committer: Shazron Abdullah 
Committed: Wed Mar 16 11:18:31 2016 -0700

--
 cordova-common/spec/util/xml-helpers.spec.js | 21 +
 cordova-common/src/util/xml-helpers.js   |  6 +++---
 2 files changed, 24 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/11d13805/cordova-common/spec/util/xml-helpers.spec.js
--
diff --git a/cordova-common/spec/util/xml-helpers.spec.js 
b/cordova-common/spec/util/xml-helpers.spec.js
index 8cc46ca..59b760a 100644
--- a/cordova-common/spec/util/xml-helpers.spec.js
+++ b/cordova-common/spec/util/xml-helpers.spec.js
@@ -267,5 +267,26 @@ describe('xml-helpers', function(){
 expect(testElements.length).toEqual(2);
 
 });
+
+it('should merge preferences, with platform preferences written last', 
function () {
+var testXml = et.XML(
+'\n' +
+'http://www.w3.org/ns/widgets"\n' +
+'xmlns:cdv = "http://cordova.apache.org/ns/1.0"\n' +
+'id= "io.cordova.hellocordova"\n' +
+'version   = "0.0.1">\n' +
+'\n' +
+'\n' +
+'\n' +
+'\n' +
+'\n'
+);
+xml_helpers.mergeXml(testXml, dstXml, 'ios');
+var testElements = 
dstXml.findall('preference[@name="Orientation"]');
+expect(testElements.length).toEqual(2);
+expect(testElements[0].attrib.value).toEqual('default');
+expect(testElements[1].attrib.value).toEqual('all');
+});
+
 });
 });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/11d13805/cordova-common/src/util/xml-helpers.js
--
diff --git a/cordova-common/src/util/xml-helpers.js 
b/cordova-common/src/util/xml-helpers.js
index 8b02989..487a763 100644
--- a/cordova-common/src/util/xml-helpers.js
+++ b/cordova-common/src/util/xml-helpers.js
@@ -209,6 +209,9 @@ function mergeXml(src, dest, platform, clobber) {
 if (src.text && (clobber || !dest.text)) {
 dest.text = src.text;
 }
+//Handle children
+src.getchildren().forEach(mergeChild);
+
 //Handle platform
 if (platform) {
 src.findall('platform[@name="' + platform + '"]').forEach(function 
(platformElement) {
@@ -216,9 +219,6 @@ function mergeXml(src, dest, platform, clobber) {
 });
 }
 
-//Handle children
-src.getchildren().forEach(mergeChild);
-
 function mergeChild (srcChild) {
 var srcTag = srcChild.tag,
 destChild = new et.Element(srcTag),


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



[02/37] cordova-lib git commit: CB-10550 Fix plugin id mapper not enforced when a version is specified

2016-03-18 Thread steven
CB-10550 Fix plugin id mapper not enforced when a version is specified


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

Branch: refs/heads/common-1.1.x
Commit: 87d8e171a1f0eaa252d6d2510190b51bd56d48ae
Parents: 69178cf
Author: Byoungro So 
Authored: Sun Feb 14 12:52:10 2016 -0800
Committer: Tim Barham 
Committed: Wed Feb 17 13:48:14 2016 +1000

--
 cordova-lib/src/plugman/fetch.js | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/87d8e171/cordova-lib/src/plugman/fetch.js
--
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index dc8e28c..8a48626 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -132,10 +132,14 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
 ));
 }
 // If not found in local search path, fetch from the registry.
-var newID = pluginMapperotn[plugin_src];
+var splitVersion = plugin_src.split('@');
+var newID = pluginMapperotn[splitVersion[0]];
 if(newID) {
-events.emit('warn', 'Notice: ' + plugin_src + ' has been 
automatically converted to ' + newID + ' to be fetched from npm. This is due to 
our old plugins registry shutting down.');
+events.emit('warn', 'Notice: ' + splitVersion[0] + ' has been 
automatically converted to ' + newID + ' to be fetched from npm. This is due to 
our old plugins registry shutting down.');
 plugin_src = newID;
+if (splitVersion[1]) {
+plugin_src += '@'+splitVersion[1];
+}
 } 
 return registry.fetch([plugin_src])
 .fail(function (error) {


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



[03/37] cordova-lib git commit: CB-10518 Correct log level and error messages for some cordova errors

2016-03-18 Thread steven
CB-10518 Correct log level and error messages for some cordova errors

This closes #383


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

Branch: refs/heads/common-1.1.x
Commit: b7920505e56e4371b868bc5f0a3f852d4249fe31
Parents: 87d8e17
Author: Vladimir Kotikov 
Authored: Tue Feb 16 16:20:31 2016 +0300
Committer: Vladimir Kotikov 
Committed: Wed Feb 17 11:54:49 2016 +0300

--
 cordova-lib/src/cordova/compile.js| 5 -
 cordova-lib/src/cordova/create.js | 7 +++
 cordova-lib/src/cordova/run.js| 6 --
 cordova-lib/src/cordova/targets.js| 5 +++--
 cordova-lib/src/hooks/HooksRunner.js  | 4 ++--
 cordova-lib/src/plugman/browserify.js | 8 
 cordova-lib/src/util/unpack.js| 6 +++---
 7 files changed, 15 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b7920505/cordova-lib/src/cordova/compile.js
--
diff --git a/cordova-lib/src/cordova/compile.js 
b/cordova-lib/src/cordova/compile.js
index 7bdabb4..5834925 100644
--- a/cordova-lib/src/cordova/compile.js
+++ b/cordova-lib/src/cordova/compile.js
@@ -19,8 +19,6 @@
 
 var cordova_util = require('./util'),
 HooksRunner  = require('../hooks/HooksRunner'),
-events   = require('cordova-common').events,
-Q= require('q'),
 promiseUtil  = require('../util/promise-util'),
 platform_lib = require('../platforms/platforms');
 
@@ -39,8 +37,5 @@ module.exports = function compile(options) {
 });
 }).then(function() {
 return hooksRunner.fire('after_compile', options);
-}, function(error) {
-events.emit('log', 'ERROR building one of the platforms: ' + error + 
'\nYou may not have the required environment or OS to build this project');
-return Q.reject(error);
 });
 };

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b7920505/cordova-lib/src/cordova/create.js
--
diff --git a/cordova-lib/src/cordova/create.js 
b/cordova-lib/src/cordova/create.js
index 3ad96aa..5d8cef7 100644
--- a/cordova-lib/src/cordova/create.js
+++ b/cordova-lib/src/cordova/create.js
@@ -191,8 +191,7 @@ function create(dir, optionalId, optionalName, cfg) {
 
 return remoteLoad.gitClone(gitURL, branch).fail(
 function(err) {
-events.emit('verbose', err);
-return Q.reject('Failed to retrieve '+ cfg.lib.www.url 
+ ' using git.');
+return Q.reject(new CordovaError('Failed to retrieve 
'+ cfg.lib.www.url + ' using git: ' + err.message));
 }
 );
 } else if (isNPM) {
@@ -210,8 +209,8 @@ function create(dir, optionalId, optionalName, cfg) {
 
 return remoteLoad.npmFetch(packageName, packageVersion).fail(
 function(err) {
-events.emit('verbose', err);
-return Q.reject('Failed to retrieve '+ cfg.lib.www.url 
+ ' using npm.');
+events.emit('warn', err.message);
+return Q.reject(new CordovaError('Failed to retrieve 
'+ cfg.lib.www.url + ' using npm: ' + err.message));
 }
 );
 } else {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b7920505/cordova-lib/src/cordova/run.js
--
diff --git a/cordova-lib/src/cordova/run.js b/cordova-lib/src/cordova/run.js
index 6c6e10d..fcfc9c6 100644
--- a/cordova-lib/src/cordova/run.js
+++ b/cordova-lib/src/cordova/run.js
@@ -19,7 +19,6 @@
 
 var cordova_util = require('./util'),
 HooksRunner  = require('../hooks/HooksRunner'),
-events   = require('cordova-common').events,
 Q= require('q'),
 platform_lib = require('../platforms/platforms');
 
@@ -43,10 +42,5 @@ module.exports = function run(options) {
 }));
 }).then(function() {
 return hooksRunner.fire('after_run', options);
-}, function(error) {
-events.emit('log', 'ERROR running one or more of the platforms: ' + 
error + '\nYou may not have the required environment or OS to run this 
project');
-
-// CB-10567 bubble up `run` error, so the caller still could get 
rejected promise
-return Q.reject(error);
 });
 };

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b7920505/cordova-lib/src/cordova/targets.js

[34/37] cordova-lib git commit: CB-10902 Incremented package version to -dev

2016-03-18 Thread steven
CB-10902 Incremented package version to -dev


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

Branch: refs/heads/common-1.1.x
Commit: 9c7dead50a5a32ff2910903b5d6da6ec96844944
Parents: 31b58d0
Author: Steve Gill 
Authored: Fri Mar 18 12:51:50 2016 -0700
Committer: Steve Gill 
Committed: Fri Mar 18 12:51:50 2016 -0700

--
 cordova-lib/package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9c7dead5/cordova-lib/package.json
--
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 193c226..50dc8f5 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
   "author": "Apache Software Foundation",
   "name": "cordova-lib",
   "description": "Apache Cordova tools core lib and API",
-  "version": "6.1.0",
+  "version": "6.1.1-dev",
   "repository": {
 "type": "git",
 "url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"


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



[14/37] cordova-lib git commit: CB-10662 Add tests for ConfigParser.getStaticResources

2016-03-18 Thread steven
CB-10662 Add tests for ConfigParser.getStaticResources


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

Branch: refs/heads/common-1.1.x
Commit: cda2b72b81bf26670674b8965381ee4534bdc8e9
Parents: 84d4ea0
Author: Vladimir Kotikov 
Authored: Fri Feb 26 17:41:03 2016 +0300
Committer: Vladimir Kotikov 
Committed: Fri Feb 26 17:43:44 2016 +0300

--
 .../spec/ConfigParser/ConfigParser.spec.js  | 49 
 cordova-common/spec/fixtures/test-config.xml|  7 +++
 2 files changed, 56 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cda2b72b/cordova-common/spec/ConfigParser/ConfigParser.spec.js
--
diff --git a/cordova-common/spec/ConfigParser/ConfigParser.spec.js 
b/cordova-common/spec/ConfigParser/ConfigParser.spec.js
index f4eace7..097fe61 100644
--- a/cordova-common/spec/ConfigParser/ConfigParser.spec.js
+++ b/cordova-common/spec/ConfigParser/ConfigParser.spec.js
@@ -228,5 +228,54 @@ describe('config.xml parser', function () {
 expect(navigations.length).not.toEqual(0);
 });
 });
+describe('static resources', function() {
+var hasPlatformPropertyDefined = function (e) { return 
!!e.platform; };
+var hasSrcPropertyDefined = function (e) { return !!e.src; };
+var hasTargetPropertyDefined = function (e) { return !!e.target; };
+var hasDensityPropertyDefined = function (e) { return !!e.density; 
};
+var hasPlatformPropertyUndefined = function (e) { return 
!e.platform; };
+
+it('should fetch shared resources if platform parameter is not 
specified', function() {
+expect(cfg.getStaticResources(null, 'icon').length).toBe(2);
+expect(cfg.getStaticResources(null, 
'icon').every(hasPlatformPropertyUndefined)).toBeTruthy();
+});
+
+it('should fetch platform-specific resources along with shared if 
platform parameter is specified', function() {
+expect(cfg.getStaticResources('android', 
'icon').length).toBe(5);
+expect(cfg.getStaticResources('android', 
'icon').some(hasPlatformPropertyDefined)).toBeTruthy();
+expect(cfg.getStaticResources('android', 
'icon').filter(hasPlatformPropertyDefined).length).toBe(3);
+expect(cfg.getStaticResources('android', 
'icon').some(hasPlatformPropertyUndefined)).toBeTruthy();
+});
+
+it('should parse resources\' attributes', function() {
+expect(cfg.getStaticResources(null, 
'icon').every(hasSrcPropertyDefined)).toBeTruthy();
+expect(cfg.getStaticResources('windows', 
'icon').filter(hasPlatformPropertyDefined).every(hasTargetPropertyDefined)).toBeTruthy();
+expect(cfg.getStaticResources('android', 
'icon').filter(hasPlatformPropertyDefined).every(hasDensityPropertyDefined)).toBeTruthy();
+expect(cfg.getStaticResources('android', 
'icon').filter(hasPlatformPropertyDefined).every(hasDensityPropertyDefined)).toBeTruthy();
+});
+
+it('should have defaultResource property', function() {
+expect(cfg.getStaticResources(null, 
'icon').defaultResource).toBeDefined();
+expect(cfg.getStaticResources(null, 
'icon').defaultResource.src).toBe('icon.png');
+});
+
+it('should have getDefault method returning defaultResource 
property', function() {
+expect(cfg.getStaticResources(null, 
'icon').defaultResource).toEqual(cfg.getStaticResources(null, 
'icon').getDefault());
+});
+
+it('should have getBySize method returning resource with size 
specified or null', function() {
+expect(cfg.getStaticResources('windows', 
'icon').getBySize(128)).toBe(null);
+expect(cfg.getStaticResources('windows', 
'icon').getBySize(72)).toBeDefined();
+expect(cfg.getStaticResources('windows', 
'icon').getBySize(72).width).toBe(72);
+expect(cfg.getStaticResources('windows', 
'icon').getBySize(null, 48)).toBeDefined();
+expect(cfg.getStaticResources('windows', 
'icon').getBySize(null, 48).height).toBe(48);
+});
+
+it('should have getByDensity method returning resource with 
density specified or null', function() {
+expect(cfg.getStaticResources('android', 
'icon').getByDensity('hdpi')).toBe(null);
+expect(cfg.getStaticResources('android', 

[24/37] cordova-lib git commit: CB-10880: Remove plugin pinning

2016-03-18 Thread steven
CB-10880: Remove plugin pinning

This closes #409


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

Branch: refs/heads/common-1.1.x
Commit: d779242e8acd31231c3be98a941624ad89a5a67c
Parents: 0386ac2
Author: Richard Knoll 
Authored: Thu Mar 10 18:59:53 2016 -0800
Committer: Richard Knoll 
Committed: Tue Mar 15 10:40:07 2016 -0700

--
 cordova-lib/package.json  | 24 
 cordova-lib/src/cordova/plugin.js |  8 +++-
 2 files changed, 3 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d779242e/cordova-lib/package.json
--
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 1d452fa..3e0fadb 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -16,30 +16,6 @@
 "node": ">=0.9.9"
   },
   "engineStrict": true,
-  "cordovaPlugins": {
-"cordova-plugin-battery-status": "~1.1.1",
-"cordova-plugin-camera": "~2.1.0",
-"cordova-plugin-console": "~1.0.2",
-"cordova-plugin-contacts": "~2.0.1",
-"cordova-plugin-device": "~1.1.1",
-"cordova-plugin-device-motion": "~1.2.0",
-"cordova-plugin-device-orientation": "~1.0.2",
-"cordova-plugin-dialogs": "~1.2.0",
-"cordova-plugin-file": "~4.1.0",
-"cordova-plugin-file-transfer": "~1.5.0",
-"cordova-plugin-geolocation": "~2.1.0",
-"cordova-plugin-globalization": "~1.0.2",
-"cordova-plugin-inappbrowser": "~1.2.0",
-"cordova-plugin-legacy-whitelist": "~1.1.1",
-"cordova-plugin-media": "~2.1.0",
-"cordova-plugin-media-capture": "~1.2.0",
-"cordova-plugin-network-information": "~1.2.0",
-"cordova-plugin-splashscreen": "~3.1.0",
-"cordova-plugin-statusbar": "~2.1.0",
-"cordova-plugin-test-framework": "~1.1.1",
-"cordova-plugin-vibration": "~2.1.0",
-"cordova-plugin-whitelist": "~1.2.1"
-  },
   "dependencies": {
 "aliasify": "^1.7.2",
 "cordova-app-hello-world": "3.10.0",

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d779242e/cordova-lib/src/cordova/plugin.js
--
diff --git a/cordova-lib/src/cordova/plugin.js 
b/cordova-lib/src/cordova/plugin.js
index a5398a0..46b84be 100644
--- a/cordova-lib/src/cordova/plugin.js
+++ b/cordova-lib/src/cordova/plugin.js
@@ -326,8 +326,6 @@ function determinePluginTarget(projectRoot, cfg, target, 
fetchOptions) {
 return getFetchVersion(projectRoot, pluginInfo, pkgJson.version);
 })
 .then(function(fetchVersion) {
-// Fallback to pinned version if available
-fetchVersion = fetchVersion || pkgJson.cordovaPlugins[id];
 return fetchVersion ? (id + '@' + fetchVersion) : target;
 });
 }
@@ -588,7 +586,7 @@ function getFetchVersion(projectRoot, pluginInfo, 
cordovaVersion) {
 });
 } else {
 // If we have no engine, we want to fall back to the default behavior
-events.emit('verbose', 'No plugin engine info found or not using 
registry, falling back to latest or pinned version');
+events.emit('verbose', 'No plugin engine info found or not using 
registry, falling back to latest version');
 return Q(null);
 }
 }
@@ -706,7 +704,7 @@ function determinePluginVersionToFetch(pluginInfo, 
pluginMap, platformMap, cordo
 }
 
 // No version of the plugin is satisfied. In this case, we fall back to
-// fetching latest or pinned versions, but also output a warning
+// fetching the latest version, but also output a warning
 var latestFailedReqs = versions.length > 0 ? 
getFailedRequirements(engine[versions[0]], pluginMap, platformMap, 
cordovaVersion) : [];
 
 // If the upper bound is greater than latest, we need to combine its engine
@@ -728,7 +726,7 @@ function determinePluginVersionToFetch(pluginInfo, 
pluginMap, platformMap, cordo
 }
 
 listUnmetRequirements(name, latestFailedReqs);
-events.emit('warn', 'Current project does not satisfy the engine 
requirements specified by any version of ' + name + '. Fetching latest or 
pinned version of plugin anyway (may be incompatible)');
+events.emit('warn', 'Current project does not satisfy the engine 
requirements specified by any version of ' + name + '. Fetching latest version 
of plugin anyway (may be incompatible)');
 
 // No constraints were satisfied
 return null;


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

[33/37] cordova-lib git commit: updated cordova-common dependency to 1.1.x

2016-03-18 Thread steven
updated cordova-common dependency to 1.1.x


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

Branch: refs/heads/common-1.1.x
Commit: 31b58d0c34e4aa9cf091c067bc846701a04f4e56
Parents: f0d5a3e
Author: Steve Gill 
Authored: Fri Mar 18 12:42:17 2016 -0700
Committer: Steve Gill 
Committed: Fri Mar 18 12:42:17 2016 -0700

--
 cordova-lib/package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/31b58d0c/cordova-lib/package.json
--
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 73638bb..193c226 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -19,7 +19,7 @@
   "dependencies": {
 "aliasify": "^1.7.2",
 "cordova-app-hello-world": "3.10.0",
-"cordova-common": "1.0.x",
+"cordova-common": "1.1.x",
 "cordova-js": "4.1.4",
 "cordova-registry-mapper": "1.x",
 "cordova-serve": "^1.0.0",


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



cordova-coho git commit: CB-9911 update-release-notes now handles prefixed tags

2016-03-18 Thread steven
Repository: cordova-coho
Updated Branches:
  refs/heads/master 611f3af5b -> 532f027c6


CB-9911 update-release-notes now handles prefixed tags


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

Branch: refs/heads/master
Commit: 532f027c65f7bb93d3b97a204c4bdd3727249e5b
Parents: 611f3af
Author: Steve Gill 
Authored: Fri Mar 18 17:41:23 2016 -0700
Committer: Steve Gill 
Committed: Fri Mar 18 17:41:23 2016 -0700

--
 src/gitutil.js | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/532f027c/src/gitutil.js
--
diff --git a/src/gitutil.js b/src/gitutil.js
index 3c1851c..5aae6f2 100644
--- a/src/gitutil.js
+++ b/src/gitutil.js
@@ -31,14 +31,14 @@ var semver = require('semver');
  */
 exports.findMostRecentTag = function*(prefix) {
 prefix = prefix && prefix + "-";
+var finalBest;
 
 return (yield executil.execHelper(executil.ARGS('git tag --list'), 
true)).split(/\s+/)
 .reduce(function (curBest, value) {
 var modifiedCurBest, modifiedValue;
-//console.log('curBest: ', curBest, ' value: ', value)
 if (prefix) {
 // Ignore values that don't start with prefix, and strip 
prefix from the value we're going to test
-if (value.indexOf(prefix) !== 0) {
+if (value.indexOf(prefix) !== 0 ) {
 modifiedValue = null;
 modifiedCurBest = null;
 } else {
@@ -52,9 +52,13 @@ exports.findMostRecentTag = function*(prefix) {
 }
 
 if (semver.valid(modifiedValue)) {
+//use finalBest to hold onto reference outside of reduce 
function
+finalBest = !curBest ? value : semver.gt(modifiedCurBest, 
modifiedValue) ? finalBest : value;
 return !curBest ? value : semver.gt(modifiedCurBest, 
modifiedValue) ? curBest : value;
 } else if (curBest && semver.valid(modifiedCurBest)) {
 return curBest;
+} else if(finalBest) {
+return finalBest;
 }
 return null;
 });


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



svn commit: r1735707 - in /cordova/site/public: ./ announcements/2013/11/15/ announcements/2013/11/22/ announcements/2013/12/16/ announcements/2014/02/20/ announcements/2014/05/23/ announcements/2014/

2016-03-18 Thread dblotsky
Author: dblotsky
Date: Fri Mar 18 23:29:12 2016
New Revision: 1735707

URL: http://svn.apache.org/viewvc?rev=1735707=rev
Log:
Updating site.


[This commit notification would consist of 2559 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

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



[cordova-lib] Git Push Summary

2016-03-18 Thread steven
Repository: cordova-lib
Updated Tags:  refs/tags/common-1.1.1 [created] 80b70040b

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



[5/5] docs commit: Converted all markdown code blocks in dev to GFM fenced blocks

2016-03-18 Thread dblotsky
Converted all markdown code blocks in dev to GFM fenced blocks


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

Branch: refs/heads/master
Commit: a65e8109a34b3ca68545fde45029d8430298b3a8
Parents: da85fd2
Author: Richard Knoll 
Authored: Thu Mar 17 17:49:17 2016 -0700
Committer: Richard Knoll 
Committed: Thu Mar 17 18:26:23 2016 -0700

--
 www/docs/en/dev/config_ref/index.md | 349 ++-
 www/docs/en/dev/cordova/events/events.md| 188 +-
 www/docs/en/dev/cordova/storage/storage.md  | 160 +
 www/docs/en/dev/guide/appdev/hooks/index.md | 148 
 www/docs/en/dev/guide/appdev/whitelist/index.md |  55 +--
 www/docs/en/dev/guide/cli/index.md  | 139 +---
 www/docs/en/dev/guide/hybrid/plugins/index.md   |  32 +-
 .../en/dev/guide/platforms/android/index.md |  91 +++--
 .../en/dev/guide/platforms/android/plugin.md|   2 +-
 .../en/dev/guide/platforms/android/upgrade.md   |  26 +-
 .../en/dev/guide/platforms/android/webview.md   |   8 +-
 .../dev/guide/platforms/blackberry/upgrade.md   |  57 +--
 .../dev/guide/platforms/blackberry10/config.md  |  16 +-
 .../dev/guide/platforms/blackberry10/index.md   | 117 ---
 .../dev/guide/platforms/blackberry10/plugin.md  | 192 +-
 .../dev/guide/platforms/blackberry10/tools.md   |  48 ++-
 .../dev/guide/platforms/blackberry10/upgrade.md |  49 ++-
 www/docs/en/dev/guide/platforms/ios/index.md|  46 ++-
 www/docs/en/dev/guide/platforms/ios/plugin.md   | 141 
 www/docs/en/dev/guide/platforms/ios/upgrade.md  | 174 +
 www/docs/en/dev/guide/platforms/ios/webview.md  |  68 ++--
 www/docs/en/dev/guide/platforms/osx/config.md   |  29 +-
 www/docs/en/dev/guide/platforms/osx/index.md|  22 +-
 www/docs/en/dev/guide/platforms/ubuntu/index.md |  35 +-
 www/docs/en/dev/guide/platforms/win8/index.md   | 112 +++---
 www/docs/en/dev/guide/platforms/win8/plugin.md  |   4 +-
 www/docs/en/dev/guide/platforms/win8/upgrade.md |  19 +-
 .../dev/platform_plugin_versioning_ref/index.md |  81 +++--
 www/docs/en/dev/plugin_ref/plugman.md   | 112 --
 www/docs/en/dev/plugin_ref/spec.md  | 100 +++---
 30 files changed, 1539 insertions(+), 1081 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/a65e8109/www/docs/en/dev/config_ref/index.md
--
diff --git a/www/docs/en/dev/config_ref/index.md 
b/www/docs/en/dev/config_ref/index.md
index 7312633..e5dee88 100644
--- a/www/docs/en/dev/config_ref/index.md
+++ b/www/docs/en/dev/config_ref/index.md
@@ -33,7 +33,9 @@ For projects created with the Cordova CLI (described in [The
 Command-Line Interface](../guide/cli/index.html)), this file can be found in 
the top-level
 directory:
 
-app/config.xml
+```
+app/config.xml
+```
 
 Note that before version 3.3.1-0.2.0, the file existed at `app/www/config.xml`,
 and that having it here is still supported.
@@ -42,9 +44,11 @@ When using the CLI to build a project, versions of this file 
are
 passively copied into various `platforms/` subdirectories.
 For example:
 
-app/platforms/ios/AppName/config.xml
-app/platforms/blackberry10/www/config.xml
-app/platforms/android/res/xml/config.xml
+```
+app/platforms/ios/AppName/config.xml
+app/platforms/blackberry10/www/config.xml
+app/platforms/android/res/xml/config.xml
+```
 
 In addition to the various configuration options detailed below, you
 can also configure an application's core set of images for each target
@@ -67,40 +71,45 @@ platform. See [Customize icons topic](images.html) for more 
information.
 
Examples:
 
-
-http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
-
+   ```xml
+   
+   http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
+   
 
-
-http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
-
+   
+   http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
+   
 
-
-http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
-
+   
+   http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
+   
 
-
-http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
-
+   
+   http://www.w3.org/ns/widgets; 
xmlns:cdv="http://cordova.apache.org/ns/1.0;>
+   
+   ```
 
 ## name
Specifies the app's formal name, as it appears on the device's home screen 
and within app-store interfaces.
 

docs commit: CB-10819 Added 'snap' command to Makefile and gulpfile. Fixed 'newversion' command. Made fetched files live under /reference/ instead of /gen/. Refactored and removed incrementversion.js

2016-03-18 Thread dblotsky
Repository: cordova-docs
Updated Branches:
  refs/heads/master a65e8109a -> 4d62f605f


CB-10819 Added 'snap' command to Makefile and gulpfile. Fixed 'newversion' 
command. Made fetched files live under /reference/ instead of /gen/. Refactored 
and removed incrementversion.js in favour of simple FS commands. Added 
redirects for /gen/ files.


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

Branch: refs/heads/master
Commit: 4d62f605f8f17633395a6b75e85acade30ecf8e6
Parents: a65e810
Author: Dmitry Blotsky 
Authored: Mon Mar 7 18:21:40 2016 -0800
Committer: Dmitry Blotsky 
Committed: Fri Mar 18 15:42:36 2016 -0700

--
 .gitignore  |   2 +-
 Makefile|  84 +++---
 gulpfile.js | 110 
 package.json|   1 -
 tools/bin/fetch_docs.js | 167 ---
 tools/bin/gen_defaults.js   |   5 +-
 tools/bin/incrementversion.js   | 151 -
 tools/bin/nextversion.js|  67 
 www/_data/fetched-files.yml |  78 +
 www/_data/redirects.yml |  25 ++-
 www/_data/toc/en-dev-manual.yml |  44 ++---
 www/docs/en/dev/config_ref/images.md|   2 +-
 www/docs/en/dev/config_ref/index.md |  14 +-
 www/docs/en/dev/guide/appdev/whitelist/index.md |   2 +-
 www/docs/en/dev/guide/cli/index.md  |  26 ++-
 www/docs/en/dev/guide/hybrid/plugins/index.md   |   7 +-
 .../en/dev/guide/platforms/android/index.md |  15 +-
 .../dev/guide/platforms/blackberry10/index.md   |   6 +-
 www/docs/en/dev/guide/platforms/ios/index.md|   6 +-
 www/docs/en/dev/guide/support/index.md  |  36 ++--
 20 files changed, 484 insertions(+), 364 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4d62f605/.gitignore
--
diff --git a/.gitignore b/.gitignore
index 141eced..db617e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,7 +8,7 @@ conf/fetched_docs.json
 www/_data/docs-versions.yml
 www/static/css
 www/static/js/plugins.js
+www/docs/en/dev/reference
 
 node_modules
 Gemfile.lock
-www/docs/en/dev/gen

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/4d62f605/Makefile
--
diff --git a/Makefile b/Makefile
index 260506b..0e28622 100644
--- a/Makefile
+++ b/Makefile
@@ -13,10 +13,18 @@ ifdef WINDOWS
 SHELL  = cmd
 JEKYLL = bundle.bat exec jekyll
 MKDIRP = mkdir
+CPR= xcopy /e
+CP = copy
+CAT= type
+LS = ls
 else
 SHELL  = sh
 JEKYLL = bundle exec jekyll
 MKDIRP = mkdir -p
+CPR= cp -R
+CP = cp
+CAT= cat
+LS = ls
 endif
 
 # constants
@@ -36,7 +44,6 @@ PROD_DIR   = build-prod
 CONFIG_DIR = conf
 
 DOCS_DIR = $(SRC_DIR)/docs
-FETCH_DIR= $(DOCS_DIR)/en/dev/gen
 DATA_DIR = $(SRC_DIR)/_data
 TOC_DIR  = $(DATA_DIR)/toc
 STATIC_DIR   = $(SRC_DIR)/static
@@ -70,6 +77,7 @@ DOCS_EXCLUDE_CONFIG = $(CONFIG_DIR)/_nodocs.yml
 FETCH_CONFIG= $(DATA_DIR)/fetched-files.yml
 PLUGINS_SRC = $(PLUGINS_SRC_DIR)/app.js
 VERSION_FILE= VERSION
+FETCH_SCRIPT= $(BIN_DIR)/fetch_docs.js
 
 # NOTE:
 #  the .scss files are separate because they combine into MAIN_STYLE_FILE,
@@ -83,6 +91,17 @@ SCSS_SRC   = $(shell find $(CSS_SRC_DIR) -name "*.scss")
 STYLES_SRC = $(shell find $(CSS_SRC_DIR) -name "*.less" -or -name "*.css")
 endif
 
+LANGUAGES = $(shell $(LS) $(DOCS_DIR))
+
+LATEST_DOCS_VERSION = $(shell $(CAT) $(VERSION_FILE))
+NEXT_DOCS_VERSION   = $(shell $(NODE) $(BIN_DIR)/nextversion.js 
$(LATEST_DOCS_VERSION))
+
+LATEST_DOCS_VERSION_SLUG = $(subst .,-,$(LATEST_DOCS_VERSION))
+NEXT_DOCS_VERSION_SLUG   = $(subst .,-,$(NEXT_DOCS_VERSION))
+
+DEV_DOCS  = $(addprefix $(DOCS_DIR)/,$(addsuffix /dev,$(LANGUAGES)))
+DEV_DOCS_TOCS = $(addprefix $(TOC_DIR)/,$(addsuffix -dev-manual.yml, 
$(LANGUAGES)))
+
 # generated files
 VERSION_CONFIG= $(CONFIG_DIR)/_version.yml
 DEFAULTS_CONFIG   = $(CONFIG_DIR)/_defaults.yml
@@ -98,16 +117,20 @@ DOCS_VERSION_DIRS  = $(filter-out %.md,$(wildcard 
$(DOCS_DIR)/**/*))
 DOCS_VERSION_SLUGS = $(subst /,-,$(subst .,-,$(subst 
$(DOCS_DIR)/,,$(DOCS_VERSION_DIRS
 TOC_FILES  = $(addprefix $(TOC_DIR)/,$(addsuffix 
-generated.yml,$(DOCS_VERSION_SLUGS)))
 
-# variables
+FETCH_FLAGS   = --config 

[21/37] cordova-lib git commit: Fix syntax error introduced in e1bde1

2016-03-18 Thread steven
Fix syntax error introduced in e1bde1


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

Branch: refs/heads/common-1.1.x
Commit: e740debffe6f83174126ba3c1711d017b3052d4f
Parents: e1bde1a
Author: Nikhil Khandelwal 
Authored: Tue Mar 8 09:54:30 2016 -0800
Committer: Nikhil Khandelwal 
Committed: Tue Mar 8 09:54:30 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e740debf/cordova-lib/src/cordova/platform.js
--
diff --git a/cordova-lib/src/cordova/platform.js 
b/cordova-lib/src/cordova/platform.js
index 9b1157e..2ea8c01 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -653,7 +653,7 @@ function installPluginsForNewPlatform(platform, 
projectRoot, opts) {
 // related PR: https://github.com/apache/cordova-lib/pull/360) 
so we need to
 // specify the option below in both places
 usePlatformWww: true,
-is_top_level: pluginMetadata.is_top_level
+is_top_level: pluginMetadata.is_top_level,
 force: opts.force
 };
 


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



[29/37] cordova-lib git commit: Merge branch 'CB-10694'

2016-03-18 Thread steven
Merge branch 'CB-10694'


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

Branch: refs/heads/common-1.1.x
Commit: 4d4fbac273f910e8e868b43100fb2e4092084d96
Parents: cc91656 11d1380
Author: Shazron Abdullah 
Authored: Wed Mar 16 16:38:28 2016 -0700
Committer: Shazron Abdullah 
Committed: Wed Mar 16 16:38:28 2016 -0700

--
 cordova-common/spec/util/xml-helpers.spec.js | 19 +++
 cordova-common/src/util/xml-helpers.js   |  6 +++---
 2 files changed, 22 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4d4fbac2/cordova-common/spec/util/xml-helpers.spec.js
--
diff --cc cordova-common/spec/util/xml-helpers.spec.js
index 9d714f0,59b760a..2138f5c
--- a/cordova-common/spec/util/xml-helpers.spec.js
+++ b/cordova-common/spec/util/xml-helpers.spec.js
@@@ -268,26 -268,25 +268,45 @@@ describe('xml-helpers', function()
  
  });
  
 +it('should remove duplicate preferences (by name attribute value)', 
function () {
 +var testXml = et.XML(
 +'\n' +
 +'http://www.w3.org/ns/widgets"\n' +
 +'xmlns:cdv = "http://cordova.apache.org/ns/1.0"\n' +
 +'id= "io.cordova.hellocordova"\n' +
 +'version   = "0.0.1">\n' +
 +'\n' +
 +'\n' +
 +'\n' +
 +'\n' +
 +'\n' +
 +'\n' +
 +'\n' +
 +'\n'
 +);
 +xml_helpers.mergeXml(testXml, dstXml, 'ios');
 +var testElements = 
dstXml.findall('preference[@name="Orientation"]');
 +expect(testElements.length).toEqual(1);
 +});
 +
+ it('should merge preferences, with platform preferences written 
last', function () {
+ var testXml = et.XML(
+ '\n' +
+ 'http://www.w3.org/ns/widgets"\n' +
+ 'xmlns:cdv = "http://cordova.apache.org/ns/1.0"\n' +
+ 'id= "io.cordova.hellocordova"\n' +
+ 'version   = "0.0.1">\n' +
+ '\n' +
+ '\n' +
+ '\n' +
+ '\n' +
+ '\n'
+ );
+ xml_helpers.mergeXml(testXml, dstXml, 'ios');
+ var testElements = 
dstXml.findall('preference[@name="Orientation"]');
+ expect(testElements.length).toEqual(2);
+ expect(testElements[0].attrib.value).toEqual('default');
+ expect(testElements[1].attrib.value).toEqual('all');
+ });
 -
  });
  });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4d4fbac2/cordova-common/src/util/xml-helpers.js
--
diff --cc cordova-common/src/util/xml-helpers.js
index 85d9799,487a763..fc84128
--- a/cordova-common/src/util/xml-helpers.js
+++ b/cordova-common/src/util/xml-helpers.js
@@@ -216,12 -219,6 +219,9 @@@ function mergeXml(src, dest, platform, 
  });
  }
  
- //Handle children
- src.getchildren().forEach(mergeChild);
- 
 +//Handle duplicate preference tags (by name attribute)
 +removeDuplicatePreferences(dest);
 +
  function mergeChild (srcChild) {
  var srcTag = srcChild.tag,
  destChild = new et.Element(srcTag),


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



[08/37] cordova-lib git commit: CB-10519 Fixing rebase/merge issues

2016-03-18 Thread steven
CB-10519 Fixing rebase/merge issues


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

Branch: refs/heads/common-1.1.x
Commit: 3cef0823d7553b4885c12501609a976510f83f96
Parents: 4121b11
Author: Vladimir Kotikov 
Authored: Fri Feb 19 14:31:30 2016 +0300
Committer: Vladimir Kotikov 
Committed: Fri Feb 19 14:31:30 2016 +0300

--
 cordova-lib/src/cordova/compile.js | 8 ++--
 cordova-lib/src/cordova/run.js | 5 -
 2 files changed, 2 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3cef0823/cordova-lib/src/cordova/compile.js
--
diff --git a/cordova-lib/src/cordova/compile.js 
b/cordova-lib/src/cordova/compile.js
index e540c14..6a5adfb 100644
--- a/cordova-lib/src/cordova/compile.js
+++ b/cordova-lib/src/cordova/compile.js
@@ -17,7 +17,8 @@
 under the License.
 */
 
-var cordova_util = require('./util'),
+var Q= require('q'),
+cordova_util = require('./util'),
 HooksRunner  = require('../hooks/HooksRunner'),
 promiseUtil  = require('../util/promise-util'),
 platform_lib = require('../platforms/platforms');
@@ -38,11 +39,6 @@ module.exports = function compile(options) {
 });
 }).then(function() {
 return hooksRunner.fire('after_compile', options);
-}, function(error) {
-events.emit('log', 'ERROR building one of the platforms: ' + error 
+ '\nYou may not have the required environment or OS to build this project');
-return Q.reject(error);
 });
-}).then(function() {
-return hooksRunner.fire('after_compile', options);
 });
 };

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3cef0823/cordova-lib/src/cordova/run.js
--
diff --git a/cordova-lib/src/cordova/run.js b/cordova-lib/src/cordova/run.js
index f2afeed..046b1da 100644
--- a/cordova-lib/src/cordova/run.js
+++ b/cordova-lib/src/cordova/run.js
@@ -43,11 +43,6 @@ module.exports = function run(options) {
 }));
 }).then(function() {
 return hooksRunner.fire('after_run', options);
-}, function(error) {
-events.emit('log', 'ERROR running one or more of the platforms: ' 
+ error + '\nYou may not have the required environment or OS to run this 
project');
-
-// CB-10567 bubble up `run` error, so the caller still could get 
rejected promise
-return Q.reject(error);
 });
 });
 };


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



[05/37] cordova-lib git commit: CB-10641 Run prepare _after_ plugins were installed

2016-03-18 Thread steven
CB-10641 Run prepare _after_ plugins were installed


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

Branch: refs/heads/common-1.1.x
Commit: 3b9face5187857d354d85f3e3f4316cbace100db
Parents: 5da4364
Author: Vladimir Kotikov 
Authored: Wed Feb 17 18:48:31 2016 +0300
Committer: Vladimir Kotikov 
Committed: Thu Feb 18 12:36:21 2016 +0300

--
 cordova-lib/src/cordova/platform.js | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3b9face5/cordova-lib/src/cordova/platform.js
--
diff --git a/cordova-lib/src/cordova/platform.js 
b/cordova-lib/src/cordova/platform.js
index 87f2e58..96c5f2f 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -180,18 +180,21 @@ function addHelper(cmd, hooksRunner, projectRoot, 
targets, opts) {
 PlatformApi.createPlatform.bind(null, destination, cfg, 
options, events) :
 PlatformApi.updatePlatform.bind(null, destination, 
options, events);
 
-return promise().then(function () {
+return promise()
+.then(function() {
+if (cmd == 'add') {
+return installPluginsForNewPlatform(platform, 
projectRoot, opts);
+}
+})
+.then(function () {
 // Call prepare for the current platform.
 var prepOpts = {
 platforms :[platform],
 searchpath :opts.searchpath
 };
 return require('./cordova').raw.prepare(prepOpts);
-}).then(function() {
-if (cmd == 'add') {
-return installPluginsForNewPlatform(platform, 
projectRoot, opts);
-}
-}).then(function() {
+})
+.then(function() {
 var saveVersion = !spec || semver.validRange(spec, true);
 
 // Save platform@spec into platforms.json, where 'spec' is 
a version or a soure location. If a


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



[19/37] cordova-lib git commit: CB-10679: New version choosing logic for plugin add

2016-03-18 Thread steven
CB-10679: New version choosing logic for plugin add

Adds support for plugins specifying their cordova
related dependencies in their package.json to
guide cordova-lib in choosing the correct version
of a plugin to fetch for the current project

This closes #363


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

Branch: refs/heads/common-1.1.x
Commit: 45a235fa73e5b23ed9fa44734449503976b999e3
Parents: 114de6c
Author: riknoll 
Authored: Fri Jan 15 13:35:26 2016 -0800
Committer: riknoll 
Committed: Mon Mar 7 13:37:17 2016 -0800

--
 cordova-lib/spec-cordova/plugin.spec.js   | 157 +--
 cordova-lib/spec-cordova/plugin_fetch.spec.js | 522 +
 cordova-lib/spec-cordova/util.spec.js |  19 +
 cordova-lib/src/cordova/platform.js   |  21 +-
 cordova-lib/src/cordova/plugin.js | 324 +++--
 cordova-lib/src/cordova/util.js   |  20 +-
 cordova-lib/src/plugman/registry/registry.js  |  26 +-
 7 files changed, 985 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/45a235fa/cordova-lib/spec-cordova/plugin.spec.js
--
diff --git a/cordova-lib/spec-cordova/plugin.spec.js 
b/cordova-lib/spec-cordova/plugin.spec.js
index b09fbff..11a1b16 100644
--- a/cordova-lib/spec-cordova/plugin.spec.js
+++ b/cordova-lib/spec-cordova/plugin.spec.js
@@ -19,9 +19,12 @@
 
 var helpers = require('./helpers'),
 path = require('path'),
+Q = require('q'),
 shell = require('shelljs'),
 events = require('cordova-common').events,
-cordova = require('../src/cordova/cordova');
+cordova = require('../src/cordova/cordova'),
+plugman = require('../src/plugman/plugman'),
+registry = require('../src/plugman/registry/registry');
 
 var tmpDir = helpers.tmpDir('plugin_test');
 var project = path.join(tmpDir, 'project');
@@ -29,21 +32,66 @@ var pluginsDir = path.join(__dirname, 'fixtures', 
'plugins');
 var pluginId = 'org.apache.cordova.fakeplugin1';
 var org_test_defaultvariables = 'org.test.defaultvariables';
 
+var results;
+
+
+// Runs: list, add, list
+function addPlugin(target, id, options) {
+// Check there are no plugins yet.
+return cordova.raw.plugin('list').then(function() {
+expect(results).toMatch(/No plugins added/gi);
+}).then(function() {
+// Add a fake plugin from fixtures.
+return cordova.raw.plugin('add', target, options);
+}).then(function() {
+expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist();
+}).then(function() {
+return cordova.raw.plugin('ls');
+}).then(function() {
+expect(results).toContain(id);
+});
+}
+
+// Runs: remove, list
+function removePlugin(id) {
+return cordova.raw.plugin('rm', id)
+.then(function() {
+// The whole dir should be gone.
+expect(path.join(project, 'plugins', id)).not.toExist();
+}).then(function() {
+return cordova.raw.plugin('ls');
+}).then(function() {
+expect(results).toMatch(/No plugins added/gi);
+});
+}
+
+var errorHandler = {
+errorCallback: function(error) {
+// We want the error to be printed by jasmine
+expect(error).toBeUndefined();
+}
+};
+
+// We can't call add with a searchpath or else we will conflict with other 
tests
+// that use a searchpath. See loadLocalPlugins() in plugman/fetch.js for 
details.
+// The searchpath behavior gets tested in the plugman spec
+function mockPluginFetch(id, dir) {
+spyOn(plugman.raw, 'fetch').andCallFake(function(target, pluginPath, 
fetchOptions) {
+var dest = path.join(project, 'plugins', id);
+var src = path.join(dir, 'plugin.xml');
+
+shell.mkdir(dest);
+shell.cp(src, dest);
+return Q(dest);
+});
+}
+
 describe('plugin end-to-end', function() {
-var results;
+events.on('results', function(res) { results = res; });
 
 beforeEach(function() {
 shell.rm('-rf', project);
-});
-afterEach(function() {
-process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on 
Windows.
-shell.rm('-rf', tmpDir);
-});
 
-// The flow tested is: ls, add, ls, rm, ls.
-// Plugin dependencies are not tested as that should be corvered in 
plugman tests.
-// TODO (kamrik): Test the 'plugin search' command.
-it('should successfully run', function(done) {
 // cp then mv because we need to copy everything, but that means it'll 
copy the whole directory.
 // Using 

[36/37] cordova-lib git commit: CB-10911 Updated version and RELEASENOTES.md for release cordova-common@1.1.1

2016-03-18 Thread steven
CB-10911 Updated version and RELEASENOTES.md for release cordova-common@1.1.1


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

Branch: refs/heads/common-1.1.x
Commit: 80b70040bb7cc806d155a8955a5d2f432d509a40
Parents: 9c7dead
Author: Steve Gill 
Authored: Fri Mar 18 17:52:03 2016 -0700
Committer: Steve Gill 
Committed: Fri Mar 18 17:52:03 2016 -0700

--
 cordova-common/RELEASENOTES.md | 9 +
 cordova-common/package.json| 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/80b70040/cordova-common/RELEASENOTES.md
--
diff --git a/cordova-common/RELEASENOTES.md b/cordova-common/RELEASENOTES.md
index e7db69c..806b6f2 100644
--- a/cordova-common/RELEASENOTES.md
+++ b/cordova-common/RELEASENOTES.md
@@ -20,6 +20,15 @@
 -->
 # Cordova-common Release Notes
 
+### 1.1.1 (Mar 18, 2016)
+* CB-10694 Update test to reflect merging of CB-9264 fix
+* CB-10694 Platform-specific configuration preferences don't override global 
settings
+* CB-9264 Duplicate entries in `config.xml`
+* CB-10791 Add `adjustLoggerLevel` to `cordova-common.CordovaLogger`
+* CB-10662 Add tests for `ConfigParser.getStaticResources`
+* CB-10622 fix target attribute being ignored for images in `config.xml`.
+* CB-10583 Protect plugin preferences from adding extra Array properties.
+
 ### 1.1.0 (Feb 16, 2016)
 * CB-10482 Remove references to windows8 from cordova-lib/cli
 * CB-10430 Adds forwardEvents method to easily connect two EventEmitters

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/80b70040/cordova-common/package.json
--
diff --git a/cordova-common/package.json b/cordova-common/package.json
index e84b6a5..c38b6da 100644
--- a/cordova-common/package.json
+++ b/cordova-common/package.json
@@ -3,7 +3,7 @@
   "name": "cordova-common",
   "description": "Apache Cordova tools and platforms shared routines",
   "license": "Apache-2.0",
-  "version": "1.2.0-dev",
+  "version": "1.1.1",
   "repository": {
 "type": "git",
 "url": "git://git-wip-us.apache.org/repos/asf/cordova-common.git"


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



[32/37] cordova-lib git commit: CB-10902 Updated version and RELEASENOTES.md for release 6.1.0

2016-03-18 Thread steven
CB-10902 Updated version and RELEASENOTES.md for release 6.1.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/f0d5a3e8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/f0d5a3e8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/f0d5a3e8

Branch: refs/heads/common-1.1.x
Commit: f0d5a3e8c7722203db3fa3c5af75cce85f09d166
Parents: 3502274
Author: Steve Gill 
Authored: Thu Mar 17 19:31:11 2016 -0700
Committer: Steve Gill 
Committed: Thu Mar 17 19:31:11 2016 -0700

--
 cordova-lib/RELEASENOTES.md | 35 +++
 cordova-lib/package.json|  4 ++--
 2 files changed, 37 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0d5a3e8/cordova-lib/RELEASENOTES.md
--
diff --git a/cordova-lib/RELEASENOTES.md b/cordova-lib/RELEASENOTES.md
index 0c89745..a08eadb 100644
--- a/cordova-lib/RELEASENOTES.md
+++ b/cordova-lib/RELEASENOTES.md
@@ -20,6 +20,41 @@
 -->
 # Cordova-lib Release Notes
 
+### 6.1.0 (Mar 17, 2016)
+* CB-10902 updated pinned platforms
+* CB-10808 revert npm install for templates
+* CB-10808 CLI Support templates with subdirectory
+* CB-10880 Removed plugin pinning
+* CB-10679 Improving version choosing logic test coverage
+* CB-10673 add plugin `--force` option. 
+* CB-10679 New version choosing logic for plugin add
+* CB-10328 set top-level property when adding new platforms
+* CB-10314 avoid fetching plugins when oldId is already fetched
+* CB-10708 Install/uninstall plugins correctly into CLI project using plugman
+* CB-10462 Get rid of npmconf in favor of npm.
+* CB-10662 Use project's `config.xml` as a fallback for package name
+* CB-10644 Adds deprecation message about old platforms support removal.
+* CB-10519 Wrap all sync calls inside of `cordova.raw` methods into promises
+* CB-10641 Adds tests for order of operations in platform add
+* CB-10641 Run prepare `_after_` plugins were installed
+* CB-10618 Do not call `prepBuildFiles` for `cordova-android@>=5.2.0`.
+* CB-10518 Correct log level and error messages for some cordova errors
+* CB-10550 Fix plugin id mapper not enforced when a version is specified
+* CB-10611 fix `before_plugin_install` hook not disabled with `--nohooks`
+* CB-10235 Added clearer error message for info command.
+* CB-10584 Splashscreen plugin crashes the app on windows 10 when built with 
browserify
+* CB-10592 Don't quote platform specific args values
+* CB-10482 Remove references to **windows8** from cordova-lib/cli
+* CB-10567 Bubble up `cordova.raw.run()` error to the caller
+* CB-10553 Fix framework tag handler for **Android**
+* CB-10461 `cordova platform ls` should list the versions of platforms pinned
+* CB-10531 Enable coverage reports for cordova-lib
+* CB-10465 Pass correct options to prepare from compile
+* CB-10459 cordova platform list should mark amazon-fireos and wp8 as 
deprecated
+* CB-10499 `--template` should pull the latest template from npm when version 
isn't specified
+* CB-10432 Adds e2e test to protect against future regressions.
+* Added node versions matrix to `.travis.yml`.
+
 ### 6.0.0 (Jan 25, 2016)
 * CB-10432 Fix plugin installation for newly added platform
 * CB-10423 allow recursive folder copy skipping whatever .. was

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0d5a3e8/cordova-lib/package.json
--
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 3e0fadb..73638bb 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
   "author": "Apache Software Foundation",
   "name": "cordova-lib",
   "description": "Apache Cordova tools core lib and API",
-  "version": "6.0.1-dev",
+  "version": "6.1.0",
   "repository": {
 "type": "git",
 "url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"
@@ -20,7 +20,7 @@
 "aliasify": "^1.7.2",
 "cordova-app-hello-world": "3.10.0",
 "cordova-common": "1.0.x",
-"cordova-js": "4.1.3",
+"cordova-js": "4.1.4",
 "cordova-registry-mapper": "1.x",
 "cordova-serve": "^1.0.0",
 "dep-graph": "1.1.0",


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



[09/37] cordova-lib git commit: CB-10644 Adds deprecation message about old platforms support removal. This closes #394

2016-03-18 Thread steven
CB-10644 Adds deprecation message about old platforms support removal. This 
closes #394


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

Branch: refs/heads/common-1.1.x
Commit: 96cd416df9edbb9e6a41307a15721282e24fc9fa
Parents: 3cef082
Author: Vladimir Kotikov 
Authored: Fri Jan 22 14:22:35 2016 +0300
Committer: Vladimir Kotikov 
Committed: Wed Feb 24 22:26:04 2016 +0300

--
 cordova-lib/src/platforms/platforms.js | 10 --
 cordova-lib/src/platforms/platformsConfig.json |  4 
 2 files changed, 12 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/96cd416d/cordova-lib/src/platforms/platforms.js
--
diff --git a/cordova-lib/src/platforms/platforms.js 
b/cordova-lib/src/platforms/platforms.js
index a932267..2f8ab7c 100644
--- a/cordova-lib/src/platforms/platforms.js
+++ b/cordova-lib/src/platforms/platforms.js
@@ -48,11 +48,17 @@ function getPlatformApi(platform, platformRootDir) {
 var PlatformApi;
 try {
 // First we need to find whether platform exposes its' API via js 
module
-// If it has, then we have to require it and extend BasePlatformApi
-// with platform's API.
+// If it does, then we require and instantiate it.
 var platformApiModule = path.join(platformRootDir, 'cordova', 
'Api.js');
 PlatformApi = require(platformApiModule);
 } catch (err) {
+// Check if platform already compatible w/ PlatformApi and show 
deprecation warning
+if (err && err.code === 'MODULE_NOT_FOUND' && 
platforms[platform].apiCompatibleSince) {
+events.emit('warn', ' Using this version of Cordova with older 
version of cordova-' + platform +
+' is being deprecated. Consider upgrading to cordova-' + 
platform + '@' +
+platforms[platform].apiCompatibleSince + ' or newer.');
+}
+
 PlatformApi = require('./PlatformApiPoly');
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/96cd416d/cordova-lib/src/platforms/platformsConfig.json
--
diff --git a/cordova-lib/src/platforms/platformsConfig.json 
b/cordova-lib/src/platforms/platformsConfig.json
index ff5c3d3..8b4a649 100644
--- a/cordova-lib/src/platforms/platformsConfig.json
+++ b/cordova-lib/src/platforms/platformsConfig.json
@@ -5,6 +5,7 @@
 "handler_file": "../plugman/platforms/ios",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;,
 "version": "~4.0.1",
+"apiCompatibleSince": "4.0.0",
 "deprecated": false
 },
 "osx": {
@@ -13,6 +14,7 @@
 "handler_file": "../plugman/platforms/ios",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-osx.git;,
 "version": "~4.0.0",
+"apiCompatibleSince": "4.0.0",
 "deprecated": false
 },
 "android": {
@@ -20,6 +22,7 @@
 "handler_file": "../plugman/platforms/android",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;,
 "version": "~5.1.0",
+"apiCompatibleSince": "5.0.0",
 "deprecated": false
 },
 "ubuntu": {
@@ -73,6 +76,7 @@
 "handler_file": "../plugman/platforms/windows",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git;,
 "version": "~4.3.0",
+"apiCompatibleSince": "4.3.0",
 "deprecated": false
 },
 "webos": {


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



[30/37] cordova-lib git commit: CB-10694 - Update test to reflect merging of CB-9264 fix (removal of duplicate entries)

2016-03-18 Thread steven
CB-10694 - Update test to reflect merging of CB-9264 fix (removal of duplicate 
entries)


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

Branch: refs/heads/common-1.1.x
Commit: c9b0423769005ca3591ebd90cfe77168148787e0
Parents: 4d4fbac
Author: Shazron Abdullah 
Authored: Wed Mar 16 16:45:04 2016 -0700
Committer: Shazron Abdullah 
Committed: Wed Mar 16 16:45:04 2016 -0700

--
 cordova-common/spec/util/xml-helpers.spec.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c9b04237/cordova-common/spec/util/xml-helpers.spec.js
--
diff --git a/cordova-common/spec/util/xml-helpers.spec.js 
b/cordova-common/spec/util/xml-helpers.spec.js
index 2138f5c..b0083fd 100644
--- a/cordova-common/spec/util/xml-helpers.spec.js
+++ b/cordova-common/spec/util/xml-helpers.spec.js
@@ -304,9 +304,8 @@ describe('xml-helpers', function(){
 );
 xml_helpers.mergeXml(testXml, dstXml, 'ios');
 var testElements = 
dstXml.findall('preference[@name="Orientation"]');
-expect(testElements.length).toEqual(2);
-expect(testElements[0].attrib.value).toEqual('default');
-expect(testElements[1].attrib.value).toEqual('all');
+expect(testElements.length).toEqual(1);
+expect(testElements[0].attrib.value).toEqual('all');
 });
 });
 });


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



[16/37] cordova-lib git commit: CB-10708 Install/uninstall plugins correctly into CLI project using plugman

2016-03-18 Thread steven
CB-10708 Install/uninstall plugins correctly into CLI project using plugman


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

Branch: refs/heads/common-1.1.x
Commit: 8f15136e8892ee7f6d93b0249d2d0e9b26f9eb94
Parents: 0aef892
Author: Vladimir Kotikov 
Authored: Sat Feb 27 15:29:08 2016 +0300
Committer: Vladimir Kotikov 
Committed: Sat Feb 27 15:41:26 2016 +0300

--
 cordova-lib/src/plugman/install.js   | 5 +
 cordova-lib/src/plugman/uninstall.js | 5 +
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/8f15136e/cordova-lib/src/plugman/install.js
--
diff --git a/cordova-lib/src/plugman/install.js 
b/cordova-lib/src/plugman/install.js
index 53f37ef..ff02f1c 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -385,6 +385,11 @@ function runInstall(actions, platform, project_dir, 
plugin_dir, plugins_dir, opt
 nohooks: options.nohooks
 };
 
+// CB-10708 This is the case when we're trying to install 
plugin using plugman to specific
+// platform inside of the existing CLI project. In this case 
we need to put plugin's files
+// into platform_www but plugman CLI doesn't allow us to do 
that, so we set it here
+options.usePlatformWww = true;
+
 var hooksRunner = new HooksRunner(projectRoot);
 
 return hooksRunner.fire('before_plugin_install', 
hookOptions).then(function() {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/8f15136e/cordova-lib/src/plugman/uninstall.js
--
diff --git a/cordova-lib/src/plugman/uninstall.js 
b/cordova-lib/src/plugman/uninstall.js
index bf136eb..f481950 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -303,6 +303,11 @@ function runUninstallPlatform(actions, platform, 
project_dir, plugin_dir, plugin
 }
 };
 
+// CB-10708 This is the case when we're trying to uninstall plugin 
using plugman from specific
+// platform inside of the existing CLI project. This option is usually 
set by cordova-lib for CLI projects
+// but since we're running this code through plugman, we need to set 
it here implicitly
+options.usePlatformWww = true;
+
 var hooksRunner = new HooksRunner(projectRoot);
 
 return promise.then(function() {


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



[26/37] cordova-lib git commit: CB-10808 revert npm install for templates

2016-03-18 Thread steven
CB-10808 revert npm install for templates


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

Branch: refs/heads/common-1.1.x
Commit: 186eea067d3d05f9e65ef89faf55c00b4cea9224
Parents: 0735488
Author: Carlos Santana 
Authored: Tue Mar 15 22:49:11 2016 -0400
Committer: Carlos Santana 
Committed: Tue Mar 15 22:49:11 2016 -0400

--
 cordova-lib/src/cordova/create.js | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/186eea06/cordova-lib/src/cordova/create.js
--
diff --git a/cordova-lib/src/cordova/create.js 
b/cordova-lib/src/cordova/create.js
index 9150020..0960131 100644
--- a/cordova-lib/src/cordova/create.js
+++ b/cordova-lib/src/cordova/create.js
@@ -372,13 +372,5 @@ function create(dir, optionalId, optionalName, cfg) {
 if (cfg.id) conf.setPackageName(cfg.id);
 if (cfg.name) conf.setName(cfg.name);
 conf.write();
-
-//run npm install if package.json is at the root of cordova project
-if (fs.existsSync(path.join(dir,'package.json'))){
-shell.pushd(dir);
-events.emit('log', 'Executing npm install...');
-shell.exec('npm install');
-shell.popd();
-}
 });
 }


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



[01/37] cordova-lib git commit: CB-10626 Incremented cordova-common package version to -dev

2016-03-18 Thread steven
Repository: cordova-lib
Updated Branches:
  refs/heads/common-1.1.x d5b101e1b -> 80b70040b
  refs/heads/master 9c7dead50 -> 9f630271d


CB-10626 Incremented cordova-common package version to -dev


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

Branch: refs/heads/common-1.1.x
Commit: 69178cf8b6219a7279b520d7d10dddb0272b9e4f
Parents: d5b101e
Author: Vladimir Kotikov 
Authored: Tue Feb 16 12:46:42 2016 +0300
Committer: Vladimir Kotikov 
Committed: Tue Feb 16 12:47:19 2016 +0300

--
 cordova-common/package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/69178cf8/cordova-common/package.json
--
diff --git a/cordova-common/package.json b/cordova-common/package.json
index 6c8a2d3..e84b6a5 100644
--- a/cordova-common/package.json
+++ b/cordova-common/package.json
@@ -3,7 +3,7 @@
   "name": "cordova-common",
   "description": "Apache Cordova tools and platforms shared routines",
   "license": "Apache-2.0",
-  "version": "1.1.0",
+  "version": "1.2.0-dev",
   "repository": {
 "type": "git",
 "url": "git://git-wip-us.apache.org/repos/asf/cordova-common.git"


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



[12/37] cordova-lib git commit: Some corrections and enhancements for cordova-serve readme.

2016-03-18 Thread steven
Some corrections and enhancements for cordova-serve readme.


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

Branch: refs/heads/common-1.1.x
Commit: 8a5bd8f17577197e289f537563955aec9f99c9ce
Parents: d437ae1
Author: Tim Barham 
Authored: Fri Feb 26 18:49:28 2016 +1000
Committer: Tim Barham 
Committed: Fri Feb 26 18:49:28 2016 +1000

--
 cordova-serve/README.md | 59 ++--
 1 file changed, 51 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/8a5bd8f1/cordova-serve/README.md
--
diff --git a/cordova-serve/README.md b/cordova-serve/README.md
index 4d45447..f2700af 100644
--- a/cordova-serve/README.md
+++ b/cordova-serve/README.md
@@ -24,26 +24,53 @@ This module can be used to serve up a Cordova application 
in the browser. It has
 to be called using the following API:
 
 ``` js
-var serve = require('cordova-serve');
-serve.launchServer(opts);
-serve.servePlatform(platform, opts);
-serve.launchBrowser(ops);
+var cordovaServe = require('cordova-serve')();
+cordovaServe.launchServer(opts);
+cordovaServe.servePlatform(platform, opts);
+cordovaServe.launchBrowser(ops);
 ```
 
 ## launchServer()
 
 ``` js
-launchServer(opts);
+var cordovaServe = require('cordova-serve')();
+cordovaServe.launchServer(opts).then(function () {
+var server = cordovaServe.server;
+var root = cordovaServe.root;
+var port = cordovaServe.port;
+
+...
+}, function (error) {
+console.log('An error occurred: ' + error);
+});
 ```
 
 Launches a server with the specified options. Parameters:
 
 * **opts**: Options, as described below.
 
+Returns a promise that is fulfilled once the server has launched, or rejected 
if the server fails to launch. Once the
+promise is fulfilled, the following properties are available on the 
`cordovaServe` object:
+ 
+ * **cordovaServe.serve**: The Node http.Server instance.
+ * **cordovaServe.root**: The root that was specified, or cwd if none 
specified.
+ * **cordovaServe.port**: The port that was used (could be the requested port, 
the default port, or some incremented
+   value if the chosen port was in use).
+
 ## servePlatform()
 
 ``` js
-servePlatform(platform, opts);
+var cordovaServe = require('cordova-serve')();
+cordovaServe.servePlatform(platform, opts).then(function () {
+var server = cordovaServe.server;
+var port = cordovaServe.port;
+var projectRoot = cordovaServe.projectRoot;
+var platformRoot = cordovaServe.root;
+
+...
+}, function (error) {
+console.log('An error occurred: ' + error);
+});
 ```
 
 Launches a server that serves up any Cordova platform (e.g. `browser`, 
`android` etc) from the current project.
@@ -53,10 +80,24 @@ Parameters:
   root folder, or any folder within it - `servePlatform()` will replace it 
with the platform's `www_dir` folder. If this
   value is not specified, the *cwd* will be used.
 
+Returns a promise that is fulfilled once the server has launched, or rejected 
if the server fails to launch. Once the
+promise is fulfilled, the following properties are available on the 
`cordovaServe` object:
+ 
+ * **cordovaServe.serve**: The Node http.Server instance.
+ * **cordovaServe.root**: The requested platform's `www` folder.
+ * **cordovaServe.projectRoot**: The root folder of the Cordova project.
+ * **cordovaServe.port**: The port that was used (could be the requested port, 
the default port, or some incremented
+   value if the chosen port was in use).
+
 ## launchBrowser()
 
 ``` js
-launchBrowser(opts);
+var cordovaServe = require('cordova-serve')();
+cordovaServe.launchBrowser(opts).then(function (stdout) {
+console.log('Browser was launched successfully: ' + stdout);
+}, function (error) {
+console.log('An error occurred: ' + error);
+});
 ```
 
 Launches a browser window pointing to the specified URL. The single parameter 
is an options object that supports the
@@ -64,7 +105,9 @@ following values (both optional):
 
 * **url**: The URL to open in the browser.
 * **target**: The name of the browser to launch. Can be any of the following: 
`chrome`, `chromium`, `firefox`, `ie`,
-  `opera`, `safari`. If no browser is specified, 
+  `opera`, `safari`. Defaults to `chrome` if no browser is specified.
+
+Returns a promise that is fulfilled once the browser has been launched, or 
rejected if an error occurs.
 
 ## The *opts* Options Object
 The opts object passed to `launchServer()` and `servePlatform()` supports the 
following values (all optional):



[35/37] cordova-lib git commit: CB-10911 Updated version and RELEASENOTES.md for release cordova-common@1.1.1

2016-03-18 Thread steven
CB-10911 Updated version and RELEASENOTES.md for release cordova-common@1.1.1


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

Branch: refs/heads/master
Commit: 80b70040bb7cc806d155a8955a5d2f432d509a40
Parents: 9c7dead
Author: Steve Gill 
Authored: Fri Mar 18 17:52:03 2016 -0700
Committer: Steve Gill 
Committed: Fri Mar 18 17:52:03 2016 -0700

--
 cordova-common/RELEASENOTES.md | 9 +
 cordova-common/package.json| 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/80b70040/cordova-common/RELEASENOTES.md
--
diff --git a/cordova-common/RELEASENOTES.md b/cordova-common/RELEASENOTES.md
index e7db69c..806b6f2 100644
--- a/cordova-common/RELEASENOTES.md
+++ b/cordova-common/RELEASENOTES.md
@@ -20,6 +20,15 @@
 -->
 # Cordova-common Release Notes
 
+### 1.1.1 (Mar 18, 2016)
+* CB-10694 Update test to reflect merging of CB-9264 fix
+* CB-10694 Platform-specific configuration preferences don't override global 
settings
+* CB-9264 Duplicate entries in `config.xml`
+* CB-10791 Add `adjustLoggerLevel` to `cordova-common.CordovaLogger`
+* CB-10662 Add tests for `ConfigParser.getStaticResources`
+* CB-10622 fix target attribute being ignored for images in `config.xml`.
+* CB-10583 Protect plugin preferences from adding extra Array properties.
+
 ### 1.1.0 (Feb 16, 2016)
 * CB-10482 Remove references to windows8 from cordova-lib/cli
 * CB-10430 Adds forwardEvents method to easily connect two EventEmitters

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/80b70040/cordova-common/package.json
--
diff --git a/cordova-common/package.json b/cordova-common/package.json
index e84b6a5..c38b6da 100644
--- a/cordova-common/package.json
+++ b/cordova-common/package.json
@@ -3,7 +3,7 @@
   "name": "cordova-common",
   "description": "Apache Cordova tools and platforms shared routines",
   "license": "Apache-2.0",
-  "version": "1.2.0-dev",
+  "version": "1.1.1",
   "repository": {
 "type": "git",
 "url": "git://git-wip-us.apache.org/repos/asf/cordova-common.git"


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



[11/37] cordova-lib git commit: CB-10583 Protect plugin preferences from adding extra Array properties. This closes #400

2016-03-18 Thread steven
CB-10583 Protect plugin preferences from adding extra Array properties. This 
closes #400


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

Branch: refs/heads/common-1.1.x
Commit: d437ae1e4240fcb7a98d2833df5d1597ec7f59a8
Parents: bfea262
Author: Vladimir Kotikov 
Authored: Thu Feb 25 11:45:22 2016 +0300
Committer: Vladimir Kotikov 
Committed: Thu Feb 25 17:38:15 2016 +0300

--
 cordova-common/src/PluginInfo/PluginInfo.js | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d437ae1e/cordova-common/src/PluginInfo/PluginInfo.js
--
diff --git a/cordova-common/src/PluginInfo/PluginInfo.js 
b/cordova-common/src/PluginInfo/PluginInfo.js
index 2554a3c..e1a1b31 100644
--- a/cordova-common/src/PluginInfo/PluginInfo.js
+++ b/cordova-common/src/PluginInfo/PluginInfo.js
@@ -43,18 +43,14 @@ function PluginInfo(dirname) {
 //  tag
 // Example: 
 // Used to require a variable to be specified via --variable when 
installing the plugin.
+// returns { key : default | null}
 self.getPreferences = getPreferences;
 function getPreferences(platform) {
-var arprefs = _getTags(self._et, 'preference', platform, 
_parsePreference);
-
-var prefs= {};
-for(var i in arprefs)
-{
-var pref=arprefs[i];
-prefs[pref.preference]=pref.default;
-}
-// returns { key : default | null}
-return prefs;
+return _getTags(self._et, 'preference', platform, _parsePreference)
+.reduce(function (preferences, pref) {
+preferences[pref.preference] = pref.default;
+return preferences;
+}, {});
 }
 
 function _parsePreference(prefTag) {


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



[22/37] cordova-lib git commit: CB-10679: Improving version choosing logic test coverage

2016-03-18 Thread steven
CB-10679: Improving version choosing logic test coverage

This closes #406


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

Branch: refs/heads/common-1.1.x
Commit: 317cfdb374b9dfa215de77c617db0c373dc098c6
Parents: e740deb
Author: riknoll 
Authored: Mon Mar 7 16:10:22 2016 -0800
Committer: riknoll 
Committed: Wed Mar 9 09:39:48 2016 -0800

--
 .../plugins/cordova-lib-test-plugin/LICENSE | 202 +++
 .../plugins/cordova-lib-test-plugin/NOTICE  |   5 +
 .../cordova-lib-test-plugin/package.json|  28 +++
 .../plugins/cordova-lib-test-plugin/plugin.xml  |   4 +
 cordova-lib/spec-cordova/plugin.spec.js |  45 -
 5 files changed, 280 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/317cfdb3/cordova-lib/spec-cordova/fixtures/plugins/cordova-lib-test-plugin/LICENSE
--
diff --git 
a/cordova-lib/spec-cordova/fixtures/plugins/cordova-lib-test-plugin/LICENSE 
b/cordova-lib/spec-cordova/fixtures/plugins/cordova-lib-test-plugin/LICENSE
new file mode 100644
index 000..9b5e401
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/plugins/cordova-lib-test-plugin/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, "submitted"
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the 

[04/37] cordova-lib git commit: CB-10618 Do not call prepBuildFiles for cordova-android@>=5.2.0. This closes #389

2016-03-18 Thread steven
CB-10618 Do not call prepBuildFiles for cordova-android@>=5.2.0. This closes 
#389


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

Branch: refs/heads/common-1.1.x
Commit: 5da4364a8510f9ad83c0abbf8b21ef609e4d0e59
Parents: b792050
Author: Vladimir Kotikov 
Authored: Mon Feb 15 16:50:20 2016 +0300
Committer: Vladimir Kotikov 
Committed: Wed Feb 17 19:02:24 2016 +0300

--
 cordova-lib/src/plugman/install.js   | 15 ++-
 cordova-lib/src/plugman/uninstall.js | 10 --
 2 files changed, 18 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/5da4364a/cordova-lib/src/plugman/install.js
--
diff --git a/cordova-lib/src/plugman/install.js 
b/cordova-lib/src/plugman/install.js
index b7f0d88..53f37ef 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -83,7 +83,7 @@ module.exports = function installPlugin(platform, 
project_dir, id, plugins_dir,
 // Split @Version from the plugin id if it exists.
 var splitVersion = id.split('@');
 //Check if a mapping exists for the plugin id
-//if it does, convert id to new name id 
+//if it does, convert id to new name id
 var newId = pluginMapper[splitVersion[0]];
 if(newId) {
 events.emit('warn', 'Notice: ' + id + ' has been automatically 
converted to ' + newId + ' and fetched from npm. This is due to our old plugins 
registry shutting down.');
@@ -92,7 +92,7 @@ module.exports = function installPlugin(platform, 
project_dir, id, plugins_dir,
 } else {
 id = newId;
 }
- } 
+ }
 return possiblyFetch(id, plugins_dir, options)
 .then(function(plugin_dir) {
 return runInstall(current_stack, platform, project_dir, plugin_dir, 
plugins_dir, options);
@@ -398,7 +398,7 @@ function runInstall(actions, platform, project_dir, 
plugin_dir, plugins_dir, opt
 }
 ).fail(
 function (error) {
-
+
 if(error === 'skip') {
 events.emit('warn', 'Skipping \'' + pluginInfo.id + '\' for ' 
+ platform);
 } else {
@@ -430,7 +430,7 @@ function installDependencies(install, dependencies, 
options) {
 // Split @Version from the plugin id if it exists.
 var splitVersion = dep.id.split('@');
 //Check if a mapping exists for the plugin id
-//if it does, convert id to new name id 
+//if it does, convert id to new name id
 var newId = pluginMapper[splitVersion[0]];
 if(newId) {
 events.emit('warn', 'Notice: ' + dep.id + ' has been 
automatically converted to ' + newId + ' and fetched from npm. This is due to 
our old plugins registry shutting down.');
@@ -613,7 +613,12 @@ function handleInstall(actions, pluginInfo, platform, 
project_dir, plugins_dir,
 .addPlugin(pluginInfo.id, filtered_variables, options.is_top_level)
 .save();
 
-if (platform == 'android' && semver.gte(options.platformVersion, 
'4.0.0-dev') &&
+if (platform == 'android' &&
+semver.gte(options.platformVersion, '4.0.0-dev') &&
+// CB-10533 since 5.2.0-dev prepBuildFiles is now called 
internally by android platform and
+// no more exported from build module
+// TODO: This might be removed once we deprecate 
non-PlatformApi compatible platforms support
+semver.lte(options.platformVersion, '5.2.0-dev') &&
 pluginInfo.getFrameworks(platform).length > 0) {
 
 events.emit('verbose', 'Updating build files since android plugin 
contained ');

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/5da4364a/cordova-lib/src/plugman/uninstall.js
--
diff --git a/cordova-lib/src/plugman/uninstall.js 
b/cordova-lib/src/plugman/uninstall.js
index a46b07b..bf136eb 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -267,7 +267,7 @@ function runUninstallPlatform(actions, platform, 
project_dir, plugin_dir, plugin
 promise = promiseutil.Q_chainmap(danglers, function(dangler) {
 var dependent_path = path.join(plugins_dir, dangler);
 
-//try to convert ID if old-id path doesn't exist. 
+//try to convert ID if old-id path doesn't exist.
 if (!fs.existsSync(dependent_path)) {
 

[23/37] cordova-lib git commit: CB-10791 Add adjustLoggerLevel to cordova-common.CordovaLogger

2016-03-18 Thread steven
CB-10791 Add adjustLoggerLevel to cordova-common.CordovaLogger

Adds corresponding tests


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

Branch: refs/heads/common-1.1.x
Commit: 0386ac2cd76671001ce3d566148522cfd8de614a
Parents: 317cfdb
Author: daserge 
Authored: Wed Mar 9 22:20:01 2016 +0300
Committer: daserge 
Committed: Thu Mar 10 12:36:00 2016 +0300

--
 cordova-common/spec/CordovaLogger.spec.js | 28 ++
 cordova-common/src/CordovaLogger.js   | 17 
 2 files changed, 45 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0386ac2c/cordova-common/spec/CordovaLogger.spec.js
--
diff --git a/cordova-common/spec/CordovaLogger.spec.js 
b/cordova-common/spec/CordovaLogger.spec.js
index fd96488..5c27db1 100644
--- a/cordova-common/spec/CordovaLogger.spec.js
+++ b/cordova-common/spec/CordovaLogger.spec.js
@@ -160,5 +160,33 @@ describe('CordovaLogger class', function() {
 
expect(logger.stderrCursor.write.calls[0].args[0]).toBe('Error: error_message');
 });
 });
+
+describe('adjustLevel method', function () {
+it('should properly adjust log level', function () {
+var resetLogLevel = function() {
+logger.setLevel('normal');
+};
+
+resetLogLevel();
+expect(logger.adjustLevel({verbose: 
true}).logLevel).toEqual('verbose');
+
+resetLogLevel();
+
expect(logger.adjustLevel(['--verbose']).logLevel).toEqual('verbose');
+
+resetLogLevel();
+expect(logger.adjustLevel({silent: 
true}).logLevel).toEqual('error');
+
+resetLogLevel();
+
expect(logger.adjustLevel(['--silent']).logLevel).toEqual('error');
+
+resetLogLevel();
+expect(logger.adjustLevel({verbose: true, silent: 
true}).logLevel).toEqual('verbose');
+
+resetLogLevel();
+expect(logger.adjustLevel(['--verbose', 
'--silent']).logLevel).toEqual('verbose');
+
+resetLogLevel();
+});
+});
 });
 });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0386ac2c/cordova-common/src/CordovaLogger.js
--
diff --git a/cordova-common/src/CordovaLogger.js 
b/cordova-common/src/CordovaLogger.js
index 38bfe69..0a4a49c 100644
--- a/cordova-common/src/CordovaLogger.js
+++ b/cordova-common/src/CordovaLogger.js
@@ -153,6 +153,23 @@ CordovaLogger.prototype.setLevel = function (logLevel) {
 };
 
 /**
+ * Adjusts the current logger level according to the passed options.
+ *
+ * @param   {Object|Array}  opts  An object or args array with options
+ *
+ * @return  {CordovaLogger} Current instance, to allow calls chaining.
+ */
+CordovaLogger.prototype.adjustLevel = function (opts) {
+if (opts.verbose || (Array.isArray(opts) && opts.indexOf('--verbose') !== 
-1)) {
+this.setLevel('verbose');
+} else if (opts.silent || (Array.isArray(opts) && opts.indexOf('--silent') 
!== -1)) {
+this.setLevel('error');
+}
+
+return this;
+};
+
+/**
  * Attaches logger to EventEmitter instance provided.
  *
  * @param   {EventEmitter}  eventEmitter  An EventEmitter instance to attach


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



[25/37] cordova-lib git commit: CB-10808 CLI Support templates with subdirectory

2016-03-18 Thread steven
CB-10808 CLI Support templates with subdirectory

 This closes #410


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

Branch: refs/heads/common-1.1.x
Commit: 07354885e62b4c1c48577e9ed878e8c45193443c
Parents: d779242
Author: Carlos Santana 
Authored: Mon Mar 14 12:17:58 2016 -0400
Committer: Carlos Santana 
Committed: Tue Mar 15 16:58:13 2016 -0400

--
 cordova-lib/spec-cordova/create.spec.js | 105 +--
 .../templates/nopackage_json/config.xml |  45 
 .../templates/nopackage_json/www/index.html |  49 +
 .../templates/withpackage_json/config.xml   |  45 
 .../templates/withpackage_json/pacakge.json |  14 +++
 .../templates/withpackage_json/www/index.html   |  49 +
 .../templates/withsubdirectory/index.js |   4 +
 .../templates/withsubdirectory/package.json |  11 ++
 .../withsubdirectory/template/config.xml|  45 
 .../withsubdirectory/template/www/index.html|  49 +
 .../withsubdirectory_package_json/index.js  |   4 +
 .../withsubdirectory_package_json/package.json  |  11 ++
 .../template/config.xml |  45 
 .../template/package.json   |  10 ++
 .../template/www/index.html |  49 +
 cordova-lib/src/cordova/create.js   |  23 +++-
 16 files changed, 550 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/07354885/cordova-lib/spec-cordova/create.spec.js
--
diff --git a/cordova-lib/spec-cordova/create.spec.js 
b/cordova-lib/spec-cordova/create.spec.js
index 1f4be51..99579a2 100644
--- a/cordova-lib/spec-cordova/create.spec.js
+++ b/cordova-lib/spec-cordova/create.spec.js
@@ -35,8 +35,7 @@ var configNormal = {
   lib: {
 www: {
   url: path.join(__dirname, 'fixtures', 'base', 'www'),
-  version: 'testCordovaCreate',
-  id: appName
+  version: 'testCordovaCreate'
 }
   }
 };
@@ -54,8 +53,7 @@ var configGit = {
 www: {
 url: 'https://github.com/apache/cordova-app-hello-world',
 template: true,
-version: 'not_versioned',
-id: appName
+version: 'not_versioned'
 }
 }
 };
@@ -65,8 +63,7 @@ var configNPM = {
 www: {
 template: true,
 url: 'cordova-app-hello-world',
-version: '',
-id: appName
+version: ''
 }
 }
 };
@@ -194,6 +191,102 @@ describe('create end-to-end', function() {
 })
 .fin(done);
 });
+
+it('should successfully run with template not having a package.json at 
toplevel', function(done) {
+// Call cordova create with no args, should return help.
+var config = {
+lib: {
+www: {
+template: true,
+url: path.join(__dirname, 'fixtures', 'templates', 
'nopackage_json'),
+version: ''
+}
+}
+};
+Q()
+.then(function() {
+// Create a real project
+return cordova.raw.create(project, appId, appName, config);
+})
+.then(checkProject)
+.fail(function(err) {
+console.log(err && err.stack);
+expect(err).toBeUndefined();
+})
+.fin(done);
+});
+
+it('should successfully run with template having package.json and no sub 
directory', function(done) {
+// Call cordova create with no args, should return help.
+var config = {
+lib: {
+www: {
+template: true,
+url: path.join(__dirname, 'fixtures', 'templates', 
'withpackage_json'),
+version: ''
+}
+}
+};
+Q()
+.then(function() {
+// Create a real project
+return cordova.raw.create(project, appId, appName, config);
+})
+.then(checkProject)
+.fail(function(err) {
+console.log(err && err.stack);
+expect(err).toBeUndefined();
+})
+.fin(done);
+});
+
+it('should successfully run with template having package.json, and 
subdirectory, and no package.json in subdirectory', function(done) {
+// Call cordova create with no args, should 

[37/37] cordova-lib git commit: CB-10911 Incremented package version to -dev

2016-03-18 Thread steven
CB-10911 Incremented package version to -dev


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

Branch: refs/heads/master
Commit: 9f630271d9c02824c0031ea4cdc0e4955b53d9e2
Parents: 80b7004
Author: Steve Gill 
Authored: Fri Mar 18 17:56:17 2016 -0700
Committer: Steve Gill 
Committed: Fri Mar 18 17:56:17 2016 -0700

--
 cordova-common/package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9f630271/cordova-common/package.json
--
diff --git a/cordova-common/package.json b/cordova-common/package.json
index c38b6da..20c4916 100644
--- a/cordova-common/package.json
+++ b/cordova-common/package.json
@@ -3,7 +3,7 @@
   "name": "cordova-common",
   "description": "Apache Cordova tools and platforms shared routines",
   "license": "Apache-2.0",
-  "version": "1.1.1",
+  "version": "1.1.2-dev",
   "repository": {
 "type": "git",
 "url": "git://git-wip-us.apache.org/repos/asf/cordova-common.git"


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



[31/37] cordova-lib git commit: CB-10902 updated pinned platforms

2016-03-18 Thread steven
CB-10902 updated pinned platforms


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

Branch: refs/heads/common-1.1.x
Commit: 3502274a0028db36bc41f9f61257e3c6d24af7f5
Parents: c9b0423
Author: Steve Gill 
Authored: Thu Mar 17 16:08:51 2016 -0700
Committer: Steve Gill 
Committed: Thu Mar 17 16:08:51 2016 -0700

--
 cordova-lib/src/platforms/platformsConfig.json | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3502274a/cordova-lib/src/platforms/platformsConfig.json
--
diff --git a/cordova-lib/src/platforms/platformsConfig.json 
b/cordova-lib/src/platforms/platformsConfig.json
index 8b4a649..f411f8b 100644
--- a/cordova-lib/src/platforms/platformsConfig.json
+++ b/cordova-lib/src/platforms/platformsConfig.json
@@ -4,7 +4,7 @@
 "parser_file": "../cordova/metadata/ios_parser",
 "handler_file": "../plugman/platforms/ios",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;,
-"version": "~4.0.1",
+"version": "~4.1.0",
 "apiCompatibleSince": "4.0.0",
 "deprecated": false
 },
@@ -13,7 +13,7 @@
 "parser_file": "../cordova/metadata/osx_parser",
 "handler_file": "../plugman/platforms/ios",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-osx.git;,
-"version": "~4.0.0",
+"version": "~4.0.1",
 "apiCompatibleSince": "4.0.0",
 "deprecated": false
 },
@@ -21,7 +21,7 @@
 "parser_file": "../cordova/metadata/android_parser",
 "handler_file": "../plugman/platforms/android",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;,
-"version": "~5.1.0",
+"version": "~5.1.1",
 "apiCompatibleSince": "5.0.0",
 "deprecated": false
 },
@@ -30,7 +30,7 @@
 "parser_file": "../cordova/metadata/ubuntu_parser",
 "handler_file": "../plugman/platforms/ubuntu",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-ubuntu.git;,
-"version": "~4.3.2",
+"version": "~4.3.3",
 "deprecated": false
 },
 "amazon-fireos": {
@@ -75,7 +75,7 @@
 "parser_file": "../cordova/metadata/windows_parser",
 "handler_file": "../plugman/platforms/windows",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git;,
-"version": "~4.3.0",
+"version": "~4.3.1",
 "apiCompatibleSince": "4.3.0",
 "deprecated": false
 },
@@ -90,7 +90,7 @@
 "parser_file": "../cordova/metadata/browser_parser",
 "handler_file": "../plugman/platforms/browser",
 "url": "https://git-wip-us.apache.org/repos/asf?p=cordova-browser.git;,
-"version": "~4.0.0",
+"version": "~4.1.0",
 "deprecated": false
 }
 }


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



[20/37] cordova-lib git commit: CB-10673 add plugin --force option. This closes #404

2016-03-18 Thread steven
CB-10673 add plugin --force option. This closes #404


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

Branch: refs/heads/common-1.1.x
Commit: e1bde1afa0f22b783d3cecc5f7d14c39ab17528b
Parents: 45a235f
Author: Byoungro So 
Authored: Tue Mar 1 23:23:19 2016 -0800
Committer: Nikhil Khandelwal 
Committed: Mon Mar 7 22:43:42 2016 -0800

--
 cordova-lib/src/cordova/platform.js | 1 +
 cordova-lib/src/cordova/plugin.js   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e1bde1af/cordova-lib/src/cordova/platform.js
--
diff --git a/cordova-lib/src/cordova/platform.js 
b/cordova-lib/src/cordova/platform.js
index 1b745be..9b1157e 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -654,6 +654,7 @@ function installPluginsForNewPlatform(platform, 
projectRoot, opts) {
 // specify the option below in both places
 usePlatformWww: true,
 is_top_level: pluginMetadata.is_top_level
+force: opts.force
 };
 
 var variables = pluginMetadata && pluginMetadata.variables;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e1bde1af/cordova-lib/src/cordova/plugin.js
--
diff --git a/cordova-lib/src/cordova/plugin.js 
b/cordova-lib/src/cordova/plugin.js
index c5ead29..a5398a0 100644
--- a/cordova-lib/src/cordova/plugin.js
+++ b/cordova-lib/src/cordova/plugin.js
@@ -176,7 +176,8 @@ module.exports = function plugin(command, targets, opts) {
 // and files from 'platform_www' merged 
into 'www'. Thus we need to persist these
 // files platform_www directory, so 
they'll be applied to www on each prepare.
 usePlatformWww: true,
-nohooks: opts.nohooks
+nohooks: opts.nohooks,
+force: opts.force
 };
 
 events.emit('verbose', 'Calling 
plugman.install on plugin "' + pluginInfo.dir + '" for platform "' + platform);


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



[15/37] cordova-lib git commit: CB-10462 Get rid of npmconf in favor of npm. This closes #401

2016-03-18 Thread steven
CB-10462 Get rid of npmconf in favor of npm. This closes #401


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

Branch: refs/heads/common-1.1.x
Commit: 0aef8928e19cc32051fcda9afb66364022ab9c5f
Parents: cda2b72
Author: Vladimir Kotikov 
Authored: Fri Feb 26 14:20:14 2016 +0300
Committer: Vladimir Kotikov 
Committed: Sat Feb 27 12:38:51 2016 +0300

--
 cordova-lib/package.json   |  1 -
 cordova-lib/spec-cordova/lazy_load.spec.js | 12 +---
 cordova-lib/src/cordova/lazy_load.js   |  9 -
 3 files changed, 9 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0aef8928/cordova-lib/package.json
--
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 0be249d..1d452fa 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -53,7 +53,6 @@
 "init-package-json": "^1.2.0",
 "nopt": "^3.0.6",
 "npm": "^2.10.x",
-"npmconf": "^2.1.x",
 "opener": "1.4.1",
 "plist": "^1.2.0",
 "properties-parser": "0.2.3",

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0aef8928/cordova-lib/spec-cordova/lazy_load.spec.js
--
diff --git a/cordova-lib/spec-cordova/lazy_load.spec.js 
b/cordova-lib/spec-cordova/lazy_load.spec.js
index a986f27..410c99c 100644
--- a/cordova-lib/spec-cordova/lazy_load.spec.js
+++ b/cordova-lib/spec-cordova/lazy_load.spec.js
@@ -22,7 +22,7 @@
 var lazy_load = require('../src/cordova/lazy_load'),
 config = require('../src/cordova/config'),
 shell = require('shelljs'),
-npmconf = require('npmconf'),
+npm = require('npm'),
 path = require('path'),
 HooksRunner = require('../src/hooks/HooksRunner'),
 request = require('request'),
@@ -113,9 +113,7 @@ describe('lazy_load module', function() {
 });
 
 describe('remote URLs for libraries', function() {
-var npmConfProxy;
 var req,
-load_spy,
 events = {},
 fakeRequest = {
 on: jasmine.createSpy().andCallFake(function(event, cb) {
@@ -125,7 +123,6 @@ describe('lazy_load module', function() {
 pipe: jasmine.createSpy().andCallFake(function() { return 
fakeRequest; })
 };
 beforeEach(function() {
-npmConfProxy = null;
 events = {};
 fakeRequest.on.reset();
 fakeRequest.pipe.reset();
@@ -136,7 +133,8 @@ describe('lazy_load module', function() {
 }, 10);
 return fakeRequest;
 });
-load_spy = spyOn(npmconf, 'load').andCallFake(function(cb) { 
cb(null, { get: function() { return npmConfProxy; }}); });
+spyOn(npm, 'load').andCallFake(function(cb) { cb(); });
+spyOn(npm.config, 'get').andReturn(null);
 });
 
 it('should call request with appropriate url params', 
function(done) {
@@ -158,7 +156,7 @@ describe('lazy_load module', function() {
 });
 it('should take into account https-proxy npm configuration var if 
exists for https:// calls', function(done) {
 var proxy = 'https://somelocalproxy.com';
-npmConfProxy = proxy;
+npm.config.get.andReturn(proxy);
 var url = 'https://github.com/apache/someplugin';
 var with_android_platform = {
 'android': {
@@ -178,7 +176,7 @@ describe('lazy_load module', function() {
 });
 it('should take into account proxy npm config var if exists for 
http:// calls', function(done) {
 var proxy = 'http://somelocalproxy.com';
-npmConfProxy = proxy;
+npm.config.get.andReturn(proxy);
 var url = 'http://github.com/apache/someplugin';
 var with_android_platform = {
 'android': {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0aef8928/cordova-lib/src/cordova/lazy_load.js
--
diff --git a/cordova-lib/src/cordova/lazy_load.js 
b/cordova-lib/src/cordova/lazy_load.js
index 9079329..bdd01c9 100644
--- a/cordova-lib/src/cordova/lazy_load.js
+++ b/cordova-lib/src/cordova/lazy_load.js
@@ -25,7 +25,6 @@ var path  = require('path'),
 fs= require('fs'),
 shell 

[10/37] cordova-lib git commit: CB-10662 Use project's config.xml as a fallback for package name

2016-03-18 Thread steven
CB-10662 Use project's config.xml as a fallback for package name


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

Branch: refs/heads/common-1.1.x
Commit: bfea262310d7cad01f7d23725492703a11f1ba13
Parents: 96cd416
Author: Vladimir Kotikov 
Authored: Thu Feb 25 13:03:12 2016 +0300
Committer: Vladimir Kotikov 
Committed: Thu Feb 25 14:32:38 2016 +0300

--
 cordova-lib/src/plugman/platforms/browser.js   | 22 +-
 cordova-lib/src/plugman/platforms/common.js| 32 +
 cordova-lib/src/plugman/platforms/firefoxos.js | 22 +-
 cordova-lib/src/plugman/platforms/webos.js | 22 +-
 4 files changed, 35 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/bfea2623/cordova-lib/src/plugman/platforms/browser.js
--
diff --git a/cordova-lib/src/plugman/platforms/browser.js 
b/cordova-lib/src/plugman/platforms/browser.js
index b9cb54f..3aaa961 100644
--- a/cordova-lib/src/plugman/platforms/browser.js
+++ b/cordova-lib/src/plugman/platforms/browser.js
@@ -20,10 +20,8 @@
 /* jshint laxcomma:true, sub:true */
 
 var path = require('path')
-, fs = require('fs')
 , common = require('./common')
 , events = require('cordova-common').events
-, xml_helpers = require('cordova-common').xmlHelpers
 ;
 
 module.exports = {
@@ -31,25 +29,7 @@ module.exports = {
 return path.join(project_dir, 'www');
 },
 package_name:function(project_dir) {
-// preferred location if cordova >= 3.4
-var preferred_path = path.join(project_dir, 'config.xml');
-var config_path;
-
-if (!fs.existsSync(preferred_path)) {
-// older location
-var old_config_path = 
path.join(module.exports.www_dir(project_dir), 'config.xml');
-if (!fs.existsSync(old_config_path)) {
-// output newer location and fail reading
-config_path = preferred_path;
-events.emit('verbose', 'unable to find '+config_path);
-} else {
-config_path = old_config_path;
-}
-} else {
-config_path = preferred_path;
-}
-var widget_doc = xml_helpers.parseElementtreeSync(config_path);
-return widget_doc._root.attrib['id'];
+return common.package_name(project_dir, this.www_dir(project_dir));
 },
 'source-file':{
 install:function(obj, plugin_dir, project_dir, plugin_id, options) {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/bfea2623/cordova-lib/src/plugman/platforms/common.js
--
diff --git a/cordova-lib/src/plugman/platforms/common.js 
b/cordova-lib/src/plugman/platforms/common.js
index df5befa..cb5075d 100644
--- a/cordova-lib/src/plugman/platforms/common.js
+++ b/cordova-lib/src/plugman/platforms/common.js
@@ -22,7 +22,39 @@ var shell = require('shelljs'),
 fs= require('fs'),
 common;
 
+var cordovaUtil = require('../../cordova/util');
+var CordovaError = require('cordova-common').CordovaError;
+var xmlHelpers = require('cordova-common').xmlHelpers;
+
 module.exports = common = {
+package_name: function(project_dir, www_dir) {
+
+var configPaths = [
+// preferred location if cordova >= 3.4
+path.join(project_dir, 'config.xml'),
+// older location
+path.join(www_dir || path.join(project_dir, 'www'), 'config.xml'),
+];
+
+var cordovaRoot = cordovaUtil.isCordova();
+if (cordovaRoot) {
+// CB-10662 If we're in cli project then add project's config as a 
fallback
+configPaths.push(path.join(cordovaRoot, 'config.xml'));
+}
+
+for (var i = 0; i < configPaths.length; i++) {
+var configPath = configPaths[i];
+// If no config there try next path
+if (!fs.existsSync(configPath)) continue;
+
+var widget_doc = xmlHelpers.parseElementtreeSync(configPath);
+return widget_doc._root.attrib.id;
+}
+
+// No configs found - fail with meaningful error message
+throw new CordovaError('Unable to find project\'s config in any of ' +
+'the following directories:\n\t' + configPaths.join('\n\t'));
+},
 // helper for resolving source paths from plugin.xml
 resolveSrcPath:function(plugin_dir, relative_path) {
 var full_path = path.resolve(plugin_dir, relative_path);