Skip to content

Commit 9513295

Browse files
akdor1154audreyso
authored andcommitted
CB-13478: crlf -> lf
This closes #600
1 parent 3baf884 commit 9513295

File tree

12 files changed

+1704
-1704
lines changed

12 files changed

+1704
-1704
lines changed

integration-tests/plugin.spec.js

Lines changed: 299 additions & 299 deletions
Large diffs are not rendered by default.

integration-tests/plugin_fetch.spec.js

Lines changed: 538 additions & 538 deletions
Large diffs are not rendered by default.

spec/cordova/fixtures/plugins/cordova-lib-test-plugin/LICENSE

Lines changed: 201 additions & 201 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Apache Cordova
2-
Copyright 2012 The Apache Software Foundation
3-
4-
This product includes software developed at
5-
The Apache Software Foundation (http://www.apache.org/).
1+
Apache Cordova
2+
Copyright 2012 The Apache Software Foundation
3+
4+
This product includes software developed at
5+
The Apache Software Foundation (http://www.apache.org/).
Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
1-
/**
2-
Licensed to the Apache Software Foundation (ASF) under one
3-
or more contributor license agreements. See the NOTICE file
4-
distributed with this work for additional information
5-
regarding copyright ownership. The ASF licenses this file
6-
to you under the Apache License, Version 2.0 (the
7-
"License"); you may not use this file except in compliance
8-
with the License. You may obtain a copy of the License at
9-
10-
http://www.apache.org/licenses/LICENSE-2.0
11-
12-
Unless required by applicable law or agreed to in writing,
13-
software distributed under the License is distributed on an
14-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
KIND, either express or implied. See the License for the
16-
specific language governing permissions and limitations
17-
under the License.
18-
*/
19-
var webosParser = require('../../../src/cordova/metadata/webos_parser');
20-
var util = require('../../../src/cordova/util');
21-
var path = require('path');
22-
var shell = require('shelljs');
23-
var fs = require('fs');
24-
var config = require('../../../src/cordova/config');
25-
var ConfigParser = require('cordova-common').ConfigParser;
26-
27-
var cfg = new ConfigParser(path.join(__dirname, '..', 'test-config.xml'));
28-
describe('webos project parser', function () {
29-
var proj = path.join('some', 'path');
30-
/* eslint-disable no-unused-vars */
31-
var exists;
32-
var exec;
33-
var custom;
34-
/* eslint-enable no-unused-vars */
35-
beforeEach(function () {
36-
exists = spyOn(fs, 'existsSync').and.returnValue(true);
37-
exec = spyOn(shell, 'exec').and.callFake(function (cmd, opts, cb) {
38-
cb(0, ''); // eslint-disable-line standard/no-callback-literal
39-
});
40-
custom = spyOn(config, 'has_custom_path').and.returnValue(false);
41-
});
42-
43-
describe('constructions', function () {
44-
it('should create an instance with a path', function () {
45-
expect(function () {
46-
var p = new webosParser(proj); // eslint-disable-line new-cap
47-
expect(p.path).toEqual(proj);
48-
}).not.toThrow();
49-
});
50-
});
51-
52-
describe('instance', function () {
53-
/* eslint-disable no-unused-vars */
54-
var p;
55-
var cp;
56-
var rm;
57-
var is_cordova;
58-
var write;
59-
var read;
60-
/* eslint-enable no-unused-vars */
61-
var wos_proj = path.join(proj, 'platforms', 'webos');
62-
beforeEach(function () {
63-
p = new webosParser(wos_proj); // eslint-disable-line new-cap
64-
cp = spyOn(shell, 'cp');
65-
rm = spyOn(shell, 'rm');
66-
is_cordova = spyOn(util, 'isCordova').and.returnValue(proj);
67-
write = spyOn(fs, 'writeFileSync');
68-
read = spyOn(fs, 'readFileSync').and.returnValue('');
69-
});
70-
71-
describe('update_from_config method', function () {
72-
beforeEach(function () {
73-
cfg.name = function () { return 'testname'; };
74-
cfg.packageName = function () { return 'testpkg'; };
75-
cfg.version = function () { return '1.0'; };
76-
});
77-
78-
/* it('should write appinfo.json', function() {
79-
//p.update_from_config(cfg);
80-
//expect(write.mostRecentCall.args[0]).toEqual('appinfo.json');
81-
}); */
82-
});
83-
});
84-
});
1+
/**
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
var webosParser = require('../../../src/cordova/metadata/webos_parser');
20+
var util = require('../../../src/cordova/util');
21+
var path = require('path');
22+
var shell = require('shelljs');
23+
var fs = require('fs');
24+
var config = require('../../../src/cordova/config');
25+
var ConfigParser = require('cordova-common').ConfigParser;
26+
27+
var cfg = new ConfigParser(path.join(__dirname, '..', 'test-config.xml'));
28+
describe('webos project parser', function () {
29+
var proj = path.join('some', 'path');
30+
/* eslint-disable no-unused-vars */
31+
var exists;
32+
var exec;
33+
var custom;
34+
/* eslint-enable no-unused-vars */
35+
beforeEach(function () {
36+
exists = spyOn(fs, 'existsSync').and.returnValue(true);
37+
exec = spyOn(shell, 'exec').and.callFake(function (cmd, opts, cb) {
38+
cb(0, ''); // eslint-disable-line standard/no-callback-literal
39+
});
40+
custom = spyOn(config, 'has_custom_path').and.returnValue(false);
41+
});
42+
43+
describe('constructions', function () {
44+
it('should create an instance with a path', function () {
45+
expect(function () {
46+
var p = new webosParser(proj); // eslint-disable-line new-cap
47+
expect(p.path).toEqual(proj);
48+
}).not.toThrow();
49+
});
50+
});
51+
52+
describe('instance', function () {
53+
/* eslint-disable no-unused-vars */
54+
var p;
55+
var cp;
56+
var rm;
57+
var is_cordova;
58+
var write;
59+
var read;
60+
/* eslint-enable no-unused-vars */
61+
var wos_proj = path.join(proj, 'platforms', 'webos');
62+
beforeEach(function () {
63+
p = new webosParser(wos_proj); // eslint-disable-line new-cap
64+
cp = spyOn(shell, 'cp');
65+
rm = spyOn(shell, 'rm');
66+
is_cordova = spyOn(util, 'isCordova').and.returnValue(proj);
67+
write = spyOn(fs, 'writeFileSync');
68+
read = spyOn(fs, 'readFileSync').and.returnValue('');
69+
});
70+
71+
describe('update_from_config method', function () {
72+
beforeEach(function () {
73+
cfg.name = function () { return 'testname'; };
74+
cfg.packageName = function () { return 'testpkg'; };
75+
cfg.version = function () { return '1.0'; };
76+
});
77+
78+
/* it('should write appinfo.json', function() {
79+
//p.update_from_config(cfg);
80+
//expect(write.mostRecentCall.args[0]).toEqual('appinfo.json');
81+
}); */
82+
});
83+
});
84+
});
Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
/**
2-
Licensed to the Apache Software Foundation (ASF) under one
3-
or more contributor license agreements. See the NOTICE file
4-
distributed with this work for additional information
5-
regarding copyright ownership. The ASF licenses this file
6-
to you under the Apache License, Version 2.0 (the
7-
"License"); you may not use this file except in compliance
8-
with the License. You may obtain a copy of the License at
9-
10-
http://www.apache.org/licenses/LICENSE-2.0
11-
12-
Unless required by applicable law or agreed to in writing,
13-
software distributed under the License is distributed on an
14-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
KIND, either express or implied. See the License for the
16-
specific language governing permissions and limitations
17-
under the License.
18-
*/
19-
/* eslint-env jasmine */
20-
21-
var pluginSpec = require('../../../src/cordova/plugin/plugin_spec_parser');
22-
23-
describe('methods for parsing npm plugin packages', function () {
24-
function checkPluginSpecParsing (testString, scope, id, version) {
25-
var parsedSpec = pluginSpec.parse(testString);
26-
expect(parsedSpec.scope).toEqual(scope);
27-
expect(parsedSpec.id).toEqual(id || testString);
28-
expect(parsedSpec.version).toEqual(version);
29-
expect(parsedSpec.package).toEqual(scope ? scope + id : id);
30-
}
31-
32-
it('Test 001 : should handle package names with no scope or version', function () {
33-
checkPluginSpecParsing('test-plugin', null, 'test-plugin', null);
34-
});
35-
it('Test 002 : should handle package names with a version', function () {
36-
checkPluginSpecParsing('[email protected]', null, 'test-plugin', '1.0.0');
37-
checkPluginSpecParsing('test-plugin@latest', null, 'test-plugin', 'latest');
38-
});
39-
it('Test 003 : should handle package names with a scope', function () {
40-
checkPluginSpecParsing('@test/test-plugin', '@test/', 'test-plugin', null);
41-
});
42-
it('Test 004 : should handle package names with a scope and a version', function () {
43-
checkPluginSpecParsing('@test/[email protected]', '@test/', 'test-plugin', '1.0.0');
44-
checkPluginSpecParsing('@test/test-plugin@latest', '@test/', 'test-plugin', 'latest');
45-
});
46-
it('Test 005 : should handle invalid package specs', function () {
47-
checkPluginSpecParsing('@nonsense', null, null, null);
48-
checkPluginSpecParsing('@/nonsense', null, null, null);
49-
checkPluginSpecParsing('@', null, null, null);
50-
checkPluginSpecParsing('@nonsense@latest', null, null, null);
51-
checkPluginSpecParsing('@/@', null, null, null);
52-
checkPluginSpecParsing('/', null, null, null);
53-
checkPluginSpecParsing('../../@directory', null, null, null);
54-
checkPluginSpecParsing('@directory/../@directory', null, null, null);
55-
checkPluginSpecParsing('./directory', null, null, null);
56-
checkPluginSpecParsing('directory/directory', null, null, null);
57-
checkPluginSpecParsing('http://cordova.apache.org', null, null, null);
58-
});
59-
});
1+
/**
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
/* eslint-env jasmine */
20+
21+
var pluginSpec = require('../../../src/cordova/plugin/plugin_spec_parser');
22+
23+
describe('methods for parsing npm plugin packages', function () {
24+
function checkPluginSpecParsing (testString, scope, id, version) {
25+
var parsedSpec = pluginSpec.parse(testString);
26+
expect(parsedSpec.scope).toEqual(scope);
27+
expect(parsedSpec.id).toEqual(id || testString);
28+
expect(parsedSpec.version).toEqual(version);
29+
expect(parsedSpec.package).toEqual(scope ? scope + id : id);
30+
}
31+
32+
it('Test 001 : should handle package names with no scope or version', function () {
33+
checkPluginSpecParsing('test-plugin', null, 'test-plugin', null);
34+
});
35+
it('Test 002 : should handle package names with a version', function () {
36+
checkPluginSpecParsing('[email protected]', null, 'test-plugin', '1.0.0');
37+
checkPluginSpecParsing('test-plugin@latest', null, 'test-plugin', 'latest');
38+
});
39+
it('Test 003 : should handle package names with a scope', function () {
40+
checkPluginSpecParsing('@test/test-plugin', '@test/', 'test-plugin', null);
41+
});
42+
it('Test 004 : should handle package names with a scope and a version', function () {
43+
checkPluginSpecParsing('@test/[email protected]', '@test/', 'test-plugin', '1.0.0');
44+
checkPluginSpecParsing('@test/test-plugin@latest', '@test/', 'test-plugin', 'latest');
45+
});
46+
it('Test 005 : should handle invalid package specs', function () {
47+
checkPluginSpecParsing('@nonsense', null, null, null);
48+
checkPluginSpecParsing('@/nonsense', null, null, null);
49+
checkPluginSpecParsing('@', null, null, null);
50+
checkPluginSpecParsing('@nonsense@latest', null, null, null);
51+
checkPluginSpecParsing('@/@', null, null, null);
52+
checkPluginSpecParsing('/', null, null, null);
53+
checkPluginSpecParsing('../../@directory', null, null, null);
54+
checkPluginSpecParsing('@directory/../@directory', null, null, null);
55+
checkPluginSpecParsing('./directory', null, null, null);
56+
checkPluginSpecParsing('directory/directory', null, null, null);
57+
checkPluginSpecParsing('http://cordova.apache.org', null, null, null);
58+
});
59+
});

src/cordova/compile.js

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
/**
2-
Licensed to the Apache Software Foundation (ASF) under one
3-
or more contributor license agreements. See the NOTICE file
4-
distributed with this work for additional information
5-
regarding copyright ownership. The ASF licenses this file
6-
to you under the Apache License, Version 2.0 (the
7-
"License"); you may not use this file except in compliance
8-
with the License. You may obtain a copy of the License at
9-
10-
http://www.apache.org/licenses/LICENSE-2.0
11-
12-
Unless required by applicable law or agreed to in writing,
13-
software distributed under the License is distributed on an
14-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
KIND, either express or implied. See the License for the
16-
specific language governing permissions and limitations
17-
under the License.
18-
*/
19-
20-
var Q = require('q');
21-
var cordova_util = require('./util');
22-
var HooksRunner = require('../hooks/HooksRunner');
23-
var promiseUtil = require('../util/promise-util');
24-
var platform_lib = require('../platforms/platforms');
25-
var _ = require('underscore');
26-
27-
// Returns a promise.
28-
module.exports = function compile (options) {
29-
return Q()
30-
.then(function () {
31-
var projectRoot = cordova_util.cdProjectRoot();
32-
options = cordova_util.preProcessOptions(options);
33-
34-
var hooksRunner = new HooksRunner(projectRoot);
35-
return hooksRunner.fire('before_compile', options)
36-
.then(function () {
37-
return promiseUtil.Q_chainmap(options.platforms, function (platform) {
38-
return platform_lib
39-
.getPlatformApi(platform)
40-
.build(_.clone(options.options));
41-
});
42-
}).then(function () {
43-
return hooksRunner.fire('after_compile', options);
44-
});
45-
});
46-
};
1+
/**
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
20+
var Q = require('q');
21+
var cordova_util = require('./util');
22+
var HooksRunner = require('../hooks/HooksRunner');
23+
var promiseUtil = require('../util/promise-util');
24+
var platform_lib = require('../platforms/platforms');
25+
var _ = require('underscore');
26+
27+
// Returns a promise.
28+
module.exports = function compile (options) {
29+
return Q()
30+
.then(function () {
31+
var projectRoot = cordova_util.cdProjectRoot();
32+
options = cordova_util.preProcessOptions(options);
33+
34+
var hooksRunner = new HooksRunner(projectRoot);
35+
return hooksRunner.fire('before_compile', options)
36+
.then(function () {
37+
return promiseUtil.Q_chainmap(options.platforms, function (platform) {
38+
return platform_lib
39+
.getPlatformApi(platform)
40+
.build(_.clone(options.options));
41+
});
42+
}).then(function () {
43+
return hooksRunner.fire('after_compile', options);
44+
});
45+
});
46+
};

0 commit comments

Comments
 (0)