Sha256: 464543c07d38fa68f7e43b8c14362aea0e74a4dc4d102117760ee9e4bbecf545
Contents?: true
Size: 575 Bytes
Versions: 15
Compression:
Stored size: 575 Bytes
Contents
class RubyEnv def self.bundler?(project_path) Gem.available?("bundler") && File.exists?("#{project_path}/Gemfile") end def self.ruby_command(project_path, opts = {}) ruby_interpeter = opts[:ruby_interpeter] || "ruby" if File.exists?("#{project_path}/#{opts[:script]}") command = opts[:script] elsif opts[:bin] command = opts[:bin] else command = ruby_interpeter end if bundler?(project_path) "#{ruby_interpeter} -S bundle exec #{command}" else "#{ruby_interpeter} -S #{command}" end end end
Version data entries
15 entries across 15 versions & 1 rubygems