Sha256: e979e5d01e39dfc54be16f81693272d4257d8c6b5d4d8a749d967d5f0f11d3fa

Contents?: true

Size: 477 Bytes

Versions: 5

Compression:

Stored size: 477 Bytes

Contents

module Idonethis::Adapters
  module Git
    class << self
      def commits(dir, since)
        require 'git'

        since_when = case since
                     when 'yesterday'
                       '1am yesterday'
                     else
                       '1am'
                     end
                         
        ::Git.open(dir).log.since(since_when)
      end

      def repo?(dir)
        File.exists?(File.join(dir, ".git"))
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
idonethis-cli-0.15.0 lib/adapters/git_adapter.rb
idonethis-cli-0.14.2 lib/adapters/git_adapter.rb
idonethis-cli-0.14.1 lib/adapters/git_adapter.rb
idonethis-cli-0.14.0 lib/adapters/git_adapter.rb
idonethis-cli-0.13.3 lib/adapters/git_adapter.rb