ios_android_toolbox 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
@@ -116,9 +116,9 @@ module IosAndroidToolbox
|
|
116
116
|
self.loop_through_existing_profiles do |installed_profile, installed_profile_path|
|
117
117
|
if installed_profile.app_id == new_profile.app_id and
|
118
118
|
installed_profile.creation_date < new_profile.creation_date and
|
119
|
-
(installed_profile.is_development?
|
120
|
-
installed_profile.is_production?
|
121
|
-
installed_profile.is_adhoc?
|
119
|
+
(installed_profile.is_development? and new_profile.is_development? or
|
120
|
+
installed_profile.is_production? and new_profile.is_production? or
|
121
|
+
installed_profile.is_adhoc? and new_profile.is_adhoc?)
|
122
122
|
puts "Removing stale Prov Profile: #{installed_profile_path}"
|
123
123
|
File.delete installed_profile_path
|
124
124
|
end
|
@@ -135,7 +135,7 @@ module IosAndroidToolbox
|
|
135
135
|
new_path = File.join(PROV_PROFILE_DIR, new_profile.uuid+".mobileprovision")
|
136
136
|
|
137
137
|
if File.expand_path(path) != File.expand_path(new_path)
|
138
|
-
if profile_worth_installing?
|
138
|
+
if profile_worth_installing? new_profile
|
139
139
|
self.remove_stale_equivalent_profiles(path)
|
140
140
|
FileUtils.copy(path, new_path)
|
141
141
|
end
|
@@ -144,13 +144,19 @@ module IosAndroidToolbox
|
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
|
-
def self.profile_worth_installing?(
|
148
|
-
|
147
|
+
def self.profile_worth_installing?(path_or_profile)
|
148
|
+
if path_or_profile.is_a? String
|
149
|
+
new_profile = IosProvisioningProfile.new(path_or_profile)
|
150
|
+
elsif path_or_profile.is_a? IosProvisioningProfile
|
151
|
+
new_profile = path_or_profile
|
152
|
+
else
|
153
|
+
raise "Invalid profile or profile path specified"
|
154
|
+
end
|
149
155
|
loop_through_existing_profiles do |installed_profile, path|
|
150
156
|
if installed_profile.app_id == new_profile.app_id and
|
151
|
-
(installed_profile.is_development?
|
152
|
-
installed_profile.is_production?
|
153
|
-
installed_profile.is_adhoc?
|
157
|
+
(installed_profile.is_development? and new_profile.is_development? or
|
158
|
+
installed_profile.is_production? and new_profile.is_production? or
|
159
|
+
installed_profile.is_adhoc? and new_profile.is_adhoc?)
|
154
160
|
return false if installed_profile.creation_date >= new_profile.creation_date
|
155
161
|
end
|
156
162
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios_android_toolbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 39
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 28
|
10
|
+
version: 0.0.28
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Igor Sales
|