Permalink
Browse files

Merge pull request #33 from mobify/windows-fix

Windows fix
  • Loading branch information...
2 parents 5f322f7 + 8ee2154 commit 9d6a2bddad3c8496a0d4e6d766efc642d0711e93 @jansepar jansepar committed Jul 16, 2012
Showing with 16 additions and 2 deletions.
  1. +2 −0 CHANGELOG
  2. +1 −1 lib/fetcher.js
  3. +1 −1 package.json
  4. +12 −0 test/fetcher.coffee
View
@@ -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'
View
@@ -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);
},
View
@@ -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 <dev@mobify.com>",
"dependencies": {
View
@@ -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()

0 comments on commit 9d6a2bd

Please sign in to comment.