confetti 0.9.0 → 0.9.1

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.
@@ -46,6 +46,10 @@
46
46
  <key>{{ to_s }}</key>
47
47
  <string></string>
48
48
  {{/ devices }}
49
+ {{# exit_on_suspend? }}
50
+ <key>UIApplicationExitsOnSuspend</key>
51
+ <true/>
52
+ {{/ exit_on_suspend? }}
49
53
  {{# fullscreen? }}
50
54
  <key>UIStatusBarHidden</key>
51
55
  <true/>
@@ -56,6 +56,10 @@ module Confetti
56
56
  ORIENTATIONS_MAP[@config.orientation]
57
57
  end
58
58
 
59
+ def exit_on_suspend?
60
+ @config.preference("exit-on-suspend") == :true
61
+ end
62
+
59
63
  def fullscreen?
60
64
  @config.preference(:fullscreen) == :true
61
65
  end
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -186,5 +186,31 @@ describe Confetti::Template::IosInfo do
186
186
  @template.statusbar_style.should == "UIStatusBarStyleBlackOpaque"
187
187
  end
188
188
  end
189
+
190
+ describe "#exit_on_suspend method" do
191
+ before do
192
+ @config = Confetti::Config.new("#{fixture_dir}/config.xml")
193
+ @template = @template_class.new(@config)
194
+ end
195
+
196
+ it "should be false with no preference" do
197
+ @template.exit_on_suspend?.should be_false
198
+ end
199
+
200
+ describe "when set" do
201
+
202
+ it "should be false for exit_on_suspend = false" do
203
+ @status_pref = Confetti::Config::Preference.new("exit-on-suspend", "false")
204
+ @config.preference_set << @status_pref
205
+ @template.exit_on_suspend?.should be_false
206
+ end
207
+
208
+ it "should be true for exit_on_suspend = true" do
209
+ @status_pref = Confetti::Config::Preference.new("exit-on-suspend", "true")
210
+ @config.preference_set << @status_pref
211
+ @template.exit_on_suspend?.should be_true
212
+ end
213
+ end
214
+ end
189
215
  end
190
216
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 0
9
- version: 0.9.0
8
+ - 1
9
+ version: 0.9.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Lunny
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-07-18 00:00:00 -07:00
19
+ date: 2012-08-16 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency