Class: TFSGraph::Project
- Extended by:
- Comparable
- Defined in:
- lib/tfs_graph/project.rb
Constant Summary collapse
- SCHEMA =
{ name: {key: "Name"} }
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #active_branches ⇒ Object
- #all_activity ⇒ Object
- #all_activity_by_date(limiter = nil) ⇒ Object
- #branches ⇒ Object
- #branches_with_hidden ⇒ Object
- #last_change ⇒ Object
Methods inherited from Entity
Instance Method Details
#<=>(other) ⇒ Object
12 13 14 |
# File 'lib/tfs_graph/project.rb', line 12 def <=>(other) name <=> other.name end |
#active_branches ⇒ Object
33 34 35 |
# File 'lib/tfs_graph/project.rb', line 33 def active_branches branches.reject(&:archived?) end |
#all_activity ⇒ Object
20 21 22 |
# File 'lib/tfs_graph/project.rb', line 20 def all_activity branches.map {|b| b.changesets }.flatten end |
#all_activity_by_date(limiter = nil) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/tfs_graph/project.rb', line 24 def all_activity_by_date(limiter=nil) raise InvalidArgument("parameter must be a Date") unless limiter.nil? || limiter.is_a?(Time) activity = all_activity activity = activity.select {|c| c.created > limiter } unless limiter.nil? activity.group_by(&:formatted_created) end |
#branches ⇒ Object
37 38 39 |
# File 'lib/tfs_graph/project.rb', line 37 def branches branches_with_hidden.reject(&:hidden?) end |
#branches_with_hidden ⇒ Object
41 42 43 |
# File 'lib/tfs_graph/project.rb', line 41 def branches_with_hidden outgoing(:branches).(model: Branch).nodes.to_a end |
#last_change ⇒ Object
16 17 18 |
# File 'lib/tfs_graph/project.rb', line 16 def last_change branches.map {|b| b.last_changeset } end |