Sha256: d3cc578b27f2873ead1227a0c77224e2d04e9f73db3e20e2ba9123dfab268f05

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

module Docman
  module Builders
    class DirBuilder < Builder

      register_builder :dir_builder

      def execute
        if File.directory? @context['full_build_path']
          if GitUtil.repo? @context['full_build_path']
            log("Removed dir: #{@context['full_build_path']} because directory is git repo")
            FileUtils.rm_r(@context['full_build_path'])
          end
        end
        log("Created dir: #{@context['full_build_path']}")
        FileUtils::mkdir_p @context['full_build_path']
        @context['build_path']
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
docman-0.0.14 lib/docman/builders/dir_builder.rb
docman-0.0.13 lib/docman/builders/dir_builder.rb
docman-0.0.12 lib/docman/builders/dir_builder.rb
docman-0.0.11 lib/docman/builders/dir_builder.rb
docman-0.0.10 lib/docman/builders/dir_builder.rb
docman-0.0.9 lib/docman/builders/dir_builder.rb
docman-0.0.8 lib/docman/builders/dir_builder.rb
docman-0.0.7 lib/docman/builders/dir_builder.rb
docman-0.0.6 lib/docman/builders/dir_builder.rb