Sha256: 36824cfc57926879be47ab81ef3be92ae4852cbf6d2c7fbb6a1d93d569634fdd

Contents?: true

Size: 568 Bytes

Versions: 1

Compression:

Stored size: 568 Bytes

Contents

require 'fileutils'

module VagrantPhpStormTunnel
  class Configurator
    def initialize(app, env)
      @app = app
      @env = env
    end

    def link_php_to_phpstorm
      destination_path = Dir.getwd + '/scripts/vagrant/php'
      source_path = File.expand_path('../../../data/php', __FILE__)

      if !File.exist? destination_path
        FileUtils.mkdir_p(File.dirname(destination_path))
        File.link(source_path, destination_path)
      end
    end

    def call(env)
      @env = env
      @app.call(env)

      link_php_to_phpstorm
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-phpstorm-tunnel-0.0.3 lib/vagrant-phpstorm-tunnel/configurator.rb