Sha256: 3b450f752505b121509bf054cd193881de0eb89b140455332a15e02dc296346d

Contents?: true

Size: 933 Bytes

Versions: 43

Compression:

Stored size: 933 Bytes

Contents

require File.join(File.dirname(__FILE__), 'project_base')
require File.join(File.dirname(__FILE__), 'update_project')
require File.join(File.dirname(__FILE__), '..', 'grid_builder')

module Compass
  module Commands
    class GenerateGridBackground < ProjectBase
      include Actions
      def initialize(working_path, options)
        super
        assert_project_directory_exists!
      end

      def perform
        column_width, gutter_width = options[:grid_dimensions].split(/\+/).map{|d| d.to_i}
        unless GridBuilder.new(options.merge(:column_width => column_width, :gutter_width => gutter_width, :output_path => projectize(project_images_subdirectory), :working_path => self.working_path)).generate!
          puts "ERROR: Some library dependencies appear to be missing."
          puts "Have you installed rmagick? If not, please run:"
          puts "sudo gem install rmagick"
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 4 rubygems

Version Path
alphasights-compass-0.8.12 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.0 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.1 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.10 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.11 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.12 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.13 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.14 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.15 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.2 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.3 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.4 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.5 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.6 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.7 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.8 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.6.9 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.7.0 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.8.0 lib/compass/commands/generate_grid_background.rb
chriseppstein-compass-0.8.1 lib/compass/commands/generate_grid_background.rb