Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 30eb884

Browse files
authored
Merge pull request #22 from codacy/fix-http-usage
Fix HTTP usage
2 parents 11e436d + 3fa7875 commit 30eb884

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ tmp
1818

1919
.idea/
2020
.idea_modules/
21+
*.iml
2122

2223
.DS_Store
2324
/vendor/

lib/codacy/client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def self.send_request(url, content, project_token, redirects = 3)
3434
uri = URI.parse(url)
3535
http = Net::HTTP.new(uri.host, uri.port)
3636
request = Net::HTTP::Post.new(uri.path)
37-
http.use_ssl = true
37+
http.use_ssl = uri.scheme == "https"
3838
request["project_token"] = project_token
3939
request["Content-Type"] = "application/json"
4040
request.body = content

ruby-codacy-coverage.iml

-9
This file was deleted.

0 commit comments

Comments
 (0)