confetti 0.3.9 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/confetti/templates/symbian_wrt_info.mustache +4 -0
- data/lib/confetti/templates/symbian_wrt_info.rb +25 -4
- data/lib/confetti/version.rb +1 -1
- data/spec/fixtures/symbian/symbian_wrt_info_expected.plist +1 -1
- data/spec/fixtures/symbian/symbian_wrt_info_spec.plist +3 -1
- data/spec/templates/symbian_wrt_info_spec.rb +3 -0
- metadata +5 -20
data/Gemfile.lock
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
module Confetti
|
2
2
|
module Template
|
3
3
|
class SymbianWrtInfo < Base
|
4
|
+
|
5
|
+
GAP_PERMISSIONS_MAP = {
|
6
|
+
"network" => %w{AllowNetworkAccess},
|
7
|
+
}
|
8
|
+
|
4
9
|
def identifier
|
5
10
|
@config.package
|
6
11
|
end
|
7
12
|
|
8
13
|
def version
|
9
14
|
if @config.version_string.nil? or @config.version_string.empty?
|
10
|
-
"1.0"
|
11
|
-
else
|
12
|
-
@config.version_string
|
13
|
-
end
|
15
|
+
"1.0"
|
16
|
+
else
|
17
|
+
@config.version_string
|
18
|
+
end
|
14
19
|
end
|
15
20
|
|
16
21
|
def display_name
|
@@ -20,6 +25,22 @@ module Confetti
|
|
20
25
|
def output_filename
|
21
26
|
"info.plist"
|
22
27
|
end
|
28
|
+
|
29
|
+
def permissions
|
30
|
+
permissions = []
|
31
|
+
phonegap_api = /http\:\/\/api.phonegap.com\/1[.]0\/(\w+)/
|
32
|
+
feature_names = @config.feature_set.map { |f| f.name }
|
33
|
+
feature_names.sort
|
34
|
+
|
35
|
+
feature_names.each do |f|
|
36
|
+
feature_name = f.match(phonegap_api)[1] if f.match(phonegap_api)
|
37
|
+
associated_permissions = GAP_PERMISSIONS_MAP[feature_name]
|
38
|
+
permissions.concat(associated_permissions) if associated_permissions
|
39
|
+
end
|
40
|
+
|
41
|
+
permissions.sort!
|
42
|
+
permissions.map { |f| { :name => f } }
|
43
|
+
end
|
23
44
|
end
|
24
45
|
end
|
25
46
|
end
|
data/lib/confetti/version.rb
CHANGED
@@ -35,6 +35,9 @@ describe Confetti::Template::SymbianWrtInfo do
|
|
35
35
|
@config.name.name = "Awesome App"
|
36
36
|
@config.package = "com.whoever.awesome.app"
|
37
37
|
@config.version_string = "1.0.0"
|
38
|
+
@feature_set = TypedSet.new Confetti::Config::Feature
|
39
|
+
@feature_set << Confetti::Config::Feature.new("http://api.phonegap.com/1.0/network", "true")
|
40
|
+
@config.stub(:feature_set).and_return @feature_set
|
38
41
|
end
|
39
42
|
|
40
43
|
it "should accept the config object" do
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confetti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 1
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Andrew Lunny
|
@@ -17,18 +16,16 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2011-09-
|
19
|
+
date: 2011-09-13 00:00:00 -07:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
24
23
|
name: mustache
|
25
24
|
prerelease: false
|
26
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
26
|
requirements:
|
29
27
|
- - ~>
|
30
28
|
- !ruby/object:Gem::Version
|
31
|
-
hash: 55
|
32
29
|
segments:
|
33
30
|
- 0
|
34
31
|
- 11
|
@@ -40,11 +37,9 @@ dependencies:
|
|
40
37
|
name: thor
|
41
38
|
prerelease: false
|
42
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
40
|
requirements:
|
45
41
|
- - ~>
|
46
42
|
- !ruby/object:Gem::Version
|
47
|
-
hash: 33
|
48
43
|
segments:
|
49
44
|
- 0
|
50
45
|
- 14
|
@@ -56,11 +51,9 @@ dependencies:
|
|
56
51
|
name: rspec
|
57
52
|
prerelease: false
|
58
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
54
|
requirements:
|
61
55
|
- - ~>
|
62
56
|
- !ruby/object:Gem::Version
|
63
|
-
hash: 23
|
64
57
|
segments:
|
65
58
|
- 2
|
66
59
|
- 6
|
@@ -72,11 +65,9 @@ dependencies:
|
|
72
65
|
name: cucumber
|
73
66
|
prerelease: false
|
74
67
|
requirement: &id004 !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
68
|
requirements:
|
77
69
|
- - ">="
|
78
70
|
- !ruby/object:Gem::Version
|
79
|
-
hash: 3
|
80
71
|
segments:
|
81
72
|
- 0
|
82
73
|
version: "0"
|
@@ -86,11 +77,9 @@ dependencies:
|
|
86
77
|
name: aruba
|
87
78
|
prerelease: false
|
88
79
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
80
|
requirements:
|
91
81
|
- - ">="
|
92
82
|
- !ruby/object:Gem::Version
|
93
|
-
hash: 3
|
94
83
|
segments:
|
95
84
|
- 0
|
96
85
|
version: "0"
|
@@ -205,27 +194,23 @@ rdoc_options: []
|
|
205
194
|
require_paths:
|
206
195
|
- lib
|
207
196
|
required_ruby_version: !ruby/object:Gem::Requirement
|
208
|
-
none: false
|
209
197
|
requirements:
|
210
198
|
- - ">="
|
211
199
|
- !ruby/object:Gem::Version
|
212
|
-
hash: 3
|
213
200
|
segments:
|
214
201
|
- 0
|
215
202
|
version: "0"
|
216
203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
204
|
requirements:
|
219
205
|
- - ">="
|
220
206
|
- !ruby/object:Gem::Version
|
221
|
-
hash: 3
|
222
207
|
segments:
|
223
208
|
- 0
|
224
209
|
version: "0"
|
225
210
|
requirements: []
|
226
211
|
|
227
212
|
rubyforge_project: confetti
|
228
|
-
rubygems_version: 1.3.
|
213
|
+
rubygems_version: 1.3.6
|
229
214
|
signing_key:
|
230
215
|
specification_version: 3
|
231
216
|
summary: Generate mobile app config files
|