iosdeveloper 0.1.3 → 0.2.0
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/bin/iosdeveloper +11 -3
- data/lib/iosdeveloper/provisioning_portal.rb +7 -1
- data/lib/iosdeveloper/version.rb +1 -1
- metadata +12 -12
data/bin/iosdeveloper
CHANGED
@@ -65,13 +65,21 @@ command 'add-device' do |c|
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
desc 'Downloads provisioning profile'
|
68
|
+
desc 'Downloads provisioning profile and saves it in current directory'
|
69
69
|
arg_name 'PROFILE_NAME'
|
70
70
|
command 'download-profile' do |c|
|
71
71
|
c.action do |global_options, options, args|
|
72
72
|
profile_name = args.shift
|
73
|
-
|
74
|
-
|
73
|
+
portal(global_options).download_profile(profile_name)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
desc 'Installs provisioning profile'
|
78
|
+
arg_name 'PROFILE_NAME'
|
79
|
+
command 'install-profile' do |c|
|
80
|
+
c.action do |global_options, options, args|
|
81
|
+
profile_name = args.shift
|
82
|
+
portal(global_options).install_profile(profile_name)
|
75
83
|
end
|
76
84
|
end
|
77
85
|
|
@@ -8,6 +8,7 @@ module IOSDeveloper
|
|
8
8
|
PROFILES_URL = "https://developer.apple.com/ios/manage/provisioningprofiles/index.action"
|
9
9
|
DISTRIBUTION_PROFILES_URL = "https://developer.apple.com/ios/manage/provisioningprofiles/viewDistributionProfiles.action"
|
10
10
|
ADD_DEVICE_URL = "https://developer.apple.com/ios/manage/devices/add.action"
|
11
|
+
PROVISIONING_PROFILES_LOCATION = "#{ENV['HOME']}/Library/MobileDevice/Provisioning Profiles"
|
11
12
|
|
12
13
|
def initialize (login, password, team_name)
|
13
14
|
@agent = Mechanize.new
|
@@ -98,10 +99,11 @@ module IOSDeveloper
|
|
98
99
|
/provDisplayId=(\w+)/.match(display_url)[1]
|
99
100
|
end
|
100
101
|
|
101
|
-
def download_profile(profile_name,
|
102
|
+
def download_profile(profile_name, location=".")
|
102
103
|
profiles = list_profiles
|
103
104
|
profiles.each do |profile|
|
104
105
|
if profile.name == profile_name
|
106
|
+
file_name = "#{location}/#{profile_name}.mobileprovision"
|
105
107
|
@agent.get(profile.download_url).save(file_name)
|
106
108
|
puts "Saved #{profile_name} profile in #{file_name}"
|
107
109
|
return
|
@@ -110,6 +112,10 @@ module IOSDeveloper
|
|
110
112
|
puts "Could not find profile with name: #{profile_name}"
|
111
113
|
end
|
112
114
|
|
115
|
+
def install_profile profile_name
|
116
|
+
download_profile(profile_name, PROVISIONING_PROFILES_LOCATION)
|
117
|
+
end
|
118
|
+
|
113
119
|
end
|
114
120
|
|
115
121
|
end
|
data/lib/iosdeveloper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iosdeveloper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70202361110760 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70202361110760
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rdoc
|
27
|
-
requirement: &
|
27
|
+
requirement: &70202361110320 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70202361110320
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: aruba
|
38
|
-
requirement: &
|
38
|
+
requirement: &70202361109900 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70202361109900
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: gli
|
49
|
-
requirement: &
|
49
|
+
requirement: &70202361109380 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - =
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 2.5.3
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70202361109380
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: mechanize
|
60
|
-
requirement: &
|
60
|
+
requirement: &70202361108880 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - =
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: 2.5.1
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70202361108880
|
69
69
|
description: Command line tools for accessing iOS Provisioning Portal
|
70
70
|
email: marcin.kwiatkowski@hotmail.com
|
71
71
|
executables:
|