Sha256: c5b51437b807286d9f7481cc9e2e70c0e89d0d5a9c0890fdf95e8c47ce9a22cf

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

require 'awestruct/engine'
require 'compass'

module Awestruct
  module CLI
    class Generate

      def initialize(config, profile=nil, base_url=nil, default_base_url=Options::DEFAULT_BASE_URL, force=false)
        @profile          = profile
        @base_url         = base_url
        @default_base_url = default_base_url
        @force            = force
        @engine           = Awestruct::Engine.new( config )
      end

      def run()
        begin
          base_url = @base_url || @default_base_url
          $LOG.info "Generating site: #{base_url}" if $LOG.info?
          @engine.run( @profile, @base_url, @default_base_url, @force )
        rescue =>e
          $LOG.error e if $LOG.error?
          $LOG.error e.backtrace.join("\n") if $LOG.error?
          return false
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
awestruct-0.5.4.rc lib/awestruct/cli/generate.rb