1- The symbol argument ` :gemcutter ` , ` :rubygems ` , and ` :rubyforge `
2- are deprecated. So please change your source to URL string that
3- 'https://rubygems.org ' if possible, or 'http://rubygems.org ' if not.
1+ Passing symbol arguments to ` source ` (e.g. ` source :rubygems ` ) is
2+ deprecated because they default to using HTTP requests. Instead, specify
3+ ` 'https://rubygems.org' ` if possible, or ` 'http://rubygems.org' ` if not.
44
5- This autocorrect will replace these symbols with 'https://rubygems.org '.
6- Because it is secure, HTTPS request is strongly recommended. And in
7- most use cases HTTPS will be fine.
5+ When autocorrecting, this cop will replace symbol arguments with
6+ ` 'https://rubygems.org' ` .
87
9- However, it don't replace all ` sources ` of ` http:// ` with ` https:// ` .
10- For example, when specifying an internal gem server using HTTP on the
11- intranet, a use case where HTTPS cannot be specified was considered.
12- Consider using HTTP only if you cannot use HTTPS.
8+ This cop will not replace existing sources that use ` http:// ` . This may
9+ be necessary where HTTPS is not available. For example, where using an
10+ internal gem server via an intranet, or where HTTPS is prohibited.
11+ However, you should strongly prefer ` https:// ` where possible, as it is
12+ more secure.
13+
14+ If you don't allow ` http:// ` , please set ` false ` to ` AllowHttpProtocol ` .
15+ This option is ` true ` by default for safe autocorrection.
1316
1417### Example:
1518 # bad
@@ -19,4 +22,13 @@ Consider using HTTP only if you cannot use HTTPS.
1922
2023 # good
2124 source 'https://rubygems.org' # strongly recommended
22- source 'http://rubygems.org'
25+
26+ ### Example: AllowHttpProtocol: true (default)
27+
28+ # good
29+ source 'http://rubygems.org' # use only if HTTPS is unavailable
30+
31+ ### Example: AllowHttpProtocol: false
32+
33+ # bad
34+ source 'http://rubygems.org'
0 commit comments