From dd727345217f9a481799c727c4a844d60cf82b6a Mon Sep 17 00:00:00 2001 From: Shawn Jansepar Date: Sun, 15 Jul 2012 18:57:51 -0700 Subject: [PATCH 1/4] Fixes path issue on Windows --- lib/fetcher.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fetcher.js b/lib/fetcher.js index 210333e..2edfcf1 100644 --- a/lib/fetcher.js +++ b/lib/fetcher.js @@ -17,7 +17,7 @@ Fetcher.prototype = { * */ resolve: function(path, base) { - if (path.indexOf('/base/') == 0) path = path.slice(1); + if (path.indexOf('/base') == 0) path = path.slice(1); return Path.resolve(base, path); }, diff --git a/package.json b/package.json index 4c5369c..3d1f56e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mobify-client", - "version": "0.3.7", + "version": "0.3.8", "description": "Tools for building and compiling mobify.js adaptations", "author": "Mobify ", "dependencies": { From 03fb840b98376bc0bf4fbc884095793f7653beb7 Mon Sep 17 00:00:00 2001 From: Shawn Jansepar Date: Sun, 15 Jul 2012 19:01:08 -0700 Subject: [PATCH 2/4] Adding changelog for 0.3.8 --- CHANGELOG | 2 ++ vendor/mobify-js/1.1/base | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index f1b02c9..3e77542 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +v0.3.8 - Fixes Windows path issue introduced in v0.3.7 + v0.3.7 - Provides 'project_name' template variable when compiling mobify.js - Updates Zepto - Image resizer now reports 'project_name' diff --git a/vendor/mobify-js/1.1/base b/vendor/mobify-js/1.1/base index b79a55b..2a7c56f 160000 --- a/vendor/mobify-js/1.1/base +++ b/vendor/mobify-js/1.1/base @@ -1 +1 @@ -Subproject commit b79a55bd1fce8f4d98f7f2918bb9f3a96dc710f9 +Subproject commit 2a7c56fc4f8468d282df78fd28fd3b4439e72fea From d7e76428d2448b99ee2b9b517dd6df2860937d72 Mon Sep 17 00:00:00 2001 From: Shawn Jansepar Date: Sun, 15 Jul 2012 19:04:53 -0700 Subject: [PATCH 3/4] Accidently changed base ref in previous commit. Reverting --- vendor/mobify-js/1.1/base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/mobify-js/1.1/base b/vendor/mobify-js/1.1/base index 2a7c56f..b79a55b 160000 --- a/vendor/mobify-js/1.1/base +++ b/vendor/mobify-js/1.1/base @@ -1 +1 @@ -Subproject commit 2a7c56fc4f8468d282df78fd28fd3b4439e72fea +Subproject commit b79a55bd1fce8f4d98f7f2918bb9f3a96dc710f9 From 8ee21549e96b69c9f0fd5b0f020ad8fad05cb40a Mon Sep 17 00:00:00 2001 From: Shawn Jansepar Date: Sun, 15 Jul 2012 20:06:20 -0700 Subject: [PATCH 4/4] Adding regression tests for resolve method --- test/fetcher.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/fetcher.coffee diff --git a/test/fetcher.coffee b/test/fetcher.coffee new file mode 100644 index 0000000..978dd52 --- /dev/null +++ b/test/fetcher.coffee @@ -0,0 +1,12 @@ +Path = require 'path' +Assert = require 'assert' +Fetcher = require '../lib/fetcher' + + +module.exports = + 'test-resolve': (done) -> + fetcher = new Fetcher() + Assert.equal (fetcher.resolve '/base\\tmpl\\base_root.tmpl'), (Path.resolve 'base\\tmpl\\base_root.tmpl') + Assert.equal (fetcher.resolve '/base/tmpl/base_root.tmpl'), (Path.resolve 'base/tmpl/base_root.tmpl') + Assert.equal (fetcher.resolve '/tmpl/base_root.tmpl'), (Path.resolve '/tmpl/base_root.tmpl') + done()