Sha256: 19d0dd79d4095b78667475ee46d173e0b3d1f00d8a9032ad84462f4c223b4db1

Contents?: true

Size: 431 Bytes

Versions: 11

Compression:

Stored size: 431 Bytes

Contents


module Dockdev
  class Workspace

    def initialize(root = Dir.getwd)
      @root = root
    end

    def name
      File.dirname(@root)
    end

    def has_dockerfile?
      Dir.glob(File.join(@root,"Dockerfile")).length > 0
    end

    def dockerfile
      Dir.glob(File.join(@root,"Dockerfile")).first
    end

    def has_docker_compose?
      Dir.glob(File.join(@root,"docker-compose.yml")).length > 0
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dockdev-0.3.8 lib/dockdev/workspace.rb
dockdev-0.3.7 lib/dockdev/workspace.rb
dockdev-0.3.6 lib/dockdev/workspace.rb
dockdev-0.3.5 lib/dockdev/workspace.rb
dockdev-0.3.4 lib/dockdev/workspace.rb
dockdev-0.3.3 lib/dockdev/workspace.rb
dockdev-0.3.2 lib/dockdev/workspace.rb
dockdev-0.3.1 lib/dockdev/workspace.rb
dockdev-0.3.0 lib/dockdev/workspace.rb
dockdev-0.2.0 lib/dockdev/workspace.rb
dockdev-0.1.0 lib/dockdev/workspace.rb