Sha256: 018372764ee04872fc59f617d297b9e2d6f27138aa7623627303c2a346a83ad4
Contents?: true
Size: 904 Bytes
Versions: 7
Compression:
Stored size: 904 Bytes
Contents
# encoding: utf-8 require 'rake' # extend Rake task with a `set_non_standard_vars` method module Rake def self.set_non_standard_vars # convert tasks to vars # and remove them from the list of tasks Rake.application.top_level_tasks.delete_if do |task| # if task name is like <var.with.dot>=<value> if /^[^.=][^=]+=.*/.match(task) name, value = task.split('=', 2) ENV[name] = value true end end end def self.quotepath(switch, path) return ! path.to_s.empty? ? "#{switch}\"#{path.to_s}\"" : '' end def self.unquotepath(path) return path.to_s.gsub(/^"|"$/, '') end def self.ruby18? /^1\.8/.match(RUBY_VERSION) end def self.cygwin? RUBY_PLATFORM.downcase.include?('cygwin') end end
Version data entries
7 entries across 7 versions & 1 rubygems