Sha256: 15de7edfb96deadf6a676bfae4cced84068914990290384da7b6453f00712ae7

Contents?: true

Size: 640 Bytes

Versions: 12

Compression:

Stored size: 640 Bytes

Contents

module Aruba
  module Api

    # @return full path to files in the aruba tmp folder
    def fullpath(filename)
      path = File.expand_path(File.join(current_dir, filename))
      if path.match(/^\/cygdrive/)
        # match /cygdrive/c/path/to and return c:\\path\\to
        path = `cygpath -w #{path}`.chomp
      elsif path.match(/.\:/)
        # match c:/path/to and return c:\\path\\to
        path = path.gsub(/\//, '\\')
      end
      path
    end

    # @return the contents of "filename" in the aruba tmp folder
    def get_file_contents(filename)
      in_current_dir do
        IO.read(filename)
      end
    end

  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
mutagem-0.2.4 spec/aruba_helper.rb
oct-0.3.3 spec/aruba_helper.rb
dynabix-0.3.2 spec/aruba_helper.rb
revenc-0.2.1 spec/aruba_helper.rb
mutagem-0.2.3 spec/aruba_helper.rb
oct-0.3.2 spec/aruba_helper.rb
mutagem-0.2.2 spec/aruba_helper.rb
oct-0.3.1 spec/aruba_helper.rb
dynabix-0.3.1 spec/aruba_helper.rb
dynabix-0.3.0 spec/aruba_helper.rb
mutagem-0.2.1 spec/aruba_helper.rb
mutagem-0.2.0 spec/aruba_helper.rb