confetti 0.3.3 → 0.3.4
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/android_manifest.mustache +0 -1
- data/lib/confetti/templates/android_manifest.rb +16 -10
- data/lib/confetti/version.rb +1 -1
- data/spec/fixtures/android/AndroidManifest_expected.xml +0 -1
- data/spec/fixtures/android/android_manifest_spec.xml +1 -1
- data/spec/templates/android_manifest_spec.rb +3 -3
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -12,7 +12,6 @@
|
|
12
12
|
android:anyDensity="true"
|
13
13
|
/>
|
14
14
|
|
15
|
-
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
16
15
|
<uses-permission android:name="android.permission.INTERNET" />
|
17
16
|
{{# permissions }}
|
18
17
|
<uses-permission android:name="android.permission.{{ name }}" />
|
@@ -4,19 +4,25 @@ module Confetti
|
|
4
4
|
include JavaChecks
|
5
5
|
|
6
6
|
GAP_PERMISSIONS_MAP = {
|
7
|
-
"camera" =>
|
8
|
-
"notification" =>
|
9
|
-
"geolocation" =>
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
7
|
+
"camera" => %w{CAMERA},
|
8
|
+
"notification" => %w{VIBRATE},
|
9
|
+
"geolocation" => %w{ACCESS_COARSE_LOCATION
|
10
|
+
ACCESS_FINE_LOCATION
|
11
|
+
ACCESS_LOCATION_EXTRA_COMMANDS},
|
12
|
+
"media" => %w{RECORD_AUDIO
|
13
|
+
RECORD_VIDEO
|
14
|
+
MODIFY_AUDIO_SETTINGS},
|
15
|
+
"contacts" => %w{READ_CONTACTS
|
16
|
+
WRITE_CONTACTS
|
17
|
+
GET_ACCOUNTS},
|
18
|
+
"file" => %w{WRITE_EXTERNAL_STORAGE},
|
19
|
+
"network" => %w{ACCESS_NETWORK_STATE},
|
20
|
+
"battery" => %w{BROADCAST_STICKY}
|
15
21
|
}
|
16
22
|
|
17
23
|
ORIENTATIONS_MAP = {
|
18
|
-
:default
|
19
|
-
:landscape
|
24
|
+
:default => "unspecified",
|
25
|
+
:landscape => "landscape",
|
20
26
|
:portrait => "portrait"
|
21
27
|
}
|
22
28
|
|
data/lib/confetti/version.rb
CHANGED
@@ -12,7 +12,6 @@
|
|
12
12
|
android:anyDensity="true"
|
13
13
|
/>
|
14
14
|
|
15
|
-
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
16
15
|
<uses-permission android:name="android.permission.INTERNET" />
|
17
16
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
18
17
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
@@ -12,11 +12,11 @@
|
|
12
12
|
android:anyDensity="true"
|
13
13
|
/>
|
14
14
|
|
15
|
-
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
16
15
|
<uses-permission android:name="android.permission.INTERNET" />
|
17
16
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
18
17
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
19
18
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
19
|
+
<uses-permission android:name="android.permission.RECORD_VIDEO" />
|
20
20
|
<application android:icon="@drawable/icon" android:label="@string/app_name"
|
21
21
|
android:debuggable="true">
|
22
22
|
<activity android:name=".AwesomeApp"
|
@@ -86,13 +86,13 @@ describe Confetti::Template::AndroidManifest do
|
|
86
86
|
end
|
87
87
|
|
88
88
|
it "should return all of the permissions" do
|
89
|
-
# 1 camera, 1 network,
|
90
|
-
@template.permissions.size.should be
|
89
|
+
# 1 camera, 1 network, 3 media
|
90
|
+
@template.permissions.size.should be 5
|
91
91
|
end
|
92
92
|
|
93
93
|
# its dumb, but lets me test
|
94
94
|
it "should be sorted alphabetically" do
|
95
|
-
expected = ["ACCESS_NETWORK_STATE", "CAMERA", "MODIFY_AUDIO_SETTINGS", "RECORD_AUDIO"]
|
95
|
+
expected = ["ACCESS_NETWORK_STATE", "CAMERA", "MODIFY_AUDIO_SETTINGS", "RECORD_AUDIO", "RECORD_VIDEO"]
|
96
96
|
permission_names = @template.permissions.map { |f| f[:name] }
|
97
97
|
|
98
98
|
permission_names.should == expected
|