RE: Cordova --list option implementation

2015-01-11 Thread Murat Sutunc
I've made the changes wrt what has been discussed:

https://github.com/apache/cordova-cli/pull/205
https://github.com/apache/cordova-lib/pull/145

Thanks,
Murat

-Original Message-
From: Josh Soref [mailto:jso...@blackberry.com] 
Sent: Friday, January 9, 2015 11:39 AM
To: dev@cordova.apache.org
Subject: Re: Cordova --list option implementation

Murat Sutunc wrote:
>At the very least, if you're going to do option 1.b, please make sure that
>list is a function which is independently reachable via the api so that js
>callers can easily get the list of devices for platform[s], and can
>determine if the feature is available (by checking for the presence of the
>api function).
>
>[MS] Can you clarify this a bit more. Do you mean like
>require('./cordova').raw.list(/*args*/)

Something like this, yes, but it'd need to have some indication it's about
targets in the code portion (which here is just 'raw.list').


[GitHub] cordova-lib pull request: CB-8168 --list support for cordova-lib

2015-01-11 Thread muratsu
GitHub user muratsu opened a pull request:

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

CB-8168 --list support for cordova-lib

Add list support back after the discussion on the dev mail list

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

$ git pull https://github.com/MSOpenTech/cordova-lib CB-8168

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

https://github.com/apache/cordova-lib/pull/145.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 #145


commit b4d971c6b2795045242079e9993895402dca4daa
Author: Murat Sutunc 
Date:   2015-01-12T07:11:49Z

CB-8168 --list support for cordova-lib




---
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.
---

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



[GitHub] cordova-cli pull request: CB-8168 --list support for CLI

2015-01-11 Thread muratsu
GitHub user muratsu opened a pull request:

https://github.com/apache/cordova-cli/pull/205

CB-8168 --list support for CLI

Add list support back after the discussion on the dev mail list

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

$ git pull https://github.com/MSOpenTech/cordova-cli CB-8168

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

https://github.com/apache/cordova-cli/pull/205.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 #205


commit 314c78e3aced3d81e69686e2a89c152f75ac75ca
Author: Murat Sutunc 
Date:   2015-01-12T07:25:45Z

CB-8168 --list support for CLI




---
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.
---

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



Re: Automatically installing missing platforms from cli

2015-01-11 Thread Josh Soref
Terence‎ wrote:
>‎ On a related note, is there a diagram somewhere of all the cordova-cli 
> commands and their associated options?

I'm not sure what a diagram would look like, but cordova help / cordova help 
verb should cover most needs. 


smime.p7s
Description: S/MIME cryptographic signature


Re: Automatically installing missing platforms from cli

2015-01-11 Thread Terence M. Bandoian
Creating directories and downloading and installing files is a lot of 
"magic" that may not be desired. Here's another Git example:


$ git commit -m "commit test."
On branch development
Changes not staged for commit:
modified:   html/data/topics.json
modified:   html/topics.html

no changes added to commit

$ git status
On branch development
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

modified:   html/data/topics.json
modified:   html/topics.html

no changes added to commit (use "git add" and/or "git commit -a")

On a related note, is there a diagram somewhere of all the cordova-cli 
commands and their associated options?


-Terence


On 1/10/2015 7:38 PM, Andrew Grieve wrote:

"cordova run" already builds before running (unless you add --nobuild). I
think it'd be pretty annoying if we had run fail with a "you need to build
first" kind of message.

In my mind, cordova-cli's purpose is to add magic. Otherwise, you would
just use plugman+platform scripts (and yes, some people do and that is
okay).

I think it would be awesome if you could clone a project, type "cordova run
ios" and have it do everything necessary to run the app (install, build,
and deploy).



On Fri, Jan 9, 2015 at 8:13 PM, Jesse  wrote:


what does `cordova run ios` do in windows?
or:
`cordova run wp8` in mac?

Note that recent changes allow you to `platform add ios` in windows, but
run will always be an error.
Personally, I am with Terrance on this. Magic should be used very
carefully.

--
$ git on up
git: 'on' is not a git command. See 'git --help'.

Did you mean one of these?
 clone
 log
 notes
 svn



@purplecabbage
risingj.com

On Fri, Jan 9, 2015 at 4:53 PM, Terence M. Bandoian 
wrote:


Seems to me that:

 cordova run ios

should do just that.  If the platform has not been added, I'd suggest

that

it fail with an informative message that could include the command to run
to resolve the problem (similar to Git bash).  At this level, deducing

the

user's intentions has the potential to get messy in a hurry both in the
code and for the user.

-Terence Bandoian



On 1/9/2015 12:47 PM, Michal Mocny wrote:


I'd like to have cordova-cli automatically install missing platforms

when

it is obvious that the platform is required.  i.e.:

  cordova create Foo && cd Foo

cordova run ios


..should just `cordova platform add ios` automatically.

It appears that this was already added to phonegap-cli.  Would Adobe

mind

donating this to cordova-cli, or is it different enough for me to just
start from scratch?  Should be easy, but don't want to duplicate effort.

Filed: https://issues.apache.org/jira/browse/CB-8283

-Michal



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





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



RE: How to test the cordova-android 4.0 by mobile spec

2015-01-11 Thread Fu, Junwei
Thank you very much, I will follow this issue by CB-8280.

Another things about JUnit tests, I pulled cordova-android 4.0 branch, and 
running Unit test in /test directory, but there are compiled error as below, 
and I want reuse the Unit tests to test Crosswalk pluggable webView,  so I 
request a PR https://github.com/apache/cordova-android/pull/140, could someone 
help me to review it.

/test/menus.java:37: error: method registerForContextMenu in class Activity 
cannot be applied to given types;
[javac] super.registerForContextMenu(super.appView);
reason: actual argument CordovaWebView cannot be converted to View by method 
invocation conversion

test/splashscreen.java:33: error: method loadUrl in class CordovaActivity 
cannot be applied to given types;
[javac] 
super.loadUrl("file:///android_asset/www/splashscreen/index.html", 2000);
reason: actual and formal argument lists differ in length

Thanks,
Junwei.

-Original Message-
From: agri...@google.com [mailto:agri...@google.com] On Behalf Of Andrew Grieve
Sent: Friday, January 09, 2015 5:06 AM
To: Andrew Grieve
Cc: dev
Subject: Re: How to test the cordova-android 4.0 by mobile spec

Created issue for the splashscreen:
https://issues.apache.org/jira/browse/CB-8280

On Thu, Jan 8, 2015 at 1:28 PM, Andrew Grieve  wrote:

> Yep! Will have a look at this.
>
> On Thu, Jan 8, 2015 at 11:57 AM, Joe Bowser  wrote:
>
>> That said, the tests failing should be filed as an issue.  I think 
>> this is related to Andrew's recent refactor of the Splashscreen, 
>> removing it from the core platform.  These changes are relatively 
>> minor, but can become huge w.r.t. docs and test coverage.
>>
>> On Thu Jan 08 2015 at 8:52:53 AM Michal Mocny 
>> wrote:
>>
>> > It should be, but given that its on a branch (fewer passing 
>> > eyeballs),
>> the
>> > pace of changes on 4.0.x, and that the failing test in question is 
>> > a
>> manual
>> > test, things are easily overlooked.  Thanks for bringing it up.
>> >
>> > Once 3.7 ships and 4.0 moves to master for next major release, I 
>> > expect
>> the
>> > tests will get more eyeballs.
>> >
>> > On Wed, Jan 7, 2015 at 8:28 PM, Fu, Junwei  wrote:
>> >
>> > > Thank you  very much, it's fine after update your commit.
>> > >
>> > > Is the mobilespec being tested for Cordova 4.0, Because there are
>> still
>> > > some other issue such as the splash screen can't show in 
>> > > splashscreen manual tests.
>> > >
>> > > -Original Message-
>> > > From: agri...@google.com [mailto:agri...@google.com] On Behalf Of
>> Andrew
>> > > Grieve
>> > > Sent: Thursday, January 08, 2015 2:00 AM
>> > > To: Andrew Grieve
>> > > Cc: dev
>> > > Subject: Re: How to test the cordova-android 4.0 by mobile spec
>> > >
>> > > Went to try this out and decided it's a bad idea. Much better is 
>> > > to
>> just
>> > > fix createmobilespec.js to use the proper platform versions when
>> > generating
>> > > the .js. I've done this and checked it in.
>> > >
>> > > On Wed, Jan 7, 2015 at 10:45 AM, Andrew Grieve 
>> > > 
>> > > wrote:
>> > >
>> > > > Hmm, I hadn't tried the key event manual tests with 4.0.x in 
>> > > > MS. I
>> do
>> > > > think that would break based on the version being MSTEST, since
>> there
>> > > > is now code to make an exec() to CoreAndroid based on the
>> > > platformVersion.
>> > > >
>> > > > Maybe let's just set the plugin bridge name back to "App" on 
>> > > > 4.0.x
>> so
>> > > > that the js exec() will always work (but still leave the class 
>> > > > name
>> as
>> > > > "CoreAndroid")
>> > > >
>> > > > On Tue, Jan 6, 2015 at 10:06 PM, Fu, Junwei 
>> > > > 
>> > wrote:
>> > > >
>> > > >> Yes, I set up mobilespec following 
>> > > >> https://github.com/apache/cordova-mobile-spec .
>> > > >>
>> > > >> -Original Message-
>> > > >> From: Joe Bowser [mailto:bows...@gmail.com]
>> > > >> Sent: Wednesday, January 07, 2015 10:54 AM
>> > > >> To: dev@cordova.apache.org
>> > > >> Subject: Re: How to test the cordova-android 4.0 by mobile 
>> > > >> spec
>> > > >>
>> > > >> So, it's not using the cordova that's installed locally via npm?
>> I'll
>> > > >> have to check that again.
>> > > >>
>> > > >> On Tue Jan 06 2015 at 6:33:14 PM Andrew Grieve <
>> agri...@chromium.org>
>> > > >> wrote:
>> > > >>
>> > > >> > I've just been checkout out 4.0.x branch of cordova-android, 
>> > > >> > then running the script. I think the script requires that 
>> > > >> > cordova-mobile-spec, cordova-android, and cordova-js all be
>> sibling
>> > > >> directories.
>> > > >> >
>> > > >> > On Tue, Jan 6, 2015 at 7:58 PM, Joe Bowser 
>> > > >> > 
>> > wrote:
>> > > >> >
>> > > >> > > I haven't been able to get mobile-spec working reliably 
>> > > >> > > since
>> it
>> > > >> > > was refactored and we were forced to use the
>> createmobilespec.sh
>> > > >> > > script
>> > > >> (i.e.
>> > > >> > > Tests don't run on Android 2.3) How did you manage to get 
>> > > >> > > it to work with 4.0.x?
>> > > >> > >
>> > > >> > > On Tue Ja