ProMotion 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ module ProMotion
|
|
33
33
|
|
34
34
|
# Usage: PM.logger.log("ERROR", "message here", :red)
|
35
35
|
def log(label, message_text, color)
|
36
|
-
return if RUBYMOTION_ENV == "test"
|
36
|
+
return if defined?(RUBYMOTION_ENV) && RUBYMOTION_ENV == "test"
|
37
37
|
color = COLORS[color] || COLORS[:default]
|
38
38
|
puts color[0] + NAME + "[#{label}] #{message_text}" + color[1]
|
39
39
|
end
|
data/lib/ProMotion/version.rb
CHANGED
data/spec/unit/screen_spec.rb
CHANGED
@@ -43,6 +43,19 @@ describe "screen properties" do
|
|
43
43
|
@screen.should_autorotate.should == true
|
44
44
|
end
|
45
45
|
|
46
|
+
# Issue https://github.com/clearsightstudio/ProMotion/issues/109
|
47
|
+
it "#should_autorotate should fire when shouldAutorotate fires when in a navigation bar" do
|
48
|
+
parent_screen = BasicScreen.new(nav_bar: true)
|
49
|
+
parent_screen.open @screen
|
50
|
+
@screen.mock!(:should_autorotate) { true.should == true }
|
51
|
+
parent_screen.navigationController.shouldAutorotate
|
52
|
+
end
|
53
|
+
|
54
|
+
# <= iOS 5 only
|
55
|
+
it "#should_rotate(orientation) should fire when shouldAutorotateToInterfaceOrientation(orientation) fires" do
|
56
|
+
@screen.mock!(:should_rotate) { |orientation| orientation.should == UIInterfaceOrientationMaskPortrait }
|
57
|
+
@screen.shouldAutorotateToInterfaceOrientation(UIInterfaceOrientationMaskPortrait)
|
58
|
+
end
|
46
59
|
|
47
60
|
describe "iOS lifecycle methods" do
|
48
61
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ProMotion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-06-
|
14
|
+
date: 2013-06-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: motion-stump
|