Sha256: 0487f65f0d67778ad0e869e6d0c644e6c990281c9c0a1da02f00f24b649f63a4

Contents?: true

Size: 279 Bytes

Versions: 4

Compression:

Stored size: 279 Bytes

Contents

# frozen_string_literal: true

module GitStats
  class CommandRunner
    def run(path, command)
      execute(command, path).encode('UTF-8', 'UTF-8', invalid: :replace)
    end

    private

    def execute(command, path)
      Dir.chdir(path) { `#{command}` }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nova_git_stats-2.4.2 lib/git_stats/command_runner.rb
nova_git_stats-2.4.1 lib/git_stats/command_runner.rb
nova_git_stats-2.4.0 lib/git_stats/command_runner.rb
nova_git_stats-2.3.0 lib/git_stats/command_runner.rb