git-pr-release 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/git-pr-release +8 -8
- data/git-pr-release.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3858360e38c1b2f4ef52fa613997e282328729b
|
4
|
+
data.tar.gz: bcba7c5512fad71b320fbf35ac229380e51375f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c26c855c4bf0b737a4158d81efebcad0e67aa7459c09b6cd3301570269c3bddb24887d156ffcb1022d29b6541bde96c1ef104f05cd25d0bf82c5483c5fc3022c
|
7
|
+
data.tar.gz: afa4072c7d4dcafa9d379db140f1b36ebe0778b2453a979b1f07e261d4830e9d71becbf76186e692a6c54896bfd4959ba71cc1bcf3e5e5cd771d19bcf59f0023
|
data/bin/git-pr-release
CHANGED
@@ -84,7 +84,7 @@ end
|
|
84
84
|
|
85
85
|
|
86
86
|
def git_config(key)
|
87
|
-
host, _ =
|
87
|
+
host, _ = host_and_repository_and_scheme()
|
88
88
|
|
89
89
|
plain_key = [ 'pr-release', key ].join('.')
|
90
90
|
host_aware_key = [ 'pr-release', host, key ].compact.join('.')
|
@@ -97,7 +97,7 @@ def git_config(key)
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def git_config_set(key, value)
|
100
|
-
host, _ =
|
100
|
+
host, _ = host_and_repository_and_scheme()
|
101
101
|
host_aware_key = [ 'pr-release', host, key ].compact.join('.')
|
102
102
|
|
103
103
|
git :config, '--global', host_aware_key, value
|
@@ -208,8 +208,8 @@ def request_authorization(client, two_factor_code)
|
|
208
208
|
auth
|
209
209
|
end
|
210
210
|
|
211
|
-
def
|
212
|
-
@
|
211
|
+
def host_and_repository_and_scheme
|
212
|
+
@host_and_repository_and_scheme ||= begin
|
213
213
|
remote = git(:config, 'remote.origin.url').first.chomp
|
214
214
|
unless %r(^\w+://) === remote
|
215
215
|
remote = "ssh://#{remote.sub(':', '/')}"
|
@@ -219,19 +219,19 @@ def host_and_repository
|
|
219
219
|
repository = remote_url.path.sub(%r(^/), '').sub(/\.git$/, '')
|
220
220
|
|
221
221
|
host = remote_url.host == 'github.com' ? nil : remote_url.host
|
222
|
-
[ host, repository ]
|
222
|
+
[ host, repository, remote_url.scheme === 'http' ? 'http' : 'https' ]
|
223
223
|
end
|
224
224
|
end
|
225
225
|
|
226
|
-
host, repository =
|
226
|
+
host, repository, scheme = host_and_repository_and_scheme
|
227
227
|
|
228
228
|
if host
|
229
229
|
# GitHub:Enterprise
|
230
230
|
OpenSSL::SSL.const_set :VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE # XXX
|
231
231
|
|
232
232
|
Octokit.configure do |c|
|
233
|
-
c.api_endpoint = "
|
234
|
-
c.web_endpoint = "
|
233
|
+
c.api_endpoint = "#{scheme}://#{host}/api/v3"
|
234
|
+
c.web_endpoint = "#{scheme}://#{host}/"
|
235
235
|
end
|
236
236
|
end
|
237
237
|
|
data/git-pr-release.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "git-pr-release"
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.5'
|
8
8
|
spec.authors = ["motemen"]
|
9
9
|
spec.email = ["motemen@gmail.com"]
|
10
10
|
spec.summary = 'Creates a release pull request'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-pr-release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- motemen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|