[GitHub] cordova-wp8 pull request: CB-6728 Support chip architecture as an ...

2014-07-31 Thread vladimir-kotikov
Github user vladimir-kotikov commented on the pull request:

https://github.com/apache/cordova-wp8/pull/39#issuecomment-50854468
  
Hi @purplecabbage . I can't repro your issue with cordova-wp8 checked to 
this commit and latest cordova-cli/lib. Anyway, i've tried to change app 
version in config.xml and fount that build fails with similar message `Manifest 
validation failed: AppManifestInvalidVersion` when version string length > 10. 
See following screenshots:

![image](https://cloud.githubusercontent.com/assets/3857604/3775618/19ec8a3c-1948-11e4-93c2-cd6dc245a1e6.png)


![image](https://cloud.githubusercontent.com/assets/3857604/3775627/328c176a-1948-11e4-9d76-44f8e5100b46.png)

Could you pls check this in your project?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-plugin-contacts pull request: Removed [optional] tag from ...

2014-07-31 Thread SebastianMH
GitHub user SebastianMH opened a pull request:

https://github.com/apache/cordova-plugin-contacts/pull/37

Removed [optional] tag from contactFindOptions. Fixes #CB-7247

https://issues.apache.org/jira/browse/CB-7247
The parameter contactFindOptions of navigator.contacts.find is labeled 
optional but actually is required.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/SebastianMH/cordova-plugin-contacts CB-7247

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-contacts/pull/37.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #37


commit ec87861129f2933b52e05fd6eeb343002e8ac34b
Author: Sebastian Miller-Hack 
Date:   2014-08-01T06:26:18Z

Removed [optional] tag from contactFindOptions. Fixes #CB-7247




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Experimenting with JSCS + JSHint in cordova-lib

2014-07-31 Thread Mark Koudritsky
Just opened a pull request with an experimental JSCS config. Would be glad
to get some feedback about this. My goal is to eventually run JSCS together
with JSHint as part of `npm test`. This is a relatively liberal config that
doesn't generate too many warnings with the existing code.

https://github.com/apache/cordova-lib/pull/69


## Some background

JSHint people want to focus on syntax linting and are dropping style
oriented
options. They recommend using JSCS (in addition to JSHint) for style:
https://github.com/jshint/jshint/issues/1339

Options dropped from JSHint were added to JSCS some time ago:
https://github.com/mdevils/node-jscs/issues/102

I'm using it with SublimeLinter-jscs
https://sublime.wbond.net/packages/SublimeLinter-jscs


[GitHub] cordova-lib pull request: Add JSCS config file

2014-07-31 Thread kamrik
GitHub user kamrik opened a pull request:

https://github.com/apache/cordova-lib/pull/69

Add JSCS config file

Don't merge yet - feedback wanted.

JSHint people want to focus on syntax linting and are dropping style 
oriented
options. They recommend using JSCS (in addition to JSHint) for style:
https://github.com/jshint/jshint/issues/1339

JSCS has recently added the options dropped from JSHint.
https://github.com/mdevils/node-jscs/issues/102

This commit contains a JSCS config file with some basic settings that 
generate
very few errors with the existing cordova-cli and lib code.

Would be glad to get some feedback about this. My goal is to eventually run
JSCS together with JSHint as part of `npm test`. The nice thing about JSCS
is that style flame wars can be way more structured with it, as we can argue
about very specific well named JSCS config options, or even vote on them :)

I'm using it with SublimeLinter-jscs
https://sublime.wbond.net/packages/SublimeLinter-jscs

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kamrik/cordova-lib jscs

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-lib/pull/69.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #69


commit bad67bd12958d8ba7d32ffe41cdc81967bd17a15
Author: Mark Koudritsky 
Date:   2014-07-31T17:42:47Z

Add JSCS config file

Don't merge yet - feedback wanted.

JSHint people want to focus on syntax linting and are dropping style 
oriented
options. They recommends using JSCS (in addition to JSHint) for style:
https://github.com/jshint/jshint/issues/1339

JSCS has recently added the options dropped from JSHint.
https://github.com/mdevils/node-jscs/issues/102

This commit contains a JSCS config file with some basic settings that 
generate
very few errors with the existing cordova-cli and lib code.

Would be glad to get some feedback about this. My goal is to eventually run
JSCS together with JSHint as part of `npm test`. The nice thing about JSCS
is that style flame wars can be way more structured with it as we can argue
about very specific well named JSCS config options :)

I'm using it with SublimeLinter-jscs
https://sublime.wbond.net/packages/SublimeLinter-jscs




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [DISCUSS] Plugins Release

2014-07-31 Thread Steven Gill
So Globalization has issues with missing headers and needs a update to the
notice file for new licenses. Both Blackberry and FFOS need to go do this
before I release that plugin!

What am I doing with test-harness? That isn't being released right? It also
needs headers included + notice file updates.


On Thu, Jul 31, 2014 at 7:18 AM, Bryan Higgins 
wrote:

> I'm into it! BlackBerry now supports File plugin roots and Globalization :)
>
>
> On Tue, Jul 29, 2014 at 3:29 PM, Steven Gill 
> wrote:
>
> > How do you all feel about a plugins release?
> >
> > I can aim to start a vote thread tomorrow or Thursday if people feel good
> > about it.
> >
> > -Steve
> >
>


[GitHub] cordova-mobile-spec pull request: CB-7242 Added wp8 subdirectory t...

2014-07-31 Thread martincgg
GitHub user martincgg opened a pull request:

https://github.com/apache/cordova-mobile-spec/pull/84

CB-7242 Added wp8 subdirectory to localPlatforms variable

createmobilespec --wp8 fails, because the path for wp8 on localPlatforms
is incomplete, it requires the wp8 subdirectory to work properly.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/martincgg/cordova-mobile-spec CB-7242

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-mobile-spec/pull/84.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #84


commit 5bba7a0fdc40d1a4f5595325a25d3314c5749ba7
Author: Martin Gonzalez 
Date:   2014-07-31T20:58:03Z

CB-7242 Added wp8 subdirectory to localPlatforms variable

createmobilespec --wp8 fails, because the path for wp8 on localPlatforms
is incomplete, it requires the wp8 subdirectory to work properly.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Browserify support for cordova-lib/cordova-cli

2014-07-31 Thread Steven Gill
This looks good to me. Anyone else want to test it before I merge it in?


On Wed, Jul 30, 2014 at 3:38 PM, Suraj Pindoria <
suraj.pindo...@yahoo.com.invalid> wrote:

> So I updated this to include some of the additional use cases discussed
> earlier.  Now, running "cordova prepare --browserify" in an existing
> project will update it use prepare-browserify.  It also works with "cordova
> run --browserify".  Adding and removing plugins should still use the
> "--browserify" flag.
>
> Please try it out and let me know if there are any other use cases that
> are still missing.
>
> Thanks,
> Suraj.
>
>
> On Tuesday, July 29, 2014 7:35 PM, Michal Mocny 
> wrote:
>
>
>
> Sounds like a setting that would go well in .cordova/config.json, I think.
>
> -Michal
>
>
>
> On Tue, Jul 29, 2014 at 6:10 PM, Steven Gill 
> wrote:
>
> > Decided to add a few more issues and organize around a master issue.
> >
> > https://issues.apache.org/jira/browse/CB-7190
> >
> > If you guys think of other use cases, let us know!
> >
> >
> > On Tue, Jul 29, 2014 at 2:47 PM, Suraj Pindoria <
> > suraj.pindo...@yahoo.com.invalid> wrote:
> >
> > > Right now it only works when you add the plugins with the flag.
> > >
> > > Current working use case:
> > > -Create a project
> > > -Add platform
> > > -Add plugins with browserify flag
> > >
> > > Adding a platform after does not use the proper browserify-prepare.
> > >  Obviously an issue.
> > >
> > > We just realized an issue we need to solve first.
> > > https://issues.apache.org/jira/browse/CB-7227
> > >
> > > Also, the case for "cordova prepare --browserify" on an existing
> project
> > > needs to be handled.
> > >
> > > We are also thinking about saving the browserify flag, so that way we
> do
> > > not need to keep adding the flag after it has been used once.  Where
> > would
> > > be the best place to save this?
> > > "cordova create --browserify test com.example.test browserifyTest"
> > > Saves browserify flag for use throughout the project.
> > >
> > > Suraj.
> > >
> > >
> > > On Tuesday, July 29, 2014 2:21 PM, Michal Mocny 
> > > wrote:
> > >
> > >
> > >
> > > Just to confirm: Can I run "cordova prepare --browserify" is any
> existing
> > > workspace, or would I have needed to add all plugins / platforms with
> > that
> > > flag as well?
> > >
> > > -Michal
> > >
> > >
> > >
> > > On Tue, Jul 29, 2014 at 3:27 PM, Steven Gill 
> > > wrote:
> > >
> > > > cordova prepare --browserify works too
> > > >
> > > > https://issues.apache.org/jira/browse/CB-7001
> > > > https://issues.apache.org/jira/browse/CB-7190
> > > >
> > > >
> > > > On Tue, Jul 29, 2014 at 12:02 PM, Suraj Pindoria <
> > > > suraj.pindo...@yahoo.com.invalid> wrote:
> > > >
> > > > > Hi everyone,
> > > > >
> > > > > I have been working with Anis and Steve to add browserify support
> in
> > > > > cordova-lib and cordova-cli.  They way this is being done is
> through
> > a
> > > > flag
> > > > > in the CLI which then calls prepare-browserify versus the standard
> > > > prepare,
> > > > > an example:
> > > > > "cordova plugin --browserify add org.apache.cordova.*"
> > > > > "cordova plugin --browserify rm org.apache.cordova.*"
> > > > >
> > > > >
> > > > > So far it has only been tested using iOS and Android and requires
> > that
> > > > the
> > > > > browserify flag is present whenever you add or remove a plugin.
> Let
> > me
> > > > > know if you have any questions or concerns.
> > > > >
> > > > > https://github.com/apache/cordova-lib/pull/66
> > > > >
> > > > > https://github.com/apache/cordova-cli/pull/185
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Suraj.
> > > >
> > >
> >
>


[GitHub] cordova-plugin-media-capture pull request: CB-6959 ported capture ...

2014-07-31 Thread stacic
Github user stacic commented on the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/22#issuecomment-50808014
  
Tests removed from mobile-spec here: 
https://github.com/apache/cordova-mobile-spec/pull/83


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-mobile-spec pull request: CB-6959 Removed capture tests

2014-07-31 Thread stacic
GitHub user stacic opened a pull request:

https://github.com/apache/cordova-mobile-spec/pull/83

CB-6959 Removed capture tests

Tests should be replaced with this ported ones in this PR: 
https://github.com/apache/cordova-plugin-media-capture/pull/22

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stacic/cordova-mobile-spec CB-6959

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-mobile-spec/pull/83.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #83


commit a9105e9c568e46272ef702d2a11794a82a58e4b2
Author: Staci Cooper 
Date:   2014-07-31T19:36:11Z

CB-6959 Removed capture tests




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Cordova plugin : plugin-network-information

2014-07-31 Thread Shazron
I'll tag this 0.2.10:
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-network-information.git;a=commit;h=07ff22accc1e0a22dbf97153a516ebef886aae41

Which corresponds to the sha from the Vote thread for 0.2.10:
cordova-plugin-network-information: 0.2.10 (07ff22accc)

On Thu, Jul 31, 2014 at 12:23 PM, Shazron  wrote:
> Hmm, indeed 0.2.10 was released but not tagged 0.2.10 in the plugin's
> Apaches git repo.
>
> On Thu, Jul 31, 2014 at 5:51 AM, BOURGE, Guillaume
>  wrote:
>> Hello,
>>
>> We work on cordova app for a client and he requires that each externals 
>> sources must be tagued. We used the 0.2.9 but we had the issue "CB-6907" 
>> https://issues.apache.org/jira/browse/CB-6907?jql=project%20%3D%20CB%20AND%20component%20%3D%20%22Plugin%20Network%20Information%22%20ORDER%20BY%20updated%20DESC%2C%20priority%20DESC%2C%20created%20ASC
>>
>> Apparently the issue is fixed in the actual 0.2.10 but that is not tagged. 
>> Can you tag the version 0.2.10 please ?
>>
>> Best regards,
>>
>> ___
>> Guillaume Bourge
>> Consultant Mobilité Lab'innovation
>>
>> Capgemini | Nantes
>> Tel.: +33 2 28 20 09 68
>> www.capgemini.com
>>  People matter, results count.
>> ___
>> P Please consider the environment and do not print this email unless 
>> absolutely necessary. Capgemini encourages environnemental awareness.
>> This message contains information that may be privileged or confidential and 
>> is the property of the Capgemini Group. It is intended only for the person 
>> to whom it is addressed. If you are not the intended recipient, you are not 
>> authorized to read, print, retain, copy, disseminate, distribute, or use 
>> this message or any part thereof. If you receive this message in error, 
>> please notify the sender immediately and delete all copies of this message.


Re: Cordova plugin : plugin-network-information

2014-07-31 Thread Shazron
Hmm, indeed 0.2.10 was released but not tagged 0.2.10 in the plugin's
Apaches git repo.

On Thu, Jul 31, 2014 at 5:51 AM, BOURGE, Guillaume
 wrote:
> Hello,
>
> We work on cordova app for a client and he requires that each externals 
> sources must be tagued. We used the 0.2.9 but we had the issue "CB-6907" 
> https://issues.apache.org/jira/browse/CB-6907?jql=project%20%3D%20CB%20AND%20component%20%3D%20%22Plugin%20Network%20Information%22%20ORDER%20BY%20updated%20DESC%2C%20priority%20DESC%2C%20created%20ASC
>
> Apparently the issue is fixed in the actual 0.2.10 but that is not tagged. 
> Can you tag the version 0.2.10 please ?
>
> Best regards,
>
> ___
> Guillaume Bourge
> Consultant Mobilité Lab'innovation
>
> Capgemini | Nantes
> Tel.: +33 2 28 20 09 68
> www.capgemini.com
>  People matter, results count.
> ___
> P Please consider the environment and do not print this email unless 
> absolutely necessary. Capgemini encourages environnemental awareness.
> This message contains information that may be privileged or confidential and 
> is the property of the Capgemini Group. It is intended only for the person to 
> whom it is addressed. If you are not the intended recipient, you are not 
> authorized to read, print, retain, copy, disseminate, distribute, or use this 
> message or any part thereof. If you receive this message in error, please 
> notify the sender immediately and delete all copies of this message.


Re: CLI breaking changes on master

2014-07-31 Thread Martin Gonzalez
Yes, you are right, linking it with the latest cordova-lib in master works
pretty fine. I think that the master branch should be working stable and
working just typing "npm install", it just seems like an extra burden, get
to clone cordova-lib, then install it, then link it to the CLI node modules.

Well even so, the package.json on the CLI points to a cordova-lib that it
may not be fully compatible with CLI on master.
In that case, it would be better remove cordova-lib dependency from the
package.json, to force to get the right cordova-lib, install it and link
it, in order to make it work.
Have you consider that work in a different branch and publish into master,
only when the proper and fully compatible "cordova-lib" is released to npm,
and available to use?



2014-07-31 12:25 GMT-05:00 Josh Soref :

> That's just because ‎you didn't link cordova-lib into the cordova-cli
> node-modules directory.
>
> A bug was filed today to fix the mobile spec create script to tell you
> what to do.
>
> Sent from my BlackBerry 10 smartphone.
>
>


-- 
Regards,
Martin Gonzalez


Cordova plugin : plugin-network-information

2014-07-31 Thread BOURGE, Guillaume
Hello,

We work on cordova app for a client and he requires that each externals sources 
must be tagued. We used the 0.2.9 but we had the issue "CB-6907" 
https://issues.apache.org/jira/browse/CB-6907?jql=project%20%3D%20CB%20AND%20component%20%3D%20%22Plugin%20Network%20Information%22%20ORDER%20BY%20updated%20DESC%2C%20priority%20DESC%2C%20created%20ASC

Apparently the issue is fixed in the actual 0.2.10 but that is not tagged. Can 
you tag the version 0.2.10 please ?

Best regards,

___
Guillaume Bourge
Consultant Mobilité Lab'innovation

Capgemini | Nantes
Tel.: +33 2 28 20 09 68
www.capgemini.com
 People matter, results count.
___
P Please consider the environment and do not print this email unless absolutely 
necessary. Capgemini encourages environnemental awareness.
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.


[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-31 Thread sgrebnov
Github user sgrebnov commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/55#discussion_r15658798
  
--- Diff: cordova-lib/src/hooks/scriptsFinder.js ---
@@ -0,0 +1,164 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+var path = require('path'),
+fs = require('fs'),
+cordovaUtil = require('../cordova/util'),
+events = require('../events'),
+Q = require('q'),
+plugin  = require('../cordova/plugin'),
+PluginInfo = require('../PluginInfo'),
+ConfigParser = require('../configparser/ConfigParser');
+
+/**
+ * Implements logic to retrieve hook script files defined in special 
folders and configuration
+ * files: config.xml, hooks/hook_type, plugins/../plugin.xml, etc
+ */
+module.exports  = {
+/**
+ * Returns all script files for the hook type specified.
+ */
+getHookScripts: function(hook, opts) {
+// args check
+if (!hook) {
+throw new Error('hook type is not specified');
+}
+return getApplicationHookScripts(hook, opts)
+.concat(getPluginsHookScripts(hook, opts));
+}
+};
+
+/**
+ * Returns script files defined on application level.
+ * They are stored in .cordova/hooks folders and in config.xml.
+ */
+function getApplicationHookScripts(hook, opts) {
+// args check
+if (!hook) {
+throw new Error('hook type is not specified');
+}
+return getApplicationHookScriptsFromDir(path.join(opts.projectRoot, 
'.cordova', 'hooks', hook))
+
.concat(getApplicationHookScriptsFromDir(path.join(opts.projectRoot, 'hooks', 
hook)))
+.concat(getScriptsFromConfigXml(hook, opts));
+}
+
+/**
+ * Returns script files defined by plugin developers as part of plugin.xml.
+ */
+function getPluginsHookScripts(hook, opts) {
+// args check
+if (!hook) {
+throw new Error('hook type is not specified');
+}
+
+// In case before_plugin_install, after_plugin_install, 
before_plugin_uninstall hooks we receive opts.plugin and
+// retrieve scripts exclusive for this plugin.
+if(opts.plugin) {
+events.emit('debug', 'Executing "' + hook + '"  hook for "' + 
opts.plugin.id + '" on ' + opts.plugin.platform + '.');
+
+return getPluginScriptFiles(opts.plugin, hook, [ 
opts.plugin.platform ]);
+}
+
+events.emit('debug', 'Executing "' + hook + '"  hook for all 
plugins.');
+return getAllPluginsHookScriptFiles(hook, opts);
+}
+
+/**
+ * Gets application level hooks from the directrory specified.
+ */
+function getApplicationHookScriptsFromDir(dir) {
+if (!(fs.existsSync(dir))) {
+return [];
+}
+
+var compareNumbers = function(a, b) {
+// TODO SG looks very complex, do we really need this?
+return isNaN (parseInt(a, 10)) ? 
a.toLowerCase().localeCompare(b.toLowerCase ? b.toLowerCase(): b)
+: parseInt(a, 10) > parseInt(b, 10) ? 1 : parseInt(a, 10) < 
parseInt(b, 10) ? -1 : 0;
+};
+
+var scripts = 
fs.readdirSync(dir).sort(compareNumbers).filter(function(s) {
+return s[0] != '.';
+});
+return scripts.map(function (scriptPath) {
+// for old style hook files we don't use module loader for 
backward compatibility
+return { path: scriptPath, fullPath: path.join(dir, scriptPath), 
useModuleLoader: false };
+});
+}
+
+/**
+ * Gets all scripts defined in config.xml with the specified type and 
platforms.
+ */
+function getScriptsFromConfigXml(hook, opts) {
+var configPath = cordovaUtil.projectConfig(opts.projectRoot);
+var configXml;
+
+try {
+configXml = new ConfigParser(configPath);
+} catch(ex) {
+events.emit('err', 'scriptsFinder could not load config.xml: ' + 
ex.message);
+console.log('scriptsFinder c

Re: CLI breaking changes on master

2014-07-31 Thread Josh Soref
That's just because ‎you didn't link cordova-lib into the cordova-cli 
node-modules directory. 

A bug was filed today to fix the mobile spec create script to tell you what to 
do. 

Sent from my BlackBerry 10 smartphone.



CLI breaking changes on master

2014-07-31 Thread Martin Gonzalez
Hi all,

CLI on master, contains some changes that are breaking "--link-to"
argument, throwing a error during usage.
--link-to is highly used by createmobilespec module to link the custom
resources in there, so by extension is breaking the workflow on that module
as well.

I've switched to "rb_3.5.0-0.2.6" branch, which is stable and functional.
Both master and rb_3.5.0-0.2.6 are using "cordova-lib: 21.6", so the
problem should be found on CLI.

I've report the issue at Jira:
https://issues.apache.org/jira/browse/CB-7240
All details and the error stack trace is at the issue description.


-- 
Regards,
Martin Gonzalez


[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-31 Thread kamrik
Github user kamrik commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/55#discussion_r15655705
  
--- Diff: cordova-lib/src/hooks/scriptsFinder.js ---
@@ -0,0 +1,164 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+var path = require('path'),
+fs = require('fs'),
+cordovaUtil = require('../cordova/util'),
+events = require('../events'),
+Q = require('q'),
+plugin  = require('../cordova/plugin'),
+PluginInfo = require('../PluginInfo'),
+ConfigParser = require('../configparser/ConfigParser');
+
+/**
+ * Implements logic to retrieve hook script files defined in special 
folders and configuration
+ * files: config.xml, hooks/hook_type, plugins/../plugin.xml, etc
+ */
+module.exports  = {
+/**
+ * Returns all script files for the hook type specified.
+ */
+getHookScripts: function(hook, opts) {
+// args check
+if (!hook) {
+throw new Error('hook type is not specified');
+}
+return getApplicationHookScripts(hook, opts)
+.concat(getPluginsHookScripts(hook, opts));
+}
+};
+
+/**
+ * Returns script files defined on application level.
+ * They are stored in .cordova/hooks folders and in config.xml.
+ */
+function getApplicationHookScripts(hook, opts) {
+// args check
+if (!hook) {
+throw new Error('hook type is not specified');
+}
+return getApplicationHookScriptsFromDir(path.join(opts.projectRoot, 
'.cordova', 'hooks', hook))
+
.concat(getApplicationHookScriptsFromDir(path.join(opts.projectRoot, 'hooks', 
hook)))
+.concat(getScriptsFromConfigXml(hook, opts));
+}
+
+/**
+ * Returns script files defined by plugin developers as part of plugin.xml.
+ */
+function getPluginsHookScripts(hook, opts) {
+// args check
+if (!hook) {
+throw new Error('hook type is not specified');
+}
+
+// In case before_plugin_install, after_plugin_install, 
before_plugin_uninstall hooks we receive opts.plugin and
+// retrieve scripts exclusive for this plugin.
+if(opts.plugin) {
+events.emit('debug', 'Executing "' + hook + '"  hook for "' + 
opts.plugin.id + '" on ' + opts.plugin.platform + '.');
+
+return getPluginScriptFiles(opts.plugin, hook, [ 
opts.plugin.platform ]);
+}
+
+events.emit('debug', 'Executing "' + hook + '"  hook for all 
plugins.');
+return getAllPluginsHookScriptFiles(hook, opts);
+}
+
+/**
+ * Gets application level hooks from the directrory specified.
+ */
+function getApplicationHookScriptsFromDir(dir) {
+if (!(fs.existsSync(dir))) {
+return [];
+}
+
+var compareNumbers = function(a, b) {
+// TODO SG looks very complex, do we really need this?
+return isNaN (parseInt(a, 10)) ? 
a.toLowerCase().localeCompare(b.toLowerCase ? b.toLowerCase(): b)
+: parseInt(a, 10) > parseInt(b, 10) ? 1 : parseInt(a, 10) < 
parseInt(b, 10) ? -1 : 0;
+};
+
+var scripts = 
fs.readdirSync(dir).sort(compareNumbers).filter(function(s) {
+return s[0] != '.';
+});
+return scripts.map(function (scriptPath) {
+// for old style hook files we don't use module loader for 
backward compatibility
+return { path: scriptPath, fullPath: path.join(dir, scriptPath), 
useModuleLoader: false };
+});
+}
+
+/**
+ * Gets all scripts defined in config.xml with the specified type and 
platforms.
+ */
+function getScriptsFromConfigXml(hook, opts) {
+var configPath = cordovaUtil.projectConfig(opts.projectRoot);
+var configXml;
+
+try {
+configXml = new ConfigParser(configPath);
+} catch(ex) {
+events.emit('err', 'scriptsFinder could not load config.xml: ' + 
ex.message);
+console.log('scriptsFinder cou

[GitHub] cordova-mobile-spec pull request: CB-6958 Removed camera tests

2014-07-31 Thread stacic
GitHub user stacic opened a pull request:

https://github.com/apache/cordova-mobile-spec/pull/82

CB-6958 Removed camera tests

Tests from this PR should be used instead: 
https://github.com/apache/cordova-plugin-camera/pull/38

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stacic/cordova-mobile-spec CB-6958

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-mobile-spec/pull/82.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #82


commit 970136d5365323f63ea74809c7446c9a1993fe7f
Author: Staci Cooper 
Date:   2014-07-31T16:51:49Z

CB-6958 Removed camera tests




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-plugin-camera pull request: CB-6958 ported camera tests to...

2014-07-31 Thread stacic
Github user stacic commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/38#issuecomment-50786472
  
Tests are removed from mobile-spec in this PR: 
https://github.com/apache/cordova-mobile-spec/pull/82


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-plugin-device-motion pull request: CB-7160 port tests for ...

2014-07-31 Thread stacic
Github user stacic commented on the pull request:


https://github.com/apache/cordova-plugin-device-motion/pull/16#issuecomment-50784416
  
Tests are removed from mobile-spec in this PR: 
https://github.com/apache/cordova-mobile-spec/pull/81


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-mobile-spec pull request: CB-7160 Removed accelerometer te...

2014-07-31 Thread stacic
Github user stacic commented on the pull request:

https://github.com/apache/cordova-mobile-spec/pull/81#issuecomment-50784364
  
The tests ported in this PR should be used instead: 
https://github.com/apache/cordova-plugin-device-motion/pull/16


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-mobile-spec pull request: CB-7160 Removed accelerometer te...

2014-07-31 Thread stacic
GitHub user stacic opened a pull request:

https://github.com/apache/cordova-mobile-spec/pull/81

CB-7160 Removed accelerometer tests



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stacic/cordova-mobile-spec CB-7160

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-mobile-spec/pull/81.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #81


commit 2750c62674ea707b8db864f9df2579fc8951d1ba
Author: Staci Cooper 
Date:   2014-07-30T20:39:35Z

CB-7160 Removed accelerometer tests




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: missing documentation and missing major version bump

2014-07-31 Thread Mark Koudritsky
Thanks for updating the help, Josh.


On Thu, Jul 31, 2014 at 11:16 AM, Josh Soref  wrote:

> This is now done.
>
> I only documented run initially because I didn't really want to think
> through the code (prepare is an interesting odd case) and I knew it
> applied to run.
>
> On 7/30/14, 11:45 AM, "Carlos Santana"  wrote:
> >If it's applicable to more than build command, then it needs to be
> >documented for the other commands that is applicable
> >
> >Why a fix set of commands that this is applicable, what about "prepare"
> >and
> >"create" ?
> >
> >On Wed, Jul 30, 2014 at 11:42 AM, Carlos Santana 
> >wrote:
> >> I agree Michal, not having cordova specific, my bad was not obvious the
> >> "-- " the first time I read the email
> >>
> >> Mark I only see the -- [platformopts] only documented for "cordova run",
> >> Does it also works for other commands i.e. compile, prepare?
> >>
> >> [1]: https://github.com/apache/cordova-cli/blob/master/doc/run.txt#L3
>
>


[GitHub] cordova-plugin-device-motion pull request: CB-7160 manual tests fo...

2014-07-31 Thread stacic
Github user stacic closed the pull request at:

https://github.com/apache/cordova-plugin-device-motion/pull/14


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-plugin-device-motion pull request: CB-7160 port tests for ...

2014-07-31 Thread stacic
GitHub user stacic opened a pull request:

https://github.com/apache/cordova-plugin-device-motion/pull/16

CB-7160 port tests for accelerometer

-Added manual tests on top of existing automated tests
-Removed changes to plugin.xml
-Added nested plugin.xml
-Changed 'test' dir to 'tests' dir


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stacic/cordova-plugin-device-motion cdvtest

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-device-motion/pull/16.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #16


commit 85db0d938a26f2032d1a086cc5a5f1448d2b2281
Author: Staci Cooper 
Date:   2014-07-17T19:46:14Z

CB-7160 added manual tests

commit 0defcb791edb335f47a89e80c21e36f093e0fd4d
Author: Staci Cooper 
Date:   2014-07-17T19:47:20Z

Removed js-module for tests from plugin.xml

commit a7c6cfc89fae9eb4da1314707ad9e3e3c3e26011
Author: Staci Cooper 
Date:   2014-07-30T20:17:10Z

CB-7160 move to tests dir, add nested plugin.xml

Small bit of cleanup for automated tests




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: missing documentation and missing major version bump

2014-07-31 Thread Josh Soref
This is now done.

I only documented run initially because I didn't really want to think
through the code (prepare is an interesting odd case) and I knew it
applied to run.

On 7/30/14, 11:45 AM, "Carlos Santana"  wrote:
>If it's applicable to more than build command, then it needs to be
>documented for the other commands that is applicable
>
>Why a fix set of commands that this is applicable, what about "prepare"
>and
>"create" ?
>
>On Wed, Jul 30, 2014 at 11:42 AM, Carlos Santana 
>wrote:
>> I agree Michal, not having cordova specific, my bad was not obvious the
>> "-- " the first time I read the email
>>
>> Mark I only see the -- [platformopts] only documented for "cordova run",
>> Does it also works for other commands i.e. compile, prepare?
>>
>> [1]: https://github.com/apache/cordova-cli/blob/master/doc/run.txt#L3



Re: [DISCUSS] Plugins Release

2014-07-31 Thread Bryan Higgins
I'm into it! BlackBerry now supports File plugin roots and Globalization :)


On Tue, Jul 29, 2014 at 3:29 PM, Steven Gill  wrote:

> How do you all feel about a plugins release?
>
> I can aim to start a vote thread tomorrow or Thursday if people feel good
> about it.
>
> -Steve
>


[GitHub] cordova-plugin-globalization pull request: BB10 implementation

2014-07-31 Thread bryanhiggins
Github user bryanhiggins closed the pull request at:

https://github.com/apache/cordova-plugin-globalization/pull/18


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: How to provide more files from plugin.xml for project and native?

2014-07-31 Thread Carlos Santana
Use  element your folder will be included inside as blue folder
inside the "www" bluefolder inside your Mobile App
You can do a file or folder
For example a folder named "workligh":





On Thu, Jul 31, 2014 at 2:13 AM, julio cesar sanchez  wrote:

> I have a related question, is it possible to add folders to a plugin as if
> I seletected "Create folder references for any added folders" option? (blue
> folder)
>
> with   I get the resource as  if I
> selected the "Create groups for any added folder" option (yellow folder)
>
>
> 2014-07-30 18:45 GMT+02:00 Carlos Santana :
>
> > Would appreciate help to brainstorm
> >
> > I want to come out what is best for cordova developers.
> > Today we have a downstream that ships cordova, I want to see if we can
> > provide better experience
> >
> > I'm trying to experiment with the crazy idea of providing our value-add
> > thru a cordova plugin, meaning developer uses cordova and cordova
> plugins,
> > they can pick and choose when to update, and our value add is something
> > they can add and remove very easily leaving their app un-touch.
> >
> > I understand the scenario about grunt/yeoman/gulp and scaffolding, but
> > that's not the main use case.
> > When starting from scratch on create is easy to use a template, the main
> > use case is when a developer already has a created app.
> >
> > For example if a developer already has a Chrome Mobile App using cca, and
> > then he wants to add a functionality that we provide?
> > I want the answer to be: keep using cca tool, and just add our plugin
> >
> > I think I can achieve something by asking them to unzip an archive that I
> > provide that contains files and hooks, but my problem is I want to
> provide
> > an easy way for the developer to remove what was added by the zip
> archive.
> >
> > And again I don't think implementing a new type of "plugin",  "module",
> or
> > "package" for the app/project that can be fetch, install, and remove is a
> > simple answer, I want to keep it simple and easy to understand for
> > developers.
> >
> >
> >
> >
> >
> > On Wed, Jul 30, 2014 at 12:06 PM, Michal Mocny 
> > wrote:
> >
> > > On Wed, Jul 30, 2014 at 11:38 AM, Carlos Santana  >
> > > wrote:
> > >
> > > > On Wed, Jul 30, 2014 at 10:54 AM, Michal Mocny 
> > > > wrote:
> > > >
> > > > > First, the easy one: Certainly you should have a way to drop files
> > into
> > > > > platforms/ios/HelloCordova, and I think  is probably
> the
> > > way
> > > > > to go.  The root seems to be the plugin folder by default, so you
> may
> > > > need
> > > > > to prefix with "../.." right now.  Also seems hacky, not sure if
> > there
> > > > is a
> > > > > better way.
> > > > >
> > > >
> > > >  doesn't work for my use case, I'm already using for
> > > > libraries, frameworks, and files that I want to be available inside
> the
> > > > Mobile App.
> > > > I want the file to be inside the XCode project, but NOT inside the
> > Mobile
> > > > App. It's a file that I need from xcode build script
> > > >
> > > >
> > > > > For the other two: /merges and /hooks, I really don't think we
> should
> > > be
> > > > > adding files into there.  I consider those application assets,
> along
> > > with
> > > > > www/ and application config.xml, which we also should not be
> directly
> > > > > modifying from plugins.
> > > > >
> > > > >
> > > > I think plugins should be allow to add files to any place in the
> > cordova
> > > > project/application.
> > > > Or we can design a new type of "plugin" a plugin that deals with
> > cordova
> > > > project tooling.
> > > > I like things simple, so if I can manage to create one plugin for my
> > > > enterprise product, it will be easy for end user starting with
> cordova
> > to
> > > > add and remove one type of plugin, and then the plugin will take care
> > of
> > > > both what runs on the device and any tooling requirements for those
> > > > features
> > > >
> > > > I'm building a plugin that will add to the existing cordova project
> > > > excluding www/ (I don't want to touch this one). For www I think I
> will
> > > > have "www" templates they can use when the do "cordova create" but
> this
> > > are
> > > > just samples, if they already have an existing app I want an easy for
> > > them
> > > > to get necessary files for my plugin to work, and some files are to
> be
> > > > edited by them "merges", and other are hooks that need to run in
> > prepare
> > > >
> > > > I want to add files to /merges/ /platforms and /hooks that are only
> > > > applicable to my plugin and not overwriting any user files
> > > >
> > >
> > > This sounds like something thats worth brainstorming the right solution
> > > for.  I'm thinking this functionality should lay outside of cordova
> > > tooling, which is already too beefy.
> > >
> > > For chrome apps, we created a downstream tool for this (cca).  I do
> think
> > > its unfortunate that we all need to have separate downstream CLI's that
> > > cannot be used together, but I don't think wr