sugarcube 0.18.10 → 0.18.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -100,9 +100,9 @@ class UIImage
100
100
  # @param new_size [CGSize] Minimum dimensions of desired image. The returned image is
101
101
  # guaranteed to fit within these dimensions.
102
102
  # @param position [Symbol, CGPoint] Where to position the resized image. Valid symbols
103
- # are: `[:topleft, :top, :topright, :left, :center, :right, :bottomleft,
104
- # :bottom, :bottomright]` (if you forget and use an underscore, like
105
- # `top_left`, that'll work, too)
103
+ # are: `[:top_left, :top, :top_right, :left, :center, :right, :bottom_left,
104
+ # :bottom, :bottom_right]` (if you forget the underscore, like
105
+ # `topleft`, that'll work, too)
106
106
  # @param scale [Numeric] image scale
107
107
  # @return [UIImage]
108
108
  def scale_to_fill(new_size, position:position, scale:scale)
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '0.18.10'
2
+ Version = '0.18.11'
3
3
  end
@@ -87,17 +87,24 @@ describe "NSDate#delta" do
87
87
 
88
88
  it "should handle daylight savings logically" do
89
89
  # early hours
90
- mar_10_2012 = NSDate.from_components(year:2013, month: 3, day: 9, hour: 1)
91
- mar_10_2012.delta(days:1).should == NSDate.from_components(year:2013, month: 3, day: 10, hour: 1)
90
+ mar_9_2012 = NSDate.from_components(year:2013, month: 3, day: 9, hour: 1)
91
+ mar_9_2012.delta(days:1).should == NSDate.from_components(year:2013, month: 3, day: 10, hour: 1)
92
92
 
93
93
  # late hours
94
- mar_10_2012 = NSDate.from_components(year:2013, month: 3, day: 9, hour: 13)
95
- mar_10_2012.delta(days:1).should == NSDate.from_components(year:2013, month: 3, day: 10, hour: 13)
94
+ mar_9_2012 = NSDate.from_components(year:2013, month: 3, day: 9, hour: 13)
95
+ mar_9_2012.delta(days:1).should == NSDate.from_components(year:2013, month: 3, day: 10, hour: 13)
96
96
  end
97
97
 
98
98
  it "should handle daylight savings logically unless you assign an hour" do
99
- mar_10_2012 = NSDate.from_components(year:2013, month: 3, day: 9, hour: 13)
100
- mar_10_2012.delta(days:1, hours: 1).should == NSDate.from_components(year:2013, month: 3, day: 10, hour: 15)
99
+ mar_9_2012 = NSDate.from_components(year:2013, month: 3, day: 9, hour: 13)
100
+
101
+ tz = mar_9_2012.timezone
102
+ mar_11_2012 = NSDate.from_components(year:2013, month: 3, day: 11)
103
+ if tz.isDaylightSavingTimeForDate(mar_11_2012)
104
+ mar_9_2012.delta(days:1, hours: 1).should == NSDate.from_components(year:2013, month: 3, day: 10, hour: 15)
105
+ else
106
+ mar_9_2012.delta(days:1, hours: 1).should == NSDate.from_components(year:2013, month: 3, day: 10, hour: 14)
107
+ end
101
108
  end
102
109
 
103
110
  end
@@ -16,6 +16,10 @@ describe "SugarCube::AnimationChain" do
16
16
  }.start
17
17
  SugarCube::AnimationChain.chains.length.should == 1
18
18
 
19
+ wait 0.15 {
20
+ @variable_a.should == 'a'
21
+ @variable_b.should == nil
22
+ }
19
23
  wait 0.3 {
20
24
  @variable_a.should == 'a'
21
25
  @variable_b.should == 'b'
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: 0.18.10
4
+ version: 0.18.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -126,13 +126,13 @@ files:
126
126
  - spec/calayer_spec.rb
127
127
  - spec/core_graphics_spec.rb
128
128
  - spec/core_location_spec.rb
129
- - spec/date_delta_spec.rb
130
129
  - spec/fixnum_spec.rb
131
130
  - spec/notification_spec.rb
132
131
  - spec/nsarray_spec.rb
133
132
  - spec/nsattributedstring_spec.rb
134
133
  - spec/nscoder_spec.rb
135
134
  - spec/nsdata_spec.rb
135
+ - spec/nsdate_delta_spec.rb
136
136
  - spec/nsdate_spec.rb
137
137
  - spec/nsdate_upto_spec.rb
138
138
  - spec/nsstring_files_spec.rb
@@ -184,13 +184,13 @@ test_files:
184
184
  - spec/calayer_spec.rb
185
185
  - spec/core_graphics_spec.rb
186
186
  - spec/core_location_spec.rb
187
- - spec/date_delta_spec.rb
188
187
  - spec/fixnum_spec.rb
189
188
  - spec/notification_spec.rb
190
189
  - spec/nsarray_spec.rb
191
190
  - spec/nsattributedstring_spec.rb
192
191
  - spec/nscoder_spec.rb
193
192
  - spec/nsdata_spec.rb
193
+ - spec/nsdate_delta_spec.rb
194
194
  - spec/nsdate_spec.rb
195
195
  - spec/nsdate_upto_spec.rb
196
196
  - spec/nsstring_files_spec.rb