NamedGenerator
ORM gem dependencies
Adds ORM plugin dependency ‘merb_#{orm}’ if we use any ORM.
orm<Symbol> |
ORM to use |
String |
Gem dependencies |
# File lib/merb-gen/app_generator.rb, line 28 def gems_for_orm(orm) orm.to_sym == :none ? '' : %{gem "merb_#{orm}"} end
Template enging gem dependencies
When using something else than erb we add merb plugin dependency for the template engine.
template_engine<Symbol> |
Template engine to use |
String |
Gem dependencies |
# File lib/merb-gen/app_generator.rb, line 42 def gems_for_template_engine(template_engine) gems = '' if template_engine != :erb if template_engine.in?(:haml, :builder) template_engine_plugin = "merb-#{template_engine}" else template_engine_plugin = "merb_#{template_engine}" end gems = %{gem "#{template_engine_plugin}"} end gems end
Testing framework gem dependencies
If we use any other test framework than RSpec we must add dependency to the Gemfile. Merb depends on the RSpec so it’s default dependency.
test_framework<Symbol> |
Testing framework to use |
String |
Gem dependencies |
# File lib/merb-gen/app_generator.rb, line 65 def gems_for_testing_framework(testing_framework) testing_framework == :rspec ? '' : %{gem "#{testing_framework}", :group => :test} end
Generated with the Darkfish Rdoc Generator 2.