Skip to content

Commit ec86bb6

Browse files
committed
Conflicts: appveyor.yml
2 parents cce3b36 + 0b87cc5 commit ec86bb6

File tree

10 files changed

+10547
-13
lines changed

10 files changed

+10547
-13
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
language: node_js
22
node_js:
3-
- "0.10"
3+
- '0.10'
44
before_script:
5-
- npm install -g grunt-cli
5+
- npm install -g grunt-cli
6+
env:
7+
global:
8+
- secure: OUooygPgokU2pa5FmVKb5tEQ+NjrUS7vr2al2MYqQDi7VOViOkKiP+1TMKDaPEo3+H3BQlsRd/HxItSCucg5Wy+45pMsTnYgR0Lsp2zmcuHmY67EPOM3B6bdCyPtB5VokrpO3O+uBTtMPAKS/sQq62gKV5Xq/K1t5CQ31EgfCd4=
9+
- secure: P/+5dvk3zwkDnUmNCEX8fgNkLAQ5s6j+dR4h3Zn5UJBBUKSZaz1QbfEX+uZ5Rn4l4aRGdvG2PGStySiS/MHmPKhWJfMMEkSFjERLUF07U2gLSkn1UOQeh0zBWIb5TehwIuuTNPmOoSE/7xgmXwF83Dq8ALjDCmo6VrtoZes9E2g=

Gruntfile.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ module.exports = function(grunt) {
3232
grunt.registerTask('hooks', ['githooks:all']);
3333

3434
// test
35-
grunt.registerTask('test', ['jshint:all', 'mochaTest:unit', 'mochaTest:acceptance']);
35+
grunt.registerTask('sauce', ['karma:sauce-linux', 'karma:sauce-osx', 'karma:sauce-windows']);
36+
grunt.registerTask('test-local', ['jshint:all', 'mochaTest:unit', 'mochaTest:acceptance', 'karma:local']);
37+
grunt.registerTask('test', ['jshint:all', 'mochaTest:unit', 'mochaTest:acceptance', 'sauce']);
38+
grunt.registerTask('test-windows', ['jshint:all', 'mochaTest:unit', 'mochaTest:acceptance']);
3639

3740
// custom tasks
3841
grunt.registerTask('build', 'Builds and minifies the oc-client component', function(){
@@ -73,7 +76,7 @@ module.exports = function(grunt) {
7376
fs.writeJsonSync('package.json', taskObject.pkg);
7477

7578
grunt.task.run([
76-
'test',
79+
'test-local',
7780
'build'
7881
]);
7982
});

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ An experimental framework to serve as proof of concept for a robust, resilient,
55

66
Node version: **0.10.35** required
77

8+
[![NPM](https://nodei.co/npm/oc.png?downloads=true)](https://npmjs.org/package/oc)
9+
810
Build status: Linux: [![Build Status](https://secure.travis-ci.org/opentable/oc.png?branch=master)](http://travis-ci.org/opentable/oc) | Windows: [![Build status](https://ci.appveyor.com/api/projects/status/8cklgw4hymutqrsg?svg=true)](https://ci.appveyor.com/project/matteofigus/oc)
911

10-
[![NPM](https://nodei.co/npm/oc.png?downloads=true)](https://npmjs.org/package/oc)
12+
Front-end:
13+
14+
[![Sauce Test Status](https://saucelabs.com/browser-matrix/matteofigus.svg)](https://saucelabs.com/u/matteofigus)
1115

1216
#Index
1317

grunt-tasks/jshint.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ module.exports = {
44
options: {
55
jshintrc: '.jshintrc',
66
ignores: [
7-
'node_modules',
8-
'client/oc-client.min.js',
9-
'components/oc-client/src/head.load.js',
10-
'components/oc-client/src/oc-client.min.js',
11-
'components/oc-client/_package/**/*',
12-
'components/base-component-handlebars/_package/**/*',
13-
'components/base-components-jade/_package/**/*',
14-
'test/fixtures']
7+
'node_modules',
8+
'client/oc-client.min.js',
9+
'components/oc-client/src/head.load.js',
10+
'components/oc-client/src/oc-client.min.js',
11+
'components/oc-client/_package/**/*',
12+
'components/base-component-handlebars/_package/**/*',
13+
'components/base-components-jade/_package/**/*',
14+
'test/fixtures',
15+
'test/front-end',
16+
'test/configuration'
17+
]
1518
},
1619
all: ['.']
1720
};

grunt-tasks/karma.js

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
'use strict';
2+
3+
var _ = require('underscore');
4+
5+
var customLaunchers = {
6+
linux: {
7+
'SL_Chrome_Linux': {
8+
base: 'SauceLabs',
9+
browserName: 'chrome',
10+
platform: 'Linux',
11+
version: '41'
12+
},
13+
'SL_Firefox_Linux': {
14+
base: 'SauceLabs',
15+
browserName: 'firefox',
16+
platform: 'Linux',
17+
version: '36'
18+
},
19+
'SL_Android_Linux': {
20+
base: 'SauceLabs',
21+
browserName: 'android',
22+
platform: 'Linux',
23+
version: '4.4',
24+
deviceName: 'Android Emulator',
25+
'device-orientation': 'portrait'
26+
}
27+
},
28+
windows: {
29+
'SL_IE11_Windows_8.1': {
30+
base: 'SauceLabs',
31+
browserName: 'internet explorer',
32+
platform: 'Windows 8.1',
33+
version: '11'
34+
},
35+
'SL_IE10_Windows_8': {
36+
base: 'SauceLabs',
37+
browserName: 'internet explorer',
38+
platform: 'Windows 8',
39+
version: '10'
40+
},
41+
'SL_IE9_Windows_7': {
42+
base: 'SauceLabs',
43+
browserName: 'internet explorer',
44+
platform: 'Windows 7',
45+
version: '9'
46+
},
47+
'SL_IE8_Windows_7': {
48+
base: 'SauceLabs',
49+
browserName: 'internet explorer',
50+
platform: 'Windows XP',
51+
version: '8'
52+
}
53+
},
54+
osx: {
55+
'SL_Safari_Yosemite': {
56+
base: 'SauceLabs',
57+
browserName: 'safari',
58+
platform: 'OS X 10.10',
59+
version: '8'
60+
},
61+
'SL_Ipad': {
62+
base: 'SauceLabs',
63+
browserName: 'ipad',
64+
platform: 'OS X 10.10',
65+
version: '8',
66+
'device-orientation': 'portrait'
67+
},
68+
'SL_Iphone': {
69+
base: 'SauceLabs',
70+
browserName: 'iphone',
71+
deviceName: 'iPhone Simulator',
72+
platform: 'OS X 10.10',
73+
version: '8',
74+
'device-orientation': 'portrait'
75+
}
76+
}
77+
};
78+
79+
module.exports = {
80+
options: {
81+
configFile: 'test/configuration/karma-sauce.js',
82+
singleRun: true
83+
},
84+
dev: {
85+
configFile: 'test/configuration/karma-local.js',
86+
singleRun: false,
87+
autoWatch: true
88+
},
89+
'sauce-linux': {
90+
customLaunchers: customLaunchers.linux,
91+
browsers: _.keys(customLaunchers.linux)
92+
},
93+
'sauce-windows': {
94+
customLaunchers: customLaunchers.windows,
95+
browsers: _.keys(customLaunchers.windows)
96+
},
97+
'sauce-osx': {
98+
customLaunchers: customLaunchers.osx,
99+
browsers: _.keys(customLaunchers.osx)
100+
},
101+
local: {
102+
configFile: 'test/configuration/karma-local.js',
103+
singleRun: true
104+
}
105+
};

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,15 @@
3333
"grunt": "0.4.5",
3434
"grunt-contrib-jshint": "0.10.0",
3535
"grunt-githooks": "0.3.1",
36+
"grunt-karma": "^0.10.1",
3637
"grunt-mocha-test": "0.6.2",
3738
"injectr": "0.5.1",
39+
"jasmine-core": "^2.2.0",
40+
"karma": "^0.12.31",
41+
"karma-jasmine": "^0.3.5",
42+
"karma-phantomjs-launcher": "^0.1.4",
43+
"karma-sauce-launcher": "^0.2.10",
44+
"karma-sinon": "^1.0.4",
3845
"load-grunt-tasks": "0.6.0",
3946
"mocha": "1.18.2",
4047
"sinon": "1.12.1"

0 commit comments

Comments
 (0)