class RuboCop::Cop::Bundler::InsecureProtocolSource

source ‘rubygems.org
source ‘rubygems.org’ # strongly recommended
# good
source :rubyforge
source :rubygems
source :gemcutter
# bad
@example
Consider using HTTP only if you cannot use HTTPS.
intranet, a use case where HTTPS cannot be specified was considered.
For example, when specifying an internal gem server using HTTP on the
However, it don’t replace all ‘sources` of `http://` with `https://`.
most use cases HTTPS will be fine.
Because it is secure, HTTPS request is strongly recommended. And in
This autocorrect will replace these symbols with ’rubygems.org’.
rubygems.org’ if possible, or ‘rubygems.org’ if not.
are deprecated. So please change your source to URL string that
The symbol argument ‘:gemcutter`, `:rubygems`, and `:rubyforge`

def on_send(node)

def on_send(node)
  insecure_protocol_source?(node) do |source_node, source|
    message = format(MSG, source: source)
    add_offense(
      source_node,
      message: message
    ) do |corrector|
      corrector.replace(
        source_node, "'https://rubygems.org'"
      )
    end
  end
end