[GitHub] cordova-lib pull request: CB-7698 BugFix: For plugins which requir...

2015-03-10 Thread glasser
Github user glasser commented on the pull request:

https://github.com/apache/cordova-lib/pull/184#issuecomment-78213647
  
Awesome, thanks!


---
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-lib pull request:

2015-03-10 Thread omefire
Github user omefire commented on the pull request:


https://github.com/apache/cordova-lib/commit/242a8d760267379e963977de68d49aae96928562#commitcomment-10136020
  
Nice catch, @glasser.
I just sent a PR to fix this : 
https://github.com/apache/cordova-lib/pull/184


---
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-lib pull request: CB-7698 BugFix: For plugins which requir...

2015-03-10 Thread omefire
GitHub user omefire opened a pull request:

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

CB-7698 BugFix: For plugins which require variables, 'cordova plugin add 
FOO' should fail when no variables specified.

CB-7698 BugFix: For plugins which require variables, 'cordova plugin add 
FOO' should fail when no variables specified.

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

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

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

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


commit a5098b7758d6ad11e7fa7f2b0b22090088103314
Author: Omar Mefire 
Date:   2015-03-11T06:46:07Z

CB-7698 BugFix: For plugins which require variables, 'cordova plugin add 
FOO' should fail when no variables specified.




---
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-lib pull request:

2015-03-10 Thread glasser
Github user glasser commented on the pull request:


https://github.com/apache/cordova-lib/commit/242a8d760267379e963977de68d49aae96928562#commitcomment-10135110
  
Triggering this error doesn't seem to cause the `cordova plugin add` 
command to exit with a non-zero value.


---
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-plugin-statusbar pull request: update docs for StatusBarBa...

2015-03-10 Thread ryanmc2033
Github user ryanmc2033 commented on the pull request:


https://github.com/apache/cordova-plugin-statusbar/pull/20#issuecomment-78200291
  
Can someone tell me how to remove the black line that appears on the bottom 
of the status bar when using this plugin? I am trying to get the status bar to 
blend in with my app the the black line is really bothersome.

![statusbar](https://cloud.githubusercontent.com/assets/1508662/6589957/9d4a5470-c76e-11e4-850a-23130210ab78.PNG)



---
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: Deprecating the feature tag

2015-03-10 Thread Mefire O .
Thanks, Gorkem.
I reviewed the changes.
Overall, things look good to me, however I left some comments. 

Thanks,
Mefire

-Original Message-
From: Gorkem Ercan [mailto:gorkem.er...@gmail.com] 
Sent: Monday, March 9, 2015 4:49 PM
To: dev
Subject: Re: Deprecating the feature tag


Here is an example

  
 
 
   


On 9 Mar 2015, at 19:22, Mefire O. wrote:

> How do you specify variables with the new syntax ?
>
> Thanks,
> Mefire
>
> -Original Message-
> From: mmo...@google.com [mailto:mmo...@google.com] On Behalf Of Michal 
> Mocny
> Sent: Monday, March 9, 2015 2:50 PM
> To: dev
> Subject: Re: Deprecating the feature tag
>
> Haven't looked at a patch, but +1 to  over 
>
> On Mon, Mar 9, 2015 at 4:41 PM, Gorkem Ercan 
> wrote:
>
>>
>> I am about to deprecate the old  tag use for saving plugin 
>> information in favour of  tag. I have a PR[1] that I hope to 
>> soon merge. The changes are backward compatible,  old feature syntax 
>> will still be respected for read and remove operations but all new 
>> entries will be done with the new syntax. Please review the changes 
>> and let me know if you have any concerns, use cases that I am not 
>> aware of.
>>
>> As a note, this change does not effect the  tags that are 
>> created on platform specific config.xml files. Platforms will still 
>> be using the legacy  tag.
>>
>> [1] https://github.com/apache/cordova-lib/pull/182
>>
>> --
>> Gorkem
>>
>> -
>> 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


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



[GitHub] cordova-lib pull request: CB-8521 `cordova plugin save` should sav...

2015-03-10 Thread omefire
Github user omefire commented on the pull request:

https://github.com/apache/cordova-lib/pull/178#issuecomment-78182770
  
Thanks for raising this issue, @gorkem. I just pushed some changes to 
handle `dependent` plugins and only save `top-level` plugins in config.xml.


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



[VOTE] Camera Plugin Release 0.3.6

2015-03-10 Thread Steven Gill
Please review and vote on the release of this Camera plugin release.

Release issue: https://issues.apache.org/jira/browse/CB-8646

The plugins have been published to
dist/dev:https://dist.apache.org/repos/dist/dev/cordova/CB-8646/

The packages were published from their corresponding git tags:
cordova-plugin-camera: 0.3.6 (00cd249dd7)

Upon a successful vote I will upload the archives to dist/, upload
them to the Plugins Registry & NPM.

Voting guidelines:
https://github.com/apache/cordova-coho/blob/master/docs/release-voting.md

Voting will go on for a minimum of 48 hours.

I vote +1:
* Ran coho audit-license-headers over the relevant repos
* Ran coho check-license to ensure all dependencies and
subdependencies have Apache-compatible licenses


[Vote] 3.8.0 Cordova App Hello World Release

2015-03-10 Thread Steven Gill
Please review and vote on this 3.8.0 Cordova App Hello World Release.

Release issue: https://issues.apache.org/jira/browse/CB-8645

Repos ready to be released have been published to
dist/dev:https://dist.apache.org/repos/dist/dev/cordova/CB-8645

The package was published from its corresponding git tag:
cordova-app-hello-world: 3.8.0 (0b55140d09)

Upon a successful vote I will upload the archive to dist/ and publish it to NPM.

Voting guidelines:
https://github.com/apache/cordova-coho/blob/master/docs/release-voting.md

Voting will go on for a minimum of 48 hours.

I vote +1:
* Ran coho audit-license-headers over the relevant repos
* Ran coho check-license to ensure all dependencies and
subdependencies have Apache-compatible licenses
* Built a hello world app using the CLI


Re: Consolidating platform specific code from different places in cordova-lib

2015-03-10 Thread Jesse
Had a quick look, looks great!

@purplecabbage
risingj.com

On Tue, Mar 10, 2015 at 3:09 PM, Mark Koudritsky  wrote:

> I've created a pull request with changes across cordova-lib that should
> make it much easier to consolidate the platform specific code in
> cordova-lib to reduce duplication and maybe eventually move this code to
> the platforms repos.
>
> https://github.com/apache/cordova-lib/pull/183
> Feedback is welcome.
>
> Those changes only deal with interfacing the platform specific code from
> cordova/metadata/ and plugman/platforms/ dirs, the dirs themselves and
> their contents weren't changed yet.
>


Consolidating platform specific code from different places in cordova-lib

2015-03-10 Thread Mark Koudritsky
I've created a pull request with changes across cordova-lib that should
make it much easier to consolidate the platform specific code in
cordova-lib to reduce duplication and maybe eventually move this code to
the platforms repos.

https://github.com/apache/cordova-lib/pull/183
Feedback is welcome.

Those changes only deal with interfacing the platform specific code from
cordova/metadata/ and plugman/platforms/ dirs, the dirs themselves and
their contents weren't changed yet.


[GitHub] cordova-lib pull request: CB-8595 Merge platforms.js from cordova ...

2015-03-10 Thread kamrik
GitHub user kamrik opened a pull request:

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

CB-8595 Merge platforms.js from cordova & plugman CB-8595

Till now we had two separate places for platform specific code
cordova/metadata exposed via cordova/platforms.js
plugman/platforms exposed via plugman/platforms.js

This change merges the two `platforms.js` files into 
`platforms/platforms.js`
containing a single class exposing functionality from both places.

The class is instantiated via
prj = platforms.getPlatformProject(platform, project_dir)
`prj` can then be used just like the platform parsers were used before in 
cordova
e.g. `prj.www_dir()` or the handlers in plugman e.g: 
`prj.parseProjectFile()`.

This is a compatibility layer so that the platform specific code could be
easier consolidated and eventually moved to the platform repos.

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

$ git pull https://github.com/kamrik/cordova-lib platformcode-CB-8595

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

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


commit df7240aa119aa7024cb1a7644de836b5f59e26c0
Author: Mark Koudritsky 
Date:   2015-03-10T21:31:06Z

CB-8499 Merge platforms.js from cordova and plugman

Till now we had two separate places for platform specific code
cordova/metadata exposed via cordova/platforms.js
plugman/platforms exposed via plugman/platforms.js

This change merges the two `platforms.js` files into 
`platforms/platforms.js`
containing a single class exposing functionality from both places.

The class is instantiated via
prj = platforms.getPlatformProject(platform, project_dir)
`prj` can then be used just like the platform parsers were used before in 
cordova
e.g. `prj.www_dir()` or the handlers in plugman e.g: 
`prj.parseProjectFile()`.

This is a compatibility layer so that the platform specific code could be
easier consolidated and eventually moved to the platform repos.

commit 7932bd729b8846033ff2767ebaa7bab17fd8d4b9
Author: Mark Koudritsky 
Date:   2015-03-10T21:43:12Z

CB-8499 Fix tests for unified platforms.js change




---
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-mobile-spec pull request: Copy Mobilespec App Template Ins...

2015-03-10 Thread dblotsky
Github user dblotsky commented on the pull request:

https://github.com/apache/cordova-mobile-spec/pull/121#issuecomment-78153037
  
I put the change behind a flag called `--copywww`. By default `www` is 
linked, and if the flag is passed, then it is copied instead.


---
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-plugin-splashscreen pull request: [WP8] Respect SplashScre...

2015-03-10 Thread purplecabbage
Github user purplecabbage commented on the pull request:


https://github.com/apache/cordova-plugin-splashscreen/pull/38#issuecomment-78152746
  
Thanks for the contribution.
I did some cleanup in general of this code, some per comments from 
@robpaveza 
( 6b1e72c6312f1c449d15a11be445b858c6689d6a )
The code has been merged.


---
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-plugin-splashscreen pull request: [WP8] Respect SplashScre...

2015-03-10 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cordova-plugin-splashscreen/pull/38


---
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-lib pull request: CB-8636 Remove FEATURE_SPECIAL_PARAMS fr...

2015-03-10 Thread omefire
Github user omefire commented on the pull request:

https://github.com/apache/cordova-lib/pull/181#issuecomment-78151471
  
Let's wait until PR #182 goes in !


---
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-lib pull request: CB-8636 Remove FEATURE_SPECIAL_PARAMS fr...

2015-03-10 Thread omefire
Github user omefire commented on the pull request:

https://github.com/apache/cordova-lib/pull/181#issuecomment-78150199
  
Not until PR #182 goes in !


---
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-lib pull request: CB-8636 Remove FEATURE_SPECIAL_PARAMS fr...

2015-03-10 Thread nikhilkh
Github user nikhilkh commented on the pull request:

https://github.com/apache/cordova-lib/pull/181#issuecomment-78145771
  
Please close this PR if #182 supersedes this.


---
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: [iOS] Dropping iOS 6 support. It's time.

2015-03-10 Thread Shazron
Added an issue: https://issues.apache.org/jira/browse/CB-8643

On Mon, Mar 9, 2015 at 11:31 PM, Tommy Williams  wrote:
> None here. I still have an iOS 6 device, but can't say I test on it much.
> On 10 Mar 2015 5:21 pm, "Shazron"  wrote:
>
>> 0. https://developer.apple.com/support/appstore/
>>
>> 75% of devices are using iOS 8.
>> 22% of devices are using iOS 7.
>> 3% of devices are using iOS 6 or earlier.
>>
>> Other stats with similar results:
>> 1.
>> https://mixpanel.com/trends/#report/ios_8/from_date:-29,report_unit:day,to_date:-1
>> 2. http://stats.unity3d.com/mobile/os-ios.html
>> 3. http://david-smith.org/iosversionstats/
>>
>>
>> I propose the minimum supported iOS be iOS 7 in cordova-ios 4.0.x.
>>
>> Any objections regarding this future move?
>>
>> -
>> 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



[GitHub] cordova-ios pull request: CB-7428: Enable Swift development of Plu...

2015-03-10 Thread shazron
Github user shazron commented on the pull request:

https://github.com/apache/cordova-ios/pull/133#issuecomment-78142420
  
Also https://issues.apache.org/jira/browse/CB-8643


---
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-medic pull request: Medic Refactor

2015-03-10 Thread dblotsky
Github user dblotsky commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26157156
  
--- Diff: buildbot-conf/master.cfg ---
@@ -17,37 +17,75 @@
 # Absolute or relative path to buildbot per-project configureations.
 # For local Buildbot installation it is convenient to use the same 
directory
 # for main master.cfg and projects .conf files
-FP = "./"
+FP = './'
 
 c = BuildmasterConfig = {}
 
 ### BUILDSLAVES
 
-# import the passwds
-
-# import private
-# reload(private)
+# import the passwords
+import private
+reload(private)
 
 # c['db_url'] = private.mysqlConnection
 
+c['db'] = {
+'db_url' : "sqlite:///state.sqlite",
+}
+
 # the 'slaves' list defines the set of allowable buildslaves. Each element 
is
 # a tuple of bot-name and bot-password. These correspond to values given to
 # the buildslave's mktap invocation.
 from buildbot.buildslave import BuildSlave
 
-c['slaves'] = [
-BuildSlave("cordova-ios-slave", "pass", max_builds=1),
-BuildSlave("cordova-android-slave", "pass", max_builds=1),
-BuildSlave("cordova-windows-slave", "pass", max_builds=1),
-BuildSlave("cordova-win8-slave", "pass", max_builds=1),
-BuildSlave("cordova-blackberry-slave", "pass", max_builds=1),
-BuildSlave("cordova-common-slave", "pass", max_builds=3),
-]
+c['slaves'] = []
+
+c['slaves'].extend([
+
+# used slaves
+BuildSlave(
+'cordova-ios-slave',
+private.slave34Pwd,
--- End diff --

Yes, it seems like we will just need to keep our `master.cfg` defining the 
same slaves as Apache's `master.cfg`, and not move them to `cordova.conf`. I 
changed the password constants to be more descriptive, since now they don't 
need to be moved to `cordova.conf` and don't need to match Apache's 
`master.cfg`. Only slave names will need to stay the same.


---
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-medic pull request: Medic Refactor

2015-03-10 Thread dblotsky
Github user dblotsky commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26154261
  
--- Diff: buildbot-conf/cordova.conf ---
@@ -0,0 +1,326 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.basic import SingleBranchScheduler, 
AnyBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.changes.gitpoller import GitPoller
+from buildbot.changes import filter as change_filter
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Property as P
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# config
+MEDIC_CONFIG_FILE= os.path.join(FP, 'cordova-config.json')
+PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
+
+def parse_config_file(file_name):
+with open(file_name, 'r') as config_file:
+return json.load(config_file)
+
+medic_config= parse_config_file(MEDIC_CONFIG_FILE)
+projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
+
+# constants
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR  = '.'
+
+OSX = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+### UTILITIES
+
+# helper functions
+def cordova_builders():
+return [b.name for b in c['builders'] if b.name.startswith('cordova_')]
+
+def repo_name_from_url(url):
+match = re.match(CORDOVA_REPO_PATTERN, url)
+if match is not None:
+return match.group(1)
+return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+repo  = projects_config[name]
+codebase_name = repo['codebase']
+return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+"""
+Return the names of tasks possibly started by
+builds on the given platform and OS.
+"""
+if platform_name == 'windows':
+return ['WWAHost.exe']
+elif platform_name == 'wp8':
+return ['Xde.exe']
+elif platform_name == 'ios':
+return ['iOS Simulator']
+elif platform_name == 'android':
+if os_name == WINDOWS:
+return ['emulator-arm.exe', 'adb.exe']
+elif os_name == OSX:
+return ['emulator64-x86']
+return []
+
+def can_find_running_tasks(step):
+"""
+Return true if an OS and a platform is specified. Those are the
+criteria for finding a task because running_tasks_on_platform uses
+those properties to determine which tasks could be running.
+"""
+return (
+(step.build.getProperty('slaveos') is not None) and
+(step.build.getProperty('platform') is not None)
+)
+
+# renderers
+@renderer
+def render_repo_name(props):
+repo_url = props.getProperty('repository')
+return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+os_name   = props.getProperty('slaveos')
+platform_name = props.getProperty('platform')
+running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+if not running_tasks:
+return ['echo', 'No tasks to kill known.']
+
+if os_name == WINDOWS:
+command = ['taskkill', '/F']
+for task in running_tasks:
+command.append('/IM')
+command.append(task)
+
+else:
+command = ['killall']
+command.extend(running_tasks)
+
+return command
+
+@renderer
+def render_run_args(props):
+platform = props.getProperty('platform')
+if platform == 'windows':
+return '--win'
+return ''
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+return step_class(description=desc

[GitHub] cordova-lib pull request: Deprecate the old feature syntax from co...

2015-03-10 Thread omefire
Github user omefire commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/182#discussion_r26153119
  
--- Diff: cordova-lib/src/cordova/plugin.js ---
@@ -308,8 +301,8 @@ module.exports = function plugin(command, targets, 
opts) {
 };
 
 function getVersionFromConfigFile(plugin, cfg){
-var feature = cfg.getFeature(plugin); 
-return feature && (feature.params.url || feature.params.installPath || 
feature.params.version);
+var pluginEntry = cfg.getPlugin(plugin);
+return pluginEntry && pluginEntry.version; 
--- End diff --

This wouldn't work if config.xml contains a url or a folder.
This line should be changed to : return pluginEntry && pluginEntry.version 
|| pluginEntry.src;


---
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-ios pull request: CB-7428: Enable Swift development of Plu...

2015-03-10 Thread shazron
Github user shazron commented on the pull request:

https://github.com/apache/cordova-ios/pull/133#issuecomment-78121299
  
Thanks for the reminder, I've posted a new thread to get consensus: 
http://callback-dev.markmail.org/thread/c7c3iiuy6hr54pf6


---
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-lib pull request: CB-8596 Expose APIs to retrieve platform...

2015-03-10 Thread nikhilkh
Github user nikhilkh commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/177#discussion_r26152048
  
--- Diff: cordova-lib/src/cordova/project_metadata.js ---
@@ -0,0 +1,64 @@
+/**
+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 cordova_util = require('./util'),
+ConfigParser = require('../configparser/ConfigParser'),
+Q= require('q');
+
+/** Returns all the platforms that are currently saved into config.xml
+ *  @return Promise<{{name: string, version: string}[]}> A promise to the 
list of {name: platformName, version: platformVersion} objects
+ *  e.g: [ {name: 'android', version: '3.5.0'}, {name: 'wp8', version: 
'C:/path/to/platform'}, {name: 'ios', version: 'git://...'} ]
+ *  ToDo: Once we move to npm, this function should be updated to rely on 
npm instead
+ */
+function getPlatforms(projectRoot){
+var xml = cordova_util.projectConfig(projectRoot);
+var cfg = new ConfigParser(xml);
+return Q(cfg.getEngines());
+}
+
+/** Returns all the plugins that are currently saved into config.xml
+ *  @return Promise<{{name: string, version: string}[]}> A promise to the 
list of {name: platformName, version: platformVersion} objects
--- End diff --

Did you mean to say plugin name or really plugin id - instead of 
platformName.


---
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-lib pull request: CB-8596 Expose APIs to retrieve platform...

2015-03-10 Thread nikhilkh
Github user nikhilkh commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/177#discussion_r26152050
  
--- Diff: cordova-lib/src/cordova/project_metadata.js ---
@@ -0,0 +1,64 @@
+/**
+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 cordova_util = require('./util'),
+ConfigParser = require('../configparser/ConfigParser'),
+Q= require('q');
+
+/** Returns all the platforms that are currently saved into config.xml
+ *  @return Promise<{{name: string, version: string}[]}> A promise to the 
list of {name: platformName, version: platformVersion} objects
+ *  e.g: [ {name: 'android', version: '3.5.0'}, {name: 'wp8', version: 
'C:/path/to/platform'}, {name: 'ios', version: 'git://...'} ]
+ *  ToDo: Once we move to npm, this function should be updated to rely on 
npm instead
+ */
+function getPlatforms(projectRoot){
+var xml = cordova_util.projectConfig(projectRoot);
+var cfg = new ConfigParser(xml);
+return Q(cfg.getEngines());
+}
+
+/** Returns all the plugins that are currently saved into config.xml
+ *  @return Promise<{{name: string, version: string}[]}> A promise to the 
list of {name: platformName, version: platformVersion} objects
+ *  e.g: [ {id: 'org.apache.cordova.device', name: 'Device', APP_ID: 
'my-app-id', APP_NAME: 'my-app-name'} ]
--- End diff --

This example is confusing and does not match with the comment above.


---
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-medic pull request: Medic Refactor

2015-03-10 Thread dblotsky
Github user dblotsky commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26151823
  
--- Diff: bin/checkout.js ---
@@ -0,0 +1,46 @@
+#!/usr/bin/env node
+
+// node dependencies
+var fs = require('fs');
+
+// external dependencies
+var shell = require('shelljs');
+
+// parse args
+var argv = require('optimist')
+.usage('Usage: $0 --config [path]')
+.demand('config')
+.argv;
+
+function cloneProject(projectName, projectsConfig) {
+
+var project  = projectsConfig[projectName];
+var codebase = project.codebases[project.codebase];
+var command  = 'git clone ' + codebase.repo + ' --branch=' + 
codebase.branch + ' --depth 1'
+
+shell.exec(command, {async: false}, function (returnCode, output) {
--- End diff --

Good catch! I forgot to remove the `{async: ...}` bit. Removed in latest 
commit.


---
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: Deprecation of Config and the embedded use case (4.0.x related)

2015-03-10 Thread Joe Bowser
The main issue is that this isn't documented anywhere, and this is
necessary for people to use a Third Party WebView.  Also, why didn't you
bother updating the test with the new API?

On Mon, Mar 9, 2015 at 5:19 PM Andrew Grieve  wrote:

> Here's an example:
>
> ConfigXmlParser parser = new ConfigXmlParser();
> parser.parse(activity);
> webView.init(cordova, parser.getPluginEntries(), parser.getPreferences());
>
> Feel free to iterate if you think the API is too obtuse, but I think it's
> good to allow a file-less mode, and to allow different WebViews to have
> different settings.
>
>
>
>
> On Mon, Mar 9, 2015 at 8:08 PM, Joe Bowser  wrote:
>
> > Do you have an example of how this would work? This seems to be a lot
> more
> > complex than it needs to be.
> >
> > On Mon, Mar 9, 2015 at 5:05 PM Andrew Grieve 
> wrote:
> >
> > > It's so that you can have multiple CordovaWebViews that use different
> > > configs within one application. It's also so that you don't have to
> have
> > a
> > > config.xml if you prefer to build up your config in code instead.
> > >
> > > I don't think loadConfig() is deprecated. It has
> > > a @SuppressWarnings("deprecation"), which just silences a warning
> about
> > it
> > > setting the config of the Config class (which is done for backwards
> > > compatibility).
> > >
> > >
> > > On Mon, Mar 9, 2015 at 3:54 PM, Joe Bowser  wrote:
> > >
> > > > OK, this actually makes using the WebView as a component a lot
> harder,
> > > > since you now have to have this loadConfig method which you also
> marked
> > > for
> > > > deprecation required to get all of the necessary attributes out of
> > this.
> > > > I'm pretty sure this is a major step backwards in that people looking
> > to
> > > > use Cordova as a component now have to jump through additional hoops
> to
> > > get
> > > > this to work.  What is the benefit of deprecating the Config static
> > class
> > > > and replacing it with the ConfigXmlParser again? I don't remember why
> > > this
> > > > was done.
> > > >
> > > > On Mon, Mar 9, 2015 at 9:04 AM Andrew Grieve 
> > > wrote:
> > > >
> > > > > On Mon, Mar 9, 2015 at 11:56 AM, Joe Bowser 
> > wrote:
> > > > >
> > > > > > On Mon, Mar 9, 2015 at 7:39 AM Andrew Grieve <
> agri...@chromium.org
> > >
> > > > > wrote:
> > > > > >
> > > > > > > You can now instantiate a CordovaWebView without a config.xml,
> > and
> > > > > > without
> > > > > > > using Config. This happened when I added an "init()" method to
> > > > > > > CordovaWebView. You can pass in a CordovaPreferences object,
> and
> > a
> > > > list
> > > > > > of
> > > > > > > PluginEntry. Maybe we just need a better comment on Config
> saying
> > > to
> > > > > use
> > > > > > > these instead?
> > > > > > >
> > > > > > >
> > > > > > Where does one get this PluginEntry list when they're embedding a
> > > > > WebView?
> > > > > > This needs to be documented or at least put in the test that
> tests
> > > this
> > > > > use
> > > > > > case.
> > > > > >
> > > > > > >
> > > > > >
> > > > > > > > That has nothing to do with InAppBrowser, this is to do with
> > > > > embedding
> > > > > > a
> > > > > > > > WebView inside an Android application. I don't think you
> > > understand
> > > > > > what
> > > > > > > I
> > > > > > > > mean when I say the embedded use case.
> > > > > > > >
> > > > > > > Maybe try explaining a bit more?
> > > > > >
> > > > > >
> > > > > > Even though you edited the test that explicitly covers this use,
> > > case,
> > > > > and
> > > > > > even though we've talked about using CordovaWebView as an Android
> > > View
> > > > > for
> > > > > > over a year, you need it explained more?
> > > > > >
> > > > > > So, not everyone wants to use all of Cordova, for many reasons.
> > > > Instead,
> > > > > > they really just want to take advantage of the WebView component
> in
> > > > their
> > > > > > native apps so that they can create hybrid apps that are mostly
> > > native
> > > > > with
> > > > > > only some parts that use Cordova.  This is where you would
> declare
> > > your
> > > > > > view in your layout XML like this:
> > > > > >
> > > > > >  > > > > > android:id="@+id/WebViewComponent"
> > > > > > android:layout_width="match_parent"
> > > > > > android:layout_height="match_parent">
> > > > > > 
> > > > > >
> > > > > > And then, in the activity start up your view like this:
> > > > > >
> > > > > >   private CordovaWebView webInterface;
> > > > > >   private CordovaInterfaceImpl systemInterface = new
> > > > > > CordovaInterfaceImpl(this);
> > > > > >
> > > > > > //Set up the webview
> > > > > > SystemWebView webView = (SystemWebView)
> > > > > > findViewById(R.id.WebViewComponent);
> > > > > > webInterface = new CordovaWebViewImpl(this, new
> > > > > > SystemWebViewEngine(webView));
> > > > > >
> > > > > > Config.init();
> > > > > > webInterface.init(systemInterface,
> > > Config.getPluginEntries(),
> > > > > > Config.getPreferences());
> > > > >

RE: Pull Request Review Request [apache/cordova-plugin-splashscreen]

2015-03-10 Thread Rob Paveza
Hey Georgi,

I left some comments on your PR.  Only big thing is how you populate 
preferences, otherwise LGTM.  My other comments are mostly nits.

Thanks,
-Rob

From: agri...@google.com [mailto:agri...@google.com] On Behalf Of Andrew Grieve
Sent: Monday, March 9, 2015 7:25 AM
To: Georgi Alexandrov; dev
Cc: agri...@chromium.org
Subject: Re: Pull Request Review Request [apache/cordova-plugin-splashscreen]

Thanks Georgi!

Bouncing you to the mailing-list though, as I don't do any Windows development.

On Mon, Mar 9, 2015 at 8:15 AM, Georgi Alexandrov 
mailto:georgi.alexand...@telerik.com>> wrote:
Hi Andrew,

I saw that you are one of the main contributors in cordova-plugin-splashscreen. 
I was wondering if it’s possible to check 
this PR when you 
have some free time.

Thanks,
Georgi Alexandrov

[Telerik]

Georgi Alexandrov
Software Engineer, Senior, AppBuilder Core
m +359 894 707390
e  georgi.alexand...@telerik.com
w www.telerik.com






[GitHub] cordova-lib pull request: CB-8596 Expose APIs to retrieve platform...

2015-03-10 Thread nikhilkh
Github user nikhilkh commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/177#discussion_r26150341
  
--- Diff: cordova-lib/spec-cordova/project-metadata-apis.spec.js ---
@@ -0,0 +1,85 @@
+/**
+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 cordova = require('../src/cordova/cordova'),
+helpers = require('./helpers'),
+shell   = require('shelljs'),
+path= require('path');
+
+describe('retrieval of project metadata', function(){
+
+var appId = 'org.testing';
+var appName = 'ProjectMetadataRetrievalTests';
+
+var configNormal = {
+lib: {
+www: {
+url: path.join(__dirname, 'fixtures', 'base', 'www'),
+version: 'testProjectMetadataRetrieval',
+id: appName
+}
+}
+};
+
+var tmpDir = helpers.tmpDir('project_metadata_test');
+var projectRoot = path.join(tmpDir, appName);
+
+beforeEach(function(){
+shell.rm('-rf', tmpDir);
+shell.rm('-rf', projectRoot);
+shell.mkdir('-p', tmpDir);
+});
+
+afterEach(function() {
+process.chdir(path.join(__dirname, '..'));  // Windows: Needed to 
rm the dir on Windows.
+shell.rm('-rf', tmpDir);
+});
+
+it('retrieve platforms and plugins saved in config.xml', 
function(done){
+var devicePlugin = 'org.apache.cordova.device@0.2.11'; 
--- End diff --

Wonder if you need to add test case for git url being specified?


---
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-lib pull request: CB-8596 Expose APIs to retrieve platform...

2015-03-10 Thread nikhilkh
Github user nikhilkh commented on the pull request:

https://github.com/apache/cordova-lib/pull/177#issuecomment-78115338
  
I noticed that the plugin metadata that is exposed is the id and version 
number. What if the source is a git URL - how is that exposed?


---
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-plugin-splashscreen pull request: [WP8] Respect SplashScre...

2015-03-10 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-splashscreen/pull/38#discussion_r26149994
  
--- Diff: src/wp/SplashScreen.cs ---
@@ -68,27 +77,52 @@ public override void OnInit()
 if (!WasShown)
 {
 WasShown = true;
-show();
+this.show();
 }
 }
 
-void LoadConfigValues()
+private static void GetPreference(XDocument document, string 
preferenceName, Action action)
--- End diff --

Variable name 'document' should probably be 'configuration' or 'configFile'.


---
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-plugin-splashscreen pull request: [WP8] Respect SplashScre...

2015-03-10 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-splashscreen/pull/38#discussion_r26149807
  
--- Diff: src/wp/SplashScreen.cs ---
@@ -163,5 +190,30 @@ public void hide(string options = null)
 story.Begin();
 });
 }
+
+private void StartAutoHideTimer()
+{
+var timer = new DispatcherTimer() { Interval = 
TimeSpan.FromMilliseconds(preferences.SplashScreenDelay) };
+timer.Tick += (object sender, EventArgs e) =>
+{
+this.hide();
+timer.Stop();
+};
+timer.Start();
+}
+
+private class Preferences
--- End diff --

It's not clear that another heap-allocated object is worth it here.  With 
only three preferences, in a private class, each of these could be promoted to 
a member variable of the owning class, eliminating the private class altogether.


---
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-plugin-splashscreen pull request: [WP8] Respect SplashScre...

2015-03-10 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-splashscreen/pull/38#discussion_r26149711
  
--- Diff: src/wp/SplashScreen.cs ---
@@ -163,5 +190,30 @@ public void hide(string options = null)
 story.Begin();
 });
 }
+
+private void StartAutoHideTimer()
+{
+var timer = new DispatcherTimer() { Interval = 
TimeSpan.FromMilliseconds(preferences.SplashScreenDelay) };
+timer.Tick += (object sender, EventArgs e) =>
--- End diff --

Suggest: Promote the Tick handler to a member function.  In the callback, 
remove the Tick handler.  This eliminates the circular reference which is 
created by auto-referencing 'this' in your callback.


---
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-medic pull request: Medic Refactor

2015-03-10 Thread dblotsky
Github user dblotsky commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26149508
  
--- Diff: buildbot-conf/cordova.conf ---
@@ -0,0 +1,326 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.basic import SingleBranchScheduler, 
AnyBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.changes.gitpoller import GitPoller
+from buildbot.changes import filter as change_filter
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Property as P
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# config
+MEDIC_CONFIG_FILE= os.path.join(FP, 'cordova-config.json')
+PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
+
+def parse_config_file(file_name):
+with open(file_name, 'r') as config_file:
+return json.load(config_file)
+
+medic_config= parse_config_file(MEDIC_CONFIG_FILE)
+projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
+
+# constants
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR  = '.'
+
+OSX = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+### UTILITIES
+
+# helper functions
+def cordova_builders():
+return [b.name for b in c['builders'] if b.name.startswith('cordova_')]
+
+def repo_name_from_url(url):
+match = re.match(CORDOVA_REPO_PATTERN, url)
+if match is not None:
+return match.group(1)
+return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+repo  = projects_config[name]
+codebase_name = repo['codebase']
+return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+"""
+Return the names of tasks possibly started by
+builds on the given platform and OS.
+"""
+if platform_name == 'windows':
+return ['WWAHost.exe']
+elif platform_name == 'wp8':
+return ['Xde.exe']
+elif platform_name == 'ios':
+return ['iOS Simulator']
+elif platform_name == 'android':
+if os_name == WINDOWS:
+return ['emulator-arm.exe', 'adb.exe']
+elif os_name == OSX:
+return ['emulator64-x86']
+return []
+
+def can_find_running_tasks(step):
+"""
+Return true if an OS and a platform is specified. Those are the
+criteria for finding a task because running_tasks_on_platform uses
+those properties to determine which tasks could be running.
+"""
+return (
+(step.build.getProperty('slaveos') is not None) and
+(step.build.getProperty('platform') is not None)
+)
+
+# renderers
+@renderer
+def render_repo_name(props):
+repo_url = props.getProperty('repository')
+return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+os_name   = props.getProperty('slaveos')
+platform_name = props.getProperty('platform')
+running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+if not running_tasks:
+return ['echo', 'No tasks to kill known.']
+
+if os_name == WINDOWS:
+command = ['taskkill', '/F']
+for task in running_tasks:
+command.append('/IM')
+command.append(task)
+
+else:
+command = ['killall']
+command.extend(running_tasks)
+
+return command
+
+@renderer
+def render_run_args(props):
+platform = props.getProperty('platform')
+if platform == 'windows':
+return '--win'
+return ''
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+return step_class(description=desc

[GitHub] cordova-lib pull request:

2015-03-10 Thread cwarden
Github user cwarden commented on the pull request:


https://github.com/apache/cordova-lib/commit/6fd8e23fda5658d5c8d43ecfb6016edb6f713265#commitcomment-10125851
  
In cordova-lib/src/plugman/platforms/ios.js:
In cordova-lib/src/plugman/platforms/ios.js on line 188:
This broke `cordova prepare` in my app where `INFOPLIST_FILE` contained 
`"$(SRCROOT)/Project/Project-Info.plist"`.  Removing `$(SRCROOT)/` doesn't seem 
to cause any problems in case anyone else starts getting "could not find 
-Info.plist file, or config.xml file.".


---
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-plugin-splashscreen pull request: [WP8] Respect SplashScre...

2015-03-10 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-splashscreen/pull/38#discussion_r26144383
  
--- Diff: src/wp/SplashScreen.cs ---
@@ -40,26 +40,35 @@ namespace WPCordovaClassLib.Cordova.Commands
 /// 
 public class SplashScreen : BaseCommand
 {
+private readonly Preferences preferences = new Preferences();
 private Popup popup;
-private bool autohide = true;
 
 private static bool WasShown = false;
 
 public SplashScreen()
 {
-Image SplashScreen = new Image();
-BitmapImage splash_image = new BitmapImage();
-splash_image.SetSource(Application.GetResourceStream(new 
Uri(@"SplashScreenImage.jpg", UriKind.Relative)).Stream);
-SplashScreen.Source = splash_image;
+this.LoadPreferencesFromConfiguration();
+
+Image SplashScreen = new Image()
+{
+Height = Application.Current.Host.Content.ActualHeight,
+Width = Application.Current.Host.Content.ActualWidth,
+Stretch = Stretch.Fill
+};
+
+var imageResource = 
Application.GetResourceStream(preferences.SplashScreenImage);
+if (imageResource != null)
+{
+BitmapImage splash_image = new BitmapImage();
+splash_image.SetSource(imageResource.Stream);
+SplashScreen.Source = splash_image;
+}
 
 // Instansiate the popup and set the Child property of Popup 
to SplashScreen
-popup = new Popup() {IsOpen = false, Child = SplashScreen };
+this.popup = new Popup() { IsOpen = false, Child = 
SplashScreen };
--- End diff --

Nit: prefixed use of "this" when referring to members isn't bad, but is 
unnecessary.


---
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-lib pull request: CB-8596 Expose APIs to retrieve platform...

2015-03-10 Thread omefire
Github user omefire commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/177#discussion_r26143818
  
--- Diff: cordova-lib/src/cordova/project_metadata.js ---
@@ -0,0 +1,60 @@
+/**
+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 cordova_util = require('./util'),
+ConfigParser = require('../configparser/ConfigParser'),
+Q= require('q');
+
+// Returns all the platforms that are currently saved into config.xml
+// Return type is a promise that is fulfilled with a list of objects with 
name and version properties. e.g: [{name: 'android', version: '3.5.0'}, {name: 
'wp8', version: 'C:/path/to/platform'}, {name: 'ios', version: 'git://...'}]
+// ToDo: Once we move to npm, this function should be updated to rely on 
npm instead
+function getPlatforms(projectRoot){
+var xml = cordova_util.projectConfig(projectRoot);
+var cfg = new ConfigParser(xml);
+return Q(cfg.getEngines());
+}
+
+// Returns all the plugins that are currently saved into config.xml
+// Return type is a promise that is fulfilled with a list of objects with 
name and version properties. e.g: [ {id: 'org.apache.cordova.device', name: 
'Device', APP_ID: 'my-app-id', APP_NAME: 'my-app-name'} ]
--- End diff --

Thanks for the suggestion. definitely cleaner comments...
I just pushed cleaner, more readable comments.


---
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-plugin-splashscreen pull request: [WP8] Respect SplashScre...

2015-03-10 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-splashscreen/pull/38#discussion_r26143768
  
--- Diff: src/wp/SplashScreen.cs ---
@@ -68,27 +77,52 @@ public override void OnInit()
 if (!WasShown)
 {
 WasShown = true;
-show();
+this.show();
 }
 }
 
-void LoadConfigValues()
+private static void GetPreference(XDocument document, string 
preferenceName, Action action)
--- End diff --

This method works somewhat backwards, where you check up to N strings for 
every preference, making your worst-case performance O(n^2) (in the case that 
you don't find the preferences).  Suggested alternative: Populate a 
Dictionary>, and then for-each preference element, if 
(dictionary.TryGetValue(preferenceName, out action)) action(value).  Dictionary 
lookups approach O(1).


---
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-plugin-file-transfer pull request: CB-8641 Fixed occasiona...

2015-03-10 Thread vladimir-kotikov
Github user vladimir-kotikov commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-file-transfer/pull/69#discussion_r26140093
  
--- Diff: tests/tests.js ---
@@ -28,10 +28,11 @@
 exports.defineAutoTests = function () {
 
 // constants
-var GRACE_TIME_DELTA = 300; // in milliseconds
+var GRACE_TIME_DELTA = 500; // in milliseconds
 var DEFAULT_FILESYSTEM_SIZE = 1024*50; //filesystem size in bytes
 var UNKNOWN_HOST = "http://foobar.apache.org";;
 var HEADERS_ECHO = "http://whatheaders.com";; // NOTE: this site is 
very useful!
+var abortTimeout = 100; // for abort() tests
--- End diff --

Consider using an UPPER_CASE name here.


---
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-plugin-file-transfer pull request: CB-8641 Fixed occasiona...

2015-03-10 Thread muratsu
Github user muratsu commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-file-transfer/pull/69#discussion_r26139904
  
--- Diff: tests/tests.js ---
@@ -305,7 +306,17 @@ exports.defineAutoTests = function () {
 // - 'http://example.com'
 // - 'apache.org', with subdomains="true"
 // - 'cordova-filetransfer.jitsu.com'
-describe('download', function() {
+describe('download', function () {
+var originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
--- End diff --

it's better to move the assignment inside beforeEach.


---
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: Plugin Post Install Script

2015-03-10 Thread Michal Mocny
Thanks Steve!

On Tue, Mar 10, 2015 at 12:18 PM, Steven Gill 
wrote:

> Alright. Punted for now. Too early to talk about this.
> On Mar 10, 2015 8:56 AM, "Michal Mocny"  wrote:
>
> > I don't think this is a good idea, but I'm open to be convinced.
> >
> > However, cannot we punt this discussion for now?  The current phase 1
> > rollout does not actually have us installing plugins to node_modules, so
> > really this is an independant feature request to create a new workflow.
> I
> > don't see the benefit for this reason alone.  I think supporting plugins
> /
> > platforms / tolling inside node_modules *is* a good idea, but I think it
> > should look even more radically different (can demo some ideas next
> > Hangout).
> >
> > -Michal
> >
> > On Mon, Mar 9, 2015 at 9:59 PM, Steven Gill 
> > wrote:
> >
> > > On Mon, Mar 9, 2015 at 6:20 PM, Jesse  wrote:
> > >
> > > > What does `npm i -g cordova-plugin-device` do? Just because things
> are
> > > > similar does not mean you should force them to be the same. I don't
> > > really
> > > > see a benefit in doing this though, and I think we are going to end
> up
> > > with
> > > > circular unresolvable dependencies. or at least greatly increased
> > > > complexity in dependency resolution.
> > > >
> > > > I figure the post install script would fail if the plugin gets
> > installed
> > > globally. I'd like to figure out exactly what dependency issues we
> would
> > > run into.
> > >
> > > Having 2 ways to do things just makes it harder for us 
> > > >
> > > > Thinking outloud ... isn't the post install really just something
> like:
> > > >
> > > > ../../cordova plugin add npm_modules/cordova-plugin-device/
> > > > That assumes no dependency resolution ... which would make it
> explode.
> > > >
> > > > This could potentially be one way of doing it. Another way would be
> to
> > > move install logic into the script itself. Just thinking outloud.
> > >
> > >
> > > > Overall, I don't think the feature is worth the complexity it would
> > add,
> > > > and I don't even think it makes things easier for users.
> > > > What is the benefit of typing 'npm i cordova-plugin-device' vs
> 'cordova
> > > > plugin add cordova-plugin-device' ? Character count?
> > > >
> > > > It is definitely early for me to bring up this suggestion. I don't
> see
> > a
> > > reason why current cordova devs would use `npm install
> > > cordova-plugin-device` over cordova plugin add. I see it being more
> > useful
> > > in a world where cordova projects are node projects. CLI created
> projects
> > > would have a package.json, and I could see users installing plugins via
> > npm
> > > install.
> > >
> > > Also, I see cordova JSAPI based projects becoming more popular once we
> > > break cordova-lib into smaller scripts and offer alternative ways to
> > build
> > > and manage projects using npm/gulp/grunt/etc. This should be beneficial
> > to
> > > our many downstreams as well.
> > >
> > > Just wanting to start fleshing out what all of this will look like. If
> we
> > > do decide to go down this route, it would be nice to figure it out soon
> > so
> > > we could start getting plugin authors to make updates while we wait for
> > > tooling.
> > >
> > > >
> > > >
> > > > @purplecabbage
> > > > risingj.com
> > > >
> > > > On Mon, Mar 9, 2015 at 5:36 PM, Steven Gill 
> > > > wrote:
> > > >
> > > > > I think it is worth exploring a generic post install script plugin
> > > > authors
> > > > > could include that would install the plugin into a cordova project
> > > after
> > > > a
> > > > > npm install. I haven't had any time to actually explore this yet
> > > though.
> > > > >
> > > > > My initial reaction was that it would be hard to get right. After
> > some
> > > > > thought and discussion with the npm people & Anis, it might be a
> > really
> > > > > nice way of doing it.
> > > > >
> > > > > It would be pretty sweet if people could just go `npm i
> > > > > cordova-plugin-device` and have it install the plugin into their
> > > cordova
> > > > > projects.
> > > > >
> > > > > The script would have to:
> > > > > * detect if it is a cordova project and what version
> > > > > * do everything plugin install does now
> > > > >
> > > > > Just wanted to collect some feedback, advice, and concerns people
> > have
> > > > > before I attempt to build it.
> > > > >
> > > >
> > >
> >
>


Re: Plugin Post Install Script

2015-03-10 Thread Michal Mocny
I don't think this is a good idea, but I'm open to be convinced.

However, cannot we punt this discussion for now?  The current phase 1
rollout does not actually have us installing plugins to node_modules, so
really this is an independant feature request to create a new workflow.  I
don't see the benefit for this reason alone.  I think supporting plugins /
platforms / tolling inside node_modules *is* a good idea, but I think it
should look even more radically different (can demo some ideas next
Hangout).

-Michal

On Mon, Mar 9, 2015 at 9:59 PM, Steven Gill  wrote:

> On Mon, Mar 9, 2015 at 6:20 PM, Jesse  wrote:
>
> > What does `npm i -g cordova-plugin-device` do? Just because things are
> > similar does not mean you should force them to be the same. I don't
> really
> > see a benefit in doing this though, and I think we are going to end up
> with
> > circular unresolvable dependencies. or at least greatly increased
> > complexity in dependency resolution.
> >
> > I figure the post install script would fail if the plugin gets installed
> globally. I'd like to figure out exactly what dependency issues we would
> run into.
>
> Having 2 ways to do things just makes it harder for us 
> >
> > Thinking outloud ... isn't the post install really just something like:
> >
> > ../../cordova plugin add npm_modules/cordova-plugin-device/
> > That assumes no dependency resolution ... which would make it explode.
> >
> > This could potentially be one way of doing it. Another way would be to
> move install logic into the script itself. Just thinking outloud.
>
>
> > Overall, I don't think the feature is worth the complexity it would add,
> > and I don't even think it makes things easier for users.
> > What is the benefit of typing 'npm i cordova-plugin-device' vs 'cordova
> > plugin add cordova-plugin-device' ? Character count?
> >
> > It is definitely early for me to bring up this suggestion. I don't see a
> reason why current cordova devs would use `npm install
> cordova-plugin-device` over cordova plugin add. I see it being more useful
> in a world where cordova projects are node projects. CLI created projects
> would have a package.json, and I could see users installing plugins via npm
> install.
>
> Also, I see cordova JSAPI based projects becoming more popular once we
> break cordova-lib into smaller scripts and offer alternative ways to build
> and manage projects using npm/gulp/grunt/etc. This should be beneficial to
> our many downstreams as well.
>
> Just wanting to start fleshing out what all of this will look like. If we
> do decide to go down this route, it would be nice to figure it out soon so
> we could start getting plugin authors to make updates while we wait for
> tooling.
>
> >
> >
> > @purplecabbage
> > risingj.com
> >
> > On Mon, Mar 9, 2015 at 5:36 PM, Steven Gill 
> > wrote:
> >
> > > I think it is worth exploring a generic post install script plugin
> > authors
> > > could include that would install the plugin into a cordova project
> after
> > a
> > > npm install. I haven't had any time to actually explore this yet
> though.
> > >
> > > My initial reaction was that it would be hard to get right. After some
> > > thought and discussion with the npm people & Anis, it might be a really
> > > nice way of doing it.
> > >
> > > It would be pretty sweet if people could just go `npm i
> > > cordova-plugin-device` and have it install the plugin into their
> cordova
> > > projects.
> > >
> > > The script would have to:
> > > * detect if it is a cordova project and what version
> > > * do everything plugin install does now
> > >
> > > Just wanted to collect some feedback, advice, and concerns people have
> > > before I attempt to build it.
> > >
> >
>


Re: Plugin Post Install Script

2015-03-10 Thread Steven Gill
Alright. Punted for now. Too early to talk about this.
On Mar 10, 2015 8:56 AM, "Michal Mocny"  wrote:

> I don't think this is a good idea, but I'm open to be convinced.
>
> However, cannot we punt this discussion for now?  The current phase 1
> rollout does not actually have us installing plugins to node_modules, so
> really this is an independant feature request to create a new workflow.  I
> don't see the benefit for this reason alone.  I think supporting plugins /
> platforms / tolling inside node_modules *is* a good idea, but I think it
> should look even more radically different (can demo some ideas next
> Hangout).
>
> -Michal
>
> On Mon, Mar 9, 2015 at 9:59 PM, Steven Gill 
> wrote:
>
> > On Mon, Mar 9, 2015 at 6:20 PM, Jesse  wrote:
> >
> > > What does `npm i -g cordova-plugin-device` do? Just because things are
> > > similar does not mean you should force them to be the same. I don't
> > really
> > > see a benefit in doing this though, and I think we are going to end up
> > with
> > > circular unresolvable dependencies. or at least greatly increased
> > > complexity in dependency resolution.
> > >
> > > I figure the post install script would fail if the plugin gets
> installed
> > globally. I'd like to figure out exactly what dependency issues we would
> > run into.
> >
> > Having 2 ways to do things just makes it harder for us 
> > >
> > > Thinking outloud ... isn't the post install really just something like:
> > >
> > > ../../cordova plugin add npm_modules/cordova-plugin-device/
> > > That assumes no dependency resolution ... which would make it explode.
> > >
> > > This could potentially be one way of doing it. Another way would be to
> > move install logic into the script itself. Just thinking outloud.
> >
> >
> > > Overall, I don't think the feature is worth the complexity it would
> add,
> > > and I don't even think it makes things easier for users.
> > > What is the benefit of typing 'npm i cordova-plugin-device' vs 'cordova
> > > plugin add cordova-plugin-device' ? Character count?
> > >
> > > It is definitely early for me to bring up this suggestion. I don't see
> a
> > reason why current cordova devs would use `npm install
> > cordova-plugin-device` over cordova plugin add. I see it being more
> useful
> > in a world where cordova projects are node projects. CLI created projects
> > would have a package.json, and I could see users installing plugins via
> npm
> > install.
> >
> > Also, I see cordova JSAPI based projects becoming more popular once we
> > break cordova-lib into smaller scripts and offer alternative ways to
> build
> > and manage projects using npm/gulp/grunt/etc. This should be beneficial
> to
> > our many downstreams as well.
> >
> > Just wanting to start fleshing out what all of this will look like. If we
> > do decide to go down this route, it would be nice to figure it out soon
> so
> > we could start getting plugin authors to make updates while we wait for
> > tooling.
> >
> > >
> > >
> > > @purplecabbage
> > > risingj.com
> > >
> > > On Mon, Mar 9, 2015 at 5:36 PM, Steven Gill 
> > > wrote:
> > >
> > > > I think it is worth exploring a generic post install script plugin
> > > authors
> > > > could include that would install the plugin into a cordova project
> > after
> > > a
> > > > npm install. I haven't had any time to actually explore this yet
> > though.
> > > >
> > > > My initial reaction was that it would be hard to get right. After
> some
> > > > thought and discussion with the npm people & Anis, it might be a
> really
> > > > nice way of doing it.
> > > >
> > > > It would be pretty sweet if people could just go `npm i
> > > > cordova-plugin-device` and have it install the plugin into their
> > cordova
> > > > projects.
> > > >
> > > > The script would have to:
> > > > * detect if it is a cordova project and what version
> > > > * do everything plugin install does now
> > > >
> > > > Just wanted to collect some feedback, advice, and concerns people
> have
> > > > before I attempt to build it.
> > > >
> > >
> >
>


[GitHub] cordova-cli pull request: CB-8634 `cordova platform add git_url` s...

2015-03-10 Thread omefire
Github user omefire commented on a diff in the pull request:

https://github.com/apache/cordova-cli/pull/210#discussion_r26135743
  
--- Diff: doc/platform.txt ---
@@ -42,6 +45,8 @@ Syntax
  . url to a git repository containing 
a platform
 
  . major.minor.patch version specifier
+
+ .. name of the branch to checkout 
after cloning the git repo
--- End diff --

Thanks! done.


---
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-plugin-file-transfer pull request: CB-8641 Fixed occasiona...

2015-03-10 Thread alsorokin
GitHub user alsorokin opened a pull request:

https://github.com/apache/cordova-plugin-file-transfer/pull/69

CB-8641 Fixed occasional test failures

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

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

$ git pull https://github.com/MSOpenTech/cordova-plugin-file-transfer 
CB-8641

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

https://github.com/apache/cordova-plugin-file-transfer/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 e647afd066a8fcf3d852ad9fcb91830a288542de
Author: alsorokin 
Date:   2015-03-10T15:38:36Z

CB-8641 Fixed occasional test failures




---
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-lib pull request: CB-8633 BugFix: Support for urls to tarb...

2015-03-10 Thread vladimir-kotikov
Github user vladimir-kotikov commented on the pull request:

https://github.com/apache/cordova-lib/pull/179#issuecomment-78072159
  
Tested, works fine. LGTM.


---
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-plugman pull request: CB-8637 add windows to plugman

2015-03-10 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cordova-plugman/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.
---

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



[GitHub] cordova-lib pull request: CB-8634 : `cordova platform add git_url#...

2015-03-10 Thread vladimir-kotikov
Github user vladimir-kotikov commented on the pull request:

https://github.com/apache/cordova-lib/pull/180#issuecomment-78062068
  
LGTM


---
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-8634 `cordova platform add git_url` s...

2015-03-10 Thread vladimir-kotikov
Github user vladimir-kotikov commented on the pull request:

https://github.com/apache/cordova-cli/pull/210#issuecomment-78062091
  
LGTM


---
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-8634 `cordova platform add git_url` s...

2015-03-10 Thread vladimir-kotikov
Github user vladimir-kotikov commented on a diff in the pull request:

https://github.com/apache/cordova-cli/pull/210#discussion_r26124764
  
--- Diff: doc/platform.txt ---
@@ -29,11 +29,14 @@ Manage project platforms
 
 Syntax
 :
-||
+||
--- End diff --

:nit: IMHO it's better to use `` instead of ``


---
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-8634 `cordova platform add git_url` s...

2015-03-10 Thread vladimir-kotikov
Github user vladimir-kotikov commented on a diff in the pull request:

https://github.com/apache/cordova-cli/pull/210#discussion_r26124768
  
--- Diff: doc/platform.txt ---
@@ -42,6 +45,8 @@ Syntax
  . url to a git repository containing 
a platform
 
  . major.minor.patch version specifier
+
+ .. name of the branch to checkout 
after cloning the git repo
--- End diff --

If `#branch` is not specified after repo url, then `master` will be used by 
default, right? Could you please note this as well.


---
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-plugins pull request: Notification plugin with firefox OS ...

2015-03-10 Thread zalun
GitHub user zalun opened a pull request:

https://github.com/apache/cordova-plugins/pull/20

Notification plugin with firefox OS support



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

$ git pull https://github.com/zalun/cordova-plugins notification-plugin

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

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


commit 288def908823ec0f8e16058fcc118937f7a9ef54
Author: Piotr Zalewa 
Date:   2014-11-25T15:32:20Z

notification plugin initiation, not ready for anything state

commit 1485354ddca82fa191b88bb0dfa2d4984fa61cdf
Author: Piotr Zalewa 
Date:   2014-12-16T13:59:26Z

Notifications are working for FFOS
renamed for now to CNotifications to not interfere with dialogs plugin

commit 110688b60bd188a2302716211f1bb69709996ec1
Author: Piotr Zalewa 
Date:   2014-12-18T08:27:53Z

passing the Cordova Notification object in success callback
close is linked with remove in native side

I "feel" native side should simply pass create and close functions instead 
of updating the object

commit 26c110b8e9285d86b650b88869eed41d4cb0640a
Author: Piotr Zalewa 
Date:   2015-02-20T13:22:27Z

fixed plugins

commit 149e47c03410a234fbf7c4b420008eea3ec5ff5f
Author: Piotr Zalewa 
Date:   2015-03-10T12:39:35Z

doc added
NotificationError object added
handling events




---
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-medic pull request: Medic Refactor

2015-03-10 Thread dmitriy-barkalov
Github user dmitriy-barkalov commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26114588
  
--- Diff: cordova-plugin-medic/www/jasmine-jsreporter.js ---
@@ -1,214 +0,0 @@
-/*
-  This file is part of the Jasmine JSReporter project from Ivan De Marino.
-
-  Copyright (C) 2011 Ivan De Marino (aka detro, aka detronizator), 
http://blog.ivandemarino.me, ivan.de.mar...@gmail.com
--- End diff --

Particularly this file seems dead code. I assumed Nikhil is asking about 
all deleted files in this PR. Sorry for confusion.


---
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-medic pull request: Medic Refactor

2015-03-10 Thread dmitriy-barkalov
Github user dmitriy-barkalov commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26114383
  
--- Diff: buildbot-conf/cordova.conf ---
@@ -0,0 +1,326 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.basic import SingleBranchScheduler, 
AnyBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.changes.gitpoller import GitPoller
+from buildbot.changes import filter as change_filter
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Property as P
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# config
+MEDIC_CONFIG_FILE= os.path.join(FP, 'cordova-config.json')
+PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
+
+def parse_config_file(file_name):
+with open(file_name, 'r') as config_file:
+return json.load(config_file)
+
+medic_config= parse_config_file(MEDIC_CONFIG_FILE)
+projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
+
+# constants
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR  = '.'
+
+OSX = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+### UTILITIES
+
+# helper functions
+def cordova_builders():
+return [b.name for b in c['builders'] if b.name.startswith('cordova_')]
+
+def repo_name_from_url(url):
+match = re.match(CORDOVA_REPO_PATTERN, url)
+if match is not None:
+return match.group(1)
+return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+repo  = projects_config[name]
+codebase_name = repo['codebase']
+return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+"""
+Return the names of tasks possibly started by
+builds on the given platform and OS.
+"""
+if platform_name == 'windows':
+return ['WWAHost.exe']
+elif platform_name == 'wp8':
+return ['Xde.exe']
+elif platform_name == 'ios':
+return ['iOS Simulator']
+elif platform_name == 'android':
+if os_name == WINDOWS:
+return ['emulator-arm.exe', 'adb.exe']
+elif os_name == OSX:
+return ['emulator64-x86']
+return []
+
+def can_find_running_tasks(step):
+"""
+Return true if an OS and a platform is specified. Those are the
+criteria for finding a task because running_tasks_on_platform uses
+those properties to determine which tasks could be running.
+"""
+return (
+(step.build.getProperty('slaveos') is not None) and
+(step.build.getProperty('platform') is not None)
+)
+
+# renderers
+@renderer
+def render_repo_name(props):
+repo_url = props.getProperty('repository')
+return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+os_name   = props.getProperty('slaveos')
+platform_name = props.getProperty('platform')
+running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+if not running_tasks:
+return ['echo', 'No tasks to kill known.']
+
+if os_name == WINDOWS:
+command = ['taskkill', '/F']
+for task in running_tasks:
+command.append('/IM')
+command.append(task)
+
+else:
+command = ['killall']
+command.extend(running_tasks)
+
+return command
+
+@renderer
+def render_run_args(props):
+platform = props.getProperty('platform')
+if platform == 'windows':
+return '--win'
+return ''
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+return step_class(descript

[GitHub] cordova-medic pull request: Medic Refactor

2015-03-10 Thread dmitriy-barkalov
Github user dmitriy-barkalov commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26113846
  
--- Diff: buildbot-conf/cordova.conf ---
@@ -0,0 +1,326 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.basic import SingleBranchScheduler, 
AnyBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.changes.gitpoller import GitPoller
+from buildbot.changes import filter as change_filter
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Property as P
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# config
+MEDIC_CONFIG_FILE= os.path.join(FP, 'cordova-config.json')
+PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
+
+def parse_config_file(file_name):
+with open(file_name, 'r') as config_file:
+return json.load(config_file)
+
+medic_config= parse_config_file(MEDIC_CONFIG_FILE)
+projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
+
+# constants
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR  = '.'
+
+OSX = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+### UTILITIES
+
+# helper functions
+def cordova_builders():
+return [b.name for b in c['builders'] if b.name.startswith('cordova_')]
+
+def repo_name_from_url(url):
+match = re.match(CORDOVA_REPO_PATTERN, url)
+if match is not None:
+return match.group(1)
+return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+repo  = projects_config[name]
+codebase_name = repo['codebase']
+return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+"""
+Return the names of tasks possibly started by
+builds on the given platform and OS.
+"""
+if platform_name == 'windows':
+return ['WWAHost.exe']
+elif platform_name == 'wp8':
+return ['Xde.exe']
+elif platform_name == 'ios':
+return ['iOS Simulator']
+elif platform_name == 'android':
+if os_name == WINDOWS:
+return ['emulator-arm.exe', 'adb.exe']
+elif os_name == OSX:
+return ['emulator64-x86']
+return []
+
+def can_find_running_tasks(step):
+"""
+Return true if an OS and a platform is specified. Those are the
+criteria for finding a task because running_tasks_on_platform uses
+those properties to determine which tasks could be running.
+"""
+return (
+(step.build.getProperty('slaveos') is not None) and
+(step.build.getProperty('platform') is not None)
+)
+
+# renderers
+@renderer
+def render_repo_name(props):
+repo_url = props.getProperty('repository')
+return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+os_name   = props.getProperty('slaveos')
+platform_name = props.getProperty('platform')
+running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+if not running_tasks:
+return ['echo', 'No tasks to kill known.']
+
+if os_name == WINDOWS:
+command = ['taskkill', '/F']
+for task in running_tasks:
+command.append('/IM')
+command.append(task)
+
+else:
+command = ['killall']
+command.extend(running_tasks)
+
+return command
+
+@renderer
+def render_run_args(props):
+platform = props.getProperty('platform')
+if platform == 'windows':
+return '--win'
+return ''
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+return step_class(descript

[GitHub] cordova-medic pull request: Medic Refactor

2015-03-10 Thread dmitriy-barkalov
Github user dmitriy-barkalov commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26112764
  
--- Diff: buildbot-conf/cordova.conf ---
@@ -0,0 +1,326 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.basic import SingleBranchScheduler, 
AnyBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.changes.gitpoller import GitPoller
+from buildbot.changes import filter as change_filter
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Property as P
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# config
+MEDIC_CONFIG_FILE= os.path.join(FP, 'cordova-config.json')
+PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
+
+def parse_config_file(file_name):
+with open(file_name, 'r') as config_file:
+return json.load(config_file)
+
+medic_config= parse_config_file(MEDIC_CONFIG_FILE)
+projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
+
+# constants
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR  = '.'
+
+OSX = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+### UTILITIES
+
+# helper functions
+def cordova_builders():
+return [b.name for b in c['builders'] if b.name.startswith('cordova_')]
+
+def repo_name_from_url(url):
+match = re.match(CORDOVA_REPO_PATTERN, url)
+if match is not None:
+return match.group(1)
+return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+repo  = projects_config[name]
+codebase_name = repo['codebase']
+return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+"""
+Return the names of tasks possibly started by
+builds on the given platform and OS.
+"""
+if platform_name == 'windows':
+return ['WWAHost.exe']
+elif platform_name == 'wp8':
+return ['Xde.exe']
+elif platform_name == 'ios':
+return ['iOS Simulator']
+elif platform_name == 'android':
+if os_name == WINDOWS:
+return ['emulator-arm.exe', 'adb.exe']
+elif os_name == OSX:
+return ['emulator64-x86']
+return []
+
+def can_find_running_tasks(step):
+"""
+Return true if an OS and a platform is specified. Those are the
+criteria for finding a task because running_tasks_on_platform uses
+those properties to determine which tasks could be running.
+"""
+return (
+(step.build.getProperty('slaveos') is not None) and
+(step.build.getProperty('platform') is not None)
+)
+
+# renderers
+@renderer
+def render_repo_name(props):
+repo_url = props.getProperty('repository')
+return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+os_name   = props.getProperty('slaveos')
+platform_name = props.getProperty('platform')
+running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+if not running_tasks:
+return ['echo', 'No tasks to kill known.']
+
+if os_name == WINDOWS:
+command = ['taskkill', '/F']
+for task in running_tasks:
+command.append('/IM')
+command.append(task)
+
+else:
+command = ['killall']
+command.extend(running_tasks)
+
+return command
+
+@renderer
+def render_run_args(props):
+platform = props.getProperty('platform')
+if platform == 'windows':
+return '--win'
+return ''
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+return step_class(descript

[GitHub] cordova-medic pull request: Medic Refactor

2015-03-10 Thread dmitriy-barkalov
Github user dmitriy-barkalov commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26112558
  
--- Diff: buildbot-conf/cordova.conf ---
@@ -0,0 +1,326 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.basic import SingleBranchScheduler, 
AnyBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.changes.gitpoller import GitPoller
+from buildbot.changes import filter as change_filter
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Property as P
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# config
+MEDIC_CONFIG_FILE= os.path.join(FP, 'cordova-config.json')
+PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
+
+def parse_config_file(file_name):
+with open(file_name, 'r') as config_file:
+return json.load(config_file)
+
+medic_config= parse_config_file(MEDIC_CONFIG_FILE)
+projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
+
+# constants
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR  = '.'
+
+OSX = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+### UTILITIES
+
+# helper functions
+def cordova_builders():
+return [b.name for b in c['builders'] if b.name.startswith('cordova_')]
+
+def repo_name_from_url(url):
+match = re.match(CORDOVA_REPO_PATTERN, url)
+if match is not None:
+return match.group(1)
+return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+repo  = projects_config[name]
+codebase_name = repo['codebase']
+return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+"""
+Return the names of tasks possibly started by
+builds on the given platform and OS.
+"""
+if platform_name == 'windows':
+return ['WWAHost.exe']
+elif platform_name == 'wp8':
+return ['Xde.exe']
+elif platform_name == 'ios':
+return ['iOS Simulator']
+elif platform_name == 'android':
+if os_name == WINDOWS:
+return ['emulator-arm.exe', 'adb.exe']
+elif os_name == OSX:
+return ['emulator64-x86']
+return []
+
+def can_find_running_tasks(step):
+"""
+Return true if an OS and a platform is specified. Those are the
+criteria for finding a task because running_tasks_on_platform uses
+those properties to determine which tasks could be running.
+"""
+return (
+(step.build.getProperty('slaveos') is not None) and
+(step.build.getProperty('platform') is not None)
+)
+
+# renderers
+@renderer
+def render_repo_name(props):
+repo_url = props.getProperty('repository')
+return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+os_name   = props.getProperty('slaveos')
+platform_name = props.getProperty('platform')
+running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+if not running_tasks:
+return ['echo', 'No tasks to kill known.']
+
+if os_name == WINDOWS:
+command = ['taskkill', '/F']
+for task in running_tasks:
+command.append('/IM')
+command.append(task)
+
+else:
+command = ['killall']
+command.extend(running_tasks)
+
+return command
+
+@renderer
+def render_run_args(props):
+platform = props.getProperty('platform')
+if platform == 'windows':
+return '--win'
+return ''
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+return step_class(descript

[GitHub] cordova-medic pull request: Medic Refactor

2015-03-10 Thread dmitriy-barkalov
Github user dmitriy-barkalov commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26111200
  
--- Diff: buildbot-conf/master.cfg ---
@@ -17,37 +17,75 @@
 # Absolute or relative path to buildbot per-project configureations.
 # For local Buildbot installation it is convenient to use the same 
directory
 # for main master.cfg and projects .conf files
-FP = "./"
+FP = './'
 
 c = BuildmasterConfig = {}
 
 ### BUILDSLAVES
 
-# import the passwds
-
-# import private
-# reload(private)
+# import the passwords
+import private
+reload(private)
 
 # c['db_url'] = private.mysqlConnection
 
+c['db'] = {
+'db_url' : "sqlite:///state.sqlite",
+}
+
 # the 'slaves' list defines the set of allowable buildslaves. Each element 
is
 # a tuple of bot-name and bot-password. These correspond to values given to
 # the buildslave's mktap invocation.
 from buildbot.buildslave import BuildSlave
 
-c['slaves'] = [
-BuildSlave("cordova-ios-slave", "pass", max_builds=1),
-BuildSlave("cordova-android-slave", "pass", max_builds=1),
-BuildSlave("cordova-windows-slave", "pass", max_builds=1),
-BuildSlave("cordova-win8-slave", "pass", max_builds=1),
-BuildSlave("cordova-blackberry-slave", "pass", max_builds=1),
-BuildSlave("cordova-common-slave", "pass", max_builds=3),
-]
+c['slaves'] = []
+
+c['slaves'].extend([
+
+# used slaves
+BuildSlave(
+'cordova-ios-slave',
+private.slave34Pwd,
--- End diff --

I believe we have our own `master.cfg` that is different from Apache build 
bot one. It serves an abstraction so that we will be able to make 
`cordova.conf` the same for Apache and for local usage.

We will not be able to track Apache `master.cfg` in this repo and we don't 
need to do it.

This way `master.cfg` may not include any info about Apache server and its 
slave names and their numbers in case it is confusing for developers not 
familiar with Apache build bot.


---
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-ios pull request: CB-7428: Enable Swift development of Plu...

2015-03-10 Thread cjpearson
Github user cjpearson commented on the pull request:

https://github.com/apache/cordova-ios/pull/133#issuecomment-78029460
  
Thanks for the feedback, Shazron. I wasn't sure how it should be brought 
up, I just wanted to get the ball rolling somehow.


---
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-medic pull request: Medic Refactor

2015-03-10 Thread dmitriy-barkalov
Github user dmitriy-barkalov commented on the pull request:

https://github.com/apache/cordova-medic/pull/37#issuecomment-78027552
  
I am unable to start any platform build using this configuration. I am 
getting this error on `cloning configured repos` step on all builds:
```
fatal: destination path 'cordova-medic' already exists and is not an empty 
directory.

C:\bbot\win\cordova_plugins_windows_windows\cordova-medic\bin\checkout.js:23
throw 'Command \'' + command + '\' failed with code ' + 
returnCode
  ^
Command 'git clone https://github.com/MSOpenTech/cordova-medic.git 
--branch=new-medic --depth 1' failed with code 128
```

It is because you first clone `cordova-medic` via 
`CordovaClone('cordova-medic')` and then try to clone it again in the step 
`MedicClone(config_path='cordova-medic/cordova-repos.json')`.


---
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-mobile-spec pull request: Copy Mobilespec App Template Ins...

2015-03-10 Thread vladimir-kotikov
Github user vladimir-kotikov commented on the pull request:

https://github.com/apache/cordova-mobile-spec/pull/121#issuecomment-78015632
  
The idea LGTM, but i would prefer not to remove linking of www at all, just 
hide it behind a corresponding option (`--linkwww` for example). There is 
already the same login for plugins and platforms 
[here](https://github.com/MSOpenTech/cordova-mobile-spec/blob/copy-on-create/createmobilespec/createmobilespec.js#L122).


---
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-medic pull request: Medic Refactor

2015-03-10 Thread sgrebnov
Github user sgrebnov commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/37#discussion_r26104912
  
--- Diff: buildbot-conf/cordova.conf ---
@@ -0,0 +1,326 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.basic import SingleBranchScheduler, 
AnyBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.changes.gitpoller import GitPoller
+from buildbot.changes import filter as change_filter
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Property as P
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# config
+MEDIC_CONFIG_FILE= os.path.join(FP, 'cordova-config.json')
+PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
+
+def parse_config_file(file_name):
+with open(file_name, 'r') as config_file:
+return json.load(config_file)
+
+medic_config= parse_config_file(MEDIC_CONFIG_FILE)
+projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
+
+# constants
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR  = '.'
+
+OSX = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+### UTILITIES
+
+# helper functions
+def cordova_builders():
+return [b.name for b in c['builders'] if b.name.startswith('cordova_')]
+
+def repo_name_from_url(url):
+match = re.match(CORDOVA_REPO_PATTERN, url)
+if match is not None:
+return match.group(1)
+return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+repo  = projects_config[name]
+codebase_name = repo['codebase']
+return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+"""
+Return the names of tasks possibly started by
+builds on the given platform and OS.
+"""
+if platform_name == 'windows':
+return ['WWAHost.exe']
+elif platform_name == 'wp8':
+return ['Xde.exe']
+elif platform_name == 'ios':
+return ['iOS Simulator']
+elif platform_name == 'android':
+if os_name == WINDOWS:
+return ['emulator-arm.exe', 'adb.exe']
+elif os_name == OSX:
+return ['emulator64-x86']
+return []
+
+def can_find_running_tasks(step):
+"""
+Return true if an OS and a platform is specified. Those are the
+criteria for finding a task because running_tasks_on_platform uses
+those properties to determine which tasks could be running.
+"""
+return (
+(step.build.getProperty('slaveos') is not None) and
+(step.build.getProperty('platform') is not None)
+)
+
+# renderers
+@renderer
+def render_repo_name(props):
+repo_url = props.getProperty('repository')
+return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+os_name   = props.getProperty('slaveos')
+platform_name = props.getProperty('platform')
+running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+if not running_tasks:
+return ['echo', 'No tasks to kill known.']
+
+if os_name == WINDOWS:
+command = ['taskkill', '/F']
+for task in running_tasks:
+command.append('/IM')
+command.append(task)
+
+else:
+command = ['killall']
+command.extend(running_tasks)
+
+return command
+
+@renderer
+def render_run_args(props):
+platform = props.getProperty('platform')
+if platform == 'windows':
+return '--win'
+return ''
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+return step_class(description=desc