Skip to content

Commit

Permalink
Fix format; "=>'
Browse files Browse the repository at this point in the history
clang-format updated to v1.0.36 which checks double quotation.
  • Loading branch information
f-higashi committed Mar 15, 2016
1 parent 1ff3fa9 commit a484259
Show file tree
Hide file tree
Showing 22 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions build/gocommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ function checkGoVersion() {
if (semver.lt(currentGoVersion, minGoVersion)) {
deferred.reject(
new Error(
`The current go version "${currentGoVersion}" is older than ` +
`the minimum required version "${minGoVersion}". ` +
`The current go version '${currentGoVersion}' is older than ` +
`the minimum required version '${minGoVersion}'. ` +
`Please upgrade your go version!`));
return;
}
Expand Down
2 changes: 1 addition & 1 deletion build/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gulp.task('styles', function() {
.pipe(gulpSourcemaps.init())
.pipe(gulpSass(sassOptions))
.pipe(gulpAutoprefixer())
.pipe(gulpSourcemaps.write("."))
.pipe(gulpSourcemaps.write('.'))
.pipe(gulp.dest(conf.paths.serve))
// If BrowserSync is running, inform it that styles have changed.
.pipe(browserSyncInstance.stream());
Expand Down
2 changes: 1 addition & 1 deletion src/app/frontend/deploy/deploy_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default class DeployController {
* represents the default selection.
* @export {string}
*/
this.selection = "Settings";
this.selection = 'Settings';

/** @private {!ui.router.$state} */
this.state_ = $state;
Expand Down
2 changes: 1 addition & 1 deletion src/app/frontend/deploy/deploylabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class DeployLabel {
value(newValue) {
if (this.derivedValueGetter_ !== undefined) {
if (newValue !== undefined) {
throw Error("Can not set value of derived label.");
throw Error('Can not set value of derived label.');
}

return this.derivedValueGetter_(this.key);
Expand Down
4 changes: 2 additions & 2 deletions src/app/frontend/deploy/deploylabel_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class DeployLabelController {
/** @type {boolean} */
let isPrefixed = PrefixPattern.test(this.label.key);
/** @type {number} */
let slashPosition = isPrefixed ? this.label.key.indexOf("/") : -1;
let slashPosition = isPrefixed ? this.label.key.indexOf('/') : -1;

/** @type {boolean} */
let isUnique = !this.isKeyDuplicated_();
Expand Down Expand Up @@ -165,7 +165,7 @@ export default class DeployLabelController {
/** @type {!RegExp} */
let labelKeyPrefixPattern = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/;
/** @type {string} */
let labelPrefix = isPrefixed ? this.label.key.substring(0, slashPosition) : "valid-pattern";
let labelPrefix = isPrefixed ? this.label.key.substring(0, slashPosition) : 'valid-pattern';

return (labelKeyPrefixPattern.test(labelPrefix));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ describe('Middle ellipsis', () => {
}

return angular.element(`
<div style="width: ${availableWidth}px; display: block;" id="fixture">
<div style="width: 100%; display: block;" class="kd-middleellipsis-container">
<span class="kd-middleellipsis">${displayText}</span>
<div style='width: ${availableWidth}px; display: block;' id='fixture'>
<div style='width: 100%; display: block;' class='kd-middleellipsis-container'>
<span class='kd-middleellipsis'>${displayText}</span>
</div>
</div>`);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/frontend/common/docker/dockerimagereference_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('DokcerImageReference', () => {

it('should return empty string when containerImage is empty', () => {
// given
let reference = "";
let reference = '';

// when
let result = new DockerImageReference(reference).tag();
Expand Down Expand Up @@ -160,7 +160,7 @@ describe('DokcerImageReference', () => {

it('should retrun empty when containerImage is not empty and ends with `:` delimiter', () => {
// given
let reference = "test:";
let reference = 'test:';

// when
let result = new DockerImageReference(reference).tag();
Expand All @@ -171,7 +171,7 @@ describe('DokcerImageReference', () => {

it('should retrun empty when containerImage is not empty and ends with `/` delimiter', () => {
// given
let reference = "test/";
let reference = 'test/';

// when
let result = new DockerImageReference(reference).tag();
Expand Down
4 changes: 2 additions & 2 deletions src/test/frontend/common/errorhandling/errorhandling_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ describe('Errorhandling service', () => {
it('should show error title and error message in the md dialog', () => {
spyOn(mdDialog, 'show');
/** @type {string} */
let errorTitle = "Error title";
let errorTitle = 'Error title';
/** @type {string} */
let errorMessage = "Error message";
let errorMessage = 'Error message';
// open the error dialog
errorDialog.open(errorTitle, errorMessage);
// and expect it to show
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,37 @@ describe('Apply ellipsis filter', () => {
it('has a applyMiddleEllipsis filter',
angular.mock.inject(function($filter) { expect($filter('middleEllipsis')).not.toBeNull(); }));

it("should return the same value if max parameter is undefined",
it('should return the same value if max parameter is undefined',
angular.mock.inject(function(middleEllipsisFilter) {
expect(middleEllipsisFilter(testedString)).toEqual('podName');
}));

it("should return the same value if length less then given max length parameter",
it('should return the same value if length less then given max length parameter',
angular.mock.inject(function(middleEllipsisFilter) {
expect(middleEllipsisFilter(testedString, 10)).toEqual('podName');
}));

it("should return the same value when max = 0",
it('should return the same value when max = 0',
angular.mock.inject(function(middleEllipsisFilter) {
expect(middleEllipsisFilter(testedString, 0)).toEqual('podName');
}));

it("should return truncated value with ellipsis as tail",
it('should return truncated value with ellipsis as tail',
angular.mock.inject(function(middleEllipsisFilter) {
expect(middleEllipsisFilter(testedString, 1)).toEqual('p...');
}));

it("should return truncated value with the ellipsis in the middle",
it('should return truncated value with the ellipsis in the middle',
angular.mock.inject(function(middleEllipsisFilter) {
expect(middleEllipsisFilter(testedString, 2)).toEqual('p...e');
}));

it("should return truncated value with the ellipsis in the middle",
it('should return truncated value with the ellipsis in the middle',
angular.mock.inject(function(middleEllipsisFilter) {
expect(middleEllipsisFilter(testedString, 3)).toEqual('po...e');
}));

it("should return truncated value with the ellipsis in the middle",
it('should return truncated value with the ellipsis in the middle',
angular.mock.inject(function(middleEllipsisFilter) {
expect(middleEllipsisFilter(testedString, 5)).toEqual('pod...me');
}));
Expand Down
30 changes: 15 additions & 15 deletions src/test/frontend/common/filters/relativetime_filter_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual(`didn't happen yet`);
});

it("should return 'just now' string if given time is the same as current time", () => {
it('should return \'just now\' string if given time is the same as current time', () => {
// when
let relativeTime = relativeTimeFilter(givenTime);

// then
expect(relativeTime).toEqual('just now');
});

it("should return 'a second' string if given time is a second before current time", () => {
it('should return \'a second\' string if given time is a second before current time', () => {
// given
givenTime.setSeconds(givenTime.getSeconds() - 1);

Expand All @@ -69,7 +69,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('a second');
});

it("should return '15 seconds' string if given time is 15 seconds before current time", () => {
it('should return \'15 seconds\' string if given time is 15 seconds before current time', () => {
// given
givenTime.setSeconds(givenTime.getSeconds() - 15);

Expand All @@ -80,7 +80,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('15 seconds');
});

it("should return 'a minute' string if given time is a minute before current time", () => {
it('should return \'a minute\' string if given time is a minute before current time', () => {
// given
givenTime.setMinutes(givenTime.getMinutes() - 1);

Expand All @@ -91,7 +91,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('a minute');
});

it("should return '30 minutes' string if given time is 30 minutes before current time", () => {
it('should return \'30 minutes\' string if given time is 30 minutes before current time', () => {
// given
givenTime.setMinutes(givenTime.getMinutes() - 30);

Expand All @@ -102,7 +102,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('30 minutes');
});

it("should return 'an hour' string if given time is an hour before current time", () => {
it('should return \'an hour\' string if given time is an hour before current time', () => {
// given
givenTime.setHours(givenTime.getHours() - 1);

Expand All @@ -113,7 +113,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('an hour');
});

it("should return '3 hours' string if given time is 3 hours before current time", () => {
it('should return \'3 hours\' string if given time is 3 hours before current time', () => {
// given
givenTime.setHours(givenTime.getHours() - 3);

Expand All @@ -124,7 +124,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('3 hours');
});

it("should return 'a day' string if given time is a day before current time", () => {
it('should return \'a day\' string if given time is a day before current time', () => {
// given
givenTime.setDate(givenTime.getDate() - 1);

Expand All @@ -135,7 +135,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('a day');
});

it("should return '8 days' string if given time is 8 days before current time", () => {
it('should return \'8 days\' string if given time is 8 days before current time', () => {
// given
givenTime.setDate(givenTime.getDate() - 8);

Expand All @@ -146,7 +146,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('8 days');
});

it("should return 'a month' string if given time is a month before current time", () => {
it('should return \'a month\' string if given time is a month before current time', () => {
// given
givenTime.setMonth(givenTime.getMonth() - 1);

Expand All @@ -157,7 +157,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('a month');
});

it("should return '11 months' string if given time is 11 months before current time", () => {
it('should return \'11 months\' string if given time is 11 months before current time', () => {
// given
givenTime.setMonth(givenTime.getMonth() - 11);

Expand All @@ -168,7 +168,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('11 months');
});

it("should return 'a year' string if given time is a year before current time", () => {
it('should return \'a year\' string if given time is a year before current time', () => {
// given
givenTime.setYear(givenTime.getFullYear() - 1);

Expand All @@ -179,7 +179,7 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('a year');
});

it("should return '134 years' string if given time is 134 years before current time", () => {
it('should return \'134 years\' string if given time is 134 years before current time', () => {
// given
givenTime.setYear(givenTime.getFullYear() - 134);

Expand All @@ -190,8 +190,8 @@ describe('Relative time filter', () => {
expect(relativeTime).toEqual('134 years');
});

it("should return '11 months' string if given time is 11 months, 7 days, 5 hours and 3 minutes" +
" before current time",
it('should return \'11 months\' string if given time is 11 months, 7 days, 5 hours and 3 minutes' +
' before current time',
() => {
// given
givenTime.setMonth(givenTime.getMonth() - 11);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Validate directive', () => {
it('should throw an error when wrong type is provided', () => {
// given
let typeName = 'invalid';
let compileFn = compile(`<input ng-model="replicas" type="number"kd-validate="${typeName}">`);
let compileFn = compile(`<input ng-model='replicas' type='number'kd-validate='${typeName}'>`);

// when and then
expect(() => {
Expand Down
18 changes: 9 additions & 9 deletions src/test/frontend/deploy/createnamespace_controller_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ describe('Create-Namespace dialog', () => {
let rule = ctrl.namespacePattern;

// then the following names should be accepted
expect("mynamspace".match(rule)).toBeDefined();
expect("my-namspace-with-dashes".match(rule)).toBeDefined();
expect("my-namspace-with-numbers-234".match(rule)).toBeDefined();
expect('mynamspace'.match(rule)).toBeDefined();
expect('my-namspace-with-dashes'.match(rule)).toBeDefined();
expect('my-namspace-with-numbers-234'.match(rule)).toBeDefined();
});

it('should validate inproper names as incorrect', () => {
// given the k8s rule for namespace names
let rule = ctrl.namespacePattern;

// then the following names should be rejected
expect("mynamspace-with-illegal-chars-§$".match(rule)).toBeNull();
expect("-mynamspace-with-dash-prefix".match(rule)).toBeNull();
expect("mynamspace-with-dash-suffix-".match(rule)).toBeNull();
expect("mynamspace-with-german-umlaut-ÖÄ".match(rule)).toBeNull();
expect("my namspace with spaces".match(rule)).toBeNull();
expect(" ".match(rule)).toBeNull();
expect('mynamspace-with-illegal-chars-§$'.match(rule)).toBeNull();
expect('-mynamspace-with-dash-prefix'.match(rule)).toBeNull();
expect('mynamspace-with-dash-suffix-'.match(rule)).toBeNull();
expect('mynamspace-with-german-umlaut-ÖÄ'.match(rule)).toBeNull();
expect('my namspace with spaces'.match(rule)).toBeNull();
expect(' '.match(rule)).toBeNull();
});

it('should not submit if the form has validation errors', () => {
Expand Down
32 changes: 16 additions & 16 deletions src/test/frontend/deploy/createsecret_controller_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@ describe('Create-Secret dialog', () => {
let rule = ctrl.secretNamePattern;

// then the following secret names should be accepted
expect("mysecret".match(rule)).toBeDefined();
expect("my.secret.com".match(rule)).toBeDefined();
expect("my-secret32.com".match(rule)).toBeDefined();
expect('mysecret'.match(rule)).toBeDefined();
expect('my.secret.com'.match(rule)).toBeDefined();
expect('my-secret32.com'.match(rule)).toBeDefined();
});

it('should validate inproper secret names as incorrect', () => {
// given the k8s rule for secret names
let rule = ctrl.secretNamePattern;

// then the following secret names should be rejected
expect("illegalsecret§$".match(rule)).toBeNull();
expect(".dotpreffix.com".match(rule)).toBeNull();
expect("dotsuffix.com.".match(rule)).toBeNull();
expect("-dashprefix.com".match(rule)).toBeNull();
expect("dashsuffix-".match(rule)).toBeNull();
expect("umlautsÖÄ.not.allowed".match(rule)).toBeNull();
expect("name with spaces".match(rule)).toBeNull();
expect(" ".match(rule)).toBeNull();
expect('illegalsecret§$'.match(rule)).toBeNull();
expect('.dotpreffix.com'.match(rule)).toBeNull();
expect('dotsuffix.com.'.match(rule)).toBeNull();
expect('-dashprefix.com'.match(rule)).toBeNull();
expect('dashsuffix-'.match(rule)).toBeNull();
expect('umlautsÖÄ.not.allowed'.match(rule)).toBeNull();
expect('name with spaces'.match(rule)).toBeNull();
expect(' '.match(rule)).toBeNull();
});

/**
Expand All @@ -79,10 +79,10 @@ describe('Create-Secret dialog', () => {
let rule = ctrl.dataPattern;

// then the following data strings should be rejected
expect("aaa".match(rule)).toBeNull();
expect("=asd8".match(rule)).toBeNull();
expect("==aaa".match(rule)).toBeNull();
expect("abcde".match(rule)).toBeNull();
expect('aaa'.match(rule)).toBeNull();
expect('=asd8'.match(rule)).toBeNull();
expect('==aaa'.match(rule)).toBeNull();
expect('abcde'.match(rule)).toBeNull();
});

it('should not submit if the form has validation errors', () => {
Expand All @@ -99,7 +99,7 @@ describe('Create-Secret dialog', () => {
// given no validation error in the html form
ctrl.secretForm = {};
ctrl.secretForm.$valid = true;
ctrl.secretName = "mysecret";
ctrl.secretName = 'mysecret';
ctrl.data = `eyAiaHR0cHM6Ly9pbmRleC5kb2NrZXIuaW8` + `vdjEvIjogeyAiYXV0aCI6ICJabUZyWlhCaG` +
`MzTjNiM0prTVRJSyIsICJlbWFpbCI6` + `ICJqZG9lQGV4YW1wbGUuY29tIiB9IH0K`;
httpBackend
Expand Down
Loading

0 comments on commit a484259

Please sign in to comment.