You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/06/13 01:11:23 UTC

[7/18] android commit: updating cordova.js version

updating cordova.js version


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

Branch: refs/heads/master
Commit: bf6864bce0ea5bc376033d074ed2b979b61d833a
Parents: 55b1e40
Author: Anis Kadri <an...@gmail.com>
Authored: Fri Jun 8 17:42:06 2012 -0700
Committer: Anis Kadri <an...@gmail.com>
Committed: Fri Jun 8 17:42:06 2012 -0700

----------------------------------------------------------------------
 bin/templates/project/assets/www/index.html |    2 +-
 bin/test_create2.js                         |   90 ----------------------
 bin/test_create_unix.js                     |   90 ++++++++++++++++++++++
 3 files changed, 91 insertions(+), 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/bf6864bc/bin/templates/project/assets/www/index.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/assets/www/index.html b/bin/templates/project/assets/www/index.html
index 39368e0..8e46f62 100644
--- a/bin/templates/project/assets/www/index.html
+++ b/bin/templates/project/assets/www/index.html
@@ -23,7 +23,7 @@
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>PhoneGap</title>
       <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
-      <script type="text/javascript" charset="utf-8" src="cordova-1.8.0rc1.js"></script>
+      <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
       <script type="text/javascript" charset="utf-8" src="main.js"></script>
 
   </head>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/bf6864bc/bin/test_create2.js
----------------------------------------------------------------------
diff --git a/bin/test_create2.js b/bin/test_create2.js
deleted file mode 100644
index 1df5dd5..0000000
--- a/bin/test_create2.js
+++ /dev/null
@@ -1,90 +0,0 @@
-var project_path = '/tmp/example',
-    package_name = 'org.apache.cordova.example',
-    package_as_path = 'org/apache/cordova/example',
-    project_name = 'cordovaExample';
-
-var path = require('path'),
-    fs = require('fs'),
-    util = require('util'),
-    assert = require('assert'),
-    spawn = require('child_process').spawn;
-
-var version = fs.readFileSync(__dirname + '/../VERSION').toString().replace('\n', '');
-
-assert(version !== undefined);
-assert(version !== '');
-
-var create_project = spawn(__dirname + '/create2',
-                           [project_path,
-                            package_name,
-                            project_name]);
-
-create_project.on('exit', function(code) {
-
-    assert.equal(code, 0, 'Project did not get created');
-
-    // make sure the project was created
-    path.exists(project_path, function(exists) {
-        assert(exists, 'Project path does not exist');
-    });
-
-    // make sure the build directory was cleaned up
-    path.exists(__dirname + '/framework/libs', function(exists) {
-        assert(!exists, 'libs directory did not get cleaned up');
-    });
-    path.exists(__dirname + util.format('/framework/assets/cordova-%s.js', version), function(exists) {
-        assert(!exists, 'javascript file did not get cleaned up');
-    });
-    path.exists(__dirname + util.format('/framework/cordova-%s.jar', version), function(exists) {
-        assert(!exists, 'jar file did not get cleaned up');
-    });
-
-    // make sure AndroidManifest.xml was added
-    path.exists(util.format('%s/AndroidManifest.xml', project_path), function(exists) {
-        assert(exists, 'AndroidManifest.xml did not get created');
-        // TODO check that the activity name was properly substituted
-    });
-
-    // make sure main Activity was added 
-    path.exists(util.format('%s/src/%s/%s.java', project_path, package_as_path, project_name), function(exists) {
-        assert(exists, 'Activity did not get created');
-        // TODO check that package name and activity name were substitued properly
-    });
-   
-    // make sure plugins.xml was added
-    path.exists(util.format('%s/res/xml/plugins.xml', project_path), function(exists) {
-        assert(exists, 'plugins.xml did not get created');
-    });
-    
-    // make sure cordova.xml was added
-    path.exists(util.format('%s/res/xml/cordova.xml', project_path), function(exists) {
-        assert(exists, 'plugins.xml did not get created');
-    });
-    
-    // make sure cordova.jar was added
-    path.exists(util.format('%s/libs/cordova-%s.jar', project_path, version), function(exists) {
-        assert(exists, 'cordova.jar did not get added');
-    });
-    
-    // make sure cordova.js was added
-    path.exists(util.format('%s/assets/www/cordova-%s.js', project_path, version), function(exists) {
-        assert(exists, 'cordova.js did not get added');
-    });
-
-    // check that project compiles && creates a cordovaExample-debug.apk
-    var compile_project = spawn('ant', ['debug'], {cwd: project_path});
-    
-    compile_project.on('exit', function(code) {
-        assert.equal(code, 0, 'Cordova Android Project does not compile');
-        // make sure cordovaExample-debug.apk was created
-        path.exists(util.format('%s/bin/%s-debug.apk', project_path, project_name), function(exists) {
-            assert(exists, 'Package did not get created');
-            
-            // if project compiles properly just AXE it
-            spawn('rm', ['-rf', project_path], function(code) {
-                assert.equal(code, 0, 'Could not remove project directory');
-            });
-        });
-    });
-
-});

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/bf6864bc/bin/test_create_unix.js
----------------------------------------------------------------------
diff --git a/bin/test_create_unix.js b/bin/test_create_unix.js
new file mode 100644
index 0000000..1df5dd5
--- /dev/null
+++ b/bin/test_create_unix.js
@@ -0,0 +1,90 @@
+var project_path = '/tmp/example',
+    package_name = 'org.apache.cordova.example',
+    package_as_path = 'org/apache/cordova/example',
+    project_name = 'cordovaExample';
+
+var path = require('path'),
+    fs = require('fs'),
+    util = require('util'),
+    assert = require('assert'),
+    spawn = require('child_process').spawn;
+
+var version = fs.readFileSync(__dirname + '/../VERSION').toString().replace('\n', '');
+
+assert(version !== undefined);
+assert(version !== '');
+
+var create_project = spawn(__dirname + '/create2',
+                           [project_path,
+                            package_name,
+                            project_name]);
+
+create_project.on('exit', function(code) {
+
+    assert.equal(code, 0, 'Project did not get created');
+
+    // make sure the project was created
+    path.exists(project_path, function(exists) {
+        assert(exists, 'Project path does not exist');
+    });
+
+    // make sure the build directory was cleaned up
+    path.exists(__dirname + '/framework/libs', function(exists) {
+        assert(!exists, 'libs directory did not get cleaned up');
+    });
+    path.exists(__dirname + util.format('/framework/assets/cordova-%s.js', version), function(exists) {
+        assert(!exists, 'javascript file did not get cleaned up');
+    });
+    path.exists(__dirname + util.format('/framework/cordova-%s.jar', version), function(exists) {
+        assert(!exists, 'jar file did not get cleaned up');
+    });
+
+    // make sure AndroidManifest.xml was added
+    path.exists(util.format('%s/AndroidManifest.xml', project_path), function(exists) {
+        assert(exists, 'AndroidManifest.xml did not get created');
+        // TODO check that the activity name was properly substituted
+    });
+
+    // make sure main Activity was added 
+    path.exists(util.format('%s/src/%s/%s.java', project_path, package_as_path, project_name), function(exists) {
+        assert(exists, 'Activity did not get created');
+        // TODO check that package name and activity name were substitued properly
+    });
+   
+    // make sure plugins.xml was added
+    path.exists(util.format('%s/res/xml/plugins.xml', project_path), function(exists) {
+        assert(exists, 'plugins.xml did not get created');
+    });
+    
+    // make sure cordova.xml was added
+    path.exists(util.format('%s/res/xml/cordova.xml', project_path), function(exists) {
+        assert(exists, 'plugins.xml did not get created');
+    });
+    
+    // make sure cordova.jar was added
+    path.exists(util.format('%s/libs/cordova-%s.jar', project_path, version), function(exists) {
+        assert(exists, 'cordova.jar did not get added');
+    });
+    
+    // make sure cordova.js was added
+    path.exists(util.format('%s/assets/www/cordova-%s.js', project_path, version), function(exists) {
+        assert(exists, 'cordova.js did not get added');
+    });
+
+    // check that project compiles && creates a cordovaExample-debug.apk
+    var compile_project = spawn('ant', ['debug'], {cwd: project_path});
+    
+    compile_project.on('exit', function(code) {
+        assert.equal(code, 0, 'Cordova Android Project does not compile');
+        // make sure cordovaExample-debug.apk was created
+        path.exists(util.format('%s/bin/%s-debug.apk', project_path, project_name), function(exists) {
+            assert(exists, 'Package did not get created');
+            
+            // if project compiles properly just AXE it
+            spawn('rm', ['-rf', project_path], function(code) {
+                assert.equal(code, 0, 'Could not remove project directory');
+            });
+        });
+    });
+
+});