Class: ProjectGroup::Single

Inherits:
Object
  • Object
show all
Includes:
FromHash
Defined in:
lib/project_group/single.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/project_group/single.rb', line 5

def name
  @name
end

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/project_group/single.rb', line 5

def path
  @path
end

Instance Method Details

#needs_push?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/project_group/single.rb', line 15

def needs_push?
  !repo.pushed?
end

#spec_outputObject



22
23
24
# File 'lib/project_group/single.rb', line 22

def spec_output
  `cd #{path} && bundle exec rake spec`
end

#statusObject



19
20
21
# File 'lib/project_group/single.rb', line 19

def status
  {:committed => !repo.changes?, :pushed => repo.pushed?}
end

#uncommitted_filesObject



12
13
14
# File 'lib/project_group/single.rb', line 12

def uncommitted_files
  repo.changed_files.values.flatten.map { |x| OpenStruct.new(:relative_path => x) }
end