You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by gt...@apache.org on 2013/03/22 21:52:35 UTC

[1/8] git commit: Update package.json.

Updated Branches:
  refs/heads/master 5c3a65055 -> 24cae3151


Update package.json.

This is to prep for getting this into npm for the
hosted / cli version of ripple.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/6272f51e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/6272f51e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/6272f51e

Branch: refs/heads/master
Commit: 6272f51e3ec246d97da1d91cbb286beb17f05186
Parents: 5c3a650
Author: Gord Tanner <gt...@gmail.com>
Authored: Tue Mar 12 09:39:30 2013 -0400
Committer: Gord Tanner <gt...@gmail.com>
Committed: Tue Mar 12 09:39:30 2013 -0400

----------------------------------------------------------------------
 package.json |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/6272f51e/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index b7002af..7b54316 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,29 @@
 {
-  "name": "ripple",
+  "name": "ripple-emulator",
   "version": "0.9.15",
   "description": "A browser based html5 mobile application development and testing tool",
-  "homepage": "http://github.com/blackberry/Ripple-UI",
+  "homepage": "http://ripple.incubator.apache.org/",
   "author": {
-    "name": "Research In Motion",
-    "url": "http://github.com/blackberry/Ripple-UI"
+    "name": "Apache Ripple Community",
+    "url": "http://ripple.incubator.apache.org/"
   },
   "licenses": [{
     "type": "Apache 2.0",
     "url": "http://www.apache.org/licenses/LICENSE-2.0"
   }],
+  "repository": {
+    "type": "git",
+    "url": "https://git-wip-us.apache.org/repos/asf/icubator-ripple.git"
+  },
+  "keywords": [
+    "cordova",
+    "phonegap",
+    "ripple",
+    "mobile",
+    "testing",
+    "test",
+    "emulator"
+  ],
   "bin": { "ripple": "./bin/ripple" },
   "scripts": {"preinstall": "node thirdparty/ludicrous.js"},
   "main": "./lib/index",


[4/8] git commit: README should mention the Apache ICLA in Contributing section.

Posted by gt...@apache.org.
README should mention the Apache ICLA in Contributing section.

Now that the project is officially an incubator project, users
contribute under the Apache ICLA. Currently, the README.md Contributing
section references the BlackBerry how to contribute page, which can be
removed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/0788f761
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/0788f761
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/0788f761

Branch: refs/heads/master
Commit: 0788f76171bad079a31e8543df7633a56fddc8e0
Parents: 17cbc73
Author: Brent Lintner <br...@gmail.com>
Authored: Wed Mar 20 14:14:49 2013 -0400
Committer: Brent Lintner <br...@gmail.com>
Committed: Wed Mar 20 14:27:28 2013 -0400

----------------------------------------------------------------------
 README.md |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/0788f761/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index dd65f0a..6f0f610 100644
--- a/README.md
+++ b/README.md
@@ -87,7 +87,7 @@ The `master` branch is the latest (stable) release. The `next` branch is where a
 
 If you like the project, and want to contribute code, please issue a pull request (on [GitHub](https://github.com/blackberry/Ripple-UI/pulls)) into the `next` branch.
 
-Note: You will need to be an [official contributor](http://blackberry.github.com/howToContribute.html) before your code can be accepted.
+Note: You will need to submit an Apache [ICLA](http://www.apache.org/licenses/#clas) (Individual Contributor License Agreement) for your contribution to be accepted.
 
 ## Code Guidelines
 


[3/8] git commit: Add device selection to enableRipple qsparam

Posted by gt...@apache.org.
Add device selection to enableRipple qsparam

- updated the ui platform reload to regenerate the query string
  parameter when it exists before refreshing. There was a bug where when
  switching platforms using hosted it didn't switch due to the qs param
  overriding the persisted values.
- added device to the qsparam and made the search for devices with the
  id case insensitive.


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

Branch: refs/heads/master
Commit: b36213d426700a3cc62b4701bc75806ff8539528
Parents: 7c214f3
Author: Gord Tanner <gt...@gmail.com>
Authored: Thu Mar 14 15:16:10 2013 -0400
Committer: Gord Tanner <gt...@gmail.com>
Committed: Thu Mar 14 15:42:03 2013 -0400

----------------------------------------------------------------------
 lib/client/devices.js             |   11 ++++++++---
 lib/client/platform.js            |    1 +
 lib/client/ui/plugins/platform.js |    6 +++++-
 test/unit/client/devices.js       |    3 ++-
 4 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/b36213d4/lib/client/devices.js
----------------------------------------------------------------------
diff --git a/lib/client/devices.js b/lib/client/devices.js
index 4206ee4..68e68c9 100644
--- a/lib/client/devices.js
+++ b/lib/client/devices.js
@@ -31,6 +31,11 @@ event.on("HardwareKeyDefault", function (key) {
     }
 });
 
+function _getRequestedDevice() {
+    //format is platform-version-device
+    return (utils.queryString().enableripple || "").split('-')[2];
+}
+
 _self = module.exports = {
     initialize: function () {
         _devices = [
@@ -73,7 +78,7 @@ _self = module.exports = {
             "WQVGA",
             "WVGA"
         ].reduce(function (hash, deviceID) {
-            hash[deviceID] = ripple('devices/' + deviceID);
+            hash[deviceID.toLowerCase()] = ripple('devices/' + deviceID);
             return hash;
         }, {});
 
@@ -82,7 +87,7 @@ _self = module.exports = {
     },
 
     getCurrentDevice: function () {
-        var deviceId = db.retrieve("device-key"),
+        var deviceId = _getRequestedDevice() || db.retrieve("device-key"),
             device = this.getDevice(deviceId),
             platformId = platform.current().id,
             does = function (device) {
@@ -107,7 +112,7 @@ _self = module.exports = {
     },
 
     getDevice: function (deviceId) {
-        return _devices[deviceId] ? utils.copy(_devices[deviceId]) : null;
+        return utils.copy(_devices[(deviceId || "").toLowerCase()]);
     },
 
     getDevicesForPlatform: function (platformId) {

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/b36213d4/lib/client/platform.js
----------------------------------------------------------------------
diff --git a/lib/client/platform.js b/lib/client/platform.js
index cba9ab2..7a9eb37 100644
--- a/lib/client/platform.js
+++ b/lib/client/platform.js
@@ -34,6 +34,7 @@ function _getRequestedPlatform() {
 
     if (enableRippleArg) {
         enableRippleArg = enableRippleArg.split('-');
+        //format is platform-version-device
         platform = spec.get(enableRippleArg[0], enableRippleArg[1]);
         if (platform) {
             requestedPlatform = { name: platform.id, version: platform.version };

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/b36213d4/lib/client/ui/plugins/platform.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/platform.js b/lib/client/ui/plugins/platform.js
index 0a80b54..e1062bf 100644
--- a/lib/client/ui/plugins/platform.js
+++ b/lib/client/ui/plugins/platform.js
@@ -66,7 +66,11 @@ function changePlatformOrDevice() {
         "name": platformId,
         "version": version
     }, device, function () {
-        location.reload();
+        var original = utils.queryString().enableripple,
+            updated = platformId + "-" + version + "-" + device;
+
+        if (original) { location.href = location.href.replace(original, updated); }
+        else { location.reload(); }
     });
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/b36213d4/test/unit/client/devices.js
----------------------------------------------------------------------
diff --git a/test/unit/client/devices.js b/test/unit/client/devices.js
index 98165c0..1fcebb6 100644
--- a/test/unit/client/devices.js
+++ b/test/unit/client/devices.js
@@ -23,6 +23,7 @@ describe("devices", function () {
         event = ripple('event'),
         platform = ripple('platform'),
         emulatorBridge = ripple('emulatorBridge'),
+        utils = ripple('utils'),
         bus = ripple('bus'),
         db = ripple('db');
 
@@ -33,8 +34,8 @@ describe("devices", function () {
         spyOn(platform, "current").andReturn({
             id: "web"
         });
+        spyOn(utils, "queryString").andReturn({});
         devices.initialize();
-
     });
 
     it("getDevice returns a copied device object", function () {


[6/8] git commit: `jake btest` was broken.

Posted by gt...@apache.org.
`jake btest` was broken.

This happened when accounting.js was added to the thirdparty list.

When `jake btest` is run, Ripple's client is bundled and injected
into the HTML test runner as a giant string. The way the JS string was
being injected was to use String.replace. However, it turns out that
something like `'$'` will trigger a regex feature (unexpectedly..),
and the resulting string that is injected ends right after that
character. In this case, it resulted in a "unexpected end of
input" interpreter error.

By not using regex to inject the JS strings, and instead using
Array.split and Array.join, the strings can be concatenated without
random things like this happening.


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

Branch: refs/heads/master
Commit: ab68639adb2120362b00f3440b878690a38463ab
Parents: 0788f76
Author: Brent Lintner <br...@gmail.com>
Authored: Thu Mar 21 16:49:08 2013 -0400
Committer: Brent Lintner <br...@gmail.com>
Committed: Thu Mar 21 17:00:45 2013 -0400

----------------------------------------------------------------------
 build/btest.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/ab68639a/build/btest.js
----------------------------------------------------------------------
diff --git a/build/btest.js b/build/btest.js
index c78d3d7..3eda660 100644
--- a/build/btest.js
+++ b/build/btest.js
@@ -58,7 +58,8 @@ module.exports = function () {
         return str;
     }, "");
 
-    doc = html.replace(/<!-- SPECS -->/g, specs).replace(/##FILES##/g, modules.js);
+    doc = html.split("<!-- SPECS -->").join(specs)
+              .split("##FILES##").join(modules.js);
 
     app.listen(3000);
 


[5/8] git commit: Now that the project is in the npm registry, README should mention it.

Posted by gt...@apache.org.
Now that the project is in the npm registry, README should mention it.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/17cbc738
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/17cbc738
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/17cbc738

Branch: refs/heads/master
Commit: 17cbc738e605e9b28abf6bca474596d5e6d7ed8b
Parents: b36213d
Author: Brent Lintner <br...@gmail.com>
Authored: Wed Mar 20 14:06:36 2013 -0400
Committer: Brent Lintner <br...@gmail.com>
Committed: Wed Mar 20 14:27:28 2013 -0400

----------------------------------------------------------------------
 README.md |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/17cbc738/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index deac0ee..dd65f0a 100644
--- a/README.md
+++ b/README.md
@@ -73,22 +73,14 @@ There is a command line interface that can be paired with the client (UI).
 
 It can be used for various things, such as statically hosting an application, and running a local (cross origin) XHR proxy.
 
-Eventually, this will be available on the NPM registry. For now (to install):
+To install:
 
-    git clone git@github.com:blackberry/Ripple-UI.git ripple
-    cd ripple
-    ./configure
-    jake
-    npm install -g .
+    npm install -g ripple-emulator
 
 This will install a global script called `ripple`. To see usage, run:
 
     ripple help
 
-Note: If you don't want to use NPM, you can just do this:
-
-    node bin/ripple help
-
 ## Contributing
 
 The `master` branch is the latest (stable) release. The `next` branch is where all development happens.


[2/8] git commit: Skinned devices don't have their sizes divided by their css pixel ratio.

Posted by gt...@apache.org.
Skinned devices don't have their sizes divided by their css pixel ratio.

An example is: The Z10 would be sized to its device pixel dimensions by
by default, even if there was a css pixel ratio defined in its file.

This also caused devices with skins (and how they were
originally styled) to break, so all CSS for each skin was updated. Now,
they only use padding to set themselves.

Note: Renamed the method in resizer.js to something more appropriate,
since formatSkin really did not make sense for what it was doing.

This fixes GitHub Issue:

https://github.com/blackberry/Ripple-UI/issues/653


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/7c214f36
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/7c214f36
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/7c214f36

Branch: refs/heads/master
Commit: 7c214f3626bbd5698d3b2e475482175a935d4b04
Parents: 6272f51
Author: Brent Lintner <br...@gmail.com>
Authored: Wed Mar 6 12:21:37 2013 -0500
Committer: Brent Lintner <br...@gmail.com>
Committed: Thu Mar 14 11:54:17 2013 -0400

----------------------------------------------------------------------
 lib/client/devices/Bold9700/skin.css            |   10 +++-------
 lib/client/devices/Bold9900/skin.css            |    8 ++------
 lib/client/devices/Curve9300/skin.css           |    8 ++------
 lib/client/devices/Curve9350-9360-9370/skin.css |    8 ++------
 lib/client/devices/Pearl9100/skin.css           |    8 ++------
 lib/client/devices/Playbook/skin.css            |   18 ++++++------------
 lib/client/devices/Q10/skin.css                 |   14 ++++----------
 lib/client/devices/Style9670/skin.css           |    9 +++------
 lib/client/devices/Torch9800/skin.css           |   18 ++++++------------
 lib/client/devices/Torch9810/skin.css           |   16 ++++------------
 lib/client/devices/Torch9860-9850/skin.css      |   16 ++++------------
 lib/client/devices/Z10/skin.css                 |   18 +++++-------------
 lib/client/resizer.js                           |    6 ++----
 13 files changed, 45 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Bold9700/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Bold9700/skin.css b/lib/client/devices/Bold9700/skin.css
index cf4cca0..e82412c 100644
--- a/lib/client/devices/Bold9700/skin.css
+++ b/lib/client/devices/Bold9700/skin.css
@@ -22,15 +22,13 @@
     Bold9700 (561x1009) offset (40x181)*/
 
 .viewport-wrapper-Bold9700 {
-    width: 480px;
-    height: 360px;
     border: none;
 }
 
 .menu-button-wrapper-Bold9700{
     position: relative;
     display: inline-block;
-    margin: 30px 0 0 85px;
+    margin: 25px 0 0 90px;
     width: 100px;
     height: 80px;
     cursor: pointer;
@@ -47,12 +45,10 @@
 
 .device-wrapper-Bold9700 {
     position: relative;
-    padding: 181px 0 0 40px;
-    width: 521px;
-    height: 828px;
+    padding: 182px 37px 473px 40px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Bold9700.png') no-repeat;
+    background: url('images/Bold9700.png') top center no-repeat;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Bold9900/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Bold9900/skin.css b/lib/client/devices/Bold9900/skin.css
index 46a012f..d89dd57 100644
--- a/lib/client/devices/Bold9900/skin.css
+++ b/lib/client/devices/Bold9900/skin.css
@@ -22,8 +22,6 @@
     Bold9900 (726x1258) offset (41x196)*/
 
 .viewport-wrapper-Bold9900 {
-    width: 640px;
-    height: 480px;
     border: none;
 }
 
@@ -47,12 +45,10 @@
 
 .device-wrapper-Bold9900 {
     position: relative;
-    padding: 196px 0 0 41px;
-    width: 685px;
-    height: 1062px;
+    padding: 196px 41px 600px 41px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Bold9900.png') no-repeat;
+    background: url('images/Bold9900.png') top center no-repeat;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Curve9300/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Curve9300/skin.css b/lib/client/devices/Curve9300/skin.css
index 4253d3d..28434be 100644
--- a/lib/client/devices/Curve9300/skin.css
+++ b/lib/client/devices/Curve9300/skin.css
@@ -22,8 +22,6 @@
     Curve9300 (373x674) offset (27x119)*/
 
 .viewport-wrapper-Curve9300 {
-    width: 320px;
-    height: 240px;
     border: none;
 }
 
@@ -47,12 +45,10 @@
 
 .device-wrapper-Curve9300 {
     position: relative;
-    padding: 119px 0 0 27px;
-    width: 346px;
-    height: 555px;
+    padding: 121px 23px 315px 27px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Curve9300.png') no-repeat;
+    background: url('images/Curve9300.png') top center no-repeat;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Curve9350-9360-9370/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Curve9350-9360-9370/skin.css b/lib/client/devices/Curve9350-9360-9370/skin.css
index aef1926..08e5420 100644
--- a/lib/client/devices/Curve9350-9360-9370/skin.css
+++ b/lib/client/devices/Curve9350-9360-9370/skin.css
@@ -22,8 +22,6 @@
     Curve9350-9360-9370 (560x998) offset (42x172)*/
 
 .viewport-wrapper-Curve9350-9360-9370 {
-    width: 480px;
-    height: 360px;
     border: none;
 }
 
@@ -47,12 +45,10 @@
 
 .device-wrapper-Curve9350-9360-9370 {
     position: relative;
-    padding: 172px 0 0 42px;
-    width: 518px;
-    height: 826px;
+    padding: 173px 37px 480px 42px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Curve9350-9360-9370.png') no-repeat;
+    background: url('images/Curve9350-9360-9370.png') top center no-repeat;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Pearl9100/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Pearl9100/skin.css b/lib/client/devices/Pearl9100/skin.css
index 648e6f9..609b355 100644
--- a/lib/client/devices/Pearl9100/skin.css
+++ b/lib/client/devices/Pearl9100/skin.css
@@ -22,8 +22,6 @@
     Pearl9100 (455x969) offset (47x139)*/
 
 .viewport-wrapper-Pearl9100 {
-    width: 360px;
-    height: 400px;
     border: none;
 }
 
@@ -47,12 +45,10 @@
 
 .device-wrapper-Pearl9100 {
     position: relative;
-    padding: 139px 0 0 47px;
-    width: 408px;
-    height: 830px;
+    padding: 139px 44px 440px 47px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Pearl9100.png') no-repeat;
+    background: url('images/Pearl9100.png') top center no-repeat;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Playbook/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Playbook/skin.css b/lib/client/devices/Playbook/skin.css
index 34eda26..7c78e8b 100644
--- a/lib/client/devices/Playbook/skin.css
+++ b/lib/client/devices/Playbook/skin.css
@@ -22,38 +22,32 @@
     Playbook Skin (860x1278) offset (128x130)*/
 
 .viewport-wrapper-landscape-Playbook {
-    height: 600px;
-    width: 1024px;
     border: none;
 }
 
 .device-wrapper-landscape-Playbook {
     position: relative;
-    padding: 130px 0 0 127px;
-    height: 732px;
-    width: 1153px;
+    padding: 122px 152px 154px 154px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Playbook_landscape.png') no-repeat;
+    background: url('images/Playbook.png') top center no-repeat;
+    background-size: 855px;
 }
 
 .viewport-wrapper-Playbook {
-    height: 1024px;
-    width: 600px;
     border: none;
 }
 
 
 .device-wrapper-Playbook {
     position: relative;
-    padding: 128px 0 0 130px;
-    width: 732px;
-    height: 1153px;
+    padding: 128px 127px 125px 127px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Playbook.png') no-repeat;
+    background: url('images/Playbook_landscape.png') top center no-repeat;
+    background-size: 1274px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Q10/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Q10/skin.css b/lib/client/devices/Q10/skin.css
index 7b88cc2..905c242 100644
--- a/lib/client/devices/Q10/skin.css
+++ b/lib/client/devices/Q10/skin.css
@@ -22,30 +22,24 @@
     Q10 (848x1552) offset (268x84)*/
 
 .viewport-wrapper-Q10 {
-    width: 720px;
-    height: 720px;
     border: none;
 }
 
 .device-wrapper-Q10 {
     position: relative;
-    padding: 258px 0 0 86px;
-    width: 792px;
-    height: 1285px;
+    padding: 125px 89px 280px 97px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Q10.png') no-repeat;
-    background-size: 886px;
+    background: url('images/Q10.png') top center no-repeat;
+    background-size: 429px;
 }
 
 .viewport-wrapper-landscape-Q10 {
-    width: 720px;
-    height: 720px;
     border: none;
 }
 
 #document {
-    border-radius: 7px;
+    border-radius: 4px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Style9670/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Style9670/skin.css b/lib/client/devices/Style9670/skin.css
index 8c15621..4167e9b 100644
--- a/lib/client/devices/Style9670/skin.css
+++ b/lib/client/devices/Style9670/skin.css
@@ -22,8 +22,6 @@
     Style9670 (520x1338) offset (78x137)*/
 
 .viewport-wrapper-Style9670 {
-    width: 360px;
-    height: 400px;
     border: none;
 }
 
@@ -47,12 +45,11 @@
 
 .device-wrapper-Style9670 {
     position: relative;
-    padding: 137px 0 0 80px;
-    width: 440px;
-    height: 1201px;
+    padding: 130px 72px 810px 80px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Style9670.png') no-repeat;
+    background: url('images/Style9670.png') top center no-repeat;
+    background-size: 509px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Torch9800/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Torch9800/skin.css b/lib/client/devices/Torch9800/skin.css
index 20ef0f6..b511093 100644
--- a/lib/client/devices/Torch9800/skin.css
+++ b/lib/client/devices/Torch9800/skin.css
@@ -23,21 +23,19 @@
     Torch9800 Skin (444x779) offset (40x142)*/
 
 .viewport-wrapper-Torch9800 {
-    width: 360px;
-    height: 480px;
     border: none;
 }
 
 .device-wrapper-Torch9800 {
     position: relative;
-    padding: 142px 0 0 40px;
-    width: 404px;
-    height: 637px;
+    padding: 142px 40px 170px 40px;
     margin: 0 auto;
+    width: 55px;
+    height: 65px;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Torch9800.png') no-repeat;
+    background: url('images/Torch9800.png') top center no-repeat;
 }
 
 .menu-button-wrapper-Torch9800 {
@@ -60,21 +58,17 @@
 
 .viewport-wrapper-landscape-Torch9800 {
     margin: -99px 0 0 103px;
-    width: 480px;
-    height: 360px;
     border: none;
 }
 
 .device-wrapper-landscape-Torch9800 {
     position: relative;
-    padding: 142px 0 0 40px;
-    width: 739px;
-    height: 302px;
+    padding: 142px 258px 40px 40px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Torch9800_landscape.png') no-repeat;
+    background: url('images/Torch9800_landscape.png') top center no-repeat;
 }
 
 .menu-button-wrapper-landscape-Torch9800{

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Torch9810/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Torch9810/skin.css b/lib/client/devices/Torch9810/skin.css
index aade859..5c9a51c 100644
--- a/lib/client/devices/Torch9810/skin.css
+++ b/lib/client/devices/Torch9810/skin.css
@@ -23,21 +23,17 @@
     Torch9810 Skin (591x1048) offset (55x191)*/
 
 .viewport-wrapper-Torch9810 {
-    width: 480px;
-    height: 640px;
     border: none;
 }
 
 .device-wrapper-Torch9810 {
     position: relative;
-    padding: 191px 0 0 55px;
-    width: 536px;
-    height: 857px;
+    padding: 190px 53px 236px 55px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Torch9810.png') no-repeat;
+    background: url('images/Torch9810.png') top center no-repeat;
 }
 
 .menu-button-wrapper-Torch9810 {
@@ -59,21 +55,17 @@
 }
 
 .viewport-wrapper-landscape-Torch9810 {
-    width: 640px;
-    height: 480px;
     border: none;
 }
 
 .device-wrapper-landscape-Torch9810 {
     position: relative;
-    padding: 55px 0 0 191px;
-    width: 857px;
-    height: 536px;
+    padding: 56px 213px 55px 188px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Torch9810_landscape.png') no-repeat;
+    background: url('images/Torch9810_landscape.png') top center no-repeat;
 }
 
 .menu-button-wrapper-landscape-Torch9810{

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Torch9860-9850/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Torch9860-9850/skin.css b/lib/client/devices/Torch9860-9850/skin.css
index 3857b03..d4845bf 100644
--- a/lib/client/devices/Torch9860-9850/skin.css
+++ b/lib/client/devices/Torch9860-9850/skin.css
@@ -23,21 +23,17 @@
     Torch 9860-9850 Skin (602x1149) offset (59x159)*/
 
 .viewport-wrapper-Torch9860-9850 {
-    width: 480px;
-    height: 800px;
     border: none;
 }
 
 .device-wrapper-Torch9860-9850 {
     position: relative;
-    padding: 159px 0 0 59px;
-    width: 543px;
-    height: 990px;
+    padding: 159px 56px 202px 59px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Torch9860-9850.png') no-repeat;
+    background: url('images/Torch9860-9850.png') top center no-repeat;
 }
 
 .menu-button-wrapper-Torch9860-9850 {
@@ -60,21 +56,17 @@
 
 .viewport-wrapper-landscape-Torch9860-9850 {
     margin: -99px 0 0 103px;
-    width: 800px;
-    height: 480px;
     border: none;
 }
 
 .device-wrapper-landscape-Torch9860-9850 {
     position: relative;
-    padding: 159px 0 0 60px;
-    width: 1089px;
-    height: 443px;
+    padding: 158px 296px 60px 64px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Torch9860-9850_landscape.png') no-repeat;
+    background: url('images/Torch9860-9850_landscape.png') top center no-repeat;
 }
 
 .menu-button-wrapper-landscape-Torch9860-9850 {

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/devices/Z10/skin.css
----------------------------------------------------------------------
diff --git a/lib/client/devices/Z10/skin.css b/lib/client/devices/Z10/skin.css
index 6c7c828..a264d29 100644
--- a/lib/client/devices/Z10/skin.css
+++ b/lib/client/devices/Z10/skin.css
@@ -22,41 +22,33 @@
     Z10 (848x1552) offset (268x84)*/
 
 .viewport-wrapper-Z10 {
-    width: 768px;
-    height: 1280px;
     border: none;
 }
 
 .device-wrapper-Z10 {
     position: relative;
-    padding: 283px 0 0 99px;
-    width: 848px;
-    height: 1552px;
+    padding: 128px 46px 135px 47px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
-    background: url('images/Z10.png') no-repeat;
-    background-size: 973px;
+    background: url('images/Z10.png') center top no-repeat;
+    background-size: 437px;
 }
 
 .viewport-wrapper-landscape-Z10 {
-    width: 1280px;
-    height: 768px;
     border: none;
 }
 
 .device-wrapper-landscape-Z10 {
     position: relative;
-    padding: 106px 0 0 284px;
-    width: 1552px;
-    height: 848px;
+    padding: 48px 140px 35px 126px;
     margin: 0 auto;
     border: none;
     -webkit-box-shadow: none;
     box-shadow: none;
     background: url('images/Z10-Landscape.png') no-repeat;
-    background-size: 1867px;
+    background-size: 832px;
 }
 
 #document {

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/7c214f36/lib/client/resizer.js
----------------------------------------------------------------------
diff --git a/lib/client/resizer.js b/lib/client/resizer.js
index a5972ab..8fb98ff 100644
--- a/lib/client/resizer.js
+++ b/lib/client/resizer.js
@@ -80,7 +80,7 @@ function _getDimensions(device, orientation) {
     };
 }
 
-function _formatSkin(containers, dimensions) {
+function sizeDevice(containers, dimensions) {
     containers.device.div.style.width = (dimensions.deviceWidth + 4) + "px";
     containers.device.div.style.height = (dimensions.deviceHeight + 4) + "px";
 
@@ -122,9 +122,7 @@ _self = {
 
         dimensions = _getDimensions(device, orientation);
 
-        if (!device.skin) {
-            _formatSkin(containers, dimensions);
-        }
+        sizeDevice(containers, dimensions);
 
         window.devicePixelRatio = dimensions.cssPixelRatio;
 


[8/8] git commit: update version and changelog

Posted by gt...@apache.org.
update version and changelog


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/24cae315
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/24cae315
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/24cae315

Branch: refs/heads/master
Commit: 24cae31518e78a73090f49d72fd8debaa71c361b
Parents: 2e48383
Author: Gord Tanner <gt...@gmail.com>
Authored: Fri Mar 22 16:51:13 2013 -0400
Committer: Gord Tanner <gt...@gmail.com>
Committed: Fri Mar 22 16:51:13 2013 -0400

----------------------------------------------------------------------
 doc/CHANGELOG.md |    9 ++++++++-
 package.json     |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/24cae315/doc/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md
index 5596003..30ffdd2 100644
--- a/doc/CHANGELOG.md
+++ b/doc/CHANGELOG.md
@@ -1,4 +1,11 @@
-## v0.9.1r54 - March 08, 2013
+## v0.9.16 - March 22, 2013
+
+* Added support for serve app from multiple folders
+* Fixed browser tests to run again
+* added device selection to enableRipple qs param
+* Skinned devices now have ther size devided by the css pixel ratio
+
+## v0.9.15 - March 08, 2013
 
 * Updated version to 0.9.15 due to republishing need on Chrome Store as per this issue: https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-extensions/d56BP7CTU-M
 

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/24cae315/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 7b54316..c5d5d18 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "ripple-emulator",
-  "version": "0.9.15",
+  "version": "0.9.16",
   "description": "A browser based html5 mobile application development and testing tool",
   "homepage": "http://ripple.incubator.apache.org/",
   "author": {


[7/8] git commit: Update path arg to handle multiple paths

Posted by gt...@apache.org.
Update path arg to handle multiple paths

- added map to parser to make rules to map values from the commandline
- fixed problem in regex for enableripple (ignore case)
- added rule to always have path an array value
- updated jshint to get rid of onevar (we have grown)
- allow static server to take multiple paths and merge into one


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/2e483836
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/2e483836
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/2e483836

Branch: refs/heads/master
Commit: 2e483836bc5a24397ed002556f4209fac9508438
Parents: ab68639
Author: Gord Tanner <gt...@gmail.com>
Authored: Fri Mar 22 16:44:00 2013 -0400
Committer: Gord Tanner <gt...@gmail.com>
Committed: Fri Mar 22 16:44:00 2013 -0400

----------------------------------------------------------------------
 .jshintrc                         |    2 +-
 lib/cli/index.js                  |    4 +++
 lib/cli/parser.js                 |   14 ++++++++++-
 lib/client/ui/plugins/platform.js |    4 ++-
 lib/server/emulate.js             |    4 ++-
 lib/server/emulate/hosted.js      |   38 ++++++++++++++++++-------------
 lib/server/index.js               |    1 -
 test/unit/cli/parser.js           |   17 ++++++++++++++
 8 files changed, 62 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/.jshintrc
----------------------------------------------------------------------
diff --git a/.jshintrc b/.jshintrc
index 4b39f35..e9db285 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -109,7 +109,7 @@
     "noarg": true,
     "noempty": false,
     "nonew": false,
-    "onevar": true,
+    "onevar": false,
     "plusplus": false,
     "regexp": false,
     "undef": true,

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/lib/cli/index.js
----------------------------------------------------------------------
diff --git a/lib/cli/index.js b/lib/cli/index.js
index c461d78..1faf7e3 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -45,6 +45,10 @@ function lookup(command, subcommand, options) {
 
 module.exports = {
     interpret: function (args) {
+
+        //convert path to always be an array.
+        parser.map("path", function (v) { return v.forEach ? v : [v]; });
+
         var parsed = parser.parse(args),
             subcommand;
 

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/lib/cli/parser.js
----------------------------------------------------------------------
diff --git a/lib/cli/parser.js b/lib/cli/parser.js
index 0cd40c8..a6158d6 100644
--- a/lib/cli/parser.js
+++ b/lib/cli/parser.js
@@ -18,7 +18,8 @@
  * under the License.
  *
  */
-var FLAG_PREFIX = /^\-\-?/;
+var FLAG_PREFIX = /^\-\-?/,
+    maps = {};
 
 function parse(args) {
     var result = {
@@ -59,9 +60,18 @@ function parse(args) {
         }
     }
 
+    Object.keys(result.options).forEach(function (key) {
+        if (maps[key]) {
+            result.options[key] = maps[key](result.options[key]);
+        }
+    });
+
     return result;
 }
 
 module.exports = {
-    parse: parse
+    parse: parse,
+    map: function (key, func) {
+        maps[key] = func;
+    }
 };

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/lib/client/ui/plugins/platform.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/platform.js b/lib/client/ui/plugins/platform.js
index e1062bf..75770ec 100644
--- a/lib/client/ui/plugins/platform.js
+++ b/lib/client/ui/plugins/platform.js
@@ -69,7 +69,9 @@ function changePlatformOrDevice() {
         var original = utils.queryString().enableripple,
             updated = platformId + "-" + version + "-" + device;
 
-        if (original) { location.href = location.href.replace(original, updated); }
+        if (original) {
+            location.href = location.href.replace(new RegExp(original, "i"), updated);
+        }
         else { location.reload(); }
     });
 }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/lib/server/emulate.js
----------------------------------------------------------------------
diff --git a/lib/server/emulate.js b/lib/server/emulate.js
index e247e26..cec549e 100644
--- a/lib/server/emulate.js
+++ b/lib/server/emulate.js
@@ -58,7 +58,9 @@ module.exports = {
         app.use(hosted.inject(options));
 
         if (!options.remote) {
-            app.use(express.static(options.path));
+            options.path.forEach(function (path) {
+                app.use("/", express.static(path));
+            });
         }
 
 // TODO: This should just talk about how to enable ripple via query params

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/lib/server/emulate/hosted.js
----------------------------------------------------------------------
diff --git a/lib/server/emulate/hosted.js b/lib/server/emulate/hosted.js
index 544f782..63e4527 100644
--- a/lib/server/emulate/hosted.js
+++ b/lib/server/emulate/hosted.js
@@ -123,27 +123,33 @@ function remoteInjection(opts) {
 }
 
 function localInjection(opts) {
-    return function (req, res, next) {
-        var file;
+    function inject(file, req, res) {
+        fs.readFile(file, "utf-8", function (err, data) {
+            if (err) { throw new Error(err); }
+
+            var doc = data.replace(HEAD_TAG,
+                      '<head>' +
+                        '<script>' +
+                            BOOTSTRAP_FROM_IFRAME +
+                        '</script>');
+
+            res.send(doc);
+        });
+    }
 
+    return function (req, res, next) {
         // TODO: DRY (see proxyRemote function)
         if (req.query.enableripple) {
             res.sendfile(path.join(HOSTED_PKG_DIR, "index.html"));
         } else if (req.path.match(/^\/$/) || req.path.match(/\.html/)) {
-            file = opts.path + (req.path.match(/\/$/) ?
-                            req.path + "/index.html" : req.path);
-
-            fs.readFile(file, "utf-8", function (err, data) {
-                if (err) { throw new Error(err); }
-
-                var doc = data.replace(HEAD_TAG,
-                          '<head>' +
-                            '<script>' +
-                                BOOTSTRAP_FROM_IFRAME +
-                            '</script>');
-
-                res.send(doc);
-            });
+            //first matching file
+            var fullPath = opts.path.reduce(function (match, curr) {
+                if (match) return match;
+                var file = curr + (req.path.match(/\/$/) ? req.path + "/index.html" : req.path);
+                return fs.existsSync(file) ? file : match;
+            }, null);
+
+            inject(fullPath, req, res);
         } else {
             next();
         }

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/lib/server/index.js
----------------------------------------------------------------------
diff --git a/lib/server/index.js b/lib/server/index.js
index 95fa579..46b7663 100644
--- a/lib/server/index.js
+++ b/lib/server/index.js
@@ -37,4 +37,3 @@ module.exports = {
         return app;
     }
 };
-

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/2e483836/test/unit/cli/parser.js
----------------------------------------------------------------------
diff --git a/test/unit/cli/parser.js b/test/unit/cli/parser.js
index f67fe89..0cbfd41 100644
--- a/test/unit/cli/parser.js
+++ b/test/unit/cli/parser.js
@@ -62,4 +62,21 @@ describe("cli", function () {
             }
         });
     });
+
+    it("can use map to change the value of the option", function () {
+        var multipleFlagsWithMultipleArgs = [
+            "cmd", "--a", "b", "c"
+        ];
+
+        parser.map("a", function () { return 12; });
+        parsed = parser.parse(basicArgs.concat(multipleFlagsWithMultipleArgs));
+
+        expect(parsed).toEqual({
+            commands: ["cmd"],
+            options: {
+                "a": 12
+            }
+        });
+        parser.map("a", null);
+    });
 });