sugarcube 0.18.6 → 0.18.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/sugarcube/animation_chain.rb +1 -2
- data/lib/sugarcube/nsdate.rb +1 -1
- data/lib/sugarcube/numeric.rb +0 -1
- data/lib/sugarcube/version.rb +1 -1
- data/spec/nsdate_spec.rb +4 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -304,7 +304,7 @@ recurring events)
|
|
304
304
|
=> [2012, 9, 13, 9, 19, 6]
|
305
305
|
|
306
306
|
(main)> now.string_with_style
|
307
|
-
=> "
|
307
|
+
=> "January 29, 2013"
|
308
308
|
(main)> now.string_with_style(NSDateFormatterShortStyle)
|
309
309
|
=> "1/29/13"
|
310
310
|
(main)> now.string_with_style(:short)
|
@@ -424,8 +424,8 @@ on.
|
|
424
424
|
(main)> mar_10_2013 = NSDate.from_components
|
425
425
|
|
426
426
|
# unfortunately you will, in the edge cases, end up with stuff like this:
|
427
|
-
(main)> feb_28_2012 == feb_28_2012.delta(days:1, months:12).delta(months:-12)
|
428
|
-
=>
|
427
|
+
(main)> feb_28_2012 == feb_28_2012.delta(days:1, months:12).delta(days: -1, months:-12)
|
428
|
+
=> 2012-02-29 00:00:00 -0700
|
429
429
|
```
|
430
430
|
|
431
431
|
NSError
|
@@ -42,14 +42,13 @@ module SugarCube
|
|
42
42
|
def do_next
|
43
43
|
return nil if @block_index >= @blocks.length
|
44
44
|
|
45
|
-
options,
|
45
|
+
options, block = @blocks[@block_index]
|
46
46
|
@after_block = ->(completed){
|
47
47
|
self.do_next || AnimationChain.stop_chain(self)
|
48
48
|
}
|
49
49
|
options[:after] = @after_block
|
50
50
|
|
51
51
|
UIView.animate(options) {
|
52
|
-
_, block = @blocks[@block_index]
|
53
52
|
block.call
|
54
53
|
@block_index += 1
|
55
54
|
}
|
data/lib/sugarcube/nsdate.rb
CHANGED
data/lib/sugarcube/numeric.rb
CHANGED
data/lib/sugarcube/version.rb
CHANGED
data/spec/nsdate_spec.rb
CHANGED
@@ -15,6 +15,10 @@ describe "NSDate" do
|
|
15
15
|
@date.string_with_style(:medium).should == 'Jan 2, 2013'
|
16
16
|
end
|
17
17
|
|
18
|
+
it "should have an NSDate#string_with_style(style) method that has default" do
|
19
|
+
@date.string_with_style.should == 'Jan 2, 2013'
|
20
|
+
end
|
21
|
+
|
18
22
|
it "should have an NSDate#string_with_style(style) method that accepts NSDateStyle constants" do
|
19
23
|
@date.string_with_style(NSDateFormatterShortStyle).should == '1/2/13'
|
20
24
|
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: 0.18.
|
4
|
+
version: 0.18.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2013-02-
|
16
|
+
date: 2013-02-19 00:00:00.000000000 Z
|
17
17
|
dependencies: []
|
18
18
|
description: ! '== Description
|
19
19
|
|