confetti 0.5.4 → 0.5.5
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
@@ -9,7 +9,7 @@
|
|
9
9
|
<license href="{{ license_href }}">{{ license_text }}</license>
|
10
10
|
|
11
11
|
<feature id="blackberry.system" required="true" version="1.0.0.0" />
|
12
|
-
<feature id="
|
12
|
+
<feature id="{{ framework_namespace }}" required="true" version="1.0.0" />
|
13
13
|
<feature id="blackberry.find" required="true" version="1.0.0.0" />
|
14
14
|
<feature id="blackberry.identity" required="true" version="1.0.0.0" />
|
15
15
|
<feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
|
@@ -91,6 +91,13 @@ module Confetti
|
|
91
91
|
def no_cursor?
|
92
92
|
@config.preference("disable-cursor") == :true
|
93
93
|
end
|
94
|
+
|
95
|
+
def framework_namespace
|
96
|
+
# phonegap = 0.x, 1.0, 1.1, 1.2, 1.3, 1.4
|
97
|
+
gap = @config.phonegap_version.match(/^(0)|(1[.][0-4])/)
|
98
|
+
|
99
|
+
gap ? 'com.phonegap' : 'org.apache.cordova'
|
100
|
+
end
|
94
101
|
end
|
95
102
|
end
|
96
103
|
end
|
data/lib/confetti/version.rb
CHANGED
@@ -192,4 +192,32 @@ describe Confetti::Template::BlackberryWidgetsConfig do
|
|
192
192
|
template.no_cursor?.should be_true
|
193
193
|
end
|
194
194
|
end
|
195
|
+
|
196
|
+
describe "#framework_namespace" do
|
197
|
+
before do
|
198
|
+
@config = Confetti::Config.new("#{fixture_dir}/config.xml")
|
199
|
+
@template = @template_class.new(@config)
|
200
|
+
end
|
201
|
+
|
202
|
+
it "should be org.apache.cordova by default" do
|
203
|
+
@config.phonegap_version = nil
|
204
|
+
@template.framework_namespace.should == 'org.apache.cordova'
|
205
|
+
end
|
206
|
+
|
207
|
+
it "should be com.phonegap for 0.x" do
|
208
|
+
@config.phonegap_version = '0.9.0'
|
209
|
+
@template.framework_namespace.should == 'com.phonegap'
|
210
|
+
end
|
211
|
+
|
212
|
+
it "should be com.phonegap for 1.4.1" do
|
213
|
+
@config.phonegap_version = '1.4.1'
|
214
|
+
@template.framework_namespace.should == 'com.phonegap'
|
215
|
+
end
|
216
|
+
|
217
|
+
it "should be org.apache.cordova for 1.5.0" do
|
218
|
+
@config.phonegap_version = '1.5.0'
|
219
|
+
@template.framework_namespace.should == 'org.apache.cordova'
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
195
223
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 5
|
9
|
+
version: 0.5.5
|
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-
|
19
|
+
date: 2012-03-16 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|