Class: Lotus::RakeHelper Private
- Inherits:
-
Object
- Object
- Lotus::RakeHelper
- Includes:
- Rake::DSL
- Defined in:
- lib/lotus/rake_helper.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Install Rake tasks in projects
Class Method Summary collapse
- .install_tasks ⇒ Object private
Instance Method Summary collapse
- #install ⇒ Object private
Class Method Details
.install_tasks ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/lotus/rake_helper.rb', line 13 def self.install_tasks new.install end |
Instance Method Details
#install ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/lotus/rake_helper.rb', line 19 def install desc "Preload project configuration" task :preload do require 'lotus/environment' Lotus::Environment.new end desc "Load the full project" task environment: :preload do require Lotus::Environment.new.env_config Lotus::Application.preload_applications! end # Ruby ecosystem compatibility # # Most of the SaaS automatic tasks are designed after Ruby on Rails. # They expect the following Rake tasks to be present: # # * db:migrate # * assets:precompile # # See https://github.com/heroku/heroku-buildpack-ruby/issues/442 # # === # # These Rake tasks aren't listed when someone runs `rake -T`, because we # want to encourage developers to use `lotus` commands. # # In order to migrate the database or precompile assets a developer should # use: # # * lotus db migrate # * lotus assets precompile # # This is the preferred way to run Lotus command line tasks. # Please use them when you're in control of your deployment environment. namespace :db do task :migrate do system "bundle exec lotus db migrate" end end namespace :assets do task :precompile do system "bundle exec lotus assets precompile" end end end |