Merge branch 'stable' into rails31

This commit is contained in:
Scott Davis 2011-06-27 00:58:14 -04:00
commit 642d0b2007
4 changed files with 16 additions and 3 deletions

View File

@ -280,6 +280,13 @@ later on.
<td style="vertical-align:top;">Symbol </td> <td style="vertical-align:top;">Symbol </td>
<td style="vertical-align:top;">Defaults to <code>:chunky_png</code></td> <td style="vertical-align:top;">Defaults to <code>:chunky_png</code></td>
</tr> </tr>
<tr>
<td style="vertical-align:top;"><code>chunky_png_options</code></td>
<td style="vertical-align:top;">Hash </td>
<td style="vertical-align:top;">
Defaults to <code>{:compression => Zlib::BEST_COMPRESSION}</code>. See the chunky_png <a href='https://github.com/wvanbergen/chunky_png/wiki/Constraints' _target='blank'>wiki</a> for more information
</td>
</tr>
</table> </table>
<a name="configuration-functions"></a> <a name="configuration-functions"></a>

View File

@ -38,7 +38,8 @@ module Compass
:color_output, :color_output,
:preferred_syntax, :preferred_syntax,
:disable_warnings, :disable_warnings,
:sprite_engine :sprite_engine,
:chunky_png_options
].flatten ].flatten
# Registers a new configuration property. # Registers a new configuration property.

View File

@ -133,6 +133,10 @@ module Compass
:chunky_png :chunky_png
end end
def default_chunky_png_options
{:compression => Zlib::BEST_COMPRESSION}
end
# helper functions # helper functions
def http_join(*segments) def http_join(*segments)

View File

@ -33,7 +33,8 @@ module Compass
if canvas.nil? if canvas.nil?
construct_sprite construct_sprite
end end
canvas.save(filename, :best_compression)
canvas.save(filename, Compass.configuration.chunky_png_options)
end end
end end