bin/travis in travis-1.11.1 vs bin/travis in travis-1.12.0
- old
+ new
@@ -1,17 +1,19 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
+
# :(
Encoding.default_external = Encoding::UTF_8 if defined? Encoding
# load travis library
-require 'bundler/setup' if File.exist? File.expand_path('../../Gemfile', __FILE__)
+require 'bundler/setup' if File.exist? File.expand_path('../Gemfile', __dir__)
require 'travis/cli'
# load plugins
-TRAVIS_PLUGINS = []
+TRAVIS_PLUGINS = [].freeze
config_path = ENV.fetch('TRAVIS_CONFIG_PATH') { File.expand_path('.travis', Dir.home) }
Dir.glob(File.expand_path('*/init.rb', config_path)) do |file|
- TRAVIS_PLUGINS << file.sub(config_path + '/', '').sub(/\/init\.rb$/, '')
+ TRAVIS_PLUGINS << file.sub("#{config_path}/", '').sub(%r{/init\.rb$}, '')
load(file)
end
# and off we go then
Travis::CLI.run(ARGV)