Module: Trackler
- Defined in:
- lib/trackler.rb,
lib/trackler/path.rb,
lib/trackler/track.rb,
lib/trackler/tracks.rb,
lib/trackler/version.rb,
lib/trackler/doc_file.rb,
lib/trackler/metadata.rb,
lib/trackler/null_track.rb,
lib/trackler/description.rb,
lib/trackler/file_bundle.rb,
lib/trackler/specification.rb,
lib/trackler/implementation.rb,
lib/trackler/specifications.rb,
lib/trackler/guaranteed_file.rb,
lib/trackler/implementations.rb
Defined Under Namespace
Modules: Path
Classes: CommonFile, Description, DocFile, FileBundle, GuaranteedFile, Implementation, Implementations, MarkdownFile, Metadata, NullDocFile, NullFile, NullTrack, OrgmodeFile, Specification, Specifications, Track, TrackFile, Tracks
Constant Summary
collapse
- VERSION =
"2.2.1.136"
Class Method Summary
collapse
Class Method Details
.implementations ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/trackler.rb', line 35
def self.implementations
return @implementations if !!@implementations
@implementations = Hash.new { |h, k| h[k] = [] }
tracks.each do |track|
track.implementations.each do |implementation|
@implementations[implementation.slug] << implementation
end
end
@implementations
end
|
.path ⇒ Object
13
14
15
|
# File 'lib/trackler.rb', line 13
def self.path
@path ||= Trackler::Path.root
end
|
.reset ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/trackler.rb', line 5
def self.reset
@path = nil
@implementations = nil
@specifications = nil
@tracks = nil
@todos = nil
end
|
.specifications ⇒ Object
27
28
29
|
# File 'lib/trackler.rb', line 27
def self.specifications
@specifications ||= Specifications.new(path)
end
|
.todos ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/trackler.rb', line 47
def self.todos
return @todos if !!@todos
slugs = specifications.map(&:slug)
@todos = Hash.new { |h, k| h[k] = [] }
tracks.each do |track|
todos = slugs - track.slugs
@todos[track.id] = specifications.select { |specification|
todos.include?(specification.slug)
}.sort_by { |specification|
[implementations[specification.slug].count * -1, specification.name]
}
end
@todos
end
|
.tracks ⇒ Object
31
32
33
|
# File 'lib/trackler.rb', line 31
def self.tracks
@tracks ||= Tracks.new(path)
end
|
.use_fixture_data ⇒ Object
22
23
24
25
|
# File 'lib/trackler.rb', line 22
def self.use_fixture_data
reset
@path = Trackler::Path.fixtures
end
|
.use_real_data ⇒ Object
17
18
19
20
|
# File 'lib/trackler.rb', line 17
def self.use_real_data
reset
@path = Trackler::Path.root
end
|