Class: Quartet::Builders::Rakefile
- Defined in:
- lib/quartet/builders/rakefile.rb
Instance Method Summary collapse
- #build(app_name) ⇒ Object
-
#initialize ⇒ Rakefile
constructor
A new instance of Rakefile.
Methods inherited from Builder
Constructor Details
#initialize ⇒ Rakefile
Returns a new instance of Rakefile.
5 6 7 8 9 |
# File 'lib/quartet/builders/rakefile.rb', line 5 def initialize @name_override = "Rakefile" @directory = '' @file_type = '' end |
Instance Method Details
#build(app_name) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/quartet/builders/rakefile.rb', line 11 def build(app_name) %(# frozen_string_literal: true # Rakefile generated for #{app_name} by Quartet # Add tasks as required here require 'sinatra/activerecord/rake' namespace :db do task :load_config do require './app' end end task :c do sh 'bundle exec irb -I. -r app.rb' end task :console do sh 'bundle exec irb -I. -r app.rb' end task :serve do sh 'bundle exec rackup config.ru' end task :s do sh 'bundle exec rackup config.ru' end ) end |