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 2017/03/03 00:53:47 UTC

[1/8] cordova-plugin-file-transfer git commit: CB-12519 Updated version and RELEASENOTES.md for release 1.6.2

Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/1.6.x aff59302b -> cbb512b6b


CB-12519 Updated version and RELEASENOTES.md for release 1.6.2


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/cbb512b6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/cbb512b6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/cbb512b6

Branch: refs/heads/1.6.x
Commit: cbb512b6b8b86d46090ecacf2a877bf2194a3134
Parents: a176eff
Author: Steve Gill <st...@gmail.com>
Authored: Tue Feb 28 17:41:26 2017 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 RELEASENOTES.md  |   6 ++
 package.json     |   2 +-
 plugin.xml       |   4 +-
 tests/plugin.xml | 148 ++++++++++++++++++++++++++++++++++++++++++++++++--
 4 files changed, 151 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/cbb512b6/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 47d46d6..989206b 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,12 @@
 -->
 # Release Notes
                                               
+### 1.6.2 (Feb 28, 2017)
+* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml`
+* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped`
+* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0**
+* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges
+
 ### 1.6.1 (Dec 07, 2016)
 * [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.6.1
 * [CB-12154](https://issues.apache.org/jira/browse/CB-12154) file-transfer progressEvent.total = -1 on iOS

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/cbb512b6/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index c18d540..39a04b5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-file-transfer",
-  "version": "1.6.2-dev",
+  "version": "1.6.2",
   "description": "Cordova File Transfer Plugin",
   "types": "./types/index.d.ts",
   "cordova": {

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/cbb512b6/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 9275888..1b16101 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -21,7 +21,7 @@
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     xmlns:android="http://schemas.android.com/apk/res/android"
     id="cordova-plugin-file-transfer"
-    version="1.6.2-dev">
+    version="1.6.2">
     <name>File Transfer</name>
     <description>Cordova File Transfer Plugin</description>
     <license>Apache 2.0</license>
@@ -72,7 +72,7 @@
         <source-file src="src/android/FileProgressResult.java" target-dir="src/org/apache/cordova/filetransfer" />
         <source-file src="src/android/FileUploadResult.java" target-dir="src/org/apache/cordova/filetransfer" />
     </platform>
-    
+
     <!-- ubuntu -->
     <platform name="ubuntu">
         <header-file src="src/ubuntu/file-transfer.h" />

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/cbb512b6/tests/plugin.xml
----------------------------------------------------------------------
diff --git a/tests/plugin.xml b/tests/plugin.xml
index fd6b546..1b16101 100644
--- a/tests/plugin.xml
+++ b/tests/plugin.xml
@@ -20,15 +20,151 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     xmlns:android="http://schemas.android.com/apk/res/android"
-    id="cordova-plugin-file-transfer-tests"
-    version="1.6.2-dev">
-    <name>Cordova File Transfer Plugin Tests</name>
+    id="cordova-plugin-file-transfer"
+    version="1.6.2">
+    <name>File Transfer</name>
+    <description>Cordova File Transfer Plugin</description>
     <license>Apache 2.0</license>
+    <keywords>cordova,file,transfer</keywords>
+    <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git</repo>
+    <issue>https://issues.apache.org/jira/browse/CB/component/12320650</issue>
 
-    <js-module src="tests.js" name="tests">
+    <dependency id="cordova-plugin-file" version="^4.0.0" />
+
+    <js-module src="www/FileTransferError.js" name="FileTransferError">
+        <clobbers target="window.FileTransferError" />
+    </js-module>
+
+    <js-module src="www/FileTransfer.js" name="FileTransfer">
+        <clobbers target="window.FileTransfer" />
     </js-module>
 
-    <hook type="after_prepare" src="hooks/after_prepare.js" />
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="FileTransfer" >
+                <param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer"/>
+            </feature>
+        </config-file>
+
+        <config-file target="AndroidManifest.xml" parent="/*">
+            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+        </config-file>
+
+        <source-file src="src/android/FileTransfer.java" target-dir="src/org/apache/cordova/filetransfer" />
+        <source-file src="src/android/FileProgressResult.java" target-dir="src/org/apache/cordova/filetransfer" />
+        <source-file src="src/android/FileUploadResult.java" target-dir="src/org/apache/cordova/filetransfer" />
+    </platform>
+
+    <!-- amamzon-fireos -->
+    <platform name="amazon-fireos">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="FileTransfer" >
+                <param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer"/>
+            </feature>
+        </config-file>
+
+        <config-file target="AndroidManifest.xml" parent="/*">
+            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+        </config-file>
+
+        <source-file src="src/amazon/FileTransfer.java" target-dir="src/org/apache/cordova/filetransfer" />
+        <source-file src="src/android/FileProgressResult.java" target-dir="src/org/apache/cordova/filetransfer" />
+        <source-file src="src/android/FileUploadResult.java" target-dir="src/org/apache/cordova/filetransfer" />
+    </platform>
+
+    <!-- ubuntu -->
+    <platform name="ubuntu">
+        <header-file src="src/ubuntu/file-transfer.h" />
+        <source-file src="src/ubuntu/file-transfer.cpp" />
+    </platform>
+
+    <!-- blackberry10 -->
+    <platform name="blackberry10">
+        <config-file target="www/config.xml" parent="/widget">
+            <feature name="FileTransfer" value="FileTransfer"></feature>
+        </config-file>
+        <js-module src="www/blackberry10/FileTransferProxy.js" name="FileTransferProxy" >
+            <runs />
+        </js-module>
+        <js-module src="www/blackberry10/xhrFileTransfer.js" name="xhrFileTransfer" />
+        <!--
+        <js-module src="www/blackberry10/abort.js" name="abortProxy" />
+        <js-module src="www/blackberry10/download.js" name="downloadProxy" />
+        <js-module src="www/blackberry10/upload.js" name="uploadProxy" />
+        -->
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <config-file target="config.xml" parent="/*">
+            <feature name="FileTransfer">
+                <param name="ios-package" value="CDVFileTransfer" />
+            </feature>
+        </config-file>
+        <header-file src="src/ios/CDVFileTransfer.h" />
+        <source-file src="src/ios/CDVFileTransfer.m" />
+
+        <framework src="AssetsLibrary.framework" />
+    </platform>
+
+    <!-- wp7 -->
+    <platform name="wp7">
+        <config-file target="config.xml" parent="/*">
+            <feature name="FileTransfer">
+                <param name="wp-package" value="FileTransfer"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/wp/FileTransfer.cs" />
+
+        <js-module src="www/wp7/base64.js" name="base64">
+            <clobbers target="window.FileTransferBase64" />
+        </js-module>
+
+    </platform>
+
+    <!-- wp8 -->
+    <platform name="wp8">
+        <config-file target="config.xml" parent="/*">
+            <feature name="FileTransfer">
+                <param name="wp-package" value="FileTransfer"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/wp/FileTransfer.cs" />
+
+    </platform>
+
+    <!-- windows8 -->
+    <platform name="windows8">
+        <js-module src="src/windows/FileTransferProxy.js" name="FileTransferProxy">
+            <runs />
+        </js-module>
+    </platform>
+
+    <!-- windows -->
+    <platform name="windows">
+        <js-module src="src/windows/FileTransferProxy.js" name="FileTransferProxy">
+            <runs />
+        </js-module>
+    </platform>
+
+    <!-- firefoxOS -->
+    <platform name="firefoxos">
+        <config-file target="config.xml" parent="/*">
+            <permission name="systemXHR" privileged="true"/>
+        </config-file>
+
+        <js-module src="www/firefoxos/FileTransferProxy.js" name="FileTransferProxy">
+            <runs/>
+        </js-module>
+    </platform>
 
-    <preference name="FILETRANSFER_SERVER_ADDRESS" default="http://rwswbpiopr.localtunnel.me"/>
+    <!-- browser -->
+    <platform name="browser">
+        <js-module src="www/browser/FileTransfer.js" name="BrowserFileTransfer">
+            <clobbers target="window.FileTransfer" />
+        </js-module>
+    </platform>
 </plugin>


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


[6/8] cordova-plugin-file-transfer git commit: CB-12369: Add plugin typings from DefinitelyTyped

Posted by st...@apache.org.
CB-12369: Add plugin typings from DefinitelyTyped

 This closes #173


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/1ae20e12
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/1ae20e12
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/1ae20e12

Branch: refs/heads/1.6.x
Commit: 1ae20e1231c85671c11f945111ab3fba9945f55c
Parents: 3d1c258
Author: Nikita Matrosov <v-...@microsoft.com>
Authored: Thu Jan 19 16:07:53 2017 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 package.json     |   1 +
 types/index.d.ts | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 137 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/1ae20e12/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 2598cc1..c18d540 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
   "name": "cordova-plugin-file-transfer",
   "version": "1.6.2-dev",
   "description": "Cordova File Transfer Plugin",
+  "types": "./types/index.d.ts",
   "cordova": {
     "id": "cordova-plugin-file-transfer",
     "platforms": [

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/1ae20e12/types/index.d.ts
----------------------------------------------------------------------
diff --git a/types/index.d.ts b/types/index.d.ts
new file mode 100644
index 0000000..ad8d994
--- /dev/null
+++ b/types/index.d.ts
@@ -0,0 +1,136 @@
+// Type definitions for Apache Cordova FileTransfer plugin
+// Project: https://github.com/apache/cordova-plugin-file-transfer
+// Definitions by: Microsoft Open Technologies Inc. <http://msopentech.com>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+//
+// Copyright (c) Microsoft Open Technologies Inc
+// Licensed under the MIT license
+
+/// <reference types="cordova-plugin-file" />
+
+/**
+ * The FileTransfer object provides a way to upload files using an HTTP multi-part POST request,
+ * and to download files as well.
+ */
+interface FileTransfer {
+    /** Called with a ProgressEvent whenever a new chunk of data is transferred.  */
+    onprogress: (event: ProgressEvent) => void;
+    /**
+     * Sends a file to a server.
+     * @param fileURL           Filesystem URL representing the file on the device. For backwards compatibility,
+     *                                this can also be the full path of the file on the device.
+     * @param server            URL of the server to receive the file, as encoded by encodeURI().
+     * @param successCallback   A callback that is passed a FileUploadResult object.
+     * @param errorCallback     A callback that executes if an error occurs retrieving the FileUploadResult.
+     *                               Invoked with a FileTransferError object.
+     * @param options           Optional parameters.
+     * @param trustAllHosts     Optional parameter, defaults to false. If set to true, it accepts all security certificates.
+     *                               This is useful since Android rejects self-signed security certificates.
+     *                               Not recommended for production use. Supported on Android and iOS.
+     */
+    upload(
+        fileURL: string,
+        server: string,
+        successCallback: (result: FileUploadResult) => void,
+        errorCallback: (error: FileTransferError) => void,
+        options?: FileUploadOptions,
+        trustAllHosts?: boolean): void;
+    /**
+     * downloads a file from server.
+     * @param source            URL of the server to download the file, as encoded by encodeURI().
+     * @param target            Filesystem url representing the file on the device. For backwards compatibility,
+     *                               this can also be the full path of the file on the device.
+     * @param successCallback   A callback that is passed a FileEntry object. (Function)
+     * @param errorCallback     A callback that executes if an error occurs when retrieving the fileEntry.
+     *                               Invoked with a FileTransferError object.
+     * @param options           Optional parameters.
+     * @param trustAllHosts     Optional parameter, defaults to false. If set to true, it accepts all security certificates.
+     *                               This is useful since Android rejects self-signed security certificates.
+     *                               Not recommended for production use. Supported on Android and iOS.
+     */
+    download(
+        source: string,
+        target: string,
+        successCallback: (fileEntry: FileEntry) => void,
+        errorCallback: (error: FileTransferError) => void,
+        trustAllHosts?: boolean,
+        options?: FileDownloadOptions): void;
+    /**
+     * Aborts an in-progress transfer. The onerror callback is passed a FileTransferError object
+     * which has an error code of FileTransferError.ABORT_ERR.
+     */
+    abort(): void;
+}
+
+declare var FileTransfer: {
+    new (): FileTransfer;
+};
+
+/** A FileUploadResult object is passed to the success callback of the FileTransfer object's upload() method. */
+interface FileUploadResult {
+    /** The number of bytes sent to the server as part of the upload. */
+    bytesSent: number;
+    /** The HTTP response code returned by the server. */
+    responseCode: number;
+    /** The HTTP response returned by the server. */
+    response: string;
+    /** The HTTP response headers by the server. Currently supported on iOS only.*/
+    headers: any;
+}
+
+/** Optional parameters for upload method. */
+interface FileUploadOptions {
+    /** The name of the form element. Defaults to file. */
+    fileKey?: string;
+    /** The file name to use when saving the file on the server. Defaults to image.jpg. */
+    fileName?: string;
+    /** The HTTP method to use - either `PUT` or `POST`. Defaults to `POST`. */
+    httpMethod?: string;
+    /** The mime type of the data to upload. Defaults to image/jpeg. */
+    mimeType?: string;
+    /** A set of optional key/value pairs to pass in the HTTP request. */
+    params?: Object;
+    /** Whether to upload the data in chunked streaming mode. Defaults to true. */
+    chunkedMode?: boolean;
+    /** A map of header name/header values. Use an array to specify more than one value. */
+    headers?: Object;
+}
+
+/** Optional parameters for download method. */
+interface FileDownloadOptions {
+    /** A map of header name/header values. */
+    headers?: {};
+}
+
+/** A FileTransferError object is passed to an error callback when an error occurs. */
+interface FileTransferError {
+    /**
+     * One of the predefined error codes listed below.
+     *     FileTransferError.FILE_NOT_FOUND_ERR
+     *     FileTransferError.INVALID_URL_ERR
+     *     FileTransferError.CONNECTION_ERR
+     *     FileTransferError.ABORT_ERR
+     *     FileTransferError.NOT_MODIFIED_ERR
+     */
+    code: number;
+    /** URL to the source. */
+    source: string;
+    /** URL to the target. */
+    target: string;
+    /** HTTP status code. This attribute is only available when a response code is received from the HTTP connection. */
+    http_status: number;
+    /* Response body. This attribute is only available when a response is received from the HTTP connection. */
+    body: string;
+    /* Exception that is thrown by native code */
+    exception: any;
+}
+
+declare var FileTransferError: {
+    /** Constructor for FileTransferError object */
+    new (code?: number, source?: string, target?: string, status?: number, body?: any, exception?: any): FileTransferError;
+    FILE_NOT_FOUND_ERR: number;
+    INVALID_URL_ERR: number;
+    CONNECTION_ERR: number;
+    ABORT_ERR: number;
+    NOT_MODIFIED_ERR: number;
+}
\ No newline at end of file


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


[5/8] cordova-plugin-file-transfer git commit: CB-12224 Incremented plugin version.

Posted by st...@apache.org.
CB-12224 Incremented plugin version.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/1774f623
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/1774f623
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/1774f623

Branch: refs/heads/1.6.x
Commit: 1774f623beafe87e149078d653e0b100fedea34b
Parents: aff5930
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Dec 7 16:55:07 2016 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 package.json     | 2 +-
 plugin.xml       | 2 +-
 tests/plugin.xml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/1774f623/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 72eb6bf..2598cc1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-file-transfer",
-  "version": "1.6.1",
+  "version": "1.6.2-dev",
   "description": "Cordova File Transfer Plugin",
   "cordova": {
     "id": "cordova-plugin-file-transfer",

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/1774f623/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index e77d9cc..bee434e 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -21,7 +21,7 @@
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     xmlns:android="http://schemas.android.com/apk/res/android"
     id="cordova-plugin-file-transfer"
-    version="1.6.1">
+    version="1.6.2-dev">
     <name>File Transfer</name>
     <description>Cordova File Transfer Plugin</description>
     <license>Apache 2.0</license>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/1774f623/tests/plugin.xml
----------------------------------------------------------------------
diff --git a/tests/plugin.xml b/tests/plugin.xml
index 6695d19..fd6b546 100644
--- a/tests/plugin.xml
+++ b/tests/plugin.xml
@@ -21,7 +21,7 @@
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     xmlns:android="http://schemas.android.com/apk/res/android"
     id="cordova-plugin-file-transfer-tests"
-    version="1.6.1">
+    version="1.6.2-dev">
     <name>Cordova File Transfer Plugin Tests</name>
     <license>Apache 2.0</license>
 


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


[3/8] cordova-plugin-file-transfer git commit: CB-12230 Removed Windows 8.1 build badges

Posted by st...@apache.org.
CB-12230 Removed Windows 8.1 build badges


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/77b85904
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/77b85904
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/77b85904

Branch: refs/heads/1.6.x
Commit: 77b85904e530593d8c4569ab423fafa8c33d34eb
Parents: 1774f62
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Fri Dec 9 13:26:57 2016 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 README.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/77b85904/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index bab5adc..8234f8a 100644
--- a/README.md
+++ b/README.md
@@ -21,9 +21,9 @@ description: Upload and download files.
 #         under the License.
 -->
 
-|Android|iOS| Windows 8.1 Store | Windows 8.1 Phone | Windows 10 Store | Travis CI |
-|:-:|:-:|:-:|:-:|:-:|:-:|
-|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-file-transfer)](http://cordo
 va-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-file-transfer)|
+|Android 4.4|Android 5.1|iOS|Windows 10 Store|Travis CI|
+|:-:|:-:|:-:|:-:|:-:|
+|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci
 .cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-file-transfer)|
 
 # cordova-plugin-file-transfer
 


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


[8/8] cordova-plugin-file-transfer git commit: CB-12353 Corrected merges usage in plugin.xml

Posted by st...@apache.org.
CB-12353 Corrected merges usage in plugin.xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/4c9f1e55
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/4c9f1e55
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/4c9f1e55

Branch: refs/heads/1.6.x
Commit: 4c9f1e557fbc26e7f5b393a290d053fb899b9b81
Parents: 1ae20e1
Author: daserge <v-...@microsoft.com>
Authored: Wed Jan 18 19:25:45 2017 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 plugin.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/4c9f1e55/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index bee434e..9275888 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -139,14 +139,14 @@
     <!-- windows8 -->
     <platform name="windows8">
         <js-module src="src/windows/FileTransferProxy.js" name="FileTransferProxy">
-            <clobbers target="" />
+            <runs />
         </js-module>
     </platform>
 
     <!-- windows -->
     <platform name="windows">
         <js-module src="src/windows/FileTransferProxy.js" name="FileTransferProxy">
-            <clobbers target="" />
+            <runs />
         </js-module>
     </platform>
 


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


[7/8] cordova-plugin-file-transfer git commit: CB-12439 (Tests) Re-enable the tests

Posted by st...@apache.org.
CB-12439 (Tests) Re-enable the tests

* This is a part of file transfer CI builds being transferred to Sauce Labs emulators
* Some tests now retry up to 100 times due to Heroku server being unstable
* Now using '/upload_headers_echo' of the FT server instead of whatheaders.com which is down


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/a176eff1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/a176eff1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/a176eff1

Branch: refs/heads/1.6.x
Commit: a176eff1908ad85cced9d4ec10f2e5accbe4ddc9
Parents: 70e573e
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Fri Feb 17 18:52:44 2017 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 tests/tests.js | 221 +++++++++++++---------------------------------------
 1 file changed, 53 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/a176eff1/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index cf13dfc..98acb4c 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -32,7 +32,6 @@ exports.defineAutoTests = function () {
     var GRACE_TIME_DELTA = 600; // 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 DOWNLOAD_TIMEOUT = 7 * ONE_SECOND;
     var WINDOWS_UNKNOWN_HOST_TIMEOUT = 35 * ONE_SECOND;
     var UPLOAD_TIMEOUT = 7 * ONE_SECOND;
@@ -41,6 +40,8 @@ exports.defineAutoTests = function () {
     var DATA_URI_PREFIX = "data:image/png;base64,";
     var DATA_URI_CONTENT = "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
     var DATA_URI_CONTENT_LENGTH = 85; // bytes. (This is the raw file size: used https://en.wikipedia.org/wiki/File:Red-dot-5px.png from https://en.wikipedia.org/wiki/Data_URI_scheme)
+    var RETRY_COUNT = 100; // retry some flaky tests (yes, THIS many times, due to Heroku server instability)
+    var RETRY_INTERVAL = 100;
 
     // upload test server address
     // NOTE:
@@ -361,11 +362,6 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.4 should download a file", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/robots.txt";
                     var specContext = this;
 
@@ -400,14 +396,9 @@ exports.defineAutoTests = function () {
                     };
 
                     specContext.transfer.download(fileURL, specContext.localFilePath, downloadWin, downloadFail);
-                }, DOWNLOAD_TIMEOUT);
+                }, DOWNLOAD_TIMEOUT * 10); // to give Heroku server some time to wake up
 
                 it("filetransfer.spec.5 should download a file using http basic auth", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER_WITH_CREDENTIALS + "/download_basic_auth";
                     var specContext = this;
 
@@ -425,11 +416,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.6 should get 401 status on http basic auth failure", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     // NOTE:
                     //      using server without credentials
                     var fileURL = SERVER + "/download_basic_auth";
@@ -454,7 +440,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.7 should download a file using file:// (when hosted from file://)", function (done) {
-
                     // for Windows platform it's ms-appdata:/// by default, not file://
                     if (isWindows) {
                         pending();
@@ -486,7 +471,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.8 should download a file using https://", function (done) {
-
                     var fileURL = "https://www.apache.org/licenses/";
                     var specContext = this;
 
@@ -527,7 +511,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.11 should call the error callback on abort()", function (done) {
-
                     var fileURL = "http://cordova.apache.org/downloads/BlueZedEx.mp3";
                     fileURL = fileURL + "?q=" + (new Date()).getTime();
                     var specContext = this;
@@ -544,7 +527,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.9 should not leave partial file due to abort", function (done) {
-
                     var fileURL = "http://cordova.apache.org/downloads/logos_2.zip";
                     var specContext = this;
 
@@ -583,7 +565,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.10 should be stopped by abort()", function (done) {
-
                     var fileURL = "http://cordova.apache.org/downloads/BlueZedEx.mp3";
                     fileURL = fileURL + "?q=" + (new Date()).getTime();
                     var specContext = this;
@@ -615,11 +596,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.12 should get http status on failure", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/404";
 
                     var downloadFail = function (error) {
@@ -646,11 +622,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.13 should get http body on failure", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/404";
 
                     var downloadFail = function (error) {
@@ -673,7 +644,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.14 should handle malformed urls", function (done) {
-
                     var fileURL = getMalformedUrl();
 
                     var downloadFail = function (error) {
@@ -715,11 +685,6 @@ exports.defineAutoTests = function () {
                 }, isWindows ? WINDOWS_UNKNOWN_HOST_TIMEOUT : DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.16 should handle bad file path", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER;
 
                     var downloadWin = function() {
@@ -755,11 +720,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.30 downloaded file entries should have a toNativeURL method", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     if (cordova.platformId === "browser") {
                         pending();
                         return;
@@ -797,11 +757,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.28 (compatibility) should be able to download a file using local paths", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/robots.txt";
                     var specContext = this;
 
@@ -837,11 +792,6 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.33 should properly handle 304", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     if (isWP8) {
                         pending();
                         return;
@@ -862,11 +812,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.35 304 should not result in the deletion of a cached file", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     if (isWP8) {
                         pending();
                         return;
@@ -927,11 +872,6 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.36 should handle non-UTF8 encoded download response", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     // Only iOS is supported: https://issues.apache.org/jira/browse/CB-9840
                     if (!isIos) {
                         pending();
@@ -1046,11 +986,6 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.18 should be able to upload a file", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
 
@@ -1076,11 +1011,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.19 should be able to upload a file with http basic auth", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER_WITH_CREDENTIALS + "/upload_basic_auth";
                     var specContext = this;
 
@@ -1099,11 +1029,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.21 should be stopped by abort()", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
 
@@ -1141,29 +1066,33 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.22 should get http status and body on failure", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/403";
-
-                    var uploadFail = function (error) {
-                        expect(error.http_status).toBe(403);
-                        expect(error.http_status).not.toBe(401, "Ensure " + fileURL + " is in the white list");
-                        done();
-                    };
+                    var retryCount = 0;
+                    var self = this;
 
                     var uploadWin = function() {
                         unexpectedCallbacks.httpWin();
                         done();
                     };
 
-                    this.transfer.upload(this.localFilePath, fileURL, uploadWin, uploadFail, this.uploadOptions);
-                }, UPLOAD_TIMEOUT);
+                    var uploadFail = function (error) {
+                        if (error.http_status === 503 && ++retryCount <= RETRY_COUNT) {
+                            // Heroku often gives this error, retry in 1 second
+                            console.log('retrying... ' + retryCount);
+                            setTimeout(function () {
+                                self.transfer.upload(self.localFilePath, fileURL, uploadWin, uploadFail, self.uploadOptions);
+                            }, RETRY_INTERVAL);
+                        } else {
+                            expect(error.http_status).toBe(403);
+                            expect(error.http_status).not.toBe(401, "Ensure " + fileURL + " is in the white list");
+                            done();
+                        }
+                    };
 
-                it("filetransfer.spec.24 should handle malformed urls", function (done) {
+                    self.transfer.upload(this.localFilePath, fileURL, uploadWin, uploadFail, this.uploadOptions);
+                }, UPLOAD_TIMEOUT * 11);
 
+                it("filetransfer.spec.24 should handle malformed urls", function (done) {
                     var fileURL = getMalformedUrl();
 
                     var uploadFail = function (error) {
@@ -1181,7 +1110,6 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.25 should handle unknown host", function (done) {
-
                     var fileURL = UNKNOWN_HOST;
 
                     var uploadFail = function (error) {
@@ -1199,11 +1127,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.25 should handle missing file", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
 
                     var uploadFail = function (error) {
@@ -1221,11 +1144,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.26 should handle bad file path", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
 
                     var uploadFail = function (error) {
@@ -1242,13 +1160,9 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.27 should be able to set custom headers", function (done) {
-                    // whatheaders.com is down for a long time
-                    // TODO: add its functionality to the cordova-labs test server
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
-                    var fileURL = HEADERS_ECHO;
+                    var fileURL = SERVER + '/upload_echo_headers';
+                    var retryCount = 0;
+                    var self = this;
 
                     var uploadWin = function (uploadResult) {
 
@@ -1265,8 +1179,16 @@ exports.defineAutoTests = function () {
                     };
 
                     var uploadFail = function() {
-                        unexpectedCallbacks.httpFail();
-                        done();
+                        if (++retryCount >= RETRY_COUNT) {
+                            unexpectedCallbacks.httpFail();
+                            done();
+                        } else {
+                            console.log('retrying... ' + retryCount);
+                            setTimeout(function () {
+                                // NOTE: removing uploadOptions will cause Android to timeout
+                                self.transfer.upload(self.localFilePath, fileURL, uploadWin, uploadFail, self.uploadOptions);
+                            }, RETRY_INTERVAL);
+                        }
                     };
 
                     this.uploadOptions.headers = {
@@ -1279,14 +1201,9 @@ exports.defineAutoTests = function () {
 
                     // NOTE: removing uploadOptions cause Android to timeout
                     this.transfer.upload(this.localFilePath, fileURL, uploadWin, uploadFail, this.uploadOptions);
-                }, UPLOAD_TIMEOUT);
+                }, UPLOAD_TIMEOUT * 11);
 
                 it("filetransfer.spec.29 (compatibility) should be able to upload a file using local paths", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
 
@@ -1322,11 +1239,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.31 should be able to upload a file using PUT method", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
 
@@ -1354,11 +1266,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.32 should be able to upload a file (non-multipart)", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
 
@@ -1395,10 +1302,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.34 should not delete a file on upload error", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1441,11 +1344,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.37 should handle non-UTF8 encoded upload response", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     // Only iOS is supported: https://issues.apache.org/jira/browse/CB-9840
                     if (!isIos) {
                         pending();
@@ -1484,11 +1382,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.38 should be able to upload a file using data: source uri", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
 
@@ -1522,11 +1415,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.39 should be able to upload a file using data: source uri (non-multipart)", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
 
                     var uploadWin = function (uploadResult) {
@@ -1558,11 +1446,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.40 should not fail to upload a file using data: source uri when the data is empty", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     var fileURL = SERVER + "/upload";
 
                     var dataUri = DATA_URI_PREFIX;
@@ -1577,11 +1460,6 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.41 should not fail to upload a file using data: source uri when the data is empty (non-multipart)", function (done) {
-                    // tests that use fileserver are temporarily disabled on CI
-                    if (window.IS_CI) {
-                        pending();
-                    }
-
                     if (isIos) {
                         // iOS does not support uploads of an empty file with __chunkedMode=true__ and `multipartMode=false`:
                         // request body will be empty in this case instead of 0\n\n.
@@ -1636,11 +1514,7 @@ exports.defineAutoTests = function () {
                     };
 
                     var testChunkedModeBase = function(chunkedMode, multipart, done) {
-                        // tests that use fileserver are temporarily disabled on CI
-                        if (window.IS_CI) {
-                            pending();
-                        }
-
+                        var retryCount = 0;
                         var fileURL = SERVER + "/upload_echo_headers";
                         var specContext = this;
 
@@ -1653,8 +1527,19 @@ exports.defineAutoTests = function () {
                         }
 
                         var uploadFail = function() {
-                            unexpectedCallbacks.httpFail();
-                            done();
+                            if (++retryCount >= RETRY_COUNT) {
+                                unexpectedCallbacks.httpFail();
+                                done();
+                            } else {
+                                console.log('retrying... ' + retryCount);
+                                setTimeout(function () {
+                                    // NOTE: removing uploadOptions will cause Android to timeout
+                                    specContext.transfer.upload(specContext.localFilePath, fileURL, function (uploadResult) {
+                                        testChunkedModeWin(uploadResult, specContext);
+                                        done();
+                                    }, uploadFail, specContext.uploadOptions);
+                                }, RETRY_INTERVAL);
+                            }
                         };
 
                         // turn off the onprogress handler
@@ -1670,7 +1555,7 @@ exports.defineAutoTests = function () {
                     it("filetransfer.spec.42 chunkedMode=false, multipart=false", function (done) {
 
                         testChunkedModeBase.call(this, false, false, done);
-                    }, UPLOAD_TIMEOUT);
+                    }, UPLOAD_TIMEOUT * 11);
 
                     it("filetransfer.spec.43 chunkedMode=true, multipart=false", function (done) {
 
@@ -1678,12 +1563,12 @@ exports.defineAutoTests = function () {
                             pending();
                         }
                         testChunkedModeBase.call(this, true, false, done);
-                    }, UPLOAD_TIMEOUT);
+                    }, UPLOAD_TIMEOUT * 11);
 
                     it("filetransfer.spec.44 chunkedMode=false, multipart=true", function (done) {
 
                         testChunkedModeBase.call(this, false, true, done);
-                    }, UPLOAD_TIMEOUT);
+                    }, UPLOAD_TIMEOUT * 11);
 
                     it("filetransfer.spec.45 chunkedMode=true, multipart=true", function (done) {
 
@@ -1691,7 +1576,7 @@ exports.defineAutoTests = function () {
                             pending();
                         }
                         testChunkedModeBase.call(this, true, true, done);
-                    }, UPLOAD_TIMEOUT);
+                    }, UPLOAD_TIMEOUT * 11);
                 });
             });
         });


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


[4/8] cordova-plugin-file-transfer git commit: CB-12363 Added build badges for iOS 9.3 and 10.0

Posted by st...@apache.org.
CB-12363 Added build badges for iOS 9.3 and 10.0


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/3d1c258c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/3d1c258c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/3d1c258c

Branch: refs/heads/1.6.x
Commit: 3d1c258c6738439cfe837785fc80badb28752550
Parents: 77b8590
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Wed Jan 18 13:30:52 2017 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 README.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/3d1c258c/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 8234f8a..06f22b8 100644
--- a/README.md
+++ b/README.md
@@ -21,9 +21,9 @@ description: Upload and download files.
 #         under the License.
 -->
 
-|Android 4.4|Android 5.1|iOS|Windows 10 Store|Travis CI|
-|:-:|:-:|:-:|:-:|:-:|
-|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci
 .cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-file-transfer)|
+|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI|
+|:-:|:-:|:-:|:-:|:-:|:-:|
+|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci
 .cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-file-transfer/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-file-transfer)|
 
 # cordova-plugin-file-transfer
 


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


[2/8] cordova-plugin-file-transfer git commit: CB-12439 (Tests) Temporarily disable tests that use fileserver on CI

Posted by st...@apache.org.
CB-12439 (Tests) Temporarily disable tests that use fileserver on CI


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/70e573ef
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/70e573ef
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/70e573ef

Branch: refs/heads/1.6.x
Commit: 70e573ef9cbe4b951d51cc5ab7cc472cc0d10e38
Parents: 4c9f1e5
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Thu Feb 9 13:23:54 2017 +0300
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Mar 2 16:34:52 2017 -0800

----------------------------------------------------------------------
 tests/tests.js | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 115 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/70e573ef/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index e303b45..cf13dfc 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -361,6 +361,10 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.4 should download a file", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/robots.txt";
                     var specContext = this;
@@ -399,6 +403,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.5 should download a file using http basic auth", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER_WITH_CREDENTIALS + "/download_basic_auth";
                     var specContext = this;
@@ -417,6 +425,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.6 should get 401 status on http basic auth failure", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     // NOTE:
                     //      using server without credentials
@@ -603,6 +615,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.12 should get http status on failure", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/404";
 
@@ -630,6 +646,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.13 should get http body on failure", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/404";
 
@@ -695,6 +715,11 @@ exports.defineAutoTests = function () {
                 }, isWindows ? WINDOWS_UNKNOWN_HOST_TIMEOUT : DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.16 should handle bad file path", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
+
                     var fileURL = SERVER;
 
                     var downloadWin = function() {
@@ -730,6 +755,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.30 downloaded file entries should have a toNativeURL method", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     if (cordova.platformId === "browser") {
                         pending();
@@ -768,6 +797,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.28 (compatibility) should be able to download a file using local paths", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/robots.txt";
                     var specContext = this;
@@ -804,6 +837,10 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.33 should properly handle 304", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     if (isWP8) {
                         pending();
@@ -825,6 +862,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.35 304 should not result in the deletion of a cached file", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     if (isWP8) {
                         pending();
@@ -886,6 +927,10 @@ exports.defineAutoTests = function () {
                 }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.36 should handle non-UTF8 encoded download response", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     // Only iOS is supported: https://issues.apache.org/jira/browse/CB-9840
                     if (!isIos) {
@@ -1001,6 +1046,10 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.18 should be able to upload a file", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1027,6 +1076,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.19 should be able to upload a file with http basic auth", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER_WITH_CREDENTIALS + "/upload_basic_auth";
                     var specContext = this;
@@ -1046,6 +1099,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.21 should be stopped by abort()", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1084,6 +1141,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.22 should get http status and body on failure", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/403";
 
@@ -1138,6 +1199,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.25 should handle missing file", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
 
@@ -1156,6 +1221,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.26 should handle bad file path", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
 
@@ -1173,6 +1242,11 @@ exports.defineAutoTests = function () {
                 });
 
                 it("filetransfer.spec.27 should be able to set custom headers", function (done) {
+                    // whatheaders.com is down for a long time
+                    // TODO: add its functionality to the cordova-labs test server
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = HEADERS_ECHO;
 
@@ -1208,6 +1282,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.29 (compatibility) should be able to upload a file using local paths", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1244,6 +1322,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.31 should be able to upload a file using PUT method", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1272,6 +1354,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.32 should be able to upload a file (non-multipart)", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1309,6 +1395,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.34 should not delete a file on upload error", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1351,6 +1441,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.37 should handle non-UTF8 encoded upload response", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     // Only iOS is supported: https://issues.apache.org/jira/browse/CB-9840
                     if (!isIos) {
@@ -1390,6 +1484,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.38 should be able to upload a file using data: source uri", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
                     var specContext = this;
@@ -1424,6 +1522,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.39 should be able to upload a file using data: source uri (non-multipart)", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
 
@@ -1456,6 +1558,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.40 should not fail to upload a file using data: source uri when the data is empty", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     var fileURL = SERVER + "/upload";
 
@@ -1471,6 +1577,10 @@ exports.defineAutoTests = function () {
                 }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.41 should not fail to upload a file using data: source uri when the data is empty (non-multipart)", function (done) {
+                    // tests that use fileserver are temporarily disabled on CI
+                    if (window.IS_CI) {
+                        pending();
+                    }
 
                     if (isIos) {
                         // iOS does not support uploads of an empty file with __chunkedMode=true__ and `multipartMode=false`:
@@ -1526,6 +1636,11 @@ exports.defineAutoTests = function () {
                     };
 
                     var testChunkedModeBase = function(chunkedMode, multipart, done) {
+                        // tests that use fileserver are temporarily disabled on CI
+                        if (window.IS_CI) {
+                            pending();
+                        }
+
                         var fileURL = SERVER + "/upload_echo_headers";
                         var specContext = this;
 


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