-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added drawing of a tree of extensions, plugins, radiant + plugins
- Loading branch information
Showing
4 changed files
with
133 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
class Tree | ||
|
||
# | ||
# Show the tree representation of the project | ||
# | ||
def self.show(project) | ||
print "#{project.to_s}" | ||
|
||
# Project type | ||
if project.radiant? | ||
puts " (Radiant Project)" | ||
else | ||
puts " (Rails Project)" | ||
end | ||
|
||
# Radiant extensions | ||
if project.extensions? | ||
puts '+-extensions' | ||
project.extensions.each do |extension| | ||
puts " +-#{extension.to_s}" | ||
end | ||
end | ||
|
||
# Plugins | ||
if project.plugins? | ||
puts '+-plugins' | ||
project.plugins.each do |plugin| | ||
puts " +-#{plugin.to_s}" | ||
end | ||
end | ||
|
||
# Radiant in vendor | ||
if project.radiant | ||
puts '+-radiant' | ||
# Radiant Plugins | ||
if project.radiant_plugins? | ||
puts ' +-plugins' | ||
project.radiant_plugins.each do |plugin| | ||
puts " +-#{plugin.to_s}" | ||
end | ||
end | ||
end | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters