Class: ForgeCLI::EcommercePostHooks
- Inherits:
-
PostHooks
- Object
- PostHooks
- ForgeCLI::EcommercePostHooks
show all
- Defined in:
- lib/forge-cli/modules/ecommerce/post_hooks.rb
Instance Method Summary
collapse
Methods inherited from PostHooks
#initialize, run!
Instance Method Details
#add_controller_module ⇒ Object
17
18
19
20
21
|
# File 'lib/forge-cli/modules/ecommerce/post_hooks.rb', line 17
def add_controller_module
STDOUT.puts "Adding controller methods..."
cmi = ForgeCLI::ControllerModuleIncluder.new(@app, 'ecommerce')
cmi.run!
end
|
#add_routes ⇒ Object
10
11
12
13
14
15
|
# File 'lib/forge-cli/modules/ecommerce/post_hooks.rb', line 10
def add_routes
STDOUT.puts "Adding Routes..."
ri = ForgeCLI::RouteInstaller.new(@app, module_path)
ri.install_routes
ri.install_routes(:forge)
end
|
#module_path ⇒ Object
23
24
25
|
# File 'lib/forge-cli/modules/ecommerce/post_hooks.rb', line 23
def module_path
File.dirname(__FILE__)
end
|
#run! ⇒ Object
2
3
4
5
6
7
8
|
# File 'lib/forge-cli/modules/ecommerce/post_hooks.rb', line 2
def run!
add_routes
add_controller_module
STDOUT.puts "Adding config..."
require_addon(:ecommerce)
end
|