incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tim...@apache.org
Subject [1/9] js commit: cleaned up some lint errors
Date Thu, 07 Jun 2012 20:59:18 GMT
Updated Branches:
  refs/heads/master cdc172b21 -> cad42ed7a


cleaned up some lint errors


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/cad42ed7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/cad42ed7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/cad42ed7

Branch: refs/heads/master
Commit: cad42ed7af45e65ceaf55e004209368319121f64
Parents: 02fc210
Author: Gord Tanner <gtanner@gmail.com>
Authored: Tue Jun 5 10:57:23 2012 -0400
Committer: Tim Kim <tim.kim@nitobi.com>
Committed: Thu Jun 7 13:50:55 2012 -0700

----------------------------------------------------------------------
 lib/playbook/platform.js                           |    4 ++--
 lib/playbook/plugin/playbook/DirectoryReader.js    |   13 ++++++-------
 lib/playbook/plugin/playbook/Entry.js              |    5 +++--
 lib/playbook/plugin/playbook/FileEntry.js          |    2 +-
 lib/playbook/plugin/playbook/FileReader.js         |    6 +++---
 lib/playbook/plugin/playbook/FileWriter.js         |    4 ++--
 .../plugin/playbook/resolveLocalFileSystemURI.js   |    2 +-
 7 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cad42ed7/lib/playbook/platform.js
----------------------------------------------------------------------
diff --git a/lib/playbook/platform.js b/lib/playbook/platform.js
index 9a987c3..bb38e30 100644
--- a/lib/playbook/platform.js
+++ b/lib/playbook/platform.js
@@ -22,7 +22,7 @@ module.exports = {
         },
         resolveLocalFileSystemURI:{
             path: 'cordova/plugin/playbook/resolveLocalFileSystemURI'
-        },
+        }
     },
     merges: {
         navigator: {
@@ -40,6 +40,6 @@ module.exports = {
         },
         FileEntry:{
             path: 'cordova/plugin/playbook/FileEntry'
-        },
+        }
     }
 };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cad42ed7/lib/playbook/plugin/playbook/DirectoryReader.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/DirectoryReader.js b/lib/playbook/plugin/playbook/DirectoryReader.js
index e45cdc2..64ba5dc 100644
--- a/lib/playbook/plugin/playbook/DirectoryReader.js
+++ b/lib/playbook/plugin/playbook/DirectoryReader.js
@@ -38,16 +38,15 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
 
     var theEntries = [];
     // Entry object is borked - unable to instantiate a new Entry object so just create one
-    var anEntry = function(isDirectory, name, fullPath){
-        this.isDirectory = (isDirectory ? true : false),
-        this.isFile = (isDirectory ? false : true),
-        this.name = name,
-        this.fullPath = fullPath
+    var anEntry = function (isDirectory, name, fullPath) {
+        this.isDirectory = (isDirectory ? true : false);
+        this.isFile = (isDirectory ? false : true);
+        this.name = name;
+        this.fullPath = fullPath;
     };
 
     if(blackberry.io.dir.exists(this.path)){
-
-        var theDirectories = blackberry.io.dir.listDirectories(this.path)
+        var theDirectories = blackberry.io.dir.listDirectories(this.path);
         var theFiles = blackberry.io.dir.listFiles(this.path);
 
         var theDirectoriesLength = theDirectories.length;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cad42ed7/lib/playbook/plugin/playbook/Entry.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/Entry.js b/lib/playbook/plugin/playbook/Entry.js
index cdce36b..afc5cdb 100644
--- a/lib/playbook/plugin/playbook/Entry.js
+++ b/lib/playbook/plugin/playbook/Entry.js
@@ -1,5 +1,6 @@
 var FileError = require('cordova/plugin/FileError'),
     LocalFileSystem = require('cordova/plugin/LocalFileSystem'),
+    Metadata = require('cordova/plugin/Metadata'),
     resolveLocalFileSystemURI = require('cordova/plugin/playbook/resolveLocalFileSystemURI'),
     DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
     FileEntry = require('cordova/plugin/FileEntry'),
@@ -20,7 +21,7 @@ var recursiveCopy = function(srcDirPath, dstDirPath){
         }
         recursiveCopy(srcDirPath + '/' + dirs[j], dstDirPath + '/' + dirs[j]);
     }
-}
+};
 
 var validFileRe = new RegExp('^[a-zA-Z][0-9a-zA-Z._ ]*$');
 
@@ -147,7 +148,7 @@ module.exports = {
                         var numOfEntries = 0;
                         numOfEntries += blackberry.io.dir.listDirectories(dstPath).length;
                         numOfEntries += blackberry.io.dir.listFiles(dstPath).length;
-                        if(numOfEntries==0){
+                        if(numOfEntries === 0){
                             blackberry.io.dir.createNewDir(dstPath);
                             recursiveCopy(srcPath,dstPath);
                             blackberry.io.dir.deleteDirectory(srcPath, true);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cad42ed7/lib/playbook/plugin/playbook/FileEntry.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/FileEntry.js b/lib/playbook/plugin/playbook/FileEntry.js
index 65a2607..61383c1 100644
--- a/lib/playbook/plugin/playbook/FileEntry.js
+++ b/lib/playbook/plugin/playbook/FileEntry.js
@@ -1,4 +1,4 @@
-var FileEntry = require('cordova/plugin/FileEntry')
+var FileEntry = require('cordova/plugin/FileEntry'),
     Entry = require('cordova/plugin/playbook/Entry'),
     FileWriter = require('cordova/plugin/playbook/FileWriter'),
     File = require('cordova/plugin/playbook/File'),

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cad42ed7/lib/playbook/plugin/playbook/FileReader.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/FileReader.js b/lib/playbook/plugin/playbook/FileReader.js
index f2f1ac6..4414a18 100644
--- a/lib/playbook/plugin/playbook/FileReader.js
+++ b/lib/playbook/plugin/playbook/FileReader.js
@@ -107,7 +107,7 @@ FileReader.prototype.readAsText = function(file, encoding) {
                     me.onloadend(new ProgressEvent("loadend", {target:me}));
                 }
             }
-        }
+        };
         // setting asynch to off
         blackberry.io.file.readFile(this.fileName, getFileContents, false);
 
@@ -188,7 +188,7 @@ FileReader.prototype.readAsDataURL = function(file) {
                     me.onloadend(new ProgressEvent("loadend", {target:me}));
                 }
             }
-        }
+        };
         // setting asynch to off
         blackberry.io.file.readFile(this.fileName, getFileContents, false);
 
@@ -238,4 +238,4 @@ FileReader.prototype.readAsArrayBuffer = function(file) {
     console.log('This method is not supported at this time.');
 };
 
-module.exports = FileReader;
\ No newline at end of file
+module.exports = FileReader;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cad42ed7/lib/playbook/plugin/playbook/FileWriter.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/FileWriter.js b/lib/playbook/plugin/playbook/FileWriter.js
index 146eb11..e918806 100644
--- a/lib/playbook/plugin/playbook/FileWriter.js
+++ b/lib/playbook/plugin/playbook/FileWriter.js
@@ -117,7 +117,7 @@ FileWriter.prototype.write = function(text) {
 
             me.position = newText.length;
             me.length = me.position;
-        }
+        };
 
         // setting asynch to off
         blackberry.io.file.readFile(this.fileName, getFileContents, false);
@@ -227,7 +227,7 @@ FileWriter.prototype.truncate = function(size) {
 
             me.position = newText.length;
             me.length = me.position;
-        }
+        };
 
         // setting asynch to off - worry about making this all callbacks later
         blackberry.io.file.readFile(this.fileName, getFileContents, false);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cad42ed7/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js b/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
index eded5ab..b9f3ef3 100644
--- a/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
+++ b/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
@@ -48,7 +48,7 @@ module.exports = function(uri, successCallback, errorCallback) {
     }
 
     // check for leading /
-    if(uri.indexOf('/')==0){
+    if(uri.indexOf('/')===0){
         fail(FileError.ENCODING_ERR);
         return;
     }


Mime
View raw message