You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/03/31 19:58:12 UTC

[1/4] cordova-plugin-geolocation git commit: docs: added Windows to supported platforms

Repository: cordova-plugin-geolocation
Updated Branches:
  refs/heads/old-ID 4152ada22 -> 24191e04e


docs: added Windows to supported platforms


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/973014e4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/973014e4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/973014e4

Branch: refs/heads/old-ID
Commit: 973014e43ee4a10735a72ec9a60670c41a2a6bc4
Parents: 4152ada
Author: sgrebnov <v-...@microsoft.com>
Authored: Thu Mar 19 18:07:48 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Thu Mar 19 18:07:48 2015 +0300

----------------------------------------------------------------------
 README.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/973014e4/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index f7b24c3..bc05394 100644
--- a/README.md
+++ b/README.md
@@ -72,6 +72,7 @@ are not available until after the `deviceready` event.
 - Tizen
 - Windows Phone 7 and 8
 - Windows 8
+- Windows
 
 ## Methods
 


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


[2/4] cordova-plugin-geolocation git commit: CB-8681 Fixed occasional test failures

Posted by st...@apache.org.
CB-8681 Fixed occasional test failures

github close #41


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/90aeac68
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/90aeac68
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/90aeac68

Branch: refs/heads/old-ID
Commit: 90aeac681c764a314b9b3f8f9de98b1a0f3c8b02
Parents: 973014e
Author: alsorokin <al...@akvelon.com>
Authored: Fri Mar 20 17:31:00 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Fri Mar 20 17:37:04 2015 +0300

----------------------------------------------------------------------
 tests/tests.js | 81 +++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 57 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/90aeac68/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 89fc957..0105196 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -19,18 +19,41 @@
  *
 */
 exports.defineAutoTests = function () {
-    var fail = function (done) {
-        expect(true).toBe(false);
-        done();
-    },
-    succeed = function (done) {
-        expect(true).toBe(true);
-        // callback could be called sync so we invoke done async to make sure we know watcher id to .clear in afterEach 
-        setTimeout(function () {
-            done();
-        });
-    };
-    var isWindowsStore = (cordova.platformId == "windows8") || (cordova.platformId == "windows" && !WinJS.Utilities.isPhone);
+    var fail = function (done, context, message) {
+            // prevents done() to be called several times
+            if (context) {
+                if (context.done) return;
+                context.done = true;
+            }
+
+            if (message) {
+                expect(false).toBe(true, message);
+            } else {
+                expect(false).toBe(true);
+            }
+
+            // watchPosition could call its callback sync (before returning the value)
+            // so we invoke done async to make sure we know watcher id to .clear in afterEach
+            setTimeout(function () {
+                done();
+            });
+        },
+        succeed = function (done, context) {
+            // prevents done() to be called several times
+            if (context) {
+                if (context.done) return;
+                context.done = true;
+            }
+
+            expect(true).toBe(true);
+
+            // watchPosition could call its callback sync (before returning the value)
+            // so we invoke done async to make sure we know watcher id to .clear in afterEach
+            setTimeout(function () {
+                done();
+            });
+        },
+        isWindowsStore = (cordova.platformId == "windows8") || (cordova.platformId == "windows" && !WinJS.Utilities.isPhone);
 
     describe('Geolocation (navigator.geolocation)', function () {
 
@@ -65,6 +88,7 @@ exports.defineAutoTests = function () {
                 if (isWindowsStore) {
                     pending();
                 }
+
                 navigator.geolocation.getCurrentPosition(
                     fail.bind(null, done),
                     succeed.bind(null, done),
@@ -84,6 +108,7 @@ exports.defineAutoTests = function () {
                 if (isWindowsStore) {
                     pending();
                 }
+
                 navigator.geolocation.getCurrentPosition(function (p) {
                     expect(p.coords).toBeDefined();
                     expect(p.timestamp).toBeDefined();
@@ -91,16 +116,23 @@ exports.defineAutoTests = function () {
                 },
                 fail.bind(null, done),
                 {
-                    maximumAge: 300000 // 5 minutes maximum age of cached position
+                    maximumAge: (5 * 60 * 1000) // 5 minutes maximum age of cached position
                 });
-            });
-
+            }, 25000); // first geolocation call can take several seconds on some devices
         });
 
     });
 
     describe('watchPosition method', function () {
 
+        beforeEach(function(done) {
+            // This timeout is set to lessen the load on platform's geolocation services
+            // which were causing occasional test failures
+            setTimeout(function() {
+                done();
+            }, 100);
+        });
+
         describe('error callback', function () {
 
             var errorWatch = null;
@@ -114,9 +146,11 @@ exports.defineAutoTests = function () {
                 if (isWindowsStore) {
                     pending();
                 }
+
+                var context = this;
                 errorWatch = navigator.geolocation.watchPosition(
-                    fail.bind(null, done),
-                    succeed.bind(null, done),
+                    fail.bind(null, done, context, 'Unexpected win'),
+                    succeed.bind(null, done, context),
                     {
                         maximumAge: 0,
                         timeout: 0
@@ -138,26 +172,25 @@ exports.defineAutoTests = function () {
                 if (isWindowsStore) {
                     pending();
                 }
-                var self = this;
+
+                var context = this;
                 successWatch = navigator.geolocation.watchPosition(
                     function (p) {
                         // prevents done() to be called several times
-                        if (self.done) return;
-                        self.done = true;
+                        if (context.done) return;
+                        context.done = true;
 
                         expect(p.coords).toBeDefined();
                         expect(p.timestamp).toBeDefined();
                         // callback could be called sync so we invoke done async to make sure we know watcher id to .clear in afterEach 
                         setTimeout(function () {
                             done();
-                        })
-                        
+                        });
                     },
-                    fail.bind(null, done),
+                    fail.bind(null, done, context, 'Unexpected fail callback'),
                     {
                         maximumAge: (5 * 60 * 1000) // 5 minutes maximum age of cached position
                     });
-
             });
 
         });


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


[3/4] cordova-plugin-geolocation git commit: Use TRAVIS_BUILD_DIR, install paramedic by npm

Posted by st...@apache.org.
Use TRAVIS_BUILD_DIR, install paramedic by npm


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/4470d7f8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/4470d7f8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/4470d7f8

Branch: refs/heads/old-ID
Commit: 4470d7f82366b6e7d5aad5e6abc1954baaa4e81c
Parents: 90aeac6
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Mar 24 23:58:05 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Mar 24 23:58:05 2015 -0700

----------------------------------------------------------------------
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/4470d7f8/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index e46975e..fa7ae7d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,8 +6,8 @@ node_js:
 install:
   - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config 
   - cd ..
-  - npm install -g purplecabbage/cordova-paramedic
+  - npm install -g cordova-paramedic
   - npm install -g cordova
   - npm install -g ios-sim
 script:
-  - cordova-paramedic --platform ios --plugin ../cordova-plugin-geolocation
+  - cordova-paramedic --platform ios --plugin ${TRAVIS_BUILD_DIR}


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


[4/4] cordova-plugin-geolocation git commit: CB-8653 updated translated docs to use new id

Posted by st...@apache.org.
CB-8653 updated translated docs to use new id


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/24191e04
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/24191e04
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/24191e04

Branch: refs/heads/old-ID
Commit: 24191e04ebf5d017d97e14ae3d7bb5f9dbcb8dc3
Parents: 4470d7f
Author: Steve Gill <st...@gmail.com>
Authored: Tue Mar 31 10:53:31 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Tue Mar 31 10:53:31 2015 -0700

----------------------------------------------------------------------
 doc/de/index.md | 2 +-
 doc/es/index.md | 2 +-
 doc/fr/index.md | 2 +-
 doc/it/index.md | 2 +-
 doc/ja/index.md | 2 +-
 doc/ko/index.md | 2 +-
 doc/pl/index.md | 2 +-
 doc/ru/index.md | 2 +-
 doc/zh/index.md | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/de/index.md
----------------------------------------------------------------------
diff --git a/doc/de/index.md b/doc/de/index.md
index 96bfe85..2ca21ba 100644
--- a/doc/de/index.md
+++ b/doc/de/index.md
@@ -252,4 +252,4 @@ Das `PositionError`-Objekt wird an die `geolocationError`-Callback-Funktion übe
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   Zurückgegeben, wenn das Gerät nicht in der Lage, eine Position abzurufen ist. Im Allgemeinen bedeutet dies, dass das Gerät nicht mit einem Netzwerk verbunden ist oder ein Satelliten-Update kann nicht abgerufen werden.
 *   `PositionError.TIMEOUT` 
-    *   Zurückgegeben, wenn das Gerät nicht in der Lage, eine Position innerhalb der festgelegten Zeit abzurufen ist die `timeout` enthalten `geolocationOptions` . Bei Verwendung mit `navigator.geolocation.watchPosition` , könnte dieser Fehler wiederholt übergeben werden, zu der `geolocationError` Rückruf jedes `timeout` Millisekunden.
\ No newline at end of file
+    *   Zurückgegeben, wenn das Gerät nicht in der Lage, eine Position innerhalb der festgelegten Zeit abzurufen ist die `timeout` enthalten `geolocationOptions` . Bei Verwendung mit `navigator.geolocation.watchPosition` , könnte dieser Fehler wiederholt übergeben werden, zu der `geolocationError` Rückruf jedes `timeout` Millisekunden.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/es/index.md
----------------------------------------------------------------------
diff --git a/doc/es/index.md b/doc/es/index.md
index e7d6e2d..9b368b9 100644
--- a/doc/es/index.md
+++ b/doc/es/index.md
@@ -211,4 +211,4 @@ El `PositionError` objeto se pasa a la `geolocationError` función de devolució
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   Regresó cuando el dispositivo es capaz de recuperar una posición. En general, esto significa que el dispositivo no está conectado a una red o no puede obtener una solución vía satélite.
 *   `PositionError.TIMEOUT` 
-    *   Cuando el dispositivo es capaz de recuperar una posición dentro del tiempo especificado por el `timeout` incluido en `geolocationOptions` . Cuando se utiliza con `navigator.geolocation.watchPosition` , este error podría pasar repetidamente a la `geolocationError` "callback" cada `timeout` milisegundos.
\ No newline at end of file
+    *   Cuando el dispositivo es capaz de recuperar una posición dentro del tiempo especificado por el `timeout` incluido en `geolocationOptions` . Cuando se utiliza con `navigator.geolocation.watchPosition` , este error podría pasar repetidamente a la `geolocationError` "callback" cada `timeout` milisegundos.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/fr/index.md
----------------------------------------------------------------------
diff --git a/doc/fr/index.md b/doc/fr/index.md
index 003c8db..0ef9319 100644
--- a/doc/fr/index.md
+++ b/doc/fr/index.md
@@ -211,4 +211,4 @@ Le `PositionError` objet est passé à la `geolocationError` fonction de rappel
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   Retourné lorsque le périphérique n'est pas en mesure de récupérer une position. En général, cela signifie que l'appareil n'est pas connecté à un réseau ou ne peut pas obtenir un correctif de satellite.
 *   `PositionError.TIMEOUT` 
-    *   Retourné lorsque le périphérique n'est pas en mesure de récupérer une position dans le délai précisé par le `timeout` inclus dans `geolocationOptions` . Lorsqu'il est utilisé avec `navigator.geolocation.watchPosition` , cette erreur pourrait être transmise à plusieurs reprises à la `geolocationError` rappel chaque `timeout` millisecondes.
\ No newline at end of file
+    *   Retourné lorsque le périphérique n'est pas en mesure de récupérer une position dans le délai précisé par le `timeout` inclus dans `geolocationOptions` . Lorsqu'il est utilisé avec `navigator.geolocation.watchPosition` , cette erreur pourrait être transmise à plusieurs reprises à la `geolocationError` rappel chaque `timeout` millisecondes.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/it/index.md
----------------------------------------------------------------------
diff --git a/doc/it/index.md b/doc/it/index.md
index 5e89a45..e0e29df 100644
--- a/doc/it/index.md
+++ b/doc/it/index.md
@@ -252,4 +252,4 @@ L'oggetto `PositionError` viene passato alla funzione di callback `geolocationEr
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   Restituito quando il dispositivo è in grado di recuperare una posizione. In generale, questo significa che il dispositivo non è connesso a una rete o non può ottenere un fix satellitare.
 *   `PositionError.TIMEOUT` 
-    *   Restituito quando il dispositivo è in grado di recuperare una posizione entro il tempo specificato dal `timeout` incluso `geolocationOptions` . Quando utilizzato con `navigator.geolocation.watchPosition` , questo errore potrebbe essere passato più volte per la `geolocationError` richiamata ogni `timeout` millisecondi.
\ No newline at end of file
+    *   Restituito quando il dispositivo è in grado di recuperare una posizione entro il tempo specificato dal `timeout` incluso `geolocationOptions` . Quando utilizzato con `navigator.geolocation.watchPosition` , questo errore potrebbe essere passato più volte per la `geolocationError` richiamata ogni `timeout` millisecondi.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/ja/index.md
----------------------------------------------------------------------
diff --git a/doc/ja/index.md b/doc/ja/index.md
index 7d7ad4a..f1f3ef4 100644
--- a/doc/ja/index.md
+++ b/doc/ja/index.md
@@ -252,4 +252,4 @@
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   デバイスが、位置を取得することができます返されます。一般に、つまり、デバイスがネットワークに接続されていないまたは衛星の修正を得ることができません。
 *   `PositionError.TIMEOUT` 
-    *   デバイスがで指定された時間内の位置を取得することができるときに返される、 `timeout` に含まれている `geolocationOptions` 。 使用すると `navigator.geolocation.watchPosition` 、このエラーが繰り返しに渡すことが、 `geolocationError` コールバックごと `timeout` (ミリ秒単位)。
\ No newline at end of file
+    *   デバイスがで指定された時間内の位置を取得することができるときに返される、 `timeout` に含まれている `geolocationOptions` 。 使用すると `navigator.geolocation.watchPosition` 、このエラーが繰り返しに渡すことが、 `geolocationError` コールバックごと `timeout` (ミリ秒単位)。

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/ko/index.md
----------------------------------------------------------------------
diff --git a/doc/ko/index.md b/doc/ko/index.md
index cb16152..d94f590 100644
--- a/doc/ko/index.md
+++ b/doc/ko/index.md
@@ -252,4 +252,4 @@
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   장치 위치를 검색할 수 없을 때 반환 합니다. 일반적으로,이 장치는 네트워크에 연결 되어 있지 않은 또는 위성 수정 프로그램을 얻을 수 없습니다 의미 합니다.
 *   `PositionError.TIMEOUT` 
-    *   장치에 지정 된 시간 내에서 위치를 검색할 수 없는 경우 반환 되는 `timeout` 에 포함 된 `geolocationOptions` . 함께 사용 될 때 `navigator.geolocation.watchPosition` ,이 오류를 반복적으로 전달 될 수는 `geolocationError` 콜백 매 `timeout` 밀리초.
\ No newline at end of file
+    *   장치에 지정 된 시간 내에서 위치를 검색할 수 없는 경우 반환 되는 `timeout` 에 포함 된 `geolocationOptions` . 함께 사용 될 때 `navigator.geolocation.watchPosition` ,이 오류를 반복적으로 전달 될 수는 `geolocationError` 콜백 매 `timeout` 밀리초.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/pl/index.md
----------------------------------------------------------------------
diff --git a/doc/pl/index.md b/doc/pl/index.md
index 2bff9ce..64b3e22 100644
--- a/doc/pl/index.md
+++ b/doc/pl/index.md
@@ -252,4 +252,4 @@ Zawiera współrzędne `Position` i sygnatury czasowej, stworzony przez geolocat
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   Zwracane, gdy urządzenie jest w stanie pobrać pozycji. Ogólnie rzecz biorąc oznacza to urządzenie nie jest podłączone do sieci lub nie może uzyskać satelita utrwalić.
 *   `PositionError.TIMEOUT` 
-    *   Zwracane, gdy urządzenie jest w stanie pobrać pozycji w czasie określonym przez `timeout` w `geolocationOptions` . Gdy używana z `navigator.geolocation.watchPosition` , ten błąd może być wielokrotnie przekazywane do `geolocationError` zwrotne co `timeout` milisekund.
\ No newline at end of file
+    *   Zwracane, gdy urządzenie jest w stanie pobrać pozycji w czasie określonym przez `timeout` w `geolocationOptions` . Gdy używana z `navigator.geolocation.watchPosition` , ten błąd może być wielokrotnie przekazywane do `geolocationError` zwrotne co `timeout` milisekund.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/ru/index.md
----------------------------------------------------------------------
diff --git a/doc/ru/index.md b/doc/ru/index.md
index 7dbf8b4..b67924b 100644
--- a/doc/ru/index.md
+++ b/doc/ru/index.md
@@ -203,4 +203,4 @@ A `Coordinates` объект присоединен к `Position` объект,
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   Возвращается, если устройство не удается получить позиции. В общем это означает, что прибор не подключен к сети или не может получить Спутниковое исправить.
 *   `PositionError.TIMEOUT` 
-    *   Возвращается, если устройство не удается получить позиции в течение времени, заданного параметром `timeout` в `geolocationOptions` . При использовании с `navigator.geolocation.watchPosition` , эта ошибка может быть неоднократно передан `geolocationError` обратного вызова каждый `timeout` миллисекунд.
\ No newline at end of file
+    *   Возвращается, если устройство не удается получить позиции в течение времени, заданного параметром `timeout` в `geolocationOptions` . При использовании с `navigator.geolocation.watchPosition` , эта ошибка может быть неоднократно передан `geolocationError` обратного вызова каждый `timeout` миллисекунд.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/24191e04/doc/zh/index.md
----------------------------------------------------------------------
diff --git a/doc/zh/index.md b/doc/zh/index.md
index b49a885..c369bfb 100644
--- a/doc/zh/index.md
+++ b/doc/zh/index.md
@@ -252,4 +252,4 @@ Android 2.x 模擬器不除非 `enableHighAccuracy` 選項設置為 `true`,否
 *   `PositionError.POSITION_UNAVAILABLE` 
     *   返回設備時,不能檢索的位置。一般情況下,這意味著該設備未連接到網路或無法獲取衛星的修復。
 *   `PositionError.TIMEOUT` 
-    *   返回設備時,無法在指定的時間內檢索位置 `timeout` 中包含 `geolocationOptions` 。 與一起使用時 `navigator.geolocation.watchPosition` ,此錯誤可能反復傳遞給 `geolocationError` 回檔每 `timeout` 毫秒為單位)。
\ No newline at end of file
+    *   返回設備時,無法在指定的時間內檢索位置 `timeout` 中包含 `geolocationOptions` 。 與一起使用時 `navigator.geolocation.watchPosition` ,此錯誤可能反復傳遞給 `geolocationError` 回檔每 `timeout` 毫秒為單位)。


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