sugarcube 1.3.3 → 1.3.4

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sugarcube (1.3.3)
4
+ sugarcube (1.3.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -3,27 +3,27 @@ class CAAnimation
3
3
  class << self
4
4
 
5
5
  def basic(target, key_path, options={}, &block)
6
- corner_animation = CABasicAnimation.animationWithKeyPath(key_path)
7
- corner_animation.duration = options[:duration] if options[:duration]
8
- corner_animation.delegate = options[:delegate] if options[:delegate]
6
+ animation = CABasicAnimation.animationWithKeyPath(key_path)
7
+ animation.duration = options[:duration] if options[:duration]
8
+ animation.delegate = options[:delegate] if options[:delegate]
9
9
 
10
10
  if options.key?(:from) || options.key?(:to) || options.key?(:by)
11
11
  add_animation = options.fetch(:add, true)
12
12
 
13
- corner_animation.fromValue = options[:from] if options[:from]
14
- corner_animation.toValue = options[:to] if options[:to]
15
- corner_animation.byValue = options[:by] if options[:by]
13
+ animation.fromValue = options[:from] if options[:from]
14
+ animation.toValue = options[:to] if options[:to]
15
+ animation.byValue = options[:by] if options[:by]
16
16
  else
17
17
  add_animation = options.fetch(:add, false)
18
18
  end
19
19
 
20
20
  if add_animation
21
- target.addAnimation(corner_animation, forKey:key_path)
21
+ target.addAnimation(animation, forKey:key_path)
22
22
  target.send("#{key_path}=", options[:to])
23
23
  end
24
24
 
25
- block.call(corner_animation) if block
26
- return corner_animation
25
+ block.call(animation) if block
26
+ return animation
27
27
  end
28
28
 
29
29
  end
@@ -5,6 +5,9 @@ class NSArray
5
5
  red = self[0] / 255.0
6
6
  green = self[1] / 255.0
7
7
  blue = self[2] / 255.0
8
+ if self[3]
9
+ alpha = self[3]
10
+ end
8
11
  UIColor.colorWithRed(red, green:green, blue:blue, alpha:alpha.to_f)
9
12
  end
10
13
 
@@ -245,7 +245,7 @@ class UIImage
245
245
  thumbnail_y = position.y * (new_size.height - my_size.height) / my_size.height
246
246
 
247
247
  new_image = self.canvas(size: new_size) do
248
- thumbnail_rect = CGRectZero
248
+ thumbnail_rect = CGRect.new([0, 0], [0, 0])
249
249
  thumbnail_rect.origin = [thumbnail_x, thumbnail_y]
250
250
  thumbnail_rect.size = my_size
251
251
 
@@ -355,7 +355,7 @@ class UIImage
355
355
  CGContextDrawPath(context, KCGPathFill)
356
356
  end
357
357
 
358
- thumbnail_rect = CGRectZero
358
+ thumbnail_rect = CGRect.new([0, 0], [0, 0])
359
359
  thumbnail_rect.origin = thumbnail_point
360
360
  thumbnail_rect.size.width = scaled_width
361
361
  thumbnail_rect.size.height = scaled_height
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '1.3.3'
2
+ Version = '1.3.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-10-10 00:00:00.000000000 Z
15
+ date: 2013-10-14 00:00:00.000000000 Z
16
16
  dependencies: []
17
17
  description: ! '== Description
18
18