Class: RepositoryContext

Inherits:
Object
  • Object
show all
Defined in:
lib/tipster/commands/git/repository_context.rb

Class Method Summary collapse

Class Method Details

.valid_commit_id?(commit_id) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/tipster/commands/git/repository_context.rb', line 8

def self.valid_commit_id?(commit_id)
  FilesChanged.new(commit_id).list.length > 0
end

.valid_repository?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/tipster/commands/git/repository_context.rb', line 5

def self.valid_repository?
   LatestCommit.new.id.length == 40
end