diff --git a/dist/jquery.github.js b/dist/jquery.github.js index a3e88a1..27e6de9 100644 --- a/dist/jquery.github.js +++ b/dist/jquery.github.js @@ -1,5 +1,5 @@ /* - * jquery-github - v0.3.4 + * jquery-github - v0.4.0 * A jQuery plugin to display your Github Repositories. * https://github.com/zenorocha/jquery-github * diff --git a/dist/jquery.github.min.js b/dist/jquery.github.min.js index 3f350b3..4d06fc4 100644 --- a/dist/jquery.github.min.js +++ b/dist/jquery.github.min.js @@ -1,5 +1,5 @@ /* - * jquery-github - v0.3.4 + * jquery-github - v0.4.0 * A jQuery plugin to display your Github Repositories. * https://github.com/zenorocha/jquery-github * diff --git a/spec/jquery.github.repo-spec.js b/spec/jquery.github.repo-spec.js index 0169e4e..28c4d12 100644 --- a/spec/jquery.github.repo-spec.js +++ b/spec/jquery.github.repo-spec.js @@ -6,10 +6,10 @@ describe("jquery.github.repo", function() { instance = new GithubRepo({ name: "jquery-github", description: "A jQuery plugin to display your Github Repositories", - forks: 33, + forks_count: 33, pushed_at: "2013-07-02T12:08:36Z", url: "https://api.github.com/repos/zenorocha/jquery-github", - stargazers: 131 + stargazers_count: 131 }); }); @@ -34,11 +34,6 @@ describe("jquery.github.repo", function() { .toEqual("2013-07-02T12:08:36Z"); }); - it("should be repository's api url", function() { - expect(instance.url) - .toEqual("https://api.github.com/repos/zenorocha/jquery-github"); - }); - it("should be repository's number of stargazers", function() { expect(instance.stargazers) .toEqual(131); @@ -52,14 +47,4 @@ describe("jquery.github.repo", function() { }); }); - describe("execute _parseURL()", function() { - it("should parse repository's url attribute", function() { - expect(instance._parseURL(instance.url)) - .toEqual("https://github.com/zenorocha/jquery-github"); - }); - }); - - describe("execute toHTML()", function() { - // TODO - }); }); diff --git a/src/jquery.github.js b/src/jquery.github.js index 1fadfa9..97f0871 100644 --- a/src/jquery.github.js +++ b/src/jquery.github.js @@ -6,14 +6,13 @@ function GithubRepo( repo ) { this.name = repo.name; this.open_issues = repo.open_issues; this.pushed_at = repo.pushed_at; - this.url = repo.url; + this.url = repo.html_url; this.stargazers = repo.stargazers_count; } // Parses HTML template GithubRepo.prototype.toHTML = function () { - this.pushed_at = this._parsePushedDate( this.pushed_at ), - this.url = this._parseURL( this.url ); + this.pushed_at = this._parsePushedDate( this.pushed_at ); return $( "