cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/5] git commit: Updated amazon-fireos.spec with amazon-fireos platform name. Corrected project names for android_one and android_two. Modified README.md for Cordova-AmazonWebView-Plugman
Date Wed, 11 Dec 2013 18:50:58 GMT
Updated Branches:
  refs/heads/master fb603eaed -> 7abf47d80


Updated amazon-fireos.spec with amazon-fireos platform name.
Corrected project names for android_one and android_two.
Modified README.md for Cordova-AmazonWebView-Plugman


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/757243f9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/757243f9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/757243f9

Branch: refs/heads/master
Commit: 757243f9d20c825f5884749880178862ead70eb5
Parents: 3e57490
Author: Archana Naik <naika@lab126.com>
Authored: Thu Oct 24 17:55:14 2013 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Wed Nov 27 14:32:46 2013 -0800

----------------------------------------------------------------------
 README.md                            | 11 +++----
 spec/platforms/amazon-fireos.spec.js | 48 +++++++++++++++----------------
 2 files changed, 30 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/757243f9/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3bc886d..cd83a81 100644
--- a/README.md
+++ b/README.md
@@ -25,14 +25,15 @@ You must have `git` on your PATH to be able to install plugins directly
from rem
 ## Supported Platforms
 
 * iOS
+* Amazon Fire OS
 * Android
 * BlackBerry 10
 * Windows Phone (7+8)
 
 ## Command Line Usage
 
-    plugman install --platform <ios|android|blackberry10|wp7|wp8> --project <directory>
--plugin <name|url|path> [--plugins_dir <directory>] [--www <directory>]
[--variable <name>=<value> [--variable <name>=<value> ...]]
-    plugman uninstall --platform <ios|android|blackberr10|wp7|wp8> --project <directory>
--plugin <id> [--www <directory>] [--plugins_dir <directory>]
+    plugman install --platform <ios|amazon-fireos|android|blackberry10|wp7|wp8> --project
<directory> --plugin <name|url|path> [--plugins_dir <directory>] [--www
<directory>] [--variable <name>=<value> [--variable <name>=<value>
...]]
+    plugman uninstall --platform <ios|amazon-fireos|android|blackberr10|wp7|wp8> --project
<directory> --plugin <id> [--www <directory>] [--plugins_dir <directory>]
 
 * Using minimum parameters, installs a plugin into a cordova project. You must specify a
platform and cordova project location for that platform. You also must specify a plugin, with
the different `--plugin` parameter forms being:
   * `name`: The directory name where the plugin contents exist. This must be an existing
directory under the `--plugins_dir` path (see below for more info) or a plugin in the Cordova
registry.
@@ -65,7 +66,7 @@ Other parameters:
 
 Installs a plugin into a specified cordova project of a specified platform.
 
- * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`
+ * `platform`: one of `amazon-fireos`, `android`, `ios`, `blackberry10`, `wp7` or `wp8`
  * `project_dir`: path to an instance of the above specified platform's cordova project
  * `id`: a string representing the `id` of the plugin, a path to a cordova plugin with a
valid `plugin.xml` file, or an `https://` or `git://` url to a git repository of a valid cordova
plugin or a plugin published to the Cordova registry
  * `plugins_dir`: path to directory where plugins will be stored, defaults to `<project_dir>/cordova/plugins`
@@ -80,7 +81,7 @@ Installs a plugin into a specified cordova project of a specified platform.
 
 Uninstalls a previously-installed cordova plugin from a specified cordova project of a specified
platform.
 
- * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`
+ * `platform`: one of `amazon-fireos`, `android`, `ios`, `blackberry10`, `wp7` or `wp8`
  * `project_dir`: path to an instance of the above specified platform's cordova project
  * `id`: a string representing the `id` of the plugin
  * `plugins_dir`: path to directory where plugins are stored, defaults to `<project_dir>/cordova/plugins`
@@ -109,7 +110,7 @@ Finalizes plugin installation by making configuration file changes and
setting u
     module.exports = function handlePrepare(project_dir, platform, plugins_dir) {
 
  * `project_dir`: path to an instance of the above specified platform's cordova project
- * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`
+ * `platform`: one of `amazon-fireos`, `android`, `ios`, `blackberry10`, `wp7` or `wp8`
  * `plugins_dir`: path housing all plugins used in this project
 
 ## Registry related actions

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/757243f9/spec/platforms/amazon-fireos.spec.js
----------------------------------------------------------------------
diff --git a/spec/platforms/amazon-fireos.spec.js b/spec/platforms/amazon-fireos.spec.js
index fe91a53..cb4bc4c 100644
--- a/spec/platforms/amazon-fireos.spec.js
+++ b/spec/platforms/amazon-fireos.spec.js
@@ -1,4 +1,4 @@
-var android = require('../../src/platforms/android'),
+var amazon_fireos = require('../../src/platforms/amazon-fireos'),
     common  = require('../../src/platforms/common'),
     install = require('../../src/install'),
     path    = require('path'),
@@ -13,14 +13,14 @@ var android = require('../../src/platforms/android'),
     dummyplugin = path.join(__dirname, '..', 'plugins', 'DummyPlugin'),
     faultyplugin = path.join(__dirname, '..', 'plugins', 'FaultyPlugin'),
     variableplugin = path.join(__dirname, '..', 'plugins', 'VariablePlugin'),
-    android_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
-    android_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
+    amzon_fireos_one_project = path.join(__dirname, '..', 'projects', 'android_one', '*'),
+    amazon_fireos_two_project = path.join(__dirname, '..', 'projects', 'android_two', '*');
 
 var xml_path     = path.join(dummyplugin, 'plugin.xml')
   , xml_text     = fs.readFileSync(xml_path, 'utf-8')
   , plugin_et    = new et.ElementTree(et.XML(xml_text));
 
-var platformTag = plugin_et.find('./platform[@name="android"]');
+var platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
 var dummy_id = plugin_et._root.attrib['id'];
 var valid_source = platformTag.findall('./source-file'),
     valid_libs = platformTag.findall('./lib-file'),
@@ -31,14 +31,14 @@ xml_path  = path.join(faultyplugin, 'plugin.xml')
 xml_text  = fs.readFileSync(xml_path, 'utf-8')
 plugin_et = new et.ElementTree(et.XML(xml_text));
 
-platformTag = plugin_et.find('./platform[@name="android"]');
+platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
 var invalid_source = platformTag.findall('./source-file');
 var faulty_id = plugin_et._root.attrib['id'];
 
 xml_path  = path.join(variableplugin, 'plugin.xml')
 xml_text  = fs.readFileSync(xml_path, 'utf-8')
 plugin_et = new et.ElementTree(et.XML(xml_text));
-platformTag = plugin_et.find('./platform[@name="android"]');
+platformTag = plugin_et.find('./platform[@name="amazon-fireos"]');
 
 var variable_id = plugin_et._root.attrib['id'];
 var variable_configs = platformTag.findall('./config-file');
@@ -47,15 +47,15 @@ function copyArray(arr) {
     return Array.prototype.slice.call(arr, 0);
 }
 
-describe('android project handler', function() {
+describe('amazon-fireos project handler', function() {
     describe('www_dir method', function() {
-        it('should return cordova-android project www location using www_dir', function()
{
-            expect(android.www_dir(path.sep)).toEqual(path.sep + path.join('assets', 'www'));
+        it('should return cordova-amazon-fireos project www location using www_dir', function()
{
+            expect(amazon_fireos.www_dir(path.sep)).toEqual(path.sep + path.join('assets',
'www'));
         });
     });
     describe('package_name method', function() {
-        it('should return an android project\'s proper package name', function() {
-            expect(android.package_name(path.join(android_one_project, '..'))).toEqual('com.alunny.childapp');
+        it('should return an amazon-fireos project\'s proper package name', function() {
+            expect(amazon_fireos.package_name(path.join(amazon_fireos_one_project, '..'))).toEqual('com.alunny.childapp');
         });
     });
 
@@ -70,26 +70,26 @@ describe('android project handler', function() {
             it("should copy jar files to project/libs", function () {
                 var s = spyOn(common, 'copyFile');
 
-                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/TestLib.jar', temp,
path.join('libs', 'TestLib.jar'));
+                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/TestLib.jar',
temp, path.join('libs', 'TestLib.jar'));
             });
         });
         describe('of <source-file> elements', function() {
             beforeEach(function() {
-                shell.cp('-rf', android_one_project, temp);
+                shell.cp('-rf', amazon_fireos_one_project, temp);
             });
 
             it('should copy stuff from one location to another by calling common.copyFile',
function() {
                 var source = copyArray(valid_source);
                 var s = spyOn(common, 'copyFile');
-                android['source-file'].install(source[0], dummyplugin, temp); 
-                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin.java',
temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
+                amazon_fireos['source-file'].install(source[0], dummyplugin, temp); 
+                expect(s).toHaveBeenCalledWith(dummyplugin, 'src/amazon-fireos/DummyPlugin.java',
temp, path.join('src', 'com', 'phonegap', 'plugins', 'dummyplugin', 'DummyPlugin.java'));
             });
             it('should throw if source file cannot be found', function() {
                 var source = copyArray(invalid_source);
                 expect(function() {
-                    android['source-file'].install(source[0], faultyplugin, temp); 
-                }).toThrow('"' + path.resolve(faultyplugin, 'src/android/NotHere.java') +
'" not found!');
+                    amazon_fireos['source-file'].install(source[0], faultyplugin, temp);

+                }).toThrow('"' + path.resolve(faultyplugin, 'src/amazon-fireos/NotHere.java')
+ '" not found!');
             });
             it('should throw if target file already exists', function() {
                 // write out a file
@@ -100,7 +100,7 @@ describe('android project handler', function() {
 
                 var source = copyArray(valid_source);
                 expect(function() {
-                    android['source-file'].install(source[0], dummyplugin, temp); 
+                    amazon_fireos['source-file'].install(source[0], dummyplugin, temp); 
                 }).toThrow('"' + target + '" already exists!');
             });
         });
@@ -110,7 +110,7 @@ describe('android project handler', function() {
         beforeEach(function() {
             shell.mkdir('-p', temp);
             shell.mkdir('-p', plugins_dir);
-            shell.cp('-rf', android_two_project, temp);
+            shell.cp('-rf', amazon_fireos_two_project, temp);
         });
         afterEach(function() {
             shell.rm('-rf', temp);
@@ -118,18 +118,18 @@ describe('android project handler', function() {
         describe('of <lib-file> elements', function(done) {
             it('should remove jar files', function () {
                 var s = spyOn(common, 'removeFile');
-                android['lib-file'].install(valid_libs[0], dummyplugin, temp);
-                android['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
+                amazon_fireos['lib-file'].install(valid_libs[0], dummyplugin, temp);
+                amazon_fireos['lib-file'].uninstall(valid_libs[0], temp, dummy_id);
                 expect(s).toHaveBeenCalledWith(temp, path.join('libs', 'TestLib.jar'));
             });
         });
         describe('of <source-file> elements', function() {
             it('should remove stuff by calling common.deleteJava', function(done) {
                 var s = spyOn(common, 'deleteJava');
-                install('android', temp, dummyplugin, plugins_dir, {})
+                install('amazon-fireos', temp, dummyplugin, plugins_dir, {})
                 .then(function() {
                     var source = copyArray(valid_source);
-                    android['source-file'].uninstall(source[0], temp);
+                    amazon_fireos['source-file'].uninstall(source[0], temp);
                     expect(s).toHaveBeenCalledWith(temp, path.join('src', 'com', 'phonegap',
'plugins', 'dummyplugin', 'DummyPlugin.java'));
                     done();
                 });


Mime
View raw message