Sha256: 77c8eb9c73e783e6b0981dc6725c608e12ff894f52f72a04d1dc579920ccbda6

Contents?: true

Size: 658 Bytes

Versions: 2

Compression:

Stored size: 658 Bytes

Contents

require 'lotus/assets'

module Lotus
  module Commands
    class Assets
      class Precompile
        def initialize(options, environment)
          @options     = options
          @environment = environment
        end

        def start
          preload_applications
          precompile
        end

        private

        def preload_applications
          @environment.require_application_environment

          if @environment.container?
            Lotus::Container.new
          else
            Lotus::Application.preload!
          end
        end

        def precompile
          Lotus::Assets.deploy
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lotusrb-0.6.1 lib/lotus/commands/assets/precompile.rb
lotusrb-0.6.0 lib/lotus/commands/assets/precompile.rb