octokit 1.13.0 → 1.14.0

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.
@@ -1,5 +1,6 @@
1
1
  # CHANGELOG
2
2
 
3
+ * [1.14.0 - September 22,2012](https://github.com/pengwynn/octokit/compare/v1.13.0...v1.14.0)
3
4
  * [1.13.0 - September 5,2012](https://github.com/pengwynn/octokit/compare/v1.12.0...v1.13.0)
4
5
  * [1.12.0 - September 4,2012](https://github.com/pengwynn/octokit/compare/v1.11.0...v1.12.0)
5
6
  * [1.11.0 - August 29, 2012](https://github.com/pengwynn/octokit/compare/v1.10.0...v1.11.0)
@@ -34,6 +34,10 @@ module Octokit
34
34
  get("repos/#{Repository.new(repo)}/pulls/#{number}/commits", options)
35
35
  end
36
36
  alias :pull_commits :pull_request_commits
37
+
38
+ def merge_pull_request(repo, number, commit_message='', options={})
39
+ put("repos/#{Repository.new(repo)}/pulls/#{number}/merge", options.merge({:commit_message => commit_message}))
40
+ end
37
41
  end
38
42
  end
39
43
  end
@@ -1,3 +1,3 @@
1
1
  module Octokit
2
- VERSION = "1.13.0" unless defined?(Octokit::VERSION)
2
+ VERSION = "1.14.0" unless defined?(Octokit::VERSION)
3
3
  end
@@ -0,0 +1,5 @@
1
+ {
2
+ "sha": "2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
3
+ "merged": true,
4
+ "message": "Pull Request successfully merged"
5
+ }
@@ -65,4 +65,15 @@ describe Octokit::Client::Pulls do
65
65
 
66
66
  end
67
67
 
68
+ describe ".merge_pull_request" do
69
+
70
+ it "should merge the pull request" do
71
+ stub_put("https://api.github.com/repos/pengwynn/octokit/pulls/67/merge").
72
+ to_return(:body => fixture("v3/pull_request_merged.json"))
73
+ response = @client.merge_pull_request("pengwynn/octokit", 67)
74
+ response["sha"].should == "2097821c7c5aa4dc02a2cc54d5ca51968b373f95"
75
+ end
76
+
77
+ end
78
+
68
79
  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.13.0
4
+ version: 1.14.0
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-09-05 00:00:00.000000000 Z
14
+ date: 2012-09-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: addressable
@@ -316,6 +316,7 @@ files:
316
316
  - spec/fixtures/v3/pull_created.json
317
317
  - spec/fixtures/v3/pull_request.json
318
318
  - spec/fixtures/v3/pull_request_commits.json
319
+ - spec/fixtures/v3/pull_request_merged.json
319
320
  - spec/fixtures/v3/pull_requests.json
320
321
  - spec/fixtures/v3/readme.json
321
322
  - spec/fixtures/v3/ref.json
@@ -451,6 +452,7 @@ test_files:
451
452
  - spec/fixtures/v3/pull_created.json
452
453
  - spec/fixtures/v3/pull_request.json
453
454
  - spec/fixtures/v3/pull_request_commits.json
455
+ - spec/fixtures/v3/pull_request_merged.json
454
456
  - spec/fixtures/v3/pull_requests.json
455
457
  - spec/fixtures/v3/readme.json
456
458
  - spec/fixtures/v3/ref.json