Skip to content

Commit 33478a1

Browse files
committed
Changed to use HTTPS instead of HTTP by default for GitHub API usage.
1 parent 801f756 commit 33478a1

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# CHANGELOG - 1.0.8 #
1+
# CHANGELOG - 1.0.9 #
2+
3+
### Since 1.0.8 ###
4+
5+
* Changed to use HTTPS instead of HTTP by default for GitHub API usage.
26

37
### Since 1.0.7 ###
48

lib/git-process/github_service.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def compute_site(opts = {})
4040

4141
if /^git@/ =~ origin_url
4242
host = origin_url.sub(/^git@(.*?):.*$/, '\1')
43-
site = host_to_site(host, false)
43+
site = host_to_site(host, true)
4444
else
4545
uri = URI.parse(origin_url)
4646
host = uri.host
@@ -55,7 +55,7 @@ def compute_site(opts = {})
5555

5656
raise GitHubService::NoRemoteRepository.new("Could not determine a host from #{origin_url}") if host.nil?
5757

58-
site = host_to_site(host, scheme == 'https')
58+
site = host_to_site(host, !(scheme == 'http'))
5959
end
6060
site
6161
end

lib/git-process/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module GitProc
1414
module Version
1515
MAJOR = 1
1616
MINOR = 0
17-
PATCH = 8
17+
PATCH = 9
1818
BUILD = nil
1919

2020
STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')

spec/github_service_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def ghs
141141
it "site should work for git@... ssh address" do
142142
ghs.lib.stub(:config).with('remote.origin.url').and_return('git@myco.com:jdigger/git-process.git')
143143

144-
ghs.site.should == 'http://myco.com'
144+
ghs.site.should == 'https://myco.com'
145145
end
146146

147147

@@ -162,7 +162,7 @@ def ghs
162162
it "site should work for git://myco.com/ address" do
163163
ghs.lib.stub(:config).with('remote.origin.url').and_return('git://myco.com/jdigger/git-process.git')
164164

165-
ghs.site.should == 'http://myco.com'
165+
ghs.site.should == 'https://myco.com'
166166
end
167167

168168

@@ -202,7 +202,7 @@ def in_tempfile(content, &block)
202202
" HostName github.myco.com\n"
203203

204204
in_tempfile(content) do |file|
205-
ghs.site(:ssh_config_file => file.path).should == 'http://github.myco.com'
205+
ghs.site(:ssh_config_file => file.path).should == 'https://github.myco.com'
206206
end
207207
end
208208

0 commit comments

Comments
 (0)