Class: GemPluginAction
- Inherits:
-
BuildAction
- Object
- BuildAction
- GemPluginAction
- Defined in:
- lib/kwala/actions/gem_plugin.rb
Overview
How would I test this?
Class Method Summary collapse
- .detailed_template_file ⇒ Object
- .load_external_gems ⇒ Object
-
.summary_template_file ⇒ Object
For now I assume that the gem’s templates are in the same directory as the action file.
Methods inherited from BuildAction
#build_action, command_line_action_name, command_line_action_names, create_action_from_command_line_name, #detailed_display, #score, #summary_display
Methods included from InheritanceTracker
Class Method Details
.detailed_template_file ⇒ Object
13 14 15 |
# File 'lib/kwala/actions/gem_plugin.rb', line 13 def self.detailed_template_file "#{File.dirname(__FILE__)}/#{command_line_action_name}_detailed.html" end |
.load_external_gems ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/kwala/actions/gem_plugin.rb', line 17 def self.load_external_gems require 'rubygems' # Here we do stuff with the gem api to find all external gems that require kwala. # We will assume that they are actions and require them # Thanks to Chad Fowler for this bit of code Gem.cache.search(//).select do |specification| specification.dependencies.map{ |dep| dep.name }.include?('kwala') end.each do |depname| require depname.name end end |
.summary_template_file ⇒ Object
For now I assume that the gem’s templates are in the same directory as the action file
9 10 11 |
# File 'lib/kwala/actions/gem_plugin.rb', line 9 def self.summary_template_file "#{File.dirname(__FILE__)}/#{command_line_action_name}_summary.html" end |