octokit 1.9.3 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,10 +3,6 @@ matrix:
3
3
  allow_failures:
4
4
  - rvm: ruby-head
5
5
  rvm:
6
- - rbx-18mode
7
- - rbx-19mode
8
- - jruby-18mode
9
- - jruby-19mode
10
6
  - 1.8.7
11
7
  - 1.9.2
12
8
  - 1.9.3
@@ -1,5 +1,6 @@
1
1
  # CHANGELOG
2
2
 
3
+ * [1.9.4 - August 6, 2012](https://github.com/pengwynn/octokit/compare/v1.9.3...v1.9.4)
3
4
  * [1.9.3 - July 27, 2012](https://github.com/pengwynn/octokit/compare/v1.9.2...v1.9.3)
4
5
  * [1.9.2 - July 25, 2012](https://github.com/pengwynn/octokit/compare/v1.9.1...v1.9.2)
5
6
  * [1.9.1 - July 11, 2012](https://github.com/pengwynn/octokit/compare/v1.8.1...v1.9.1)
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
- # Octokit [![Build Status](https://secure.travis-ci.org/pengwynn/octokit.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/pengwynn/octokit.png?travis)][gemnasium]
1
+ # Octokit [![Build Status](https://secure.travis-ci.org/pengwynn/octokit.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/pengwynn/octokit.png?travis)][gemnasium] [![Code Climate](https://codeclimate.com/badge.png)][codeclimate]
2
2
  Simple Ruby wrapper for the GitHub v3 API.
3
3
 
4
4
  [travis]: http://travis-ci.org/pengwynn/octokit
5
5
  [gemnasium]: https://gemnasium.com/pengwynn/octokit
6
+ [codeclimate]: https://codeclimate.com/github/pengwynn/octokit
6
7
 
7
8
  ## Installation
8
9
  gem install octokit
@@ -98,19 +99,11 @@ end
98
99
 
99
100
  ## Supported Ruby Versions
100
101
  This library aims to support and is [tested against][travis] the following Ruby
101
- implementations:
102
+ versions:
102
103
 
103
104
  * Ruby 1.8.7
104
105
  * Ruby 1.9.2
105
106
  * Ruby 1.9.3
106
- * [JRuby][]
107
- * [Rubinius][]
108
-
109
- [jruby]: http://www.jruby.org/
110
- [rubinius]: http://rubini.us/
111
-
112
- If something doesn't work on one of these interpreters, it should be considered
113
- a bug.
114
107
 
115
108
  This library may inadvertently work (or seem to work) on other Ruby
116
109
  implementations, however support will only be provided for the versions listed
@@ -13,7 +13,7 @@ module Octokit
13
13
  # @see http://developer.github.com/v3/repos/commits/
14
14
  def commits(repo, sha_or_branch="master", options={})
15
15
  params = { :sha => sha_or_branch, :per_page => 35 }
16
- get("repos/#{Repository.new(repo)}/commits", options.merge(params), 3)
16
+ get("repos/#{Repository.new(repo)}/commits", params.merge(options), 3)
17
17
  end
18
18
  alias :list_commits :commits
19
19
 
@@ -82,6 +82,17 @@ module Octokit
82
82
  get("repos/#{Repository.new(repo)}/comments/#{id}", options, 3)
83
83
  end
84
84
 
85
+ # Compare two commits
86
+ #
87
+ # @param repo [String, Hash, Repository] A GitHub repository
88
+ # @param base [String] The sha of the starting commit
89
+ # @param end [String] The sha of the ending commit
90
+ # @return [Hashie::Mash] A hash representing the comparison
91
+ # @see http://developer.github.com/v3/repos/commits/
92
+ def compare(repo, start, endd, options={})
93
+ get("repos/#{Repository.new(repo)}/compare/#{start}...#{endd}", options, 3)
94
+ end
95
+
85
96
  end
86
97
  end
87
98
  end
@@ -1,3 +1,3 @@
1
1
  module Octokit
2
- VERSION = "1.9.3" unless defined?(Octokit::VERSION)
2
+ VERSION = "1.9.4" unless defined?(Octokit::VERSION)
3
3
  end
@@ -0,0 +1,98 @@
1
+ {"ahead_by": 0,
2
+ "files": [],
3
+ "merge_base_commit":
4
+ {"sha": "b7b37f75a80b8e84061cd45b246232ad958158f5",
5
+ "author":
6
+ {"id": 10308,
7
+ "login": "sferik",
8
+ "avatar_url":
9
+ "https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
10
+ "url": "https://api.github.com/users/sferik",
11
+ "gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb"},
12
+ "commit":
13
+ {"comment_count": 0,
14
+ "author":
15
+ {"name": "Erik Michaels-Ober",
16
+ "email": "sferik@gmail.com",
17
+ "date": "2012-07-27T10:23:34-07:00"},
18
+ "committer":
19
+ {"name": "Erik Michaels-Ober",
20
+ "email": "sferik@gmail.com",
21
+ "date": "2012-07-27T10:23:34-07:00"},
22
+ "url":
23
+ "https://api.github.com/repos/gvaughn/octokit/git/commits/b7b37f75a80b8e84061cd45b246232ad958158f5",
24
+ "message":
25
+ "Merge pull request #117 from lanej/master\n\nallow override of the per_page parameter from Client#commits",
26
+ "tree":
27
+ {"sha": "9c5df3c0f203bfe8c09d4da7b0795cdf6f1a1d5e",
28
+ "url":
29
+ "https://api.github.com/repos/gvaughn/octokit/git/trees/9c5df3c0f203bfe8c09d4da7b0795cdf6f1a1d5e"}},
30
+ "committer":
31
+ {"id": 10308,
32
+ "login": "sferik",
33
+ "avatar_url":
34
+ "https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
35
+ "url": "https://api.github.com/users/sferik",
36
+ "gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb"},
37
+ "parents":
38
+ [{"sha": "2f6c36319af163acdefdd05e016d40b65e3a482c",
39
+ "url":
40
+ "https://api.github.com/repos/gvaughn/octokit/commits/2f6c36319af163acdefdd05e016d40b65e3a482c"},
41
+ {"sha": "7950a0287f12419f00487b518dd8221a87e559da",
42
+ "url":
43
+ "https://api.github.com/repos/gvaughn/octokit/commits/7950a0287f12419f00487b518dd8221a87e559da"}],
44
+ "url":
45
+ "https://api.github.com/repos/gvaughn/octokit/commits/b7b37f75a80b8e84061cd45b246232ad958158f5"},
46
+ "permalink_url":
47
+ "https://github.com/gvaughn/octokit/compare/gvaughn:0e0d7ae...gvaughn:b7b37f7",
48
+ "diff_url":
49
+ "https://github.com/gvaughn/octokit/compare/0e0d7ae299514da692eb1cab741562c253d44188...b7b37f75a80b8e84061cd45b246232ad958158f5.diff",
50
+ "commits": [],
51
+ "total_commits": 0,
52
+ "behind_by": 2,
53
+ "base_commit":
54
+ {"sha": "0e0d7ae299514da692eb1cab741562c253d44188",
55
+ "author":
56
+ {"id": 10308,
57
+ "login": "sferik",
58
+ "avatar_url":
59
+ "https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
60
+ "url": "https://api.github.com/users/sferik",
61
+ "gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb"},
62
+ "commit":
63
+ {"comment_count": 0,
64
+ "author":
65
+ {"name": "Erik Michaels-Ober",
66
+ "email": "sferik@gmail.com",
67
+ "date": "2012-07-27T10:31:34-07:00"},
68
+ "committer":
69
+ {"name": "Erik Michaels-Ober",
70
+ "email": "sferik@gmail.com",
71
+ "date": "2012-07-27T10:31:34-07:00"},
72
+ "url":
73
+ "https://api.github.com/repos/gvaughn/octokit/git/commits/0e0d7ae299514da692eb1cab741562c253d44188",
74
+ "message": "Add CodeClimate badge",
75
+ "tree":
76
+ {"sha": "841640f89489414c6d09ff06a72deab1502d7107",
77
+ "url":
78
+ "https://api.github.com/repos/gvaughn/octokit/git/trees/841640f89489414c6d09ff06a72deab1502d7107"}},
79
+ "committer":
80
+ {"id": 10308,
81
+ "login": "sferik",
82
+ "avatar_url":
83
+ "https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
84
+ "url": "https://api.github.com/users/sferik",
85
+ "gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb"},
86
+ "parents":
87
+ [{"sha": "a7e1ca21c9de24743f3c6f840b96711c0baa0890",
88
+ "url":
89
+ "https://api.github.com/repos/gvaughn/octokit/commits/a7e1ca21c9de24743f3c6f840b96711c0baa0890"}],
90
+ "url":
91
+ "https://api.github.com/repos/gvaughn/octokit/commits/0e0d7ae299514da692eb1cab741562c253d44188"},
92
+ "url":
93
+ "https://api.github.com/repos/gvaughn/octokit/compare/0e0d7ae299514da692eb1cab741562c253d44188...b7b37f75a80b8e84061cd45b246232ad958158f5",
94
+ "status": "behind",
95
+ "patch_url":
96
+ "https://github.com/gvaughn/octokit/compare/0e0d7ae299514da692eb1cab741562c253d44188...b7b37f75a80b8e84061cd45b246232ad958158f5.patch",
97
+ "html_url":
98
+ "https://github.com/gvaughn/octokit/compare/0e0d7ae299514da692eb1cab741562c253d44188...b7b37f75a80b8e84061cd45b246232ad958158f5"}
@@ -78,4 +78,15 @@ describe Octokit::Client::Commits do
78
78
 
79
79
  end
80
80
 
81
+ describe ".compare" do
82
+
83
+ it "should return a comparison" do
84
+ stub_get("/repos/gvaughn/octokit/compare/0e0d7ae299514da692eb1cab741562c253d44188...b7b37f75a80b8e84061cd45b246232ad958158f5").
85
+ to_return(:body => fixture("v3/compare.json"))
86
+ comparison = @client.compare("gvaughn/octokit", '0e0d7ae299514da692eb1cab741562c253d44188', 'b7b37f75a80b8e84061cd45b246232ad958158f5')
87
+ comparison.base_commit.sha.should == '0e0d7ae299514da692eb1cab741562c253d44188'
88
+ comparison.merge_base_commit.sha.should == 'b7b37f75a80b8e84061cd45b246232ad958158f5'
89
+ end
90
+ end
91
+
81
92
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octokit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-27 00:00:00.000000000 Z
14
+ date: 2012-08-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: addressable
@@ -272,6 +272,7 @@ files:
272
272
  - spec/fixtures/v3/commit_comments.json
273
273
  - spec/fixtures/v3/commit_create.json
274
274
  - spec/fixtures/v3/commits.json
275
+ - spec/fixtures/v3/compare.json
275
276
  - spec/fixtures/v3/contents.json
276
277
  - spec/fixtures/v3/contributors.json
277
278
  - spec/fixtures/v3/download.json
@@ -400,6 +401,7 @@ test_files:
400
401
  - spec/fixtures/v3/commit_comments.json
401
402
  - spec/fixtures/v3/commit_create.json
402
403
  - spec/fixtures/v3/commits.json
404
+ - spec/fixtures/v3/compare.json
403
405
  - spec/fixtures/v3/contents.json
404
406
  - spec/fixtures/v3/contributors.json
405
407
  - spec/fixtures/v3/download.json