lib/travis/client.rb in travis-1.11.1 vs lib/travis/client.rb in travis-1.12.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'travis/client/error' require 'travis/client/states' require 'travis/client/restartable' require 'travis/client/not_loadable' require 'travis/client/has_uuid' @@ -24,14 +26,15 @@ require 'travis/client/listener' require 'travis/client/lint_result' module Travis module Client + ORG_URI = 'https://api.travis-ci.org/' COM_URI = 'https://api.travis-ci.com/' def self.new(options = {}) - options[:uri] ||= ORG_URI if options.is_a? Hash and not options['uri'] + options[:uri] ||= COM_URI if options.is_a?(Hash) && !(options['uri']) Session.new(options) end end end