Re: [Blackberry10] View logging events without the IDE

2014-05-26 Thread Martin Gonzalez Glez
Yes agree, Momentics simplifies the process of course.
This process it's aimed in the case that only Webworks it's available, or
for those who does not use Momentics.

Thanks Bryan.


2014-05-26 8:12 GMT-05:00 Bryan Higgins br...@bryanhiggins.net:

 Thanks for the write-up Martin!

 For most Cordova devs WebInspector will be sufficient, but for plugin
 development or performance tuning it can be useful to view the native
 device logs.

 Momentics IDE greatly simplifies this process. Just click Open Device
 Logs from the Target Navigator


 On Fri, May 23, 2014 at 5:38 PM, Martin Gonzalez Glez 
 martin.c.glez.g...@gmail.com wrote:

  Deploying Blackberry 10 apps, I realize that it is possible to view the
  events on the device or emulator without the IDE usage.
 
  This can be an useful stuff to* debug any Cordova App*.
 
  *Requirements:*
  -Command line tools from the Native SDK or the tools from the BB10
 WebWorks
  SDK (1.0 or 2.0).
  -Client SSH (PuTTY, Open SSH, Free SSH or any other).
  -Platform irrelevant.
  -Device or Simulator.
 
  First at all, it is required create a public and private RSA 4096 key, to
  do use the SSH client to create it.
 
 *ssh-keygen -t rsa -b 4096*
 
  Set a name and path, then a passphrase, then it will be stored.
  Note: Windows user default path: %USERPROFILE%\.ssh\, here's where the
 ssh
  tools looks first.
 
  Then, connect your device or start the simulator, and activate the
  Development Mode at Settings, set a password and check for the IP
 provided.
 
  *Create a secure connection with the device:*
 
  ToolsDir=
 
 - C:\Program Files\BlackBerry\BB10 WebWorks SDK
 2.0.0.71\cordova-blackberry\bin\dependencies\bb-tools\bin
 - C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK
 1.0.4.11\dependencies\tools\bin
 - Native SDK bin path with the tools.
 
  Any of above paths should do the work, you can add any of those to the
 PATH
  variable or add it temporally in the current command prompt/shell.
 
  Type:
 
  *blackberry-connect [ip] -password [password-device] -sshPublicKey
  [path-to-the-key]*
 
  Example:
 
  *blackberry-connect 169.254.0.1 -password bbpass11 -sshPublicKey
  %USERPROFILE%/.ssh/id_rsa.pub*
 
  Note: The IP it is provided when you activate the development mode in
  settings.
  If you are using the simulator provide the ip located at the *south-left
  corner*, otherwise it's not going to work.
 
  If the connection fails, check:
 
 - Development mode setting
 - Settings -- Storage -- USB connection
 - No other blackberry-connect command-line tool is already connected.
 - Is not connected by the IDE.
 
 
  After the successful connected message, open a new command prompt/shell,
  and connect to the device with the SSH client.
 
  Type:
  *ssh devuser@IPDEVICE -i path-to-the/id_rsa*
 
  Example:
  PWD = C:/Users/admin
 
  *ssh dev@192.168.244.123 dev@192.168.244.123 -i .ssh\id_rsa*
 
  This time we are providing the private key to connect with the device. If
  everything went just fine, we are in a ssh connection with the device, we
  can explore the device storage content.
 
  Type to start to view logging events:
 
  *slog2info -w*
 
  Now you have devuser access to the device, and availability to view all
  events related with the applications installed in the device, similar to
  log cat from android.
 
 
  Type:
 
  *slog2info -h *
 
  In order to check all options.
  Keep both command prompt windows opened.
 
  Well, this is what I found, there you have the how to do it, the workflow
  can be followed to debug any app, and it can used to quickly and easy
 view
  the events on the native side, how your app behaves in there.
 
  RIM folks, is there any other alternative, besides of the IDE usage? or
 how
  are you guys doing this?
 
  Regards,
  Martin.
 



[Blackberry10] View logging events without the IDE

2014-05-23 Thread Martin Gonzalez Glez
Deploying Blackberry 10 apps, I realize that it is possible to view the
events on the device or emulator without the IDE usage.

This can be an useful stuff to* debug any Cordova App*.

*Requirements:*
-Command line tools from the Native SDK or the tools from the BB10 WebWorks
SDK (1.0 or 2.0).
-Client SSH (PuTTY, Open SSH, Free SSH or any other).
-Platform irrelevant.
-Device or Simulator.

First at all, it is required create a public and private RSA 4096 key, to
do use the SSH client to create it.

   *ssh-keygen -t rsa -b 4096*

Set a name and path, then a passphrase, then it will be stored.
Note: Windows user default path: %USERPROFILE%\.ssh\, here's where the ssh
tools looks first.

Then, connect your device or start the simulator, and activate the
Development Mode at Settings, set a password and check for the IP provided.

*Create a secure connection with the device:*

ToolsDir=

   - C:\Program Files\BlackBerry\BB10 WebWorks SDK
   2.0.0.71\cordova-blackberry\bin\dependencies\bb-tools\bin
   - C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK
   1.0.4.11\dependencies\tools\bin
   - Native SDK bin path with the tools.

Any of above paths should do the work, you can add any of those to the PATH
variable or add it temporally in the current command prompt/shell.

Type:

*blackberry-connect [ip] -password [password-device] -sshPublicKey
[path-to-the-key]*

Example:

*blackberry-connect 169.254.0.1 -password bbpass11 -sshPublicKey
%USERPROFILE%/.ssh/id_rsa.pub*

Note: The IP it is provided when you activate the development mode in
settings.
If you are using the simulator provide the ip located at the *south-left
corner*, otherwise it's not going to work.

If the connection fails, check:

   - Development mode setting
   - Settings -- Storage -- USB connection
   - No other blackberry-connect command-line tool is already connected.
   - Is not connected by the IDE.


After the successful connected message, open a new command prompt/shell,
and connect to the device with the SSH client.

Type:
*ssh devuser@IPDEVICE -i path-to-the/id_rsa*

Example:
PWD = C:/Users/admin

*ssh dev@192.168.244.123 dev@192.168.244.123 -i .ssh\id_rsa*

This time we are providing the private key to connect with the device. If
everything went just fine, we are in a ssh connection with the device, we
can explore the device storage content.

Type to start to view logging events:

*slog2info -w*

Now you have devuser access to the device, and availability to view all
events related with the applications installed in the device, similar to
log cat from android.


Type:

*slog2info -h *

In order to check all options.
Keep both command prompt windows opened.

Well, this is what I found, there you have the how to do it, the workflow
can be followed to debug any app, and it can used to quickly and easy view
the events on the native side, how your app behaves in there.

RIM folks, is there any other alternative, besides of the IDE usage? or how
are you guys doing this?

Regards,
Martin.


constant CORDOVA_VERSION in native side

2014-05-15 Thread Martin Gonzalez Glez
Hi all,
I noticed that android provides a constant string with the cordova version
in the native side (CordovaWebView). This variable is updated by Coho.
none of the other platforms have this native version, I think we should add
it for consistency.


[Cordova-lib] CB-5082 [cordova info] Add support for BB10

2014-05-14 Thread Martin Gonzalez Glez
I have created a PR at cordova-lib several hours ago, but it seems that it
didn't show up in the dev list.

Can somebody review this PR:
https://github.com/apache/cordova-lib/pull/7

Thanks,
Martin.


Re: cordova-js errors and coho

2014-05-06 Thread Martin Gonzalez Glez
I had the same problem with nodejs 0.11, using url.parse module  and
running the Unit Test on cordova-js, those are failing with nodejs 0.11.13,
but with 0.11.12  it works fine.

Nodejs 0.11 it's working unestable, they are going to release one more
11.xx version before nodejs 0.12 (According to their google group forum).
It seems that cordova-coho uses a dependency that requires node 0.11.
A quick fix in your case Joe it's the usage of a node version manager as
n or nvm for Mac OS X, or nodist under Windows.
It won't fix your nodejs 11, but it allows you to switch between nodejs
versions easily and quickly.
On May 6, 2014 5:07 PM, Joe Bowser bows...@gmail.com wrote:

 Hey

 I know that for some reason, we decided to use node 0.11 for coho, but
 the thing is that it means that we can't run the Unit Tests on
 cordova-js now.  At least on my machine, coho will now always fail
 because of either named branch errors or Unit Test errors.  This seems
 to be some weird unicode enforcing that is happening in the node 0.11.

 This is extremely frustrating, since we're supposed to use this coho
 tool to do releases to automate the process, yet the tool keeps
 breaking every time we try and use it.  I'm sure that there's a whole
 other thread where this issue was beaten to death, but I didn't need
 to try to tag an RC1 for 3.5 when that was happening.

 Seriously, can we make coho work with stable node versions, or agree
 to stop using it altogether and re-write the docs on cutting a
 release?  I probably will have to do RC1 manually because of how
 broken it is right now.



Re: cordova-js errors and coho

2014-05-06 Thread Martin Gonzalez Glez
Agree guys we shouldn't be depending on unstable node versions to work,
just sharing what it worked for me. I think coho has been using node 0.11
since the last clean up a few days ago.

Hey Joe, I've just shared with you my findings, it's not the best solution
I know that, but it worked for me.
On May 6, 2014 5:47 PM, Jesse purplecabb...@gmail.com wrote:

 We shouldn't be depending on unstable versions of node, imo.
 Being able to switch versions is not a solution.

 @purplecabbage
 risingj.com


 On Tue, May 6, 2014 at 3:40 PM, Martin Gonzalez Glez 
 martin.c.glez.g...@gmail.com wrote:

  I had the same problem with nodejs 0.11, using url.parse module  and
  running the Unit Test on cordova-js, those are failing with nodejs
 0.11.13,
  but with 0.11.12  it works fine.
 
  Nodejs 0.11 it's working unestable, they are going to release one more
  11.xx version before nodejs 0.12 (According to their google group forum).
  It seems that cordova-coho uses a dependency that requires node 0.11.
  A quick fix in your case Joe it's the usage of a node version manager as
  n or nvm for Mac OS X, or nodist under Windows.
  It won't fix your nodejs 11, but it allows you to switch between nodejs
  versions easily and quickly.
  On May 6, 2014 5:07 PM, Joe Bowser bows...@gmail.com wrote:
 
   Hey
  
   I know that for some reason, we decided to use node 0.11 for coho, but
   the thing is that it means that we can't run the Unit Tests on
   cordova-js now.  At least on my machine, coho will now always fail
   because of either named branch errors or Unit Test errors.  This seems
   to be some weird unicode enforcing that is happening in the node 0.11.
  
   This is extremely frustrating, since we're supposed to use this coho
   tool to do releases to automate the process, yet the tool keeps
   breaking every time we try and use it.  I'm sure that there's a whole
   other thread where this issue was beaten to death, but I didn't need
   to try to tag an RC1 for 3.5 when that was happening.
  
   Seriously, can we make coho work with stable node versions, or agree
   to stop using it altogether and re-write the docs on cutting a
   release?  I probably will have to do RC1 manually because of how
   broken it is right now.
  
 



[Nodejs 11.x] config.js returns path for local library escaping all backslashes

2014-05-05 Thread Martin Gonzalez Glez
Hi all,

Using createmobilespec module for cordova-mobile-spec, I've found a problem
that only is reproduced using Nodejs 11.xx (tested with 11.12, 11.13).

config.js returns the following path:
c:%5CUsers%5CAdministrator%5CDesktop%5CTestWP%5Ccordova-wp8
instead of:
c:\Users\Administrator\Desktop\TestWP\cordova-wp8

The only reason, why I've installed nodejs 11 it's because, cordova-coho
requires that specific version to work (since clean-up), on the mobilespec
workflow it requires cordova-coho to get all repositories (not a
requirement as is, but it's recommended to make it easy and fast).
The problem is happening at this line :
https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;a=blob;f=cordova-lib/src/cordova/config.js;h=d0c8d9aec0270d88ca80ebfd9798b094d3583cb1;hb=master#l75

At url.parse. This module is behaving and messing the path escaping all
backslashes.

Related issue: https://issues.apache.org/jira/browse/CB-6621

It's possible fix this up just returning the library as is retrieved from
the json file, avoiding the url.parse module.

With global libraries plays nice, but when those libraries paths are
present at projectRoot/.cordova/config.json, it happens this problem.

I have reproduced this issue under Windows 7, 8 environments.

Questions:

The workflow would change for mobilespec, install coho with nodejs 11
present, then uninstall it and install 10.xx and continue creating 
deploying the mobilespec project? or just use git and get all repositories
(plugins, cli, platforms-libs) not using cordova-coho?

Changes on config.js to return just the lib path as is retrieved from the
json file (return json.lib[platform].uri) ?

Give the heads-up to nodejs developers, and wait until they fix this up?

Any thoughts or advice to follow with this?

Thanks in advance.


Re: [Nodejs 11.x] config.js returns path for local library escaping all backslashes

2014-05-05 Thread Martin Gonzalez Glez
I'm not sure why is an url.parse, but unless that I'm wrong about it, the
custom libraries can be private repositories, or specific snapshots from a
http, ftp site or a network location, but it doesn't make much sense.

As I said before I can deliver the changes to return json.lib[platform].uri
only, it works just fine.



2014-05-05 14:52 GMT-05:00 Andrew Grieve agri...@chromium.org:

 Good stuff for finding this issue. Making sure the tools work with node v11
 is important, since it's likely the behaviour will be present in v12.

 Makes sense that we shouldn't try and use url.parse to parse something that
 is *not* a URL.


 On Mon, May 5, 2014 at 2:50 PM, Martin Gonzalez Glez 
 martin.c.glez.g...@gmail.com wrote:

  Well, n it requires curl or wget to work, those aren't present under
  windows, the one from git is failing on windows 7 64 bit. I can figure
  something out to fix this up and be able to switch between versions.
 It's a
  really good advice, thanks Rodrigo.
  On May 5, 2014 12:58 PM, Rodrigo Silveira rsilve...@mozilla.com
 wrote:
 
   Not exactly a fix for your issue, but to easily switch between nodejs
   versions you can use the node version manager n[1]. This blog post[2]
  has
   installation instructions. Then to use the latest (11.x) you do `n
  latest`
   and to go back to stable (10.x) do `n stable`.
  
   [1] - https://www.npmjs.org/package/n
   [2] - http://davidwalsh.name/upgrade-nodejs
  
   - Original Message -
   From: Martin Gonzalez Glez martin.c.glez.g...@gmail.com
   To: dev@cordova.apache.org
   Sent: Monday, May 5, 2014 10:41:57 AM
   Subject: [Nodejs 11.x] config.js returns path for local library
 escaping
   all backslashes
  
   Hi all,
  
   Using createmobilespec module for cordova-mobile-spec, I've found a
  problem
   that only is reproduced using Nodejs 11.xx (tested with 11.12, 11.13).
  
   config.js returns the following path:
   c:%5CUsers%5CAdministrator%5CDesktop%5CTestWP%5Ccordova-wp8
   instead of:
   c:\Users\Administrator\Desktop\TestWP\cordova-wp8
  
   The only reason, why I've installed nodejs 11 it's because,
 cordova-coho
   requires that specific version to work (since clean-up), on the
  mobilespec
   workflow it requires cordova-coho to get all repositories (not a
   requirement as is, but it's recommended to make it easy and fast).
   The problem is happening at this line :
  
  
 
 https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;a=blob;f=cordova-lib/src/cordova/config.js;h=d0c8d9aec0270d88ca80ebfd9798b094d3583cb1;hb=master#l75
  
   At url.parse. This module is behaving and messing the path escaping all
   backslashes.
  
   Related issue: https://issues.apache.org/jira/browse/CB-6621
  
   It's possible fix this up just returning the library as is retrieved
 from
   the json file, avoiding the url.parse module.
  
   With global libraries plays nice, but when those libraries paths are
   present at projectRoot/.cordova/config.json, it happens this problem.
  
   I have reproduced this issue under Windows 7, 8 environments.
  
   Questions:
  
   The workflow would change for mobilespec, install coho with nodejs 11
   present, then uninstall it and install 10.xx and continue creating 
   deploying the mobilespec project? or just use git and get all
  repositories
   (plugins, cli, platforms-libs) not using cordova-coho?
  
   Changes on config.js to return just the lib path as is retrieved from
 the
   json file (return json.lib[platform].uri) ?
  
   Give the heads-up to nodejs developers, and wait until they fix this
 up?
  
   Any thoughts or advice to follow with this?
  
   Thanks in advance.
  
 



Re: [Proposal] Cordova guidelines part of ContributorWorkflow

2014-04-24 Thread Martin Gonzalez Glez
Yes, I'll start to use it no problem, but what about new contributors on
near future?. Like I said, which are gonna be the guidelines for them, or
the validation rules, this is resolved using just jshint to validate basic
criteria and that's it?

Good point, the code that's not JS. At the wiki page, it's just covered
guidelines for JS, not for any other languages.


2014-04-24 16:22 GMT-05:00 Jesse purplecabb...@gmail.com:

 I agree that jshint is awesome and powerful, I use it all the time, and so
 should you.
 That seems like a great end to this discussion ...
 Otherwise, how do we address the 50% of our code that is not JS?

 @purplecabbage
 risingj.com


 On Thu, Apr 24, 2014 at 2:15 PM, Martin Gonzalez Glez 
 martin.c.glez.g...@gmail.com wrote:

  jshint is really cool. Agree, +1 for jshint.
 
  A couple of questions about this, which are gonna be the validation
 rules?
  I mean, we have to be in the same page about which are gonna be those
  rules.
  Besides, how the users are going to use it? First they need to have the
  node module installed, and then, use a set of validation rules that we
 are
  going to provide?
 
  How it's gonna be? use a .jshintrc file with all the rules, general rules
  provided by the community, or each cordova component would contain a
  jshintConfig/package.json with specific validation rules. CLI+rules,
  platforms + rules, plugins + rules
  It's gonna be optional(recommended)or as requirement to deliver code, the
  usage of jshint before commit files? the contributors would need send any
  evidence, that proves that their code has passed the validation?
  Any thoughts?
 
  Jshint, it's awesome and a really good solution, I really like it.
 
  -Martin.
 
 
  2014-04-24 10:55 GMT-05:00 Marcel Kinard cmarc...@gmail.com:
 
   Big +1 for jshint.
  
   On Apr 23, 2014, at 5:53 PM, Brian LeRoux b...@brian.io wrote:
  
This may get rotten eggs thrown at me but I think it would be good to
  add
jshint to the project.
  
 



[Proposal] Cordova guidelines part of ContributorWorkflow

2014-04-23 Thread Martin Gonzalez Glez
Hi guys,

As code contributor, I've been receiving feedback, comments, advice and
more from the commiters. Part of the received feedback is about the Cordova
code style, best practices, and
preferences about how to contribute code to the project, which existing
APIs to use, and more.

Because of that, I have added some advices about code style, practices and
preferences in the wiki page:

https://wiki.apache.org/cordova/StyleGuide

This kind of information it would be great for new Contributors involved in
code deliverance, to serve as initial guidance to follow.

That said, I have a *proposal *for all of you guys if are agree.
It's about adding this wiki page as part of the *ContributorWorkflow*; the
content attempts to explain basic styles, patterns, practices, and methods
used in the project. All new and existent code should conform to these
guidelines in order to maintain structural quality and code readability,
and to make software maintenance easier.

This could be a *win-win* for all of us, allowing contributors to provide
high quality code, and reducing the burden on committers to provide
individual feedback about the code style practices and standards that are
currently applied in the Cordova source code.

For contributors following these style guidelines, their code it will be
easier to review and merge into the project quickly.

Well, that's the proposal that I have, if you are agree with it, please
check the few lines that I've added to the Style guide page, and feel
yourself free to add more information, comments, practices,
recommendations, modify the current ones, whatever that you can provide it
would be great.

If you don't have permission to add information the Wiki page, you can ask
to a commiter for access to it. Or you can share a replay with the
information that you'd like to add, and I'll be happy to post it.

Thanks.
-Martin


Re: [Proposal] Cordova guidelines part of ContributorWorkflow

2014-04-23 Thread Martin Gonzalez Glez
Yes, agree. I can remove it.


2014-04-23 15:25 GMT-05:00 Mark Koudritsky kam...@google.com:

 The style guide contains the following two points that seem to partially
 contradict each other. Ok if we just delete the second one?

1. Remove unnecessary trailing whitespace in lines; this includes after
operators, commas, semicolons or braces.
2. trailing spaces - you should turn off remove trailing spaces in
your editor/IDE. That is, trailing spaces should be left in files. Not
doing this yields extra diff junk, and sometime trailing spaces are
significant.



 On Wed, Apr 23, 2014 at 2:41 PM, Shazron shaz...@gmail.com wrote:

  I'll add this to the wiki, but putting it out here as well for the other
  platforms/plugins:
 
  cordova-ios uses uncrustify in a pre-commit hook:
  https://github.com/apache/cordova-ios/tree/master/hooks that needs to be
  added on a per clone basis. Saves me a lot of time when I do my own
  commits. It can be configured for other languages. Could be a coho thing
 to
  add these hooks when pulling down repos (gasp) ;)
 
  Also, regarding contributing, I added this issue for adding a
  CONTRIBUTING.md to all our repos:
  https://issues.apache.org/jira/browse/CB-6491
 
 
 
 
 
  On Wed, Apr 23, 2014 at 11:23 AM, Martin Gonzalez Glez 
  martin.c.glez.g...@gmail.com wrote:
 
   Hi guys,
  
   As code contributor, I've been receiving feedback, comments, advice and
   more from the commiters. Part of the received feedback is about the
  Cordova
   code style, best practices, and
   preferences about how to contribute code to the project, which existing
   APIs to use, and more.
  
   Because of that, I have added some advices about code style, practices
  and
   preferences in the wiki page:
  
   https://wiki.apache.org/cordova/StyleGuide
  
   This kind of information it would be great for new Contributors
 involved
  in
   code deliverance, to serve as initial guidance to follow.
  
   That said, I have a *proposal *for all of you guys if are agree.
   It's about adding this wiki page as part of the *ContributorWorkflow*;
  the
   content attempts to explain basic styles, patterns, practices, and
  methods
   used in the project. All new and existent code should conform to these
   guidelines in order to maintain structural quality and code
 readability,
   and to make software maintenance easier.
  
   This could be a *win-win* for all of us, allowing contributors to
 provide
   high quality code, and reducing the burden on committers to provide
   individual feedback about the code style practices and standards that
 are
   currently applied in the Cordova source code.
  
   For contributors following these style guidelines, their code it will
 be
   easier to review and merge into the project quickly.
  
   Well, that's the proposal that I have, if you are agree with it, please
   check the few lines that I've added to the Style guide page, and feel
   yourself free to add more information, comments, practices,
   recommendations, modify the current ones, whatever that you can provide
  it
   would be great.
  
   If you don't have permission to add information the Wiki page, you can
  ask
   to a commiter for access to it. Or you can share a replay with the
   information that you'd like to add, and I'll be happy to post it.
  
   Thanks.
   -Martin
  
 



Re: [Proposal] Cordova guidelines part of ContributorWorkflow

2014-04-23 Thread Martin Gonzalez Glez
Yes, we have to get to an agreement on that, and of course, we have to
follow the current style, I'm not proposing create a new style or follow
another style or pattern.
The whole listed items in Style Guide, are part of the feedback that so
far, I have received from commiters. What I was trying to point here, is
encourage the whole community to describe Cordova practices based on the
current code, on the current style, for those new contributors involved
with code deliverance.

Of course Jesse, we should discuss this and get to an agreement, for all of
us follow those same guidelines.

Thought: If Jesse reviews a contributor's PR, he surely will get some
feedback and guidance from Jesse, the contributor would think that based on
those practices that he learned from Jesse, it's the best way, the current
Code style. But maybe in another PR, Andrew reviews his code, he may point
to change some of the practices that he learn from Jesse. That may happen.
I'm not trying that everybody think in the same way, about how to create
logic. Just trying to set an starting point to explicitely describe, which
is the pattern of code style that we are using, in that way everyone is
going to be in the same page since the very beginning.



2014-04-23 15:35 GMT-05:00 Jesse purplecabb...@gmail.com:

 I agree with Andrew, there are several items in the style guide that I
 question.
 But mainly I question how a definitive guide can be defined without
 agreement ...




 @purplecabbage
 risingj.com


 On Wed, Apr 23, 2014 at 1:30 PM, Andrew Grieve agri...@chromium.org
 wrote:

  In general, I think the only style guideline we need (at least for a
  non-per-repo sense), is to follow whatever style currently exists.
 
  On Wed, Apr 23, 2014 at 4:25 PM, Mark Koudritsky kam...@google.com
  wrote:
   The style guide contains the following two points that seem to
 partially
   contradict each other. Ok if we just delete the second one?
  
  1. Remove unnecessary trailing whitespace in lines; this includes
  after
  operators, commas, semicolons or braces.
  2. trailing spaces - you should turn off remove trailing spaces in
  your editor/IDE. That is, trailing spaces should be left in files.
 Not
  doing this yields extra diff junk, and sometime trailing spaces are
  significant.
  
  
  
   On Wed, Apr 23, 2014 at 2:41 PM, Shazron shaz...@gmail.com wrote:
  
   I'll add this to the wiki, but putting it out here as well for the
 other
   platforms/plugins:
  
   cordova-ios uses uncrustify in a pre-commit hook:
   https://github.com/apache/cordova-ios/tree/master/hooks that needs to
  be
   added on a per clone basis. Saves me a lot of time when I do my own
   commits. It can be configured for other languages. Could be a coho
  thing to
   add these hooks when pulling down repos (gasp) ;)
  
   Also, regarding contributing, I added this issue for adding a
   CONTRIBUTING.md to all our repos:
   https://issues.apache.org/jira/browse/CB-6491
  
  
  
  
  
   On Wed, Apr 23, 2014 at 11:23 AM, Martin Gonzalez Glez 
   martin.c.glez.g...@gmail.com wrote:
  
Hi guys,
   
As code contributor, I've been receiving feedback, comments, advice
  and
more from the commiters. Part of the received feedback is about the
   Cordova
code style, best practices, and
preferences about how to contribute code to the project, which
  existing
APIs to use, and more.
   
Because of that, I have added some advices about code style,
 practices
   and
preferences in the wiki page:
   
https://wiki.apache.org/cordova/StyleGuide
   
This kind of information it would be great for new Contributors
  involved
   in
code deliverance, to serve as initial guidance to follow.
   
That said, I have a *proposal *for all of you guys if are agree.
It's about adding this wiki page as part of the
 *ContributorWorkflow*;
   the
content attempts to explain basic styles, patterns, practices, and
   methods
used in the project. All new and existent code should conform to
 these
guidelines in order to maintain structural quality and code
  readability,
and to make software maintenance easier.
   
This could be a *win-win* for all of us, allowing contributors to
  provide
high quality code, and reducing the burden on committers to provide
individual feedback about the code style practices and standards
 that
  are
currently applied in the Cordova source code.
   
For contributors following these style guidelines, their code it
 will
  be
easier to review and merge into the project quickly.
   
Well, that's the proposal that I have, if you are agree with it,
  please
check the few lines that I've added to the Style guide page, and
 feel
yourself free to add more information, comments, practices,
recommendations, modify the current ones, whatever that you can
  provide
   it
would be great.
   
If you don't have permission to add information

Hangout streaming link

2014-04-17 Thread Martin Gonzalez Glez
Is the hangout on? Does somebody has the streaming link?


Re: CB-6415 [Blackberry] unable to add platform, using custom or local library

2014-04-09 Thread Martin Gonzalez Glez
Agree, your config.json file it provides more properties. But in
blackberry10_parser, as well as in config.js or at lazy_load those
properties are completely ignored. According to those files, the most
important data to retrieve is the URL, and get the platform name to use it
with the platforms.js, in order to determine the url link (download if no
local library is found), subdir, and so.

Yes we should receive feedback from the community about this subject, but
well my fix like you said it only applies to the current model, if the
community is agree and disposed to add the other properties in the
config.json file and use them, we can add logic to the requirements check
to use those properties.


2014-04-08 17:13 GMT-05:00 Josh Soref jso...@blackberry.com:

 Martin Gonzalez Glez wrote:

 https://issues.apache.org/jira/browse/CB-6415

 SoŠ I was the one who tried to implement this thing.

 I probably failed to implement it the way something was expecting, but I
 implemented it the way I was expecting things to work.

 Before we spend time making changes, I¹m hoping someone can explain how
 they envision this to work.

 Personally, I expect .cordova/config.json:
 {
 lib: {
 blackberry10: {
 uri: /tmp/blackberry10,
 version: dev²,
 subdir: ,
 id: blackberry10
 }
 }
 }

 to overlay/mask other files such as platforms.js:
 module.exports = {
 Š
 'blackberry10' : {
 parser : './src/metadata/blackberry10_parser',
 url:
 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
 version: '3.4.0',
 subdirectory: 'blackberry10'
 },
 Š

 }



 Apparently, it doesn¹t because `subdir` from config.json is totally
 ignored.


 BlackBerry has code in places which do a lot of `mixin` which would result
 in stuff like this working w/o requiring all the strange logic that¹s
 currently scattered through multiple files.

 I¹m going to probably try (unfortunately not until near the end of the
 month) replace the mess that¹s currently lying around w/ such mixin code,
 which should result in things being considerably cleaner.

 While we could land Martin¹s fix temporarily ‹ and then back it out later,
 I¹m not a big fan of lots of backouts/changes which aren¹t in the right
 direction.

 Thoughts?




[windows8 - CLI] Failed to install 'org.cordova.mobile-spec-dependencies'

2014-04-09 Thread Martin Gonzalez Glez
Trying to install the latest plugins for Windows 8, the process stops
because it doesn't fulfill the requirements. This is the output in the
console:

Failed to install 'org.cordova.mobile-spec-dependencies':Error: Plugin
doesn't s
upport this project's cordova version. cordova: 3.3.0-dev, failed version
requir
ement: =3.3.0
Then it throws an error and shows the stack trace.

It seems that currentVersion --- 3.3.0-dev
doesn't satisfied:
required version: 3.3.0

Is this an expected behavior?


Re: [windows8 - CLI] Failed to install 'org.cordova.mobile-spec-dependencies'

2014-04-09 Thread Martin Gonzalez Glez
Yeah, that's what I've found, I've checked the main repository at apache.org,
and I've found that it's outdated.
https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git;a=blob_plain;f=windows8/VERSION;hb=master

Should I create a jira Issue and update it? or you can handle easier and
quicker?


2014-04-09 12:05 GMT-05:00 Sergey Grebnov (Akvelon) v-seg...@microsoft.com
:

 I think the action item here is to update version file in cordova-windows
 /master/. It is outdated.

 Encountered w/ the same issue testing windows8 master branch with Medic

 Sent from my Windows Phone
 
 From: Josh Sorefmailto:jso...@blackberry.com
 Sent: 4/9/2014 8:27 PM
 To: dev@cordova.apache.orgmailto:dev@cordova.apache.org
 Subject: Re: [windows8 - CLI] Failed to install
 'org.cordova.mobile-spec-dependencies'

 Martin wrote:
  It seems that currentVersion --- 3.3.0-dev
  doesn't satisfied:
  required version: 3.3.0
 
  Is this an expected behavior?

 Yes, -dev is a prerelease and is less than non -blah




CB-6415 [Blackberry] unable to add platform, using custom or local library

2014-04-08 Thread Martin Gonzalez Glez
https://issues.apache.org/jira/browse/CB-6415

I've faced this problem this morning, when I tried to use a local library
to add the platform.
Has anybody ever faced this problem?


Blackberry copyright in js files

2014-04-04 Thread Martin Gonzalez Glez
Hi everyone, in some blackberry files, I have noticed some blackberry
copyright statements:

https://github.com/blackberry/cordova-blackberry/blob/cb_6398/blackberry10/bin/templates/project/cordova/lib/params.js#L2

https://github.com/blackberry/cordova-blackberry/blob/cb_6398/blackberry10/bin/templates/project/cordova/lib/params.js#L2

https://github.com/blackberry/cordova-blackberry/blob/cb_6398/blackberry10/bin/templates/project/cordova/lib/debugtoken-helper.js#L2

Something like:

Copyright 2014 BlackBerry Limited.

Copyright 2012 Research In Motion Limited.


Is not supposed to all files should be under Apache License, Version 2.0?.

Just asking if this is normal?


Re: Blackberry copyright in js files

2014-04-04 Thread Martin Gonzalez Glez
Ok, it's completely understandable, I just wanted to ask about it.
Thanks Bryan.


2014-04-04 14:40 GMT-06:00 Bryan Higgins br...@bryanhiggins.net:

 The files are all Apache 2.0 licensed.

 The 2012 headers came from code donated by RIM which was previously hosted
 on GitHub. The recent one is probably a copy/paste mistake by Josh.

 I *think* they can all be removed.


 On Fri, Apr 4, 2014 at 4:26 PM, Martin Gonzalez Glez 
 martin.c.glez.g...@gmail.com wrote:

  Hi everyone, in some blackberry files, I have noticed some blackberry
  copyright statements:
 
 
 
 https://github.com/blackberry/cordova-blackberry/blob/cb_6398/blackberry10/bin/templates/project/cordova/lib/params.js#L2
 
 
 
 https://github.com/blackberry/cordova-blackberry/blob/cb_6398/blackberry10/bin/templates/project/cordova/lib/params.js#L2
 
 
 
 https://github.com/blackberry/cordova-blackberry/blob/cb_6398/blackberry10/bin/templates/project/cordova/lib/debugtoken-helper.js#L2
 
  Something like:
 
  Copyright 2014 BlackBerry Limited.
 
  Copyright 2012 Research In Motion Limited.
 
 
  Is not supposed to all files should be under Apache License, Version
 2.0?.
 
  Just asking if this is normal?
 



Re: CB-6121 (Windows command line script for Mobile spec)

2014-03-05 Thread Martin Gonzalez Glez
Well as Sergey recommend, I added logic to work with a present git in the
PATH (Env var).
Also I added some functionality to work with a previous path provided on a
previous execution.

Summary:
-Now it deals with git, if it's present at the environment
-Saves a file with the path provided for futures executions.



2014-03-04 15:14 GMT-06:00 Carlos Santana csantan...@gmail.com:

 Great tool, but I echo Jesse's it will be more awesome to implement in
 node, that way cross platform (linux, mac, windows)
 Since node is already a requirement to run cordova-cli/plugman then should
 not be a problem to assume that node is already present.



 On Tue, Mar 4, 2014 at 2:56 PM, Martin Gonzalez 
 martin.c.glez.g...@gmail.com wrote:

  I didn't consider it, but you're, this would be nice to have this feature
  running on all environment, let me check some options for node module
  environment.
  Thanks a lot for the feedback guys.
  I'll take this under serious consideration.
 
 
  -Original message-
  From: purplecabbage purplecabb...@gmail.com
  To: dev@cordova.apache.org dev@cordova.apache.org
  Sent: Tue, 04 Mar 2014, 19:46:34 GMT+00:00
  Subject: Re: CB-6121 (Windows command line script for Mobile spec)
 
  I looked at doing this for CB-5963, but I didn't consider writing a bat
  file.IMO this would be better served by a node module that runs
 everywhere.
 
  I did not consider taking it as far as you did Martin, nice work! Have
 you
  considered making it run in node so Mac users can share it? plus we would
  have the same features on all environments.
  Sent from my iPhone
 
   On Mar 4, 2014, at 11:23 AM, Sergey Grebnov (Akvelon)
 
  v-seg...@microsoft.com wrote:
 
 
  Looks very interesting, playing with this tool right now..
 
  Martin, if it is not so hard could you please add logic to save git
 
  location provided, for example in system variable. Right now I need to
  navigate to custom git location every time I run the bat. Or you can
 check
  if git is in PATH.
 
 
  Thx!
  Sergey
  -Original Message-
  From: mmo...@google.com [mailto:mmo...@google.com] On Behalf Of Michal
 
  Mocny
 
  Sent: Tuesday, March 4, 2014 6:44 PM
  To: Michal Mocny
  Cc: dev
  Subject: Re: CB-6121 (Windows command line script for Mobile spec)
 
  I guess the key difference being that it runs on command prompt without
 
  unix emulation, and also seems to be a better swiss army knife too.
  Seems
  like a great tool, thanks for putting it together.
 
 
  I don't have access to a windows machine (Jesse, maybe you would like to
 
  take a look?), but seeing as we have no solution for this right now, it
  seems like better than the alternative :)
 
 
 
   On Tue, Mar 4, 2014 at 9:39 AM, Michal Mocny mmo...@chromium.org
  wrote:
 
  Cool.
 
  I haven't dug deep yet, but was curious how this compares to:
  https://github.com/apache/cordova-mobile-spec/blob/master/createmobile
  spec.sh
 
 
  On Mon, Mar 3, 2014 at 5:15 PM, Martin Gonzalez Glez 
  martin.c.glez.g...@gmail.com wrote:
 
   I've just made a command line script for Mobile spec tests under
 
  Windows.
 
  It can handle Android, BB10, WP8, and Windows 8 platform.
  So if somebody, has the opportunity to test it, I'd really like
  toreceive some feedback about it, check if more capabilities or
 optionscan
  be added.
 
  Basically is a command line script file, that uses the CordovaCommand
  Line Interface, git for windows, and node cordova-cli moduleto create
 and
  assist the test process, using cordova mobile specstest suite, that
  includes manual and automated tests, to test pluginscapabilities, as
 well
  as stability through versions.
  The script capabilities helps to simplify the test process,
  obtainingall resources required or giving the chance to set them in
 place,
  orset where they are.
  This script file it uses the cordova CLI capabilities to create,
  addplatforms/plugins, as well as build, emulate and deploy to phone,
 italso
  uses the coho script to update some repositories, and getseveral
 resources
  if it's required.
 
 
  This is the issue: https://issues.apache.org/jira/browse/CB-6121
 
  Pull request with the complete description:
  https://github.com/apache/cordova-mobile-spec/pull/51
 
  Regards.
  Martin Gonzalez
 
 
 
 
 


 --
 Carlos Santana
 csantan...@gmail.com



Re: CB-6121 (Windows command line script for Mobile spec)

2014-03-04 Thread Martin Gonzalez Glez
Yes indeed, it runs without emulation. There's some differences between
createmobilespec.sh, and this one.
Well this one can work by itself, if it doesn't have available the coho
repository, it will download it, if it's present, it gives you the choice
to update it.
It allows delete the mobilespec project, if is present.
It supports (Android, Blackberry10, Windows Phone 8, and Windows 8[Not
entirely supported])
It allows to choice between add *all plugins* from coho repository, and also*
add individual plugins*(This is useful to add a plugin that you are or were
working on and add it to the mobile project to test it)
Install/update several requirements to build the mobilespec (install
grunt/grunt-CLI).
Also allows you to deploy the application to a* phone or emulator*, just
switching menu's. It's possible deploy to all the platforms at the time.

It's a batch script for windows, it doesn't have any GUI, except for when
you are trying to select a path, at that time it creates some VBS(at temp
system folder) to launch a GUI window to select a path. It should work fine
in the cordova-coho/cordova-mobile-spec folder, but, if the coho-repository
isn't present, it will download all the repository, and all files required
to work with.

It just need, git for windows installed, and the environment for the
platforms that you are trying to test, that's it.

It's really easy to use, I think it can be useful tool to use.



2014-03-04 8:44 GMT-06:00 Michal Mocny mmo...@chromium.org:

 I guess the key difference being that it runs on command prompt without
 unix emulation, and also seems to be a better swiss army knife too.  Seems
 like a great tool, thanks for putting it together.

 I don't have access to a windows machine (Jesse, maybe you would like to
 take a look?), but seeing as we have no solution for this right now, it
 seems like better than the alternative :)


 On Tue, Mar 4, 2014 at 9:39 AM, Michal Mocny mmo...@chromium.org wrote:

  Cool.
 
  I haven't dug deep yet, but was curious how this compares to:
 
 https://github.com/apache/cordova-mobile-spec/blob/master/createmobilespec.sh
 
 
  On Mon, Mar 3, 2014 at 5:15 PM, Martin Gonzalez Glez 
  martin.c.glez.g...@gmail.com wrote:
 
  I've just made a command line script for Mobile spec tests under
 Windows.
  It can handle Android, BB10, WP8, and Windows 8 platform.
  So if somebody, has the opportunity to test it, I'd really like to
 receive
  some feedback about it, check if more capabilities or options can be
  added.
 
  Basically is a command line script file, that uses the Cordova Command
  Line
  Interface, git for windows, and node cordova-cli module to create and
  assist the test process, using cordova mobile specs test suite, that
  includes manual and automated tests, to test plugins capabilities, as
 well
  as stability through versions.
  The script capabilities helps to simplify the test process, obtaining
 all
  resources required or giving the chance to set them in place, or set
 where
  they are.
  This script file it uses the cordova CLI capabilities to create, add
  platforms/plugins, as well as build, emulate and deploy to phone, it
 also
  uses the coho script to update some repositories, and get several
  resources
  if it's required.
 
  This is the issue: https://issues.apache.org/jira/browse/CB-6121
 
  Pull request with the complete description:
  https://github.com/apache/cordova-mobile-spec/pull/51
 
  Regards.
  Martin Gonzalez
 
 
 



CB-6121 (Windows command line script for Mobile spec)

2014-03-03 Thread Martin Gonzalez Glez
I've just made a command line script for Mobile spec tests under Windows.
It can handle Android, BB10, WP8, and Windows 8 platform.
So if somebody, has the opportunity to test it, I'd really like to receive
some feedback about it, check if more capabilities or options can be added.

Basically is a command line script file, that uses the Cordova Command Line
Interface, git for windows, and node cordova-cli module to create and
assist the test process, using cordova mobile specs test suite, that
includes manual and automated tests, to test plugins capabilities, as well
as stability through versions.
The script capabilities helps to simplify the test process, obtaining all
resources required or giving the chance to set them in place, or set where
they are.
This script file it uses the cordova CLI capabilities to create, add
platforms/plugins, as well as build, emulate and deploy to phone, it also
uses the coho script to update some repositories, and get several resources
if it's required.

This is the issue: https://issues.apache.org/jira/browse/CB-6121

Pull request with the complete description:
https://github.com/apache/cordova-mobile-spec/pull/51

Regards.
Martin Gonzalez


Introducing myself

2014-02-04 Thread Martin Gonzalez Glez
Hi everyone! My name is Martin Gonzalez, I work in the IBM Mobile
Foundation, and my job role it's help and contribute with this amazing
project that Cordova is. I really want to contribute to the success and
development in any way possible.
You may already know some folks, that I'm working with (Marcel Kinard,
Michael Billau, James Jong, Lisa Deluca).
I have good command using Javascript, Java, C/C++, HTML and another
languages, however, I don't have much experience with Cordova yet, but I'm
really focused on increase my knowledge and expertise.
If you have any questions, please feel free to contact me.
Thanks.
Martin Gonzalez.