#!ruby require 'pathname' root = Pathname(__dir__) / '../' def v(require) if v = ENV['RAILS_VERSION'] "#{require}:#{v}" else require end end def repo ENV['RBS_REPO_DIR'] || Pathname(__dir__).join('../gem_rbs/gems').to_s end exec( 'rbs', # Require stdlibs '-rlogger', '-rpathname', '-rmutex_m', '-rdate', "--repo=#{repo}", # Require Rails libraries v('-ractivesupport'), v('-ractionpack'), v('-ractivejob'), v('-ractivemodel'), v('-ractionview'), v('-ractiverecord'), v('-rrailties'), # Load signatures that are bundled in rbs_rails '-I' + root.join('sig').to_s, '-I' + root.join('assets/sig').to_s, # Expand arguments *ARGV, )