sugarcube 0.18.8 → 0.18.9
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/lib/sugarcube/nsstring.rb +2 -1
- data/lib/sugarcube/version.rb +1 -1
- data/spec/nsstring_spec.rb +21 -11
- metadata +2 -2
data/lib/sugarcube/nsstring.rb
CHANGED
data/lib/sugarcube/version.rb
CHANGED
data/spec/nsstring_spec.rb
CHANGED
@@ -34,18 +34,28 @@ describe "NSString" do
|
|
34
34
|
font.pointSize.should == UIFont.systemFontSize
|
35
35
|
end
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
describe "should have a #uicolor method" do
|
38
|
+
it "that supports hex" do
|
39
|
+
color = '#ffffff'.uicolor
|
40
|
+
UIColor.should === color
|
41
|
+
color.red.should == 1.0
|
42
|
+
color.green.should == 1.0
|
43
|
+
color.blue.should == 1.0
|
43
44
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
45
|
+
color = '#808080'.uicolor
|
46
|
+
UIColor.should === color
|
47
|
+
((color.red * 2).round / 2.0).should == 0.5
|
48
|
+
((color.green * 2).round / 2.0).should == 0.5
|
49
|
+
((color.blue * 2).round / 2.0).should == 0.5
|
50
|
+
end
|
51
|
+
|
52
|
+
it "that supports image names" do
|
53
|
+
'little_square'.uicolor.should == 'little_square'.uiimage.uicolor
|
54
|
+
end
|
55
|
+
|
56
|
+
it "that supports non-existant image names" do
|
57
|
+
'this is not my beautiful house!'.uicolor.should == nil
|
58
|
+
end
|
49
59
|
end
|
50
60
|
|
51
61
|
it "should have a #uilabel method" do
|
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.9
|
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-20 00:00:00.000000000 Z
|
17
17
|
dependencies: []
|
18
18
|
description: ! '== Description
|
19
19
|
|