compass 0.12.alpha.2 → 0.12.alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. data/VERSION.yml +1 -1
  2. data/examples/compass/compass_app_log.txt +6 -0
  3. data/features/extensions.feature +1 -1
  4. data/features/step_definitions/command_line_steps.rb +7 -6
  5. data/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss +1 -1
  6. data/frameworks/compass/stylesheets/compass/css3/_images.scss +6 -6
  7. data/frameworks/compass/stylesheets/compass/typography/_vertical_rhythm.scss +15 -3
  8. data/lib/compass/configuration/helpers.rb +19 -2
  9. data/lib/compass/sass_extensions/functions/image_size.rb +3 -3
  10. data/lib/compass/sass_extensions/functions/lists.rb +5 -0
  11. data/lib/compass/sass_extensions/sprites.rb +2 -0
  12. data/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb +1 -13
  13. data/lib/compass/sass_extensions/sprites/image.rb +22 -2
  14. data/lib/compass/sass_extensions/sprites/layout_methods.rb +33 -1
  15. data/lib/compass/sass_extensions/sprites/sprite_map.rb +8 -1
  16. data/lib/compass/sass_extensions/sprites/sprite_methods.rb +2 -3
  17. data/test/fixtures/sprites/public/images/repeat_x/five.png +0 -0
  18. data/test/fixtures/sprites/public/images/repeat_x/four.png +0 -0
  19. data/test/fixtures/sprites/public/images/repeat_x/one.png +0 -0
  20. data/test/fixtures/sprites/public/images/repeat_x/three.png +0 -0
  21. data/test/fixtures/sprites/public/images/repeat_x/two.png +0 -0
  22. data/test/fixtures/stylesheets/compass/css/box_shadow.css +0 -3
  23. data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +3 -0
  24. data/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss +3 -1
  25. data/test/helpers/rails.rb +11 -2
  26. data/test/integrations/sprites_test.rb +3 -3
  27. data/test/test_helper.rb +10 -3
  28. data/test/units/actions_test.rb +1 -1
  29. data/test/units/sass_extensions_test.rb +4 -0
  30. data/test/units/sprites/engine_test.rb +6 -1
  31. data/test/units/sprites/image_row_test.rb +1 -0
  32. data/test/units/sprites/image_test.rb +18 -24
  33. data/test/units/sprites/layout_test.rb +155 -0
  34. data/test/units/sprites/sprite_command_test.rb +6 -2
  35. data/test/units/sprites/sprite_map_test.rb +18 -96
  36. metadata +21 -10
  37. data/test/tmp/compass_rails/public/images/selectors-s4c703bbc05.png +0 -0
@@ -2,5 +2,5 @@
2
2
  :major: 0
3
3
  :minor: 12
4
4
  :state: alpha
5
- :build: 2
5
+ :build: 3
6
6
  :name: Alnilam
@@ -0,0 +1,6 @@
1
+ 2011-12-22 23:55:48 overwrite stylesheets/bp_layout.css
2
+ 2011-12-22 23:55:48 identical stylesheets/compass.css
3
+ 2011-12-22 23:55:49 overwrite stylesheets/pie.css
4
+ 2011-12-22 23:59:05 identical stylesheets/bp_layout.css
5
+ 2011-12-22 23:59:05 identical stylesheets/compass.css
6
+ 2011-12-22 23:59:05 identical stylesheets/pie.css
@@ -15,7 +15,7 @@ Feature: Extensions
15
15
  @listframeworks
16
16
  Scenario: Extensions directory for rails projects
17
17
  Given ruby supports fork
18
- And I'm in a newly created rails project: my_rails_project
18
+ And I'm in a newly created rails project: extension_test_rails_project
19
19
  And I run: compass init rails
20
20
  And the "vendor/plugins/compass_extensions" directory exists
21
21
  And and I have a fake extension at vendor/plugins/compass_extensions/testing
@@ -42,10 +42,11 @@ Given %r{^I am in the parent directory$} do
42
42
  end
43
43
 
44
44
  Given %r{^I'm in a newly created rails project: (.+)$} do |project_name|
45
- @cleanup_directories << project_name
45
+ dir = File.join(Dir.pwd, project_name)
46
+ @cleanup_directories << dir
46
47
  begin
47
- generate_rails_app project_name
48
- Dir.chdir project_name
48
+ generate_rails_app project_name, Dir.pwd
49
+ Dir.chdir dir
49
50
  rescue LoadError
50
51
  pending "Missing Ruby-on-rails gems: sudo gem install rails"
51
52
  end
@@ -136,13 +137,13 @@ end
136
137
  Then "the following files are reported removed:" do |table|
137
138
  table.rows.each do |css_file|
138
139
  #need to find a better way but this works for now
139
- Then %Q{a css file #{css_file.first} is reported removed}
140
+ step %Q{a css file #{css_file.first} is reported removed}
140
141
  end
141
142
  end
142
143
 
143
144
  Then "the following files are removed:" do |table|
144
145
  table.rows.each do |css_file|
145
- Then %Q{a css file #{css_file.first} is removed}
146
+ step %Q{a css file #{css_file.first} is removed}
146
147
  end
147
148
  end
148
149
 
@@ -258,7 +259,7 @@ end
258
259
  Then /^I should see the following "([^"]+)" commands:$/ do |kind, table|
259
260
 
260
261
 
261
- Then %Q{I should be shown a list of "#{kind}" commands}
262
+ step %Q{I should be shown a list of "#{kind}" commands}
262
263
 
263
264
  commands = @last_command_list.map{|c| c =~ /^\s+\* ([^ ]+)\s+- [A-Z].+$/; [$1]}
264
265
  table.diff!(commands)
@@ -45,7 +45,7 @@ $default-box-shadow-inset : false !default;
45
45
  }
46
46
  $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
47
47
  @include experimental(box-shadow, $shadow,
48
- -moz, -webkit, -o, not -ms, not -khtml, official
48
+ -moz, -webkit, not -o, not -ms, not -khtml, official
49
49
  );
50
50
  }
51
51
 
@@ -91,12 +91,12 @@
91
91
 
92
92
  // Border image property support for vendor prefixing properties and values.
93
93
  @mixin border-image($value) {
94
- @if $experimental-support-for-mozilla { -moz-border-image: -moz(-compass-list($value)); }
95
- @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(-compass-list($value)); }
96
- @if $experimental-support-for-webkit { -webkit-border-image: -webkit(-compass-list($value)); }
97
- @if $experimental-support-for-opera { -o-border-image: -o(-compass-list($value)); }
98
- @if $experimental-support-for-svg { border-image: -svg(-compass-list($value)); }
99
- border-image: $value;
94
+ @if $experimental-support-for-mozilla { -moz-border-image: -moz(reject(-compass-list($value), fill)); }
95
+ @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(reject(-compass-list($value), fill)); }
96
+ @if $experimental-support-for-webkit { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); }
97
+ @if $experimental-support-for-opera { -o-border-image: -o(reject(-compass-list($value), fill)); }
98
+ @if $experimental-support-for-svg { border-image: -svg(reject(-compass-list($value), fill)); }
99
+ border-image: $value;
100
100
  }
101
101
 
102
102
  // List style image property support for vendor prefixing within values.
@@ -15,9 +15,14 @@ $ie-font-ratio: 16px / 100%;
15
15
  // Set to false if you want to use absolute pixes in sizing your typography.
16
16
  $relative-font-sizing: true !default;
17
17
 
18
+ // Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function
19
+ // to round the line height to the nearest half line height instead of the
20
+ // nearest integral line height to avoid large spacing between lines.
21
+ $round-to-nearest-half-line: false !default;
22
+
18
23
  // Ensure there is at least this many pixels
19
24
  // of vertical padding above and below the text.
20
- $min-line-padding: 2px;
25
+ $min-line-padding: 2px !default;
21
26
 
22
27
  // $base-font-size but in your output unit of choice.
23
28
  // Defaults to 1em when `$relative-font-sizing`
@@ -59,6 +64,11 @@ $base-half-leader: $base-leader / 2;
59
64
  }
60
65
  }
61
66
 
67
+ // resets the baseline to 1 leading unit
68
+ @mixin reset-baseline {
69
+ @include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size));
70
+ }
71
+
62
72
  // Show a background image that can be used to debug your alignments.
63
73
  // include the $img argument if you would rather use your own image than the
64
74
  // Compass default gradient image.
@@ -103,9 +113,11 @@ $base-half-leader: $base-leader / 2;
103
113
  }
104
114
 
105
115
  @function lines-for-font-size($font-size) {
106
- $lines: ceil($font-size / $base-line-height);
116
+ $lines: if($round-to-nearest-half-line,
117
+ ceil(2 * $font-size / $base-line-height) / 2,
118
+ ceil($font-size / $base-line-height));
107
119
  @if $lines * $base-line-height - $font-size < $min-line-padding * 2 {
108
- $lines: $lines + 1;
120
+ $lines: $lines + if($round-to-nearest-half-line, 0.5, 1);
109
121
  }
110
122
  @return $lines;
111
123
  }
@@ -67,12 +67,19 @@ module Compass
67
67
  end
68
68
  end
69
69
  unless @callbacks_loaded
70
- Sass::Plugin.on_updating_stylesheet do |sass_file, css_file|
71
- Compass.configuration.run_stylesheet_saved(css_file)
70
+ on_saved = Proc.new do |sass_file, css_file|
71
+ Compass.configuration.run_stylesheet_saved(css_file)
72
+ end
73
+ if Sass::Plugin.respond_to?(:on_updated_stylesheet)
74
+ Sass::Plugin.on_updated_stylesheet(&on_saved)
75
+ else
76
+ Sass::Plugin.on_updating_stylesheet(&on_saved)
72
77
  end
78
+
73
79
  Sass::Plugin.on_compilation_error do |e, filename, css|
74
80
  Compass.configuration.run_stylesheet_error(filename, e.message)
75
81
  end
82
+
76
83
  @callbacks_loaded = true
77
84
  end
78
85
  end
@@ -92,6 +99,16 @@ module Compass
92
99
  def add_project_configuration(*args)
93
100
  options = args.last.is_a?(Hash) ? args.pop : {}
94
101
  configuration_file_path = args.shift || detect_configuration_file
102
+
103
+ # TODO make this better i don't think it belongs here but it gets the job done
104
+ # This will allow compass to boot rails and load the config if its configured in the application.rb file via railtie
105
+ # if File.exists?(projectize('config/boot.rb')) && configuration_file_path.nil?
106
+ # require 'rails'
107
+ # require projectize('config/application.rb')
108
+ # options[:project_type] = :rails
109
+ # end
110
+
111
+
95
112
  raise ArgumentError, "Too many arguments" if args.any?
96
113
  if data = configuration_for(configuration_file_path, nil, configuration_for(options[:defaults]))
97
114
  if data.raw_project_type
@@ -1,13 +1,13 @@
1
1
  module Compass::SassExtensions::Functions::ImageSize
2
2
  # Returns the width of the image relative to the images directory
3
3
  def image_width(image_file)
4
- width, _ = image_demensions(image_file)
4
+ width, _ = image_dimensions(image_file)
5
5
  Sass::Script::Number.new(width,["px"])
6
6
  end
7
7
 
8
8
  # Returns the height of the image relative to the images directory
9
9
  def image_height(image_file)
10
- _, height = image_demensions(image_file)
10
+ _, height = image_dimensions(image_file)
11
11
  Sass::Script::Number.new(height, ["px"])
12
12
  end
13
13
 
@@ -44,7 +44,7 @@ module Compass::SassExtensions::Functions::ImageSize
44
44
 
45
45
  private
46
46
 
47
- def image_demensions(image_file)
47
+ def image_dimensions(image_file)
48
48
  options[:compass] ||= {}
49
49
  options[:compass][:image_dimensions] ||= {}
50
50
  options[:compass][:image_dimensions][image_file.value] = ImageProperties.new(image_path_for_size(image_file.value)).size
@@ -74,6 +74,11 @@ module Compass::SassExtensions::Functions::Lists
74
74
  Sass::Script::List.new list.values[start_index..end_index], list.separator
75
75
  end
76
76
 
77
+ # removes the given values from the list.
78
+ def reject(list, *values)
79
+ Sass::Script::List.new(list.value.reject{|v| values.any?{|o| v == o}}, list.separator)
80
+ end
81
+
77
82
  # returns the first value of a space delimited list.
78
83
  def first_value_of(list)
79
84
  if list.is_a?(Sass::Script::String)
@@ -2,11 +2,13 @@ require 'digest/md5'
2
2
  require 'compass/sprite_importer'
3
3
 
4
4
  module Compass
5
+ class SpriteException < Exception; end
5
6
  module SassExtensions
6
7
  module Sprites
7
8
  end
8
9
  end
9
10
  end
11
+
10
12
  require 'compass/sass_extensions/sprites/image_row'
11
13
  require 'compass/sass_extensions/sprites/row_fitter'
12
14
  require 'compass/sass_extensions/sprites/image'
@@ -13,19 +13,7 @@ module Compass
13
13
  @canvas = ChunkyPNG::Image.new(width, height, ChunkyPNG::Color::TRANSPARENT)
14
14
  images.each do |image|
15
15
  input_png = ChunkyPNG::Image.from_file(image.file)
16
- if image.repeat == "no-repeat"
17
- canvas.replace! input_png, image.left, image.top
18
- else
19
- x = image.left - (image.left / image.width).ceil * image.width
20
- while x < width do
21
- begin
22
- canvas.replace! input_png, x, image.top
23
- x += image.width
24
- rescue ChunkyPNG::OutOfBounds
25
- break;
26
- end
27
- end
28
- end
16
+ canvas.replace! input_png, image.left, image.top
29
17
  end
30
18
  end
31
19
 
@@ -6,6 +6,11 @@ module Compass
6
6
  TARGET = %r{[_-]target$}
7
7
  HOVER = %r{[_-]hover$}
8
8
  PARENT = %r{(.+)[-_](.+)$}
9
+
10
+ REPEAT_X = 'repeat-x'
11
+ NO_REPEAT = 'no-repeat'
12
+
13
+ VALID_REPEATS = [REPEAT_X, NO_REPEAT]
9
14
 
10
15
  attr_reader :relative_file, :options, :base
11
16
  attr_accessor :top, :left
@@ -53,8 +58,23 @@ module Compass
53
58
  end
54
59
 
55
60
  # Value of <tt> $#{name}-repeat </tt> or <tt> $repeat </tt>
56
- def repeat
57
- @repeat ||= (get_var_file("repeat") || options.get_var("repeat") || Sass::Script::String.new("no-repeat")).value
61
+ def repeat
62
+ @repeat ||= begin
63
+ rep = (get_var_file("repeat") || options.get_var("repeat") || Sass::Script::String.new(NO_REPEAT)).value
64
+ unless VALID_REPEATS.include? rep
65
+ raise SpriteException, "Invalid option for repeat \"#{rep}\" - valid options are #{VALID_REPEATS.join(', ')}"
66
+ end
67
+
68
+ rep
69
+ end
70
+ end
71
+
72
+ def repeat_x?
73
+ repeat == REPEAT_X
74
+ end
75
+
76
+ def no_repeat?
77
+ repeat == NO_REPEAT
58
78
  end
59
79
 
60
80
  # Value of <tt> $#{name}-position </tt> or <tt> $position </tt> defaults to <tt>0px</tt>
@@ -5,6 +5,7 @@ module Compass
5
5
  HORIZONTAL = 'horizontal'
6
6
  DIAGONAL = 'diagonal'
7
7
  SMART = 'smart'
8
+ VERTICAL = 'vertical'
8
9
 
9
10
  def smart?
10
11
  layout == SMART
@@ -17,6 +18,10 @@ module Compass
17
18
  def diagonal?
18
19
  layout == DIAGONAL
19
20
  end
21
+
22
+ def vertical?
23
+ layout == VERTICAL
24
+ end
20
25
 
21
26
  def layout
22
27
  @layout ||= @kwargs.get_var('layout').value
@@ -43,11 +48,38 @@ module Compass
43
48
  b.size <=> a.size
44
49
  end
45
50
  end
51
+
46
52
  @width = width_for_vertical_layout
47
53
  calulate_vertical_postions
48
54
  @height = height_for_vertical_layout
55
+ if @images.any?(&:repeat_x?)
56
+ calculate_repeat_extra_width!
57
+ tile_images_that_repeat
58
+ end
49
59
  end
50
60
  end
61
+
62
+ def tile_images_that_repeat
63
+ @images.map {|img| img if img.repeat_x?}.compact.each do |image|
64
+ x = image.left - (image.left / image.width).ceil * image.width
65
+ while x < @width do
66
+ begin
67
+ img = image.dup
68
+ img.top = image.top
69
+ img.left = x.to_i
70
+ @images << img
71
+ x += image.width
72
+ end
73
+ end
74
+ end
75
+ end
76
+
77
+ def calculate_repeat_extra_width!
78
+ require 'rational' #for ruby 1.8.7
79
+ m = @images.inject(1) {|m,img| img.repeat_x? ? m.lcm(img.width) : m}
80
+ remainder = @width % m
81
+ @width += (m - remainder) unless remainder.zero?
82
+ end
51
83
 
52
84
  def calculate_smart_positions
53
85
  fitter = ::Compass::SassExtensions::Sprites::RowFitter.new(@images)
@@ -97,7 +129,7 @@ module Compass
97
129
 
98
130
  def calulate_vertical_postions
99
131
  @images.each_with_index do |image, index|
100
- image.left = image.position.unit_str == "%" ? (@width - image.width) * (image.position.value / 100.0) : image.position.value
132
+ image.left = (image.position.unit_str == "%" ? (@width - image.width) * (image.position.value / 100.0) : image.position.value).to_i
101
133
  next if index == 0
102
134
  last_image = @images[index-1]
103
135
  image.top = last_image.top + last_image.height + [image.spacing, last_image.spacing].max
@@ -49,7 +49,14 @@ module Compass
49
49
  end
50
50
 
51
51
  def inspect
52
- to_s
52
+ puts 'images'
53
+ @images.each do |img|
54
+ puts img.file
55
+ end
56
+ puts "options"
57
+ @kwargs.each do |k,v|
58
+ puts "#{k}:#{v}"
59
+ end
53
60
  end
54
61
 
55
62
  def to_s(kwargs = self.kwargs)
@@ -27,8 +27,7 @@ module Compass
27
27
  # Creates the Sprite::Image objects for each image and calculates the width
28
28
  def init_images
29
29
  @images = image_names.collect do |relative_file|
30
- image = Compass::SassExtensions::Sprites::Image.new(self, relative_file, kwargs)
31
- image
30
+ Image.new(self, relative_file, kwargs)
32
31
  end
33
32
  end
34
33
 
@@ -69,7 +68,7 @@ module Compass
69
68
  end
70
69
 
71
70
  def cleanup_old_sprites
72
- Dir[File.join(Compass.configuration.images_path, "#{path}-*.png")].each do |file|
71
+ Dir[File.join(Compass.configuration.images_path, "#{path}-s*.png")].each do |file|
73
72
  log :remove, file
74
73
  FileUtils.rm file
75
74
  Compass.configuration.run_sprite_removed(file)
@@ -1,17 +1,14 @@
1
1
  .box-shadow {
2
2
  -webkit-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222;
3
3
  -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222;
4
- -o-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222;
5
4
  box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; }
6
5
 
7
6
  .single-box-shadow {
8
7
  -webkit-box-shadow: 0px 0px 5px #333333;
9
8
  -moz-box-shadow: 0px 0px 5px #333333;
10
- -o-box-shadow: 0px 0px 5px #333333;
11
9
  box-shadow: 0px 0px 5px #333333; }
12
10
 
13
11
  .multiple-box-shadows {
14
12
  -webkit-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222;
15
13
  -moz-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222;
16
- -o-box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222;
17
14
  box-shadow: 0px 0px 5px #333333, 2px 2px 5px #222222; }
@@ -40,3 +40,6 @@ html > body {
40
40
  border-bottom-style: solid;
41
41
  border-bottom-width: 0.25em;
42
42
  padding-bottom: 0.417em; }
43
+
44
+ .reset {
45
+ line-height: 1.143em; }
@@ -11,4 +11,6 @@ $base-line-height: 16px;
11
11
  .small-padded { @include adjust-font-size-to(12px,1); @include rhythm(1,1,1,1,12px); }
12
12
 
13
13
  .borders { @include h-borders(1px,1); }
14
- .large-borders { @include adjust-font-size-to(24px,3); @include h-borders(6px,1,24px); }
14
+ .large-borders { @include adjust-font-size-to(24px,3); @include h-borders(6px,1,24px); }
15
+
16
+ .reset { @include reset-baseline; }
@@ -10,7 +10,7 @@ module Compass
10
10
  # Generate a rails application without polluting our current set of requires
11
11
  # with the rails libraries. This will allow testing against multiple versions of rails
12
12
  # by manipulating the load path.
13
- def generate_rails_app(name)
13
+ def generate_rails_app(name, dir = nil)
14
14
  if pid = fork
15
15
  Process.wait(pid)
16
16
  if $?.exitstatus == 2
@@ -22,7 +22,16 @@ module Compass
22
22
  begin
23
23
  require 'action_pack/version'
24
24
  if ActionPack::VERSION::MAJOR >= 3
25
- `rails new #{name}`
25
+ require 'rails/generators'
26
+ require 'rails/generators/rails/app/app_generator'
27
+ require 'mocha'
28
+ dir ||= File.join(File.expand_path('../../', __FILE__))
29
+ args = [File.join(dir, name), '-q', '-f', '--skip-bundle', '--skip-gemfile']
30
+
31
+ #stub this so you can generate more apps
32
+ Rails::Generators::AppGenerator.any_instance.stubs(:valid_const?).returns(true)
33
+ Rails::Generators::AppGenerator.start(args, {:destination_root => dir})
34
+
26
35
  else
27
36
  require 'rails/version'
28
37
  require 'rails_generator'
@@ -374,13 +374,13 @@ class SpritesTest < Test::Unit::TestCase
374
374
 
375
375
  it "should repeat the image" do
376
376
  css = render <<-SCSS
377
- $squares-repeat: repeat;
377
+ $squares-repeat: repeat-x;
378
378
  @import "squares/*.png";
379
379
  @include all-squares-sprites;
380
380
  SCSS
381
381
  assert_correct css, <<-CSS
382
382
  .squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
383
- background: url('/squares-sbab486c25a.png') no-repeat;
383
+ background: url('/squares-s65c43cd573.png') no-repeat;
384
384
  }
385
385
 
386
386
  .squares-ten-by-ten {
@@ -628,7 +628,7 @@ class SpritesTest < Test::Unit::TestCase
628
628
  SCSS
629
629
  assert_correct css, <<-CSS
630
630
  .ko-sprite, .ko-default_background, .ko-starbg26x27 {
631
- background: url('/ko-sd6b4d44430.png') no-repeat;
631
+ background: url('/ko-sd46dfbab4f.png') no-repeat;
632
632
  }
633
633
 
634
634
  .ko-default_background {
@@ -23,6 +23,12 @@ require 'compass'
23
23
  require 'test/unit'
24
24
 
25
25
 
26
+ class String
27
+ def name
28
+ to_s
29
+ end
30
+ end
31
+
26
32
  %w(command_line diff io rails test_case).each do |helper|
27
33
  require "helpers/#{helper}"
28
34
  end
@@ -49,7 +55,7 @@ module SpriteHelper
49
55
  path, name = Compass::SpriteImporter.path_and_name(uri)
50
56
  sprite_names = Compass::SpriteImporter.sprite_names(uri)
51
57
  sass_engine = Compass::SpriteImporter.sass_engine(uri, name, importer, options)
52
- map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map{|n| "selectors/#{n}.png"}, path, name, sass_engine, options)
58
+ map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map{|n| uri.gsub('*', n)}, path, name, sass_engine, options)
53
59
  map.options = {:compass => {:logger => Compass::NullLogger.new}}
54
60
  map
55
61
  end
@@ -60,8 +66,9 @@ module SpriteHelper
60
66
  end
61
67
 
62
68
  def clean_up_sprites
63
- init_sprite_helper
64
- ::FileUtils.rm_r @images_tmp_path
69
+ init_sprite_helper
70
+ ::FileUtils.rm_r @images_tmp_path
71
+ rescue Errno::ENOENT => e
65
72
  end
66
73
 
67
74
  end
@@ -13,7 +13,7 @@ class ActionsTest < Test::Unit::TestCase
13
13
  end
14
14
 
15
15
  # When log4r is included, it sometimes breaks the Actions
16
- def test_quiet_option
16
+ test "test_quiet_option" do
17
17
  b = BaseActionExtender.new
18
18
  b.logger = ""
19
19
  b.options[:quiet] = true
@@ -152,6 +152,10 @@ class SassExtensionsTest < Test::Unit::TestCase
152
152
  Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(object)
153
153
  end
154
154
 
155
+ def test_reject
156
+ assert_equal "b d", evaluate("reject(a b c d, a, c)")
157
+ assert_equal "a b c d", evaluate("reject(a b c d, e)")
158
+ end
155
159
 
156
160
  protected
157
161
  def evaluate(value)
@@ -1,14 +1,19 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class EngineTest < Test::Unit::TestCase
4
-
4
+ include SpriteHelper
5
5
  def setup
6
+ create_sprite_temp
6
7
  sprite_filename = 'squares/ten-by-ten.png'
7
8
  @images = [
8
9
  Compass::SassExtensions::Sprites::Image.new(nil, File.join(sprite_filename), {})
9
10
  ]
10
11
  @engine = Compass::SassExtensions::Sprites::Engine.new(100, 100, @images)
11
12
  end
13
+
14
+ def taredown
15
+ clean_up_sprites
16
+ end
12
17
 
13
18
 
14
19
  test "should have width of 100" do
@@ -3,6 +3,7 @@ require 'test_helper'
3
3
  class ImageRowTest < Test::Unit::TestCase
4
4
  include SpriteHelper
5
5
  def setup
6
+ clean_up_sprites
6
7
  create_sprite_temp
7
8
  file = StringIO.new("images_path = #{@images_src_path.inspect}\n")
8
9
  Compass.add_configuration(file, "sprite_config")
@@ -4,10 +4,15 @@ require 'ostruct'
4
4
 
5
5
  class SpritesImageTest < Test::Unit::TestCase
6
6
  include SpriteHelper
7
+
7
8
  def setup
8
9
  create_sprite_temp
9
10
  end
10
11
 
12
+ def teardown
13
+ clean_up_sprites
14
+ end
15
+
11
16
  SPRITE_FILENAME = 'selectors/ten-by-ten.png'
12
17
 
13
18
  def sprite_path
@@ -51,13 +56,22 @@ class SpritesImageTest < Test::Unit::TestCase
51
56
  assert_nil test_image.parent
52
57
  end
53
58
 
54
- test 'image type is "global"' do
55
- image = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('global')
56
- assert_equal 'global', image.repeat
59
+ test 'image type is "global" should raise exception' do
60
+ assert_raise ::Compass::SpriteException do
61
+ image = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('global')
62
+ image.repeat
63
+ end
57
64
  end
58
65
 
59
66
  test 'image type is "no-repeat"' do
60
- assert_equal 'no-repeat', test_image.repeat
67
+ img = test_image
68
+ assert_equal 'no-repeat', img.repeat
69
+ assert img.no_repeat?
70
+ end
71
+
72
+ test 'image repeat-x' do
73
+ img = test_image "selectors_ten_by_ten_repeat" => Sass::Script::String.new('repeat-x')
74
+ assert img.repeat_x?
61
75
  end
62
76
 
63
77
  test 'image position' do
@@ -82,24 +96,4 @@ class SpritesImageTest < Test::Unit::TestCase
82
96
  assert_equal 0, img.offset
83
97
  end
84
98
 
85
-
86
- test 'gets name for sprite in search path' do
87
- Compass.reset_configuration!
88
- uri = 'foo/*.png'
89
- other_folder = File.join(@images_tmp_path, '../other-temp')
90
- FileUtils.mkdir_p other_folder
91
- FileUtils.mkdir_p File.join(other_folder, 'foo')
92
- %w(my bar).each do |file|
93
- FileUtils.touch(File.join(other_folder, "foo/#{file}.png"))
94
- end
95
- config = Compass::Configuration::Data.new('config')
96
- config.images_path = @images_tmp_path
97
- config.sprite_load_path = [@images_tmp_path, other_folder]
98
- Compass.add_configuration(config, "sprite_config")
99
- image = Compass::SassExtensions::Sprites::Image.new(test_map, "foo/my.png", {})
100
- assert_equal File.join(other_folder, 'foo/my.png'), image.file
101
- assert_equal 0, image.size
102
- FileUtils.rm_rf other_folder
103
- end
104
-
105
99
  end
@@ -0,0 +1,155 @@
1
+ require 'test_helper'
2
+
3
+ class LayoutTest < Test::Unit::TestCase
4
+ include SpriteHelper
5
+
6
+ def setup
7
+ Hash.send(:include, Compass::SassExtensions::Functions::Sprites::VariableReader)
8
+ clean_up_sprites
9
+ create_sprite_temp
10
+ file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n")
11
+ Compass.add_configuration(file, "sprite_config")
12
+ Compass.configure_sass_plugin!
13
+ @options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')}
14
+ end
15
+
16
+ def teardown
17
+ clean_up_sprites
18
+ end
19
+
20
+ # HELPERS
21
+
22
+ def vertical
23
+ opts = @options.merge("layout" => Sass::Script::String.new('vertical'))
24
+
25
+ sprite_map_test(opts)
26
+ end
27
+
28
+ def smart
29
+ options = @options.merge("layout" => Sass::Script::String.new('smart'))
30
+ importer = Compass::SpriteImporter.new
31
+ uri = "image_row/*.png"
32
+ path, name = Compass::SpriteImporter.path_and_name(uri)
33
+ sprite_names = Compass::SpriteImporter.sprite_names(uri)
34
+ sass_engine = Compass::SpriteImporter.sass_engine(uri, name, importer, options)
35
+ map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map {|n| "image_row/#{n}.png"}, path, name, sass_engine, options)
36
+ map.options = {:compass => {:logger => Compass::NullLogger.new}}
37
+
38
+ map
39
+ end
40
+
41
+ def diagonal
42
+ opts = @options.merge("layout" => Sass::Script::String.new('diagonal'))
43
+
44
+ sprite_map_test(opts)
45
+ end
46
+
47
+ def horizontal(options= {})
48
+ opts = @options.merge("layout" => Sass::Script::String.new('horizontal'))
49
+ opts.merge!(options)
50
+
51
+ sprite_map_test(opts)
52
+ end
53
+
54
+ # REPEAT_X
55
+
56
+ test 'repeat-x layout single image' do
57
+ opts = {"repeat_x_three_repeat" => Sass::Script::String.new('repeat-x')}
58
+ map = sprite_map_test(@options.merge(opts), 'repeat_x/*.png')
59
+ assert_equal 6, map.width
60
+ assert_equal [0, 4, 7, 9, 14, 4, 4], map.images.map(&:top)
61
+ assert_equal [0, 0, 0, 0, 0, 0, 3], map.images.map(&:left)
62
+ end
63
+
64
+ test 'repeat-x layout multi image' do
65
+ opts = {"repeat_x_three_repeat" => Sass::Script::String.new('repeat-x'), "repeat_x_four_repeat" => Sass::Script::String.new('repeat-x')}
66
+ map = sprite_map_test(@options.merge(opts), 'repeat_x/*.png')
67
+ assert_equal 12, map.width
68
+ end
69
+
70
+ # VERTICAL LAYOUT
71
+
72
+ it "should have a vertical layout" do
73
+ vert = vertical
74
+ assert_equal [0, 10, 20, 30], vert.images.map(&:top)
75
+ assert_equal [0, 0, 0, 0], vert.images.map(&:left)
76
+ assert vert.vertical?
77
+ end
78
+
79
+ it "should have a vertical layout with spacing" do
80
+ vert = sprite_map_test(@options.merge({"spacing" => Sass::Script::Number.new(10, ['px'])}))
81
+ assert_equal [0, 20, 40, 60], vert.images.map(&:top)
82
+ end
83
+
84
+ it "should layout vertical with position" do
85
+ vert = sprite_map_test("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px']))
86
+ assert_equal [0, 10, 0, 0], vert.images.map(&:left)
87
+ end
88
+
89
+ it "should generate vertical sprites in decending order" do
90
+ sizes = vertical.images.map{|image| File.size(image.file) }
91
+ assert_equal sizes.min, File.size(vertical.images.first.file)
92
+ assert_equal sizes.max, File.size(vertical.images.last.file)
93
+ end
94
+
95
+ # SMART LAYOUT
96
+
97
+ it "should have a smart layout" do
98
+ base = smart
99
+ base.generate
100
+ assert base.smart?
101
+ assert_equal 400, base.width
102
+ assert_equal 60, base.height
103
+ assert_equal [[0, 0], [20, 120], [20, 0], [20, 100], [20, 160]], base.images.map {|i| [i.top, i.left]}
104
+ assert File.exists?(base.filename)
105
+ FileUtils.rm base.filename
106
+ end
107
+
108
+ # DIAGONAL LAYOUT
109
+
110
+ it "should generate a diagonal sprite" do
111
+ base = diagonal
112
+ base.generate
113
+ assert base.diagonal?
114
+ assert_equal 40, base.width
115
+ assert_equal 40, base.height
116
+ assert_equal [[30, 0], [20, 10], [10, 20], [0, 30]], base.images.map {|i| [i.top, i.left]}
117
+ assert File.exists?(base.filename)
118
+ FileUtils.rm base.filename
119
+ end
120
+
121
+ # HORIZONTAL LAYOUT
122
+
123
+ it "should have a horizontal layout" do
124
+ base = horizontal
125
+ assert base.horizontal?
126
+ assert_equal 10, base.height
127
+ assert_equal 40, base.width
128
+ end
129
+
130
+ it "should layout images horizontaly" do
131
+ base = horizontal
132
+ assert_equal [0, 10, 20, 30], base.images.map(&:left)
133
+ assert_equal [0, 0, 0, 0], base.images.map(&:top)
134
+ end
135
+
136
+ it "should layout horizontaly with spacing" do
137
+ base = horizontal("spacing" => Sass::Script::Number.new(10, ['px']))
138
+ assert_equal [0, 20, 40, 60], base.images.map(&:left)
139
+ assert_equal [0, 0, 0, 0], base.images.map(&:top)
140
+ assert_equal 80, base.width
141
+ end
142
+
143
+ it "should layout horizontaly with position" do
144
+ base = horizontal("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px']))
145
+ assert_equal [0, 10, 0, 0], base.images.map(&:top)
146
+ end
147
+
148
+ it "should generate a horrizontal sprite" do
149
+ base = horizontal
150
+ base.generate
151
+ assert File.exists?(base.filename)
152
+ FileUtils.rm base.filename
153
+ end
154
+
155
+ end
@@ -1,6 +1,10 @@
1
1
  require 'test_helper'
2
-
2
+ require 'compass/exec'
3
3
  class SpriteCommandTest < Test::Unit::TestCase
4
+ include Compass::TestCaseHelper
5
+ include Compass::CommandLineHelper
6
+ include Compass::IoHelper
7
+
4
8
  attr_reader :test_dir
5
9
  include SpriteHelper
6
10
  def setup
@@ -27,7 +31,7 @@ class SpriteCommandTest < Test::Unit::TestCase
27
31
  def run_compass_with_options(options)
28
32
  output = 'foo'
29
33
  ::Dir.chdir @test_dir
30
- %x{compass #{options.join(' ')}}
34
+ compass *options
31
35
  end
32
36
 
33
37
  def options_to_cli(options)
@@ -80,102 +80,6 @@ class SpriteMapTest < Test::Unit::TestCase
80
80
  @base.generate
81
81
  assert !File.exists?(file), "Sprite file did not get removed"
82
82
  end
83
-
84
- it "should have a vertical layout" do
85
- assert_equal [0, 10, 20, 30], @base.images.map(&:top)
86
- assert_equal [0, 0, 0, 0], @base.images.map(&:left)
87
- end
88
-
89
- it "should have a vertical layout with spacing" do
90
- base = sprite_map_test(@options.merge({"spacing" => Sass::Script::Number.new(10, ['px'])}))
91
- assert_equal [0, 20, 40, 60], base.images.map(&:top)
92
- end
93
-
94
- it "should layout vertical with position" do
95
- base = sprite_map_test("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px']))
96
- assert_equal [0, 10, 0, 0], base.images.map(&:left)
97
- end
98
-
99
- def smart
100
- options = @options.merge("layout" => Sass::Script::String.new('smart'))
101
- importer = Compass::SpriteImporter.new
102
- uri = "image_row/*.png"
103
- path, name = Compass::SpriteImporter.path_and_name(uri)
104
- sprite_names = Compass::SpriteImporter.sprite_names(uri)
105
- sass_engine = Compass::SpriteImporter.sass_engine(uri, name, importer, options)
106
- map = Compass::SassExtensions::Sprites::SpriteMap.new(sprite_names.map {|n| "image_row/#{n}.png"}, path, name, sass_engine, options)
107
- map.options = {:compass => {:logger => Compass::NullLogger.new}}
108
- map
109
- end
110
-
111
- it "should have a smart layout" do
112
- base = smart
113
- base.generate
114
- assert_equal 400, base.width
115
- assert_equal 60, base.height
116
- assert_equal [[0, 0], [20, 120], [20, 0], [20, 100], [20, 160]], base.images.map {|i| [i.top, i.left]}
117
- assert File.exists?(base.filename)
118
- FileUtils.rm base.filename
119
- end
120
-
121
- def diagonal
122
- opts = @options.merge("layout" => Sass::Script::String.new('diagonal'))
123
- sprite_map_test(opts)
124
- end
125
-
126
- it "should generate a diagonal sprite" do
127
- base = diagonal
128
- base.generate
129
- assert_equal 40, base.width
130
- assert_equal 40, base.height
131
- assert_equal [[30, 0], [20, 10], [10, 20], [0, 30]], base.images.map {|i| [i.top, i.left]}
132
- assert File.exists?(base.filename)
133
- FileUtils.rm base.filename
134
- end
135
-
136
- # Horizontal tests
137
- def horizontal(options= {})
138
- opts = @options.merge("layout" => Sass::Script::String.new('horizontal'))
139
- opts.merge!(options)
140
- sprite_map_test(opts)
141
- end
142
-
143
- it "should have a horizontal layout" do
144
- base = horizontal
145
- assert_equal 10, base.height
146
- assert_equal 40, base.width
147
- end
148
-
149
- it "should layout images horizontaly" do
150
- base = horizontal
151
- assert_equal [0, 10, 20, 30], base.images.map(&:left)
152
- assert_equal [0, 0, 0, 0], base.images.map(&:top)
153
- end
154
-
155
- it "should layout horizontaly with spacing" do
156
- base = horizontal("spacing" => Sass::Script::Number.new(10, ['px']))
157
- assert_equal [0, 20, 40, 60], base.images.map(&:left)
158
- assert_equal [0, 0, 0, 0], base.images.map(&:top)
159
- assert_equal 80, base.width
160
- end
161
-
162
- it "should layout horizontaly with position" do
163
- base = horizontal("selectors_ten_by_ten_active_position" => Sass::Script::Number.new(10, ['px']))
164
- assert_equal [0, 10, 0, 0], base.images.map(&:top)
165
- end
166
-
167
- it "should generate a horrizontal sprite" do
168
- base = horizontal
169
- base.generate
170
- assert File.exists?(base.filename)
171
- FileUtils.rm base.filename
172
- end
173
-
174
- it "should generate vertical sprites in decending order" do
175
- sizes = @base.images.map{|image| File.size(image.file) }
176
- assert_equal sizes.min, File.size(@base.images.first.file)
177
- assert_equal sizes.max, File.size(@base.images.last.file)
178
- end
179
83
 
180
84
  test "should get correct relative_name" do
181
85
  Compass.reset_configuration!
@@ -205,5 +109,23 @@ class SpriteMapTest < Test::Unit::TestCase
205
109
  base = sprite_map_test(@options.merge('selectors_ten_by_ten_position' => percent))
206
110
  assert_equal percent, base.image_for('ten-by-ten').position
207
111
  end
112
+
113
+ test 'gets name for sprite in search path' do
114
+ Compass.reset_configuration!
115
+ uri = 'foo/*.png'
116
+ other_folder = File.join(@images_tmp_path, '../other-temp')
117
+ FileUtils.mkdir_p other_folder
118
+ FileUtils.mkdir_p File.join(other_folder, 'foo')
119
+ %w(my bar).each do |file|
120
+ FileUtils.touch(File.join(other_folder, "foo/#{file}.png"))
121
+ end
122
+ config = Compass::Configuration::Data.new('config')
123
+ config.images_path = @images_tmp_path
124
+ config.sprite_load_path = [@images_tmp_path, other_folder]
125
+ Compass.add_configuration(config, "sprite_config")
126
+ image = Compass::SassExtensions::Sprites::Image.new(@base, "foo/my.png", {})
127
+ assert_equal File.join(other_folder, 'foo/my.png'), image.file
128
+ assert_equal 0, image.size
129
+ end
208
130
 
209
131
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.alpha.2
4
+ version: 0.12.alpha.3
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -13,11 +13,11 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2011-11-28 00:00:00.000000000Z
16
+ date: 2011-12-24 00:00:00.000000000Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: sass
20
- requirement: &70104972023440 !ruby/object:Gem::Requirement
20
+ requirement: &70118335109760 !ruby/object:Gem::Requirement
21
21
  none: false
22
22
  requirements:
23
23
  - - ~>
@@ -25,10 +25,10 @@ dependencies:
25
25
  version: '3.1'
26
26
  type: :runtime
27
27
  prerelease: false
28
- version_requirements: *70104972023440
28
+ version_requirements: *70118335109760
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: chunky_png
31
- requirement: &70104972022940 !ruby/object:Gem::Requirement
31
+ requirement: &70118335109100 !ruby/object:Gem::Requirement
32
32
  none: false
33
33
  requirements:
34
34
  - - ~>
@@ -36,10 +36,10 @@ dependencies:
36
36
  version: '1.2'
37
37
  type: :runtime
38
38
  prerelease: false
39
- version_requirements: *70104972022940
39
+ version_requirements: *70118335109100
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: fssm
42
- requirement: &70104972022480 !ruby/object:Gem::Requirement
42
+ requirement: &70118335108460 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
45
  - - ! '>='
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: 0.2.7
48
48
  type: :runtime
49
49
  prerelease: false
50
- version_requirements: *70104972022480
50
+ version_requirements: *70118335108460
51
51
  description: Compass is a Sass-based Stylesheet Framework that streamlines the creation
52
52
  and maintainance of CSS.
53
53
  email: chris@eppsteins.net
@@ -127,6 +127,7 @@ files:
127
127
  - examples/compass/bootstrap.rb
128
128
  - examples/compass/clean.rb
129
129
  - examples/compass/compass.html.haml
130
+ - examples/compass/compass_app_log.txt
130
131
  - examples/compass/config.rb
131
132
  - examples/compass/headers.txt
132
133
  - examples/compass/images/blue_arrow.gif
@@ -827,6 +828,11 @@ files:
827
828
  - test/fixtures/sprites/public/images/nested/squares/ten-by-ten.png
828
829
  - test/fixtures/sprites/public/images/prefix/20-by-20.png
829
830
  - test/fixtures/sprites/public/images/prefix/ten-by-ten.png
831
+ - test/fixtures/sprites/public/images/repeat_x/five.png
832
+ - test/fixtures/sprites/public/images/repeat_x/four.png
833
+ - test/fixtures/sprites/public/images/repeat_x/one.png
834
+ - test/fixtures/sprites/public/images/repeat_x/three.png
835
+ - test/fixtures/sprites/public/images/repeat_x/two.png
830
836
  - test/fixtures/sprites/public/images/selectors/ten-by-ten.png
831
837
  - test/fixtures/sprites/public/images/selectors/ten-by-ten_active.png
832
838
  - test/fixtures/sprites/public/images/selectors/ten-by-ten_hover.png
@@ -1241,7 +1247,6 @@ files:
1241
1247
  - test/integrations/test_rails_helper.rb
1242
1248
  - test/test_helper.rb
1243
1249
  - test/test_helper.rbc
1244
- - test/tmp/compass_rails/public/images/selectors-s4c703bbc05.png
1245
1250
  - test/units/actions_test.rb
1246
1251
  - test/units/actions_test.rbc
1247
1252
  - test/units/command_line_test.rb
@@ -1262,6 +1267,7 @@ files:
1262
1267
  - test/units/sprites/image_test.rbc
1263
1268
  - test/units/sprites/importer_test.rb
1264
1269
  - test/units/sprites/importer_test.rbc
1270
+ - test/units/sprites/layout_test.rb
1265
1271
  - test/units/sprites/row_fitter_test.rb
1266
1272
  - test/units/sprites/row_fitter_test.rbc
1267
1273
  - test/units/sprites/sprite_command_test.rb
@@ -1318,6 +1324,11 @@ test_files:
1318
1324
  - test/fixtures/sprites/public/images/nested/squares/ten-by-ten.png
1319
1325
  - test/fixtures/sprites/public/images/prefix/20-by-20.png
1320
1326
  - test/fixtures/sprites/public/images/prefix/ten-by-ten.png
1327
+ - test/fixtures/sprites/public/images/repeat_x/five.png
1328
+ - test/fixtures/sprites/public/images/repeat_x/four.png
1329
+ - test/fixtures/sprites/public/images/repeat_x/one.png
1330
+ - test/fixtures/sprites/public/images/repeat_x/three.png
1331
+ - test/fixtures/sprites/public/images/repeat_x/two.png
1321
1332
  - test/fixtures/sprites/public/images/selectors/ten-by-ten.png
1322
1333
  - test/fixtures/sprites/public/images/selectors/ten-by-ten_active.png
1323
1334
  - test/fixtures/sprites/public/images/selectors/ten-by-ten_hover.png
@@ -1732,7 +1743,6 @@ test_files:
1732
1743
  - test/integrations/test_rails_helper.rb
1733
1744
  - test/test_helper.rb
1734
1745
  - test/test_helper.rbc
1735
- - test/tmp/compass_rails/public/images/selectors-s4c703bbc05.png
1736
1746
  - test/units/actions_test.rb
1737
1747
  - test/units/actions_test.rbc
1738
1748
  - test/units/command_line_test.rb
@@ -1753,6 +1763,7 @@ test_files:
1753
1763
  - test/units/sprites/image_test.rbc
1754
1764
  - test/units/sprites/importer_test.rb
1755
1765
  - test/units/sprites/importer_test.rbc
1766
+ - test/units/sprites/layout_test.rb
1756
1767
  - test/units/sprites/row_fitter_test.rb
1757
1768
  - test/units/sprites/row_fitter_test.rbc
1758
1769
  - test/units/sprites/sprite_command_test.rb