Sha256: 0fa5723de28308ba4b3cee77f65a88432d23e8a5772ce53bfd8f2171008d88c8

Contents?: true

Size: 514 Bytes

Versions: 12

Compression:

Stored size: 514 Bytes

Contents

module Ufo
  module Execute
    def execute(command, local_options={})
      command = "cd #{@project_root} && #{command}"
      # local_options[:live] overrides the global @options[:noop]
      if @options[:noop] && !local_options[:live]
        say "NOOP: #{command}"
        result = true # always success with no noop for specs
      else
        if local_options[:use_system]
          result = system(command)
        else
          result = `#{command}`
        end
      end
      result
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ufo-1.2.0 lib/ufo/execute.rb
ufo-1.1.0 lib/ufo/execute.rb
ufo-1.0.1 lib/ufo/execute.rb
ufo-1.0.0 lib/ufo/execute.rb
ufo-0.1.6 lib/ufo/execute.rb
ufo-0.1.5 lib/ufo/execute.rb
ufo-0.1.4 lib/ufo/execute.rb
ufo-0.1.3 lib/ufo/execute.rb
ufo-0.1.2 lib/ufo/execute.rb
ufo-0.1.1 lib/ufo/execute.rb
ufo-0.1.0 lib/ufo/execute.rb
ufo-0.0.6 lib/ufo/execute.rb