Skip to content

Commit

Permalink
Update SASS to sass 3.3.0.alpha.195, compass 0.13.alpha.4
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyvit committed Jun 26, 2013
1 parent 578fe27 commit 5b6293b
Show file tree
Hide file tree
Showing 827 changed files with 22,364 additions and 23,742 deletions.
3 changes: 1 addition & 2 deletions SASS.lrplugin/lib/chunky_png/.gitignore
Expand Up @@ -5,6 +5,5 @@ spec/resources/_*.png
/doc
/.yardoc
/.bundle
/_site
Gemfile.lock
test.*
*.rbc
8 changes: 8 additions & 0 deletions SASS.lrplugin/lib/chunky_png/.infinity_test
@@ -0,0 +1,8 @@
infinity_test do

use :rubies => %w(1.8.6 1.8.7 1.9.2 ree jruby rbx), :test_framework => :rspec

before(:each_ruby) do |environment|
environment.system('bundle install')
end
end
17 changes: 0 additions & 17 deletions SASS.lrplugin/lib/chunky_png/.travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion SASS.lrplugin/lib/chunky_png/BENCHMARKS.rdoc
Expand Up @@ -13,7 +13,7 @@ rake task or as standalone script.
Use rvm to simply run the tests against different interpreters. Of course,
make sure that the chunky_png is installed for all your interpreters.

rvm 1.8.7,1.9.3,rbx rake benchmark N=10
rvm 1.8.7,1.9.1,rbx rake benchmark N=10

== Results

Expand Down
2 changes: 1 addition & 1 deletion SASS.lrplugin/lib/chunky_png/Gemfile
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
source :rubygems
gemspec

platforms :jruby do
Expand Down
4 changes: 2 additions & 2 deletions SASS.lrplugin/lib/chunky_png/LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2010-2013 Willem van Bergen
Copyright (c) 2010 Willem van Bergen

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 changes: 0 additions & 14 deletions SASS.lrplugin/lib/chunky_png/README.rdoc
Expand Up @@ -57,25 +57,11 @@ provides a massive speed boost to encoding and decoding.
For more information, see the project wiki on http://github.com/wvanbergen/chunky_png/wiki
or the RDOC documentation on http://rdoc.info/gems/chunky_png/frames

== Security warning

ChunkyPNG is vulnerable to decompression bombs, which means that ChunkyPNG is vulnerable to
DOS attacks by running out of memory when loading a specifically crafted PNG file. Because
of the pure-Ruby nature of the library it is very hard to fix this problem in the library
itself.

In order to safely deal with untrusted images, you should make sure to do the image
processing using ChunkyPNG in a separate process, e.g. by using fork or a background
processing library.

== About

The library is written by Willem van Bergen for Floorplanner.com, and released
under the MIT license (see LICENSE). Please contact me for questions or
remarks. Patches are greatly appreciated!

Please check out the changelog on https://github.com/wvanbergen/chunky_png/wiki/Changelog
to see what changed in all versions.

P.S.: The name of this library is intentionally similar to Chunky Bacon and
Chunky GIF. Use Google if you want to know _why. :-)
8 changes: 4 additions & 4 deletions SASS.lrplugin/lib/chunky_png/chunky_png.gemspec

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions SASS.lrplugin/lib/chunky_png/lib/chunky_png.rb
Expand Up @@ -25,7 +25,7 @@ module ChunkyPNG

# The current version of ChunkyPNG. This value will be updated
# automatically by them <tt>gem:release</tt> rake task.
VERSION = "1.2.8"
VERSION = "1.0.0.rc2"

###################################################
# PNG international standard defined constants
Expand Down Expand Up @@ -104,7 +104,7 @@ module ChunkyPNG
class Exception < ::StandardError
end

# Exception that is raised for an unsupported PNG image.
# Exception that is raised for an unsopported PNG image.
class NotSupported < ChunkyPNG::Exception
end

Expand All @@ -113,7 +113,7 @@ class NotSupported < ChunkyPNG::Exception
class SignatureMismatch < ChunkyPNG::Exception
end

# Exception that is raised if the CRC check for a block fails
# Exception that is raised if the CRC check for a block failes
class CRCMismatch < ChunkyPNG::Exception
end

Expand All @@ -124,21 +124,17 @@ class ExpectationFailed < ChunkyPNG::Exception
# Exception that is raised if an expectation fails.
class OutOfBounds < ChunkyPNG::ExpectationFailed
end

def self.force_binary(str)
str.respond_to?(:force_encoding) ? str.force_encoding('BINARY') : str
end

# Empty byte array. This basically is an empty string, but with the encoding
# set correctly to ASCII-8BIT (binary) in Ruby 1.9.
# @return [String] An empty string, with encoding set to binary in Ruby 1.9
# @private
EMPTY_BYTEARRAY = force_binary("").freeze
EMPTY_BYTEARRAY = String.method_defined?(:force_encoding) ? "".force_encoding('ASCII-8BIT').freeze : "".freeze

# Null-byte, with the encoding set correctly to ASCII-8BIT (binary) in Ruby 1.9.
# @return [String] A binary string, consisting of one NULL-byte.
# @private
EXTRA_BYTE = force_binary("\0").freeze
EXTRA_BYTE = String.method_defined?(:force_encoding) ? "\0".force_encoding('ASCII-8BIT') : "\0"
end


Expand Down
94 changes: 49 additions & 45 deletions SASS.lrplugin/lib/chunky_png/lib/chunky_png/canvas.rb
Expand Up @@ -3,16 +3,14 @@
require 'chunky_png/canvas/adam7_interlacing'
require 'chunky_png/canvas/stream_exporting'
require 'chunky_png/canvas/stream_importing'
require 'chunky_png/canvas/data_url_exporting'
require 'chunky_png/canvas/data_url_importing'
require 'chunky_png/canvas/operations'
require 'chunky_png/canvas/drawing'
require 'chunky_png/canvas/resampling'
require 'chunky_png/canvas/masking'

module ChunkyPNG

# The ChunkyPNG::Canvas class represents a raster image as a matrix of
# The ChunkPNG::Canvas class represents a raster image as a matrix of
# pixels.
#
# This class supports loading a Canvas from a PNG datastream, and creating a
Expand Down Expand Up @@ -40,9 +38,6 @@ class Canvas
include StreamExporting
extend StreamImporting

include DataUrlExporting
extend DataUrlImporting

include Operations
include Drawing
include Resampling
Expand All @@ -63,28 +58,23 @@ class Canvas
# CONSTRUCTORS
#################################################################

# Initializes a new Canvas instance.
# Initializes a new Canvas instance
# @param [Integer] width The width in pixels of this canvas
# @param [Integer] width The height in pixels of this canvas
# @param [ChunkyPNG::Pixel, Array<ChunkyPNG::Color>] initial The initial value of te pixels:
#
# @overload initialize(width, height, background_color)
# @param [Integer] width The width in pixels of this canvas
# @param [Integer] height The height in pixels of this canvas
# @param [Integer, ...] background_color The initial background color of this canvas.
# This can be a color value or any value that {ChunkyPNG::Color.parse} can handle.
# * If a color is passed to this parameter, this color will be used as background color.
#
# @overload initialize(width, height, initial)
# @param [Integer] width The width in pixels of this canvas
# @param [Integer] height The height in pixels of this canvas
# @param [Array<Integer>] initial The initial pizel values. Must be an array with
# <tt>width * height</tt> elements.
# * If an array of pixels is provided, these pixels will be used as initial value. Note
# that the amount of pixels in this array should equal +width * height+.
def initialize(width, height, initial = ChunkyPNG::Color::TRANSPARENT)

@width, @height = width, height

if initial.kind_of?(Array)
raise ArgumentError, "The initial array should have #{width}x#{height} = #{width*height} elements!" unless initial.length == width * height
if initial.kind_of?(Array) && initial.length == width * height
@pixels = initial
else
@pixels = Array.new(width * height, ChunkyPNG::Color.parse(initial))
@pixels = Array.new(width * height, ChunkyPNG::Color(initial))
end
end

Expand All @@ -110,7 +100,7 @@ def self.from_canvas(canvas)
#################################################################

# Returns the dimension (width x height) for this canvas.
# @return [ChunkyPNG::Dimension] A dimension instance with the width and height set for this canvas.
# @return [ChunkyPNG::Dimension] A dimension instante with the width and height set for this canvas.
def dimension
ChunkyPNG::Dimension.new(width, height)
end
Expand All @@ -122,15 +112,26 @@ def area
end

# Replaces a single pixel in this canvas.
# @param [Integer] x The x-coordinate of the pixel (column)
# @param [Integer] y The y-coordinate of the pixel (row)
# @param [Integer] color The new color for the provided coordinates.
# @return [Integer] The new color value for this pixel, i.e. <tt>color</tt>.
#
# @overload []=(x, y, color)
# Sets the color value of a pixel given a x- and y-coordinate
# @param [Integer] x The x-coordinate of the pixel (column)
# @param [Integer] y The y-coordinate of the pixel (row)
# @param [Integer] color The new color for the provided coordinates.
# @return [Integer] The new color value for this pixel, i.e. <tt>color</tt>.
#
# @overload []=(point, color)
# Sets the color value of a pixel given point-like value.
# @param [ChunkyPNG::Point, ...] point The point on the canvas to replace.
# @param [Integer] color The new color for the provided coordinates.
# @return [Integer] The new color value for this pixel, i.e. <tt>color</tt>.
#
# @raise [ChunkyPNG::OutOfBounds] when the coordinates are outside of the image's dimensions.
# @see #set_pixel
def []=(x, y, color)
assert_xy!(x, y)
@pixels[y * width + x] = ChunkyPNG::Color.parse(color)
def []=(*args)
point = args.length == 2 ? ChunkyPNG::Point(args.first) : ChunkyPNG::Point(args[0], args[1])
assert_xy!(point.x, point.y)
@pixels[point.y * width + point.x] = args.last
end

# Replaces a single pixel in this canvas, without bounds checking.
Expand All @@ -140,7 +141,7 @@ def []=(x, y, color)
#
# @param [Integer] x The x-coordinate of the pixel (column)
# @param [Integer] y The y-coordinate of the pixel (row)
# @param [Integer] pixel The new color for the provided coordinates.
# @param [Inteer] pixel The new color for the provided coordinates.
# @return [Integer] The new color value for this pixel, i.e. <tt>color</tt>.
def set_pixel(x, y, color)
@pixels[y * width + x] = color
Expand All @@ -151,7 +152,7 @@ def set_pixel(x, y, color)
#
# @param [Integer] x The x-coordinate of the pixel (column)
# @param [Integer] y The y-coordinate of the pixel (row)
# @param [Integer] pixel The new color value for the provided coordinates.
# @param [CInteger] pixel The new color value for the provided coordinates.
# @return [Integer] The new color value for this pixel, i.e. <tt>color</tt>, or
# <tt>nil</tt> if the coordinates are out of bounds.
def set_pixel_if_within_bounds(x, y, color)
Expand All @@ -160,14 +161,24 @@ def set_pixel_if_within_bounds(x, y, color)
end

# Returns a single pixel's color value from this canvas.
# @param [Integer] x The x-coordinate of the pixel (column)
# @param [Integer] y The y-coordinate of the pixel (row)
# @return [Integer] The current color value at the provided coordinates.
#
# @overload [](point)
# Returns the color value given a point-like value.
# @param [ChunkyPNG::Point, ...] point The coordinates of the pixel as point.
# @return [Integer] The current color value at the provided coordinates.
#
# @overload [](x, y)
# Returns the color value given a x- and y-coordinate.
# @param [Integer] x The x-coordinate of the pixel (column)
# @param [Integer] y The y-coordinate of the pixel (row)
# @return [Integer] The current color value at the provided coordinates.
#
# @raise [ChunkyPNG::OutOfBounds] when the coordinates are outside of the image's dimensions.
# @see #get_pixel
def [](x, y)
assert_xy!(x, y)
@pixels[y * width + x]
def [](*args)
point = ChunkyPNG::Point(*args)
assert_xy!(point.x, point.y)
@pixels[point.y * width + point.x]
end

# Returns a single pixel from this canvas, without checking bounds. The return value for
Expand Down Expand Up @@ -224,14 +235,7 @@ def include_point?(*point_like)
end

alias_method :include?, :include_point?

# Checks whether the given x- and y-coordinate are in the range of the canvas
# @param [Integer] x The x-coordinate of the pixel (column)
# @param [Integer] y The y-coordinate of the pixel (row)
# @return [true, false] True if the x- and y-coordinate is in the range of this canvas.
def include_xy?(x, y)
y >= 0 && y < height && x >= 0 && x < width
end
alias_method :include_xy?, :include_point?

# Checks whether the given y-coordinate is in the range of the canvas
# @param [Integer] y The y-coordinate of the pixel (row)
Expand All @@ -248,7 +252,7 @@ def include_x?(x)
end

# Returns the palette used for this canvas.
# @return [ChunkyPNG::Palette] A palette which contains all the colors that are
# @return [ChunkyPNG::Palette] A pallete which contains all the colors that are
# being used for this image.
def palette
ChunkyPNG::Palette.from_canvas(self)
Expand Down
Expand Up @@ -3,7 +3,7 @@ class Canvas

# Methods for decoding and encoding Adam7 interlacing.
#
# Adam7 interlacing extracts 7 pass images out of a single image, that can be encoded to a
# Adam7 interlacing extractg 7 pass images out of a single image, that can be encoded to a
# stream separately so the image can be built up progressively. The module is included into
# ChunkyPNG canvas and is used to extract the pass images from the original image, or to
# reconstruct an original image from separate pass images.
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 5b6293b

Please sign in to comment.