spaceship 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +390 -17
- data/lib/spaceship.rb +69 -3
- data/lib/spaceship/app.rb +96 -0
- data/lib/spaceship/base.rb +86 -0
- data/lib/spaceship/certificate.rb +270 -0
- data/lib/spaceship/client.rb +399 -0
- data/lib/spaceship/device.rb +100 -0
- data/lib/spaceship/helper/net_http_generic_request.rb +12 -0
- data/lib/spaceship/helper/plist_middleware.rb +15 -0
- data/lib/spaceship/launcher.rb +89 -0
- data/lib/spaceship/profile_types.rb +39 -0
- data/lib/spaceship/provisioning_profile.rb +352 -0
- data/lib/spaceship/ui.rb +28 -0
- data/lib/spaceship/ui/select_team.rb +55 -0
- data/lib/spaceship/version.rb +2 -2
- metadata +179 -33
- data/.gitignore +0 -14
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/Rakefile +0 -3
- data/lib/spaceship/ship.rb +0 -7
- data/spaceship.gemspec +0 -24
- data/spec/ship_spec.rb +0 -16
- data/spec/spec_helper.rb +0 -1
- data/tasks/rspec.rake +0 -3
data/lib/spaceship/ui.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
paths = Dir[File.expand_path "**/ui/*.rb", File.dirname(__FILE__)]
|
2
|
+
raise "Could not find UI classes to import" unless paths.count > 0
|
3
|
+
paths.each do |file|
|
4
|
+
require file
|
5
|
+
end
|
6
|
+
|
7
|
+
|
8
|
+
module Spaceship
|
9
|
+
class Client
|
10
|
+
# Public getter for all UI related code
|
11
|
+
def UI
|
12
|
+
UserInterface.new(self)
|
13
|
+
end
|
14
|
+
|
15
|
+
# All User Interface related code lives in this class
|
16
|
+
class UserInterface
|
17
|
+
# Is called by the client to generate one instance of UserInterface
|
18
|
+
def initialize(c)
|
19
|
+
@client = c
|
20
|
+
end
|
21
|
+
|
22
|
+
# Access the client this UserInterface object is for
|
23
|
+
def client
|
24
|
+
@client
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Spaceship
|
2
|
+
class Client
|
3
|
+
class UserInterface
|
4
|
+
# Shows the UI to select a team
|
5
|
+
# @example teams value:
|
6
|
+
# [{"status"=>"active",
|
7
|
+
# "teamId"=>"5A997XAAAA",
|
8
|
+
# "type"=>"Company/Organization",
|
9
|
+
# "extendedTeamAttributes"=>{},
|
10
|
+
# "teamAgent"=>{
|
11
|
+
# "personId"=>15534241111,
|
12
|
+
# "firstName"=>"Felix",
|
13
|
+
# "lastName"=>"Krause",
|
14
|
+
# "email"=>"spaceship@krausefx.com",
|
15
|
+
# "developerStatus"=>"active",
|
16
|
+
# "teamMemberId"=>"5Y354CXAAA"},
|
17
|
+
# "memberships"=>
|
18
|
+
# [{"membershipId"=>"HJ5WHYC5CE",
|
19
|
+
# "membershipProductId"=>"ds1",
|
20
|
+
# "status"=>"active",
|
21
|
+
# "inDeviceResetWindow"=>false,
|
22
|
+
# "inRenewalWindow"=>false,
|
23
|
+
# "dateStart"=>"11/20/14 07:59",
|
24
|
+
# "dateExpire"=>"11/20/15 07:59",
|
25
|
+
# "platform"=>"ios",
|
26
|
+
# "availableDeviceSlots"=>100,
|
27
|
+
# "name"=>"iOS Developer Program"}],
|
28
|
+
# "currentTeamMember"=>
|
29
|
+
# {"personId"=>nil, "firstName"=>nil, "lastName"=>nil, "email"=>nil, "developerStatus"=>nil, "privileges"=>{}, "roles"=>["TEAM_ADMIN"], "teamMemberId"=>"HQR8N4GAAA"},
|
30
|
+
# "name"=>"Company GmbH"},
|
31
|
+
# {...}
|
32
|
+
# ]
|
33
|
+
|
34
|
+
def select_team
|
35
|
+
teams = client.teams
|
36
|
+
|
37
|
+
raise "Your account is in no teams" if teams.count == 0
|
38
|
+
return teams[0]['teamId'] if teams.count == 1 # user is just in one team
|
39
|
+
|
40
|
+
loop do
|
41
|
+
# Multiple teams, user has to select
|
42
|
+
puts "Multiple teams found, please enter the number of the team you want to use: ".yellow
|
43
|
+
teams.each_with_index do |team, i|
|
44
|
+
puts "#{i + 1}) #{team['teamId']} #{team['name']} (#{team['type']})".green
|
45
|
+
end
|
46
|
+
|
47
|
+
selected = $stdin.gets.strip.to_i - 1
|
48
|
+
team_to_use = teams[selected] if selected >= 0
|
49
|
+
|
50
|
+
return team_to_use['teamId'] if team_to_use
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/spaceship/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Spaceship
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
2
|
+
VERSION = "0.0.2"
|
3
|
+
end
|
metadata
CHANGED
@@ -1,77 +1,224 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spaceship
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Stefan Natchev
|
8
|
+
- Felix Krause
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: credentials_manager
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '>='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.5.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.5.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: multi_xml
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0.5'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.5'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: plist
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3.1'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.1'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: faraday
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.8.9
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.8.9
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: faraday_middleware
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.9'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0.9'
|
13
84
|
- !ruby/object:Gem::Dependency
|
14
85
|
name: bundler
|
15
86
|
requirement: !ruby/object:Gem::Requirement
|
16
87
|
requirements:
|
17
|
-
- -
|
88
|
+
- - '>='
|
18
89
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
90
|
+
version: '0'
|
20
91
|
type: :development
|
21
92
|
prerelease: false
|
22
93
|
version_requirements: !ruby/object:Gem::Requirement
|
23
94
|
requirements:
|
24
|
-
- -
|
95
|
+
- - '>='
|
25
96
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
97
|
+
version: '0'
|
27
98
|
- !ruby/object:Gem::Dependency
|
28
99
|
name: rake
|
29
100
|
requirement: !ruby/object:Gem::Requirement
|
30
101
|
requirements:
|
31
|
-
- -
|
102
|
+
- - '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: coveralls
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '>='
|
32
117
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
118
|
+
version: '0'
|
34
119
|
type: :development
|
35
120
|
prerelease: false
|
36
121
|
version_requirements: !ruby/object:Gem::Requirement
|
37
122
|
requirements:
|
38
|
-
- -
|
123
|
+
- - '>='
|
39
124
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
125
|
+
version: '0'
|
41
126
|
- !ruby/object:Gem::Dependency
|
42
127
|
name: rspec
|
43
128
|
requirement: !ruby/object:Gem::Requirement
|
44
129
|
requirements:
|
45
|
-
- -
|
130
|
+
- - ~>
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 3.1.0
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ~>
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 3.1.0
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: pry
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - '>='
|
46
145
|
- !ruby/object:Gem::Version
|
47
146
|
version: '0'
|
48
147
|
type: :development
|
49
148
|
prerelease: false
|
50
149
|
version_requirements: !ruby/object:Gem::Requirement
|
51
150
|
requirements:
|
52
|
-
- -
|
151
|
+
- - '>='
|
53
152
|
- !ruby/object:Gem::Version
|
54
153
|
version: '0'
|
55
|
-
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: yard
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ~>
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: 0.8.7.4
|
161
|
+
type: :development
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ~>
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 0.8.7.4
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: webmock
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ~>
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: 1.21.0
|
175
|
+
type: :development
|
176
|
+
prerelease: false
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ~>
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: 1.21.0
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: codeclimate-test-reporter
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - '>='
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - '>='
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
description: Because you would rather spend your time building stuff than fighting
|
197
|
+
provisioning
|
56
198
|
email:
|
57
|
-
-
|
199
|
+
- stefan@natchev.com
|
200
|
+
- spaceship@krausefx.com
|
58
201
|
executables: []
|
59
202
|
extensions: []
|
60
203
|
extra_rdoc_files: []
|
61
204
|
files:
|
62
|
-
-
|
63
|
-
- Gemfile
|
64
|
-
- LICENSE.txt
|
205
|
+
- LICENSE
|
65
206
|
- README.md
|
66
|
-
- Rakefile
|
67
207
|
- lib/spaceship.rb
|
68
|
-
- lib/spaceship/
|
208
|
+
- lib/spaceship/app.rb
|
209
|
+
- lib/spaceship/base.rb
|
210
|
+
- lib/spaceship/certificate.rb
|
211
|
+
- lib/spaceship/client.rb
|
212
|
+
- lib/spaceship/device.rb
|
213
|
+
- lib/spaceship/helper/net_http_generic_request.rb
|
214
|
+
- lib/spaceship/helper/plist_middleware.rb
|
215
|
+
- lib/spaceship/launcher.rb
|
216
|
+
- lib/spaceship/profile_types.rb
|
217
|
+
- lib/spaceship/provisioning_profile.rb
|
218
|
+
- lib/spaceship/ui.rb
|
219
|
+
- lib/spaceship/ui/select_team.rb
|
69
220
|
- lib/spaceship/version.rb
|
70
|
-
|
71
|
-
- spec/ship_spec.rb
|
72
|
-
- spec/spec_helper.rb
|
73
|
-
- tasks/rspec.rake
|
74
|
-
homepage: ''
|
221
|
+
homepage: https://fastlane.tools
|
75
222
|
licenses:
|
76
223
|
- MIT
|
77
224
|
metadata: {}
|
@@ -81,20 +228,19 @@ require_paths:
|
|
81
228
|
- lib
|
82
229
|
required_ruby_version: !ruby/object:Gem::Requirement
|
83
230
|
requirements:
|
84
|
-
- -
|
231
|
+
- - '>='
|
85
232
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
233
|
+
version: 2.0.0
|
87
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
235
|
requirements:
|
89
|
-
- -
|
236
|
+
- - '>='
|
90
237
|
- !ruby/object:Gem::Version
|
91
238
|
version: '0'
|
92
239
|
requirements: []
|
93
240
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.4.
|
241
|
+
rubygems_version: 2.4.7
|
95
242
|
signing_key:
|
96
243
|
specification_version: 4
|
97
|
-
summary:
|
98
|
-
test_files:
|
99
|
-
|
100
|
-
- spec/spec_helper.rb
|
244
|
+
summary: Because you would rather spend your time building stuff than fighting provisioning
|
245
|
+
test_files: []
|
246
|
+
has_rdoc:
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014 Alexander Schuch
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED
data/lib/spaceship/ship.rb
DELETED
data/spaceship.gemspec
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'spaceship/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "spaceship"
|
8
|
-
spec.version = Spaceship::VERSION
|
9
|
-
spec.authors = ["Alexander Schuch"]
|
10
|
-
spec.email = ["alexander@schuch.me"]
|
11
|
-
spec.summary = %q{Spaceship liftoff}
|
12
|
-
#spec.description = %q{}
|
13
|
-
spec.homepage = ""
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency "rspec"
|
24
|
-
end
|