teacup 1.2.7 → 1.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/dummy.rb +8 -0
- data/lib/teacup/version.rb +1 -1
- data/lib/teacup/z_core_extensions/ui_view_controller.rb +2 -3
- data/spec/main_spec.rb +3 -0
- data/spec/uiswitch_spec.rb +16 -0
- metadata +4 -2
data/Gemfile.lock
CHANGED
data/lib/dummy.rb
CHANGED
data/lib/teacup/version.rb
CHANGED
@@ -53,8 +53,7 @@ class UIViewController
|
|
53
53
|
|
54
54
|
end # class << self
|
55
55
|
|
56
|
-
# Assigning a new stylesheet triggers {restyle!}
|
57
|
-
# rotation to get your different layouts applied.
|
56
|
+
# Assigning a new stylesheet triggers {restyle!}.
|
58
57
|
#
|
59
58
|
# Assigning a stylesheet is an *alternative* to returning a Stylesheet in
|
60
59
|
# the {stylesheet} method. Note that {restyle!} calls {stylesheet}, so while
|
@@ -68,7 +67,7 @@ class UIViewController
|
|
68
67
|
# stylesheet = Teacup::Stylesheet[:ipadhorizontal]
|
69
68
|
# stylesheet = :ipadhorizontal
|
70
69
|
def stylesheet=(new_stylesheet)
|
71
|
-
|
70
|
+
super
|
72
71
|
if self.viewLoaded?
|
73
72
|
self.view.restyle!
|
74
73
|
end
|
data/spec/main_spec.rb
CHANGED
@@ -103,6 +103,9 @@ describe "background view in landscape" do
|
|
103
103
|
end
|
104
104
|
|
105
105
|
it "should be in landscape" do
|
106
|
+
if UIApplication.sharedApplication.statusBarOrientation != UIInterfaceOrientationLandscapeLeft
|
107
|
+
NSLog("\n=====\n The device orientation is not changing to `landscape`!\n=====\n")
|
108
|
+
end
|
106
109
|
UIApplication.sharedApplication.statusBarOrientation.should == UIInterfaceOrientationLandscapeLeft
|
107
110
|
end
|
108
111
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
describe "UISwitch test" do
|
2
|
+
describe "it should style `on`" do
|
3
|
+
before do
|
4
|
+
@ctlr = UIViewController.new
|
5
|
+
end
|
6
|
+
|
7
|
+
it "should be on" do
|
8
|
+
switch = @ctlr.subview(UISwitch, on: true)
|
9
|
+
switch.on?.should == true
|
10
|
+
end
|
11
|
+
it "should be off" do
|
12
|
+
switch = @ctlr.subview(UISwitch, on: false)
|
13
|
+
switch.on?.should == false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teacup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- spec/main_spec.rb
|
108
108
|
- spec/style_spec.rb
|
109
109
|
- spec/stylesheet_spec.rb
|
110
|
+
- spec/uiswitch_spec.rb
|
110
111
|
- spec/view_spec.rb
|
111
112
|
- teacup.gemspec
|
112
113
|
homepage: https://github.com/rubymotion/teacup
|
@@ -139,4 +140,5 @@ test_files:
|
|
139
140
|
- spec/main_spec.rb
|
140
141
|
- spec/style_spec.rb
|
141
142
|
- spec/stylesheet_spec.rb
|
143
|
+
- spec/uiswitch_spec.rb
|
142
144
|
- spec/view_spec.rb
|