You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/06/27 22:48:47 UTC
git commit: fixed ios parser spec to pass on windows
Updated Branches:
refs/heads/master2 167852870 -> 8ce3a4a83
fixed ios parser spec to pass on windows
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/8ce3a4a8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/8ce3a4a8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/8ce3a4a8
Branch: refs/heads/master2
Commit: 8ce3a4a8303dded600098de31e2f46a2c853ced1
Parents: 1678528
Author: Benn Mapes <be...@gmail.com>
Authored: Thu Jun 27 13:44:10 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu Jun 27 13:44:10 2013 -0700
----------------------------------------------------------------------
spec/metadata/ios_parser.spec.js | 4 ++--
src/metadata/ios_parser.js | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/8ce3a4a8/spec/metadata/ios_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/ios_parser.spec.js b/spec/metadata/ios_parser.spec.js
index a449255..cafe6e2 100644
--- a/spec/metadata/ios_parser.spec.js
+++ b/spec/metadata/ios_parser.spec.js
@@ -243,13 +243,13 @@ describe('ios project parser', function () {
});
it('should copy in a fresh cordova.js from stock cordova lib if no custom lib is specified', function() {
p.update_www();
- expect(cp.mostRecentCall.args[1]).toMatch(util.libDirectory);
+ expect(cp.mostRecentCall.args[1]).toContain(util.libDirectory);
});
it('should copy in a fresh cordova.js from custom cordova lib if custom lib is specified', function() {
var custom_path = path.join('custom', 'path');
custom.andReturn(custom_path);
p.update_www();
- expect(cp.mostRecentCall.args[1]).toMatch(custom_path);
+ expect(cp.mostRecentCall.args[1]).toContain(custom_path);
});
});
describe('update_overrides method', function() {
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/8ce3a4a8/src/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/ios_parser.js b/src/metadata/ios_parser.js
index abbdc12..fb79f5f 100644
--- a/src/metadata/ios_parser.js
+++ b/src/metadata/ios_parser.js
@@ -50,7 +50,7 @@ module.exports = function ios_parser(project) {
var xcodeproj_dir = fs.readdirSync(project).filter(function(e) { return e.match(/\.xcodeproj$/i); })[0];
if (!xcodeproj_dir) throw new Error('The provided path "' + project + '" is not a Cordova iOS project.');
this.xcodeproj = path.join(project, xcodeproj_dir);
- this.originalName = this.xcodeproj.substring(this.xcodeproj.lastIndexOf('/'), this.xcodeproj.indexOf('.xcodeproj'));
+ this.originalName = this.xcodeproj.substring(this.xcodeproj.lastIndexOf(path.sep), this.xcodeproj.indexOf('.xcodeproj'));
this.cordovaproj = path.join(project, this.originalName);
} catch(e) {
throw new Error('The provided path is not a Cordova iOS project.');