Sha256: 8601c399b806f5fd719a4d1b4133e7779b74a4847471af47a92dcf6b8f15711a

Contents?: true

Size: 366 Bytes

Versions: 38

Compression:

Stored size: 366 Bytes

Contents

require 'fileutils'

module Dply
  class SharedDirs

    def initialize(extra_dirs)
      dirs << extra_dirs
    end

    def create
      FileUtils.mkdir_p dirs
    end 

    def create_in(dir)
      Dir.chdir(dir) { create }
    end

    def dirs
      @dirs ||= [
        "tmp",
        "log",
        "tmp/pids",
        "tmp/sockets"
      ]
    end

  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
dply-0.2.19 lib/dply/shared_dirs.rb
dply-0.2.18 lib/dply/shared_dirs.rb
dply-0.2.17 lib/dply/shared_dirs.rb
dply-0.2.16 lib/dply/shared_dirs.rb
dply-0.2.15 lib/dply/shared_dirs.rb
dply-0.2.14 lib/dply/shared_dirs.rb
dply-0.2.13 lib/dply/shared_dirs.rb
dply-0.2.11 lib/dply/shared_dirs.rb
dply-0.2.10 lib/dply/shared_dirs.rb
dply-0.2.9 lib/dply/shared_dirs.rb
dply-0.2.8 lib/dply/shared_dirs.rb
dply-0.2.7 lib/dply/shared_dirs.rb
dply-0.2.6 lib/dply/shared_dirs.rb
dply-0.2.5 lib/dply/shared_dirs.rb
dply-0.2.4 lib/dply/shared_dirs.rb
dply-0.2.3 lib/dply/shared_dirs.rb
dply-0.2.2 lib/dply/shared_dirs.rb
dply-0.2.0 lib/dply/shared_dirs.rb
dply-0.1.19 lib/dply/shared_dirs.rb
dply-0.1.18 lib/dply/shared_dirs.rb