slowlane 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/complete.sh +43 -0
- data/bin/slowlane-itunes +1 -20
- data/lib/slowlane/itunes/command.rb +43 -0
- data/lib/slowlane/portal/profile.rb +71 -5
- data/slowlane.gemspec +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e23fda9ca9f16d0108eebe50404e1d528150220a
|
4
|
+
data.tar.gz: f9bbbb8f82b60faebc82b51becf7f11989cab5b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6b528a992145497183a178d53a63ff480155b800ea6af71da8ab3eaea8c23b6f6ea3dab48b2e717a86caa72b21064d7e867507724dbf9f377602e6e35124871
|
7
|
+
data.tar.gz: 6c8b0b860eed2285912ed70c6d05ef0293676de720778b22e7e091704a91ec3e798e001a6c36f61a618aefcf591c424716005f894e164a39fce320834086c91b
|
data/README.md
CHANGED
@@ -49,6 +49,7 @@ results in binaries:
|
|
49
49
|
- `slowlane-portal device list`
|
50
50
|
- `slowlane-portal profile list`
|
51
51
|
- `slowlane-portal profile decode`
|
52
|
+
- `slowlane-portal profile download`
|
52
53
|
- `slowlane-portal psn list`
|
53
54
|
- `slowlane-portal team list`
|
54
55
|
|
@@ -76,7 +77,6 @@ A lot is still focusing on the happy path , we need to catch better the errors a
|
|
76
77
|
#### Portal
|
77
78
|
- create|delete app
|
78
79
|
- create|delete certificate
|
79
|
-
- download certificate
|
80
80
|
- create|delete device
|
81
81
|
- create|delete profile
|
82
82
|
- download profile
|
data/bin/complete.sh
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
_slowlane_itunes_complete()
|
2
|
+
{
|
3
|
+
local cur prev
|
4
|
+
|
5
|
+
COMPREPLY=()
|
6
|
+
cur=${COMP_WORDS[COMP_CWORD]}
|
7
|
+
prev=${COMP_WORDS[COMP_CWORD-1]}
|
8
|
+
|
9
|
+
if [ $COMP_CWORD -eq 1 ]; then
|
10
|
+
COMPREPLY=( $(compgen -W "help team app build tester" -- $cur) )
|
11
|
+
elif [ $COMP_CWORD -eq 2 ]; then
|
12
|
+
case "$prev" in
|
13
|
+
"app")
|
14
|
+
COMPREPLY=( $(compgen -W "list help" -- $cur) )
|
15
|
+
;;
|
16
|
+
"build")
|
17
|
+
COMPREPLY=( $(compgen -W "list help" -- $cur) )
|
18
|
+
;;
|
19
|
+
"team")
|
20
|
+
COMPREPLY=( $(compgen -W "list help" -- $cur) )
|
21
|
+
;;
|
22
|
+
"tester")
|
23
|
+
COMPREPLY=( $(compgen -W "list help" -- $cur) )
|
24
|
+
;;
|
25
|
+
*)
|
26
|
+
;;
|
27
|
+
esac
|
28
|
+
elif [ $COMP_CWORD -gt 2 ]; then
|
29
|
+
command=${COMP_WORDS[1]}
|
30
|
+
subcommand=${COMP_WORDS[2]}
|
31
|
+
if [ "$command" == "team" ] && [ "$subcommand" == "list" ]; then
|
32
|
+
case "$cur" in
|
33
|
+
--*)
|
34
|
+
COMPREPLY=( $( compgen -W '--user --password --team' -- $cur ) );;
|
35
|
+
*)
|
36
|
+
;;
|
37
|
+
esac
|
38
|
+
fi
|
39
|
+
fi
|
40
|
+
|
41
|
+
return 0
|
42
|
+
} &&
|
43
|
+
complete -F _slowlane_itunes_complete slowlane-itunes
|
data/bin/slowlane-itunes
CHANGED
@@ -6,25 +6,6 @@ require_relative '../lib/slowlane/itunes/app.rb'
|
|
6
6
|
require_relative '../lib/slowlane/itunes/team.rb'
|
7
7
|
require_relative '../lib/slowlane/itunes/build.rb'
|
8
8
|
require_relative '../lib/slowlane/itunes/tester.rb'
|
9
|
-
|
10
|
-
class SlowlaneItunes < Thor
|
11
|
-
|
12
|
-
class_option :username , :default => '<username>' , :required => true, :desc => 'username [SLOWLANE_ITUNES_USERNAME]'
|
13
|
-
class_option :password , :default => '<password>' , :required => true, :desc => 'password [SLOWLANE_ITUNES_PASSWORD]'
|
14
|
-
class_option :team , :default => '<team>' , :required => false, :desc => 'team [SLOWLANE_ITUNES_TEAM]'
|
15
|
-
|
16
|
-
desc "app SUBCOMMAND ...ARGS", "manage apps"
|
17
|
-
subcommand "app", Slowlane::Itunes::App
|
18
|
-
|
19
|
-
desc "team SUBCOMMAND ...ARGS", "manage teams"
|
20
|
-
subcommand "team", Slowlane::Itunes::Team
|
21
|
-
|
22
|
-
desc "build SUBCOMMAND ...ARGS", "manage builds"
|
23
|
-
subcommand "build", Slowlane::Itunes::Build
|
24
|
-
|
25
|
-
desc "tester SUBCOMMAND ...ARGS", "manage testers"
|
26
|
-
subcommand "tester", Slowlane::Itunes::Tester
|
27
|
-
|
28
|
-
end
|
9
|
+
require_relative '../lib/slowlane/itunes/command.rb'
|
29
10
|
|
30
11
|
SlowlaneItunes.start(ARGV)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'thor'
|
2
|
+
class SlowlaneItunes < Thor
|
3
|
+
|
4
|
+
class_option :username , :default => '<username>' , :required => true, :desc => 'username [SLOWLANE_ITUNES_USERNAME]'
|
5
|
+
class_option :password , :default => '<password>' , :required => true, :desc => 'password [SLOWLANE_ITUNES_PASSWORD]'
|
6
|
+
class_option :team , :default => '<team>' , :required => false, :desc => 'team [SLOWLANE_ITUNES_TEAM]'
|
7
|
+
|
8
|
+
desc "app SUBCOMMAND ...ARGS", "manage apps"
|
9
|
+
subcommand "app", Slowlane::Itunes::App
|
10
|
+
|
11
|
+
desc "team SUBCOMMAND ...ARGS", "manage teams"
|
12
|
+
subcommand "team", Slowlane::Itunes::Team
|
13
|
+
|
14
|
+
desc "build SUBCOMMAND ...ARGS", "manage builds"
|
15
|
+
subcommand "build", Slowlane::Itunes::Build
|
16
|
+
|
17
|
+
desc "tester SUBCOMMAND ...ARGS", "manage testers"
|
18
|
+
subcommand "tester", Slowlane::Itunes::Tester
|
19
|
+
|
20
|
+
desc "autocomplete","provide autocompletion",:hide => true
|
21
|
+
def autocomplete
|
22
|
+
class_options = self.class.class_options
|
23
|
+
commands = self.class.commands
|
24
|
+
commands.each do |command_name,command|
|
25
|
+
unless command.instance_of? Thor::HiddenCommand
|
26
|
+
subcommand_class = Object.const_get("Slowlane::Itunes::"+command_name.capitalize)
|
27
|
+
subcommand_class.commands.each do |subcommand_name,subcommand|
|
28
|
+
available_options = []
|
29
|
+
options = subcommand.options
|
30
|
+
options.each do |option_name,option|
|
31
|
+
available_options << "--#{option_name}"
|
32
|
+
end
|
33
|
+
class_options.each do |option_name,option|
|
34
|
+
available_options << "--#{option_name}"
|
35
|
+
end
|
36
|
+
puts "#{command_name}::#{subcommand_name} : #{available_options.join(',')}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -51,10 +51,71 @@ module Slowlane
|
|
51
51
|
|
52
52
|
end
|
53
53
|
|
54
|
-
desc "
|
55
|
-
def
|
56
|
-
puts
|
57
|
-
|
54
|
+
desc "add_device","add_device <bundle_id> <device_udid>"
|
55
|
+
def device_add(bundle_id,device_udid)
|
56
|
+
puts "Note: only adding devices to distribution adhoc profiles"
|
57
|
+
|
58
|
+
device=Spaceship.device.find_by_udid(device_udid)
|
59
|
+
if device.nil?
|
60
|
+
puts "No device with udid #{device_udid} found"
|
61
|
+
exit(-1)
|
62
|
+
end
|
63
|
+
|
64
|
+
profiles = Spaceship.provisioning_profile.find_by_bundle_id(bundle_id)
|
65
|
+
distribution_profiles = profiles.select do |profile|
|
66
|
+
profile.type == "iOS Distribution" and profile.distribution_method == "adhoc"
|
67
|
+
end
|
68
|
+
|
69
|
+
if distribution_profiles.size() == 0
|
70
|
+
puts "We found no provisioning profiles for bundle_id #{bundle_id}"
|
71
|
+
exit(-1)
|
72
|
+
end
|
73
|
+
|
74
|
+
if distribution_profiles.size() > 1
|
75
|
+
puts "We found multiple provisioning profiles for bundle_id #{bundle_id}"
|
76
|
+
exit(-1)
|
77
|
+
end
|
78
|
+
|
79
|
+
profile=distribution_profiles.first
|
80
|
+
profile.devices.push(device)
|
81
|
+
profile.update!
|
82
|
+
|
83
|
+
puts "device with udid #{device_udid} added to provisioning profile #{profile.name}(#{bundle_id})"
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
#option :platform,:default => 'ios', :banner => '<adhoc,limited,store>'
|
88
|
+
desc "download", "download provisioning profile <bundle_id>"
|
89
|
+
option :distribution_method,:required => true , :banner => '<adhoc,limited,store>'
|
90
|
+
def download(bundle_id)
|
91
|
+
|
92
|
+
c=Utils.credentials(options)
|
93
|
+
Spaceship::Portal.login(c.username,c.password)
|
94
|
+
|
95
|
+
t=Utils.team(options)
|
96
|
+
Spaceship::Portal.client.team_id=t
|
97
|
+
|
98
|
+
profiles = Spaceship.provisioning_profile.find_by_bundle_id(bundle_id)
|
99
|
+
distribution_profiles = profiles.select do |profile|
|
100
|
+
profile.distribution_method == options[:distribution_method]
|
101
|
+
end
|
102
|
+
|
103
|
+
if distribution_profiles.size() == 0
|
104
|
+
puts "We found no provisioning profiles for bundle_id #{bundle_id}"
|
105
|
+
exit(-1)
|
106
|
+
end
|
107
|
+
|
108
|
+
if distribution_profiles.size() > 1
|
109
|
+
puts "We found multiple provisioning profiles for bundle_id #{bundle_id}"
|
110
|
+
exit(-1)
|
111
|
+
end
|
112
|
+
|
113
|
+
profile=distribution_profiles.first
|
114
|
+
|
115
|
+
filename = "#{profile.uuid}.mobileprovision"
|
116
|
+
puts "writing provisioning profile #{profile.name}(#{bundle_id}) to #{filename}"
|
117
|
+
File.write("#{profile.uuid}.mobileprovision", profile.download)
|
118
|
+
|
58
119
|
end
|
59
120
|
|
60
121
|
desc "list", "List profiles"
|
@@ -67,13 +128,18 @@ module Slowlane
|
|
67
128
|
Spaceship::Portal.client.team_id=t
|
68
129
|
|
69
130
|
rows = []
|
70
|
-
headings = [ 'uuid', 'id', 'distribution_method', 'name' ]
|
131
|
+
headings = [ 'uuid', 'id', 'distribution_method', 'name' ,'platform','type','bundle_id']
|
71
132
|
Spaceship::Portal.provisioning_profile.all.find_all do |profile|
|
72
133
|
row = []
|
73
134
|
row << profile.uuid
|
74
135
|
row << profile.id
|
75
136
|
row << profile.distribution_method
|
76
137
|
row << profile.name
|
138
|
+
#TODO Spaceship - separate this type
|
139
|
+
row << profile.type.split(' ')[0].downcase
|
140
|
+
row << profile.type.split(' ')[1].downcase
|
141
|
+
row << profile.app.bundle_id
|
142
|
+
|
77
143
|
unless options[:filter].nil?
|
78
144
|
if profile.name =~ /#{options[:filter]}/
|
79
145
|
rows << row
|
data/slowlane.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slowlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Debois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -126,6 +126,7 @@ description: Fastlane Cli without supprises
|
|
126
126
|
email:
|
127
127
|
- patrick.debois@jedi.be
|
128
128
|
executables:
|
129
|
+
- complete.sh
|
129
130
|
- slowlane-ipa
|
130
131
|
- slowlane-itunes
|
131
132
|
- slowlane-portal
|
@@ -136,11 +137,13 @@ files:
|
|
136
137
|
- Gemfile
|
137
138
|
- README.md
|
138
139
|
- Rakefile
|
140
|
+
- bin/complete.sh
|
139
141
|
- bin/slowlane-ipa
|
140
142
|
- bin/slowlane-itunes
|
141
143
|
- bin/slowlane-portal
|
142
144
|
- lib/slowlane/itunes/app.rb
|
143
145
|
- lib/slowlane/itunes/build.rb
|
146
|
+
- lib/slowlane/itunes/command.rb
|
144
147
|
- lib/slowlane/itunes/team.rb
|
145
148
|
- lib/slowlane/itunes/tester.rb
|
146
149
|
- lib/slowlane/itunes/util.rb
|