teacup 1.2.7 → 1.2.8

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
- teacup (1.2.5)
4
+ teacup (1.2.7)
5
5
  rake
6
6
 
7
7
  GEM
data/lib/dummy.rb CHANGED
@@ -81,3 +81,11 @@ private
81
81
  setTranslucent(nil)
82
82
  end
83
83
  end
84
+
85
+ class DummySwitch < UISwitch
86
+ private
87
+ def dummy
88
+ on?
89
+ setOn(true)
90
+ end
91
+ end
@@ -1,5 +1,5 @@
1
1
  module Teacup
2
2
 
3
- VERSION = '1.2.7'
3
+ VERSION = '1.2.8'
4
4
 
5
5
  end
@@ -53,8 +53,7 @@ class UIViewController
53
53
 
54
54
  end # class << self
55
55
 
56
- # Assigning a new stylesheet triggers {restyle!}, so do this during a
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
- @stylesheet = new_stylesheet
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.7
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-02-22 00:00:00.000000000 Z
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