Sha256: f3a933a91d19ad292e216e9c970c606e1661822f968e1b496680d54baf01f6cc

Contents?: true

Size: 1.15 KB

Versions: 13

Compression:

Stored size: 1.15 KB

Contents

require 'compass/installers'

module Compass
  module Commands
    module InstallerCommand
      include Compass::Installers

      def configure!
        if respond_to?(:is_project_creation?) && is_project_creation?
          Compass.add_configuration(options.delete(:project_type) || :stand_alone)
        else
          Compass.add_project_configuration(:project_type => options.delete(:project_type))
        end
        Compass.add_configuration(options, 'command_line')
        if File.exists?(Compass.configuration.extensions_path)
          Compass::Frameworks.discover(Compass.configuration.extensions_path)
        end
        Compass.add_configuration(installer.completed_configuration, 'installer')
      end

      def app
        @app ||= Compass::AppIntegration.lookup(Compass.configuration.project_type)
      end

      def installer
        @installer ||= if options[:bare]
          Compass::Installers::BareInstaller.new(*installer_args)
        else
          app.installer(*installer_args)
        end
      end

      def installer_args
        [template_directory(options[:pattern] || "project"), project_directory, options]
      end
    end
  end
end

Version data entries

13 entries across 12 versions & 3 rubygems

Version Path
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.8/gems/compass-0.10.0.pre5/lib/compass/commands/installer_command.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.9.1/gems/compass-0.10.0.pre4/lib/compass/commands/installer_command.rb
compass-0.10.0.pre5 lib/compass/commands/installer_command.rb
compass-0.10.0.pre4 lib/compass/commands/installer_command.rb
compass-0.10.0.pre3 lib/compass/commands/installer_command.rb
middleman-0.12.2 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/installer_command.rb
middleman-0.12.1 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/installer_command.rb
middleman-0.12.0.pre3 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/installer_command.rb
middleman-0.12.0.pre2 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/installer_command.rb
compass-0.10.0.pre2 lib/compass/commands/installer_command.rb
compass-0.10.0.pre1 lib/compass/commands/installer_command.rb
compass-edge-0.9.5.0 lib/compass/commands/installer_command.rb
compass-edge-0.9.4 lib/compass/commands/installer_command.rb