Sha256: 9c91c1feb907aecca0c1f1d44eb62e05b59274e7aa1cfa2745a161d4f2101c46

Contents?: true

Size: 456 Bytes

Versions: 8

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module RakeGitCrypt
  class Home
    def initialize(work_directory, home_directory)
      @work_directory = work_directory
      @home_directory = home_directory
    end

    def with_resolved_directory(&)
      if @home_directory == :temporary
        Dir.mktmpdir('home', @work_directory, &)
      else
        FileUtils.mkdir_p(@home_directory) if @home_directory
        yield @home_directory
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rake_git_crypt-0.3.0.pre.2 lib/rake_git_crypt/home.rb
rake_git_crypt-0.3.0.pre.1 lib/rake_git_crypt/home.rb
rake_git_crypt-0.2.0 lib/rake_git_crypt/home.rb
rake_git_crypt-0.1.0.pre.34 lib/rake_git_crypt/home.rb
rake_git_crypt-0.1.0.pre.33 lib/rake_git_crypt/home.rb
rake_git_crypt-0.1.0.pre.32 lib/rake_git_crypt/home.rb
rake_git_crypt-0.1.0.pre.31 lib/rake_git_crypt/home.rb
rake_git_crypt-0.1.0.pre.30 lib/rake_git_crypt/home.rb