Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using single-quoted string instead of double-quoted ones

and no lines over 80 characters in the javascript code.
  • Loading branch information...
commit 5605f67640bef83dae8b93b6c046b34e32f6a4ab 1 parent 20dea20
David Haglund authored
16 app/js/controllers.js
View
@@ -45,7 +45,7 @@ var watchForms = {
function SearchCtrl($scope, $location) {
'use strict';
- $scope.user = "angular";
+ $scope.user = 'angular';
$scope.userSearch = function () {
$location.path(['', 'github', $scope.user, ''].join('/'));
@@ -84,9 +84,9 @@ function RepoCtrl($scope, $routeParams, githubResource) {
'use strict';
$scope.repoInfo = githubResource.get({
- "query": "repos",
- "user": $routeParams.user,
- "repo": $routeParams.repo
+ 'query': 'repos',
+ 'user': $routeParams.user,
+ 'repo': $routeParams.repo
});
$scope.watchForms = watchForms;
@@ -98,10 +98,10 @@ function ContribListCtrl($scope, $routeParams, githubResource) {
'use strict';
$scope.contributors = githubResource.get({
- "query": "repos",
- "user": $routeParams.user,
- "repo": $routeParams.repo,
- "spec": "contributors"
+ 'query': 'repos',
+ 'user': $routeParams.user,
+ 'repo': $routeParams.repo,
+ 'spec': 'contributors'
});
}
ContribListCtrl.$inject = ['$scope', '$routeParams', 'githubResource'];
11 test/e2e/app-e2e.js
View
@@ -10,10 +10,13 @@ angular.module('githubContributorsE2E', ['githubContributors', 'ngMockE2E'])
$httpBackend.whenJSONP(/https:\/\/api\.github\.com\/users\/bar\?/)
.respond(githubResponses.users_bar);
- $httpBackend.whenJSONP(/https:\/\/api\.github\.com\/users\/foo\/repos\?/)
- .respond(githubResponses.users_foo_repos);
- $httpBackend.whenJSONP(/https:\/\/api\.github\.com\/users\/bar\/repos\?/)
- .respond(githubResponses.users_bar_repos);
+ $httpBackend.whenJSONP(
+ /https:\/\/api\.github\.com\/users\/foo\/repos\?/
+ ).respond(githubResponses.users_foo_repos);
+
+ $httpBackend.whenJSONP(
+ /https:\/\/api\.github\.com\/users\/bar\/repos\?/
+ ).respond(githubResponses.users_bar_repos);
$httpBackend.whenJSONP(
/https:\/\/api\.github\.com\/repos\/foo\/repoA\?/
6 test/e2e/scenarios.js
View
@@ -97,11 +97,11 @@ describe('GitHub Contributors with mocked data', function () {
expect(repoNameLink.row(2)).toEqual(['repoA']);
expect(element('li:nth-child(1) a').attr('href'))
- .toBe("#/github/foo/repoC/");
+ .toBe('#/github/foo/repoC/');
expect(element('li:nth-child(2) a').attr('href'))
- .toBe("#/github/foo/repoB/");
+ .toBe('#/github/foo/repoB/');
expect(element('li:nth-child(3) a').attr('href'))
- .toBe("#/github/foo/repoA/");
+ .toBe('#/github/foo/repoA/');
});
it('should show description if available', function () {
4 test/unit/controllersSpec.js
View
@@ -9,8 +9,8 @@ describe('GitHub Contributors controllers', function () {
ctrl, verifyRequestAndModel,
testUser = 'foo',
anotherUser = 'bar',
- testRepo = "angular",
- anotherRepo = "baz",
+ testRepo = 'angular',
+ anotherRepo = 'baz',
fakeData = ['resonse one'],
otherFakeData = ['another respone'],
baseUrl = 'https://api.github.com/',
Please sign in to comment.
Something went wrong with that request. Please try again.