confetti 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confetti (0.4.6)
4
+ confetti (0.4.7)
5
5
  mustache (~> 0.11.2)
6
6
  thor (~> 0.14.3)
7
7
 
@@ -46,5 +46,9 @@
46
46
  <key>{{ to_s }}</key>
47
47
  <string></string>
48
48
  {{/ devices }}
49
+ {{# fullscreen? }}
50
+ <key>UIStatusBarHidden</key>
51
+ <true/>
52
+ {{/ fullscreen? }}
49
53
  </dict>
50
54
  </plist>
@@ -49,6 +49,10 @@ module Confetti
49
49
  def app_orientations
50
50
  ORIENTATIONS_MAP[@config.orientation]
51
51
  end
52
+
53
+ def fullscreen?
54
+ @config.preference(:fullscreen) == :true
55
+ end
52
56
  end
53
57
  end
54
58
  end
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
@@ -0,0 +1,56 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <widget xmlns = "http://www.w3.org/ns/widgets"
3
+ xmlns:gap = "http://phonegap.com/ns/1.0"
4
+ id = "com.alunny.confetti"
5
+ version = "1.0.0">
6
+
7
+ <name>Confetti Sample App</name>
8
+
9
+ <description>
10
+ This is a sample config.xml for integration testing with Confetti
11
+ </description>
12
+
13
+ <license href="http://www.opensource.org/licenses/mit-license.php">The MIT License
14
+
15
+ Copyright (c) 2011 Andrew Lunny
16
+
17
+ Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ of this software and associated documentation files (the &quot;Software&quot;), to deal
19
+ in the Software without restriction, including without limitation the rights
20
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ copies of the Software, and to permit persons to whom the Software is
22
+ furnished to do so, subject to the following conditions:
23
+
24
+ The above copyright notice and this permission notice shall be included in
25
+ all copies or substantial portions of the Software.
26
+
27
+ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33
+ THE SOFTWARE.</license>
34
+
35
+ <author href="http://alunny.github.com"
36
+ email="alunny@gmail.com">
37
+ Andrew Lunny
38
+ </author>
39
+
40
+ <icon src="icon.png" height="150" width="200" />
41
+
42
+ <gap:splash src="mainsplash.png" height="480" width="360" />
43
+
44
+ <preference name="universal" value="true"/>
45
+ <preference name="fullscreen" value="true"/>
46
+ <preference name="phonegap-version" value="1.3.0"/>
47
+
48
+ <feature name="http://api.phonegap.com/1.0/geolocation" required="true"/>
49
+ <feature name="http://api.phonegap.com/1.0/camera" required="true"/>
50
+ <feature name="http://api.phonegap.com/1.0/notification" required="true"/>
51
+
52
+ <gap:plugin name="ChildBrowser"
53
+ value="com.phonegap.plugins.childBrowser.ChildBrowser">
54
+ <platform name="android" />
55
+ </gap:plugin>
56
+ </widget>
@@ -118,12 +118,26 @@ describe Confetti::Template::IosInfo do
118
118
 
119
119
  describe "should specify if the application is universal" do
120
120
  before do
121
- @config = Confetti::Config.new("#{fixture_dir}/config.xml")
122
- @template = @template_class.new(@config)
121
+ @config = Confetti::Config.new("#{fixture_dir}/config.xml")
122
+ @template = @template_class.new(@config)
123
123
  end
124
124
 
125
125
  it "should should specify universal" do
126
126
  @template.render.should == File.read("#{ fixture_dir }/ios/ios_info_expected.plist")
127
127
  end
128
128
  end
129
+
130
+ describe "#fullscreen? method" do
131
+ it "should be false with no preference" do
132
+ config = Confetti::Config.new("#{fixture_dir}/config.xml")
133
+ template = @template_class.new(config)
134
+ template.fullscreen?.should be_false
135
+ end
136
+
137
+ it "should be true when the preference is set" do
138
+ config = Confetti::Config.new("#{fixture_dir}/config_fullscreen.xml")
139
+ template = @template_class.new(config)
140
+ template.fullscreen?.should be_true
141
+ end
142
+ end
129
143
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confetti
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 6
10
- version: 0.4.6
9
+ - 7
10
+ version: 0.4.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Lunny
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-12-18 00:00:00 -08:00
20
+ date: 2012-01-02 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -173,6 +173,7 @@ files:
173
173
  - spec/fixtures/config-icons-custom-attribs.xml
174
174
  - spec/fixtures/config-icons.xml
175
175
  - spec/fixtures/config.xml
176
+ - spec/fixtures/config_fullscreen.xml
176
177
  - spec/fixtures/config_legacy.xml
177
178
  - spec/fixtures/config_with_orientation.xml
178
179
  - spec/fixtures/config_with_version_code.xml
@@ -267,6 +268,7 @@ test_files:
267
268
  - spec/fixtures/config-icons-custom-attribs.xml
268
269
  - spec/fixtures/config-icons.xml
269
270
  - spec/fixtures/config.xml
271
+ - spec/fixtures/config_fullscreen.xml
270
272
  - spec/fixtures/config_legacy.xml
271
273
  - spec/fixtures/config_with_orientation.xml
272
274
  - spec/fixtures/config_with_version_code.xml