ios_android_toolbox 0.0.5 → 0.0.6

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.
@@ -48,9 +48,15 @@ def creation_date_from_profile(contents)
48
48
  end
49
49
  end
50
50
 
51
+ def has_provisioned_devices(contents)
52
+ # <key>ProvisionedDevices</key>
53
+ /<key>ProvisionedDevices<\/key>/.match(contents)
54
+ end
55
+
51
56
  new_uuid = uuid_for_profile(prov_profile)
52
57
  new_app_id = app_id_from_profile(prov_profile)
53
58
  new_cdate = creation_date_from_profile(prov_profile)
59
+ new_is_dev = has_provisioned_devices(prov_profile)
54
60
 
55
61
  # Look through each file in the list
56
62
  Dir.foreach(PROV_PROFILE_DIR) do |item|
@@ -64,8 +70,9 @@ Dir.foreach(PROV_PROFILE_DIR) do |item|
64
70
  old_uuid = uuid_for_profile(old_prov_profile)
65
71
  old_app_id = app_id_from_profile(old_prov_profile)
66
72
  old_cdate = creation_date_from_profile(old_prov_profile)
73
+ old_is_dev = has_provisioned_devices(old_prov_profile)
67
74
 
68
- if old_app_id == new_app_id and old_cdate < new_cdate
75
+ if old_app_id == new_app_id and old_cdate < new_cdate and old_is_dev == new_is_dev
69
76
  puts "Removing stale Prov Profile: #{item}"
70
77
  File.unlink PROV_PROFILE_DIR+'/'+item
71
78
  end
@@ -1,3 +1,3 @@
1
1
  module IosAndroidToolbox
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  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: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Igor Sales
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-06 00:00:00 Z
18
+ date: 2012-02-02 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: ""