thegarage-gitx 1.5.0.pre1 → 1.5.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9da76850a18efd35f1ad4755e580f74b2bddda17
4
- data.tar.gz: c80377d9cf9269445ab266348a60c93777061992
3
+ metadata.gz: 52a37776bf7e23d9faaaf25714ec07c74e7d5cea
4
+ data.tar.gz: 262bf66a8b98d07f2d76942203e5a82da32b8eb5
5
5
  SHA512:
6
- metadata.gz: d8461ef865ca67baf61344ccfdd29a0cf4820878343c606cfac1bde2892e658e6ca116575484097e81cec7809da617fcb08f5fc1c5b9871cd26a6c655d656ffc
7
- data.tar.gz: 5965d506c234b42a3c014f87a1649173aeceaea0814a31537c0089bed3abafddb641f0f0d0a0bed35fe171a76df3b6098cd609e4a1f1fabe57e3b7d80374b15f
6
+ metadata.gz: 52299513ccc1b006bf64638722b04625319fade28138d35556128d4973e29d15360c9b9507434d97fdbdd365d85c72d29ddf3c73e8469f77dce5cbff8a6d9e18
7
+ data.tar.gz: d4ea5dc594034d96ae2a4e9788dbe9ace26349652c61ec9337bdc6f997c8e7dc261fc2e8566d4b9ff71d996eaf541a82b48214f056a8f7468d828585135ac880
@@ -64,7 +64,6 @@ module Thegarage
64
64
 
65
65
  # @see http://developer.github.com/v3/pulls/
66
66
  def create_pull_request(branch, changelog, options = {})
67
- remote = remote_origin_name
68
67
  body = pull_request_body(changelog, options[:description])
69
68
 
70
69
  shell.say "Creating pull request for "
@@ -72,7 +71,7 @@ module Thegarage
72
71
  shell.say "against "
73
72
  shell.say "#{Thegarage::Gitx::BASE_BRANCH} ", :green
74
73
  shell.say "in "
75
- shell.say remote, :green
74
+ shell.say remote_origin_name, :green
76
75
 
77
76
  payload = {
78
77
  :title => branch,
@@ -80,7 +79,7 @@ module Thegarage
80
79
  :head => branch,
81
80
  :body => body
82
81
  }.to_json
83
- response = RestClient::Request.new(:url => "https://api.github.com/repos/#{remote}/pulls", :method => "POST", :payload => payload, :headers => request_headers).execute
82
+ response = RestClient::Request.new(:url => pull_request_url, :method => "POST", :payload => payload, :headers => request_headers).execute
84
83
  pull_request = JSON.parse response.body
85
84
 
86
85
  pull_request
@@ -105,7 +104,7 @@ module Thegarage
105
104
  payload = {
106
105
  course: branch
107
106
  }.to_json
108
- response = RestClient::Request.new(:url => "https://api.github.com/repos/#{remote}/pulls", :method => "GET", :payload => payload, :headers => request_headers).execute
107
+ response = RestClient::Request.new(:url => remote_origin_name, :method => "GET", :payload => payload, :headers => request_headers).execute
109
108
  data = JSON.parse(response.body)
110
109
  data.first
111
110
  rescue RestClient::Exception => e
@@ -120,6 +119,10 @@ module Thegarage
120
119
  throw e
121
120
  end
122
121
 
122
+ def pull_request_url
123
+ "https://api.github.com/repos/#{remote_origin_name}/pulls"
124
+ end
125
+
123
126
  def request_headers
124
127
  {
125
128
  :accept => :json,
@@ -1,5 +1,5 @@
1
1
  module Thegarage
2
2
  module Gitx
3
- VERSION = '1.5.0.pre1'
3
+ VERSION = '1.5.0.pre2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thegarage-gitx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.pre1
4
+ version: 1.5.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-13 00:00:00.000000000 Z
11
+ date: 2014-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grit