confetti 0.7.9 → 0.7.10
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
|
@@ -18,6 +18,12 @@ module Confetti
|
|
|
18
18
|
]
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
STATUS_BARS = {
|
|
22
|
+
:default => "UIStatusBarStyleDefault",
|
|
23
|
+
:"black-transparent" => "UIStatusBarStyleBlackTransparent",
|
|
24
|
+
:"black-opaque" => "UIStatusBarStyleBlackOpaque"
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
def icons
|
|
22
28
|
@config.plist_icon_set
|
|
23
29
|
end
|
|
@@ -57,6 +63,13 @@ module Confetti
|
|
|
57
63
|
def prerendered_icon?
|
|
58
64
|
@config.preference("prerendered-icon") == :true
|
|
59
65
|
end
|
|
66
|
+
|
|
67
|
+
def statusbar_style
|
|
68
|
+
pref = @config.preference("ios-statusbarstyle")
|
|
69
|
+
if pref
|
|
70
|
+
STATUS_BARS[pref]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
60
73
|
end
|
|
61
74
|
end
|
|
62
75
|
end
|
data/lib/confetti/version.rb
CHANGED
|
@@ -154,4 +154,37 @@ describe Confetti::Template::IosInfo do
|
|
|
154
154
|
template.prerendered_icon?.should be_true
|
|
155
155
|
end
|
|
156
156
|
end
|
|
157
|
+
|
|
158
|
+
describe "#statusbar_style method" do
|
|
159
|
+
before do
|
|
160
|
+
@config = Confetti::Config.new("#{fixture_dir}/config.xml")
|
|
161
|
+
@template = @template_class.new(@config)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
it "should be nil with no preference" do
|
|
165
|
+
@template.statusbar_style.should be_nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
describe "when set" do
|
|
169
|
+
before do
|
|
170
|
+
@status_pref = Confetti::Config::Preference.new("ios-statusbarstyle")
|
|
171
|
+
@config.preference_set << @status_pref
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
it "should be UIStatusBarStyleDefault for default" do
|
|
175
|
+
@status_pref.value = "default"
|
|
176
|
+
@template.statusbar_style.should == "UIStatusBarStyleDefault"
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
it "should be UIStatusBarStyleBlackTransparent for default" do
|
|
180
|
+
@status_pref.value = "black-transparent"
|
|
181
|
+
@template.statusbar_style.should == "UIStatusBarStyleBlackTransparent"
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
it "should be UIStatusBarStyleBlackOpaque for default" do
|
|
185
|
+
@status_pref.value = "black-opaque"
|
|
186
|
+
@template.statusbar_style.should == "UIStatusBarStyleBlackOpaque"
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
157
190
|
end
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 7
|
|
8
|
-
-
|
|
9
|
-
version: 0.7.
|
|
8
|
+
- 10
|
|
9
|
+
version: 0.7.10
|
|
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-04-
|
|
19
|
+
date: 2012-04-30 00:00:00 -07:00
|
|
20
20
|
default_executable:
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|