deploygate 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/deploygate.gemspec +3 -3
- data/lib/deploygate/version.rb +1 -1
- data/lib/deploygate/xcode/member_center.rb +4 -4
- data/lib/deploygate/xcode/member_centers/app.rb +2 -2
- data/lib/deploygate/xcode/member_centers/device.rb +4 -4
- data/lib/deploygate/xcode/member_centers/provisioning_profile.rb +4 -4
- data/spec/deploygate/xcode/member_center_spec.rb +3 -3
- data/spec/deploygate/xcode/member_centers/app_spec.rb +14 -26
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzA5MWI3ZTZiYTg2YWVhYTVjNjQ5MDcyMzFlMWRhZjJjMmM0ZDkxZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Njg1ZGYyNjAzNzJjY2VlMTg2YzIwYjk0OWQ2ZDM0OTcwMGU4YTgwNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjcyNTA1ZGU3NDE3ZmJjY2Q0MzQ2NGFjMjAyMTVlZGY0MjkzNWZiZTEwZTA0
|
10
|
+
NDg2MTc4YzBiOGFiYzdmNTFjYTQ1N2E3YzcwMWUzYWFlOWQ5Zjc1YWNlYmQz
|
11
|
+
YTRjZjQzODEwYTBkNDVmZmNhYjNiNzQxYzc4ZjkyZDk2ODg3YjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzA2NTliMzk2MDA4MDg4NDUzNzhmOGU2YTc0NDNkMDFjNmM2NmUwOGI2ZmEy
|
14
|
+
ZDEwMGY4NDNlZDNmYTM2NTA1YmJiYjQ4NGY3OWEzMThkZTcwMjhiY2Y5YTlh
|
15
|
+
MTU1MDEyNjllNDJiMWM0YWYyMzdkZDY0YjFlMGNkMTYyOWIwZTk=
|
data/deploygate.gemspec
CHANGED
@@ -38,9 +38,9 @@ POST_INSTALL_MESSAGE
|
|
38
38
|
spec.add_dependency 'workers'
|
39
39
|
|
40
40
|
# ios build
|
41
|
-
spec.add_dependency 'gym', '~> 1.
|
42
|
-
spec.add_dependency 'spaceship', '~> 0.32.
|
43
|
-
spec.add_dependency 'sigh', '~> 1.10.
|
41
|
+
spec.add_dependency 'gym', '~> 1.9.0'
|
42
|
+
spec.add_dependency 'spaceship', '~> 0.32.4'
|
43
|
+
spec.add_dependency 'sigh', '~> 1.10.4'
|
44
44
|
|
45
45
|
spec.add_development_dependency "bundler"
|
46
46
|
spec.add_development_dependency "rake"
|
data/lib/deploygate/version.rb
CHANGED
@@ -4,14 +4,14 @@ module DeployGate
|
|
4
4
|
module Xcode
|
5
5
|
class MemberCenter
|
6
6
|
include Singleton
|
7
|
-
attr_reader :email, :method, :team
|
7
|
+
attr_reader :email, :method, :team, :launcher
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
@email = input_email
|
11
|
-
Spaceship.
|
12
|
-
@team =
|
11
|
+
@launcher = Spaceship::Launcher.new @email
|
12
|
+
@team = @launcher.select_team
|
13
13
|
|
14
|
-
if
|
14
|
+
if @launcher.client.in_house?
|
15
15
|
@method = Export::ENTERPRISE
|
16
16
|
else
|
17
17
|
@method = Export::AD_HOC
|
@@ -13,7 +13,7 @@ module DeployGate
|
|
13
13
|
|
14
14
|
# @return [Boolean]
|
15
15
|
def created?
|
16
|
-
|
16
|
+
@member_center.launcher.app.all.collect do |app|
|
17
17
|
return true if app.bundle_id == @uuid
|
18
18
|
end
|
19
19
|
|
@@ -22,7 +22,7 @@ module DeployGate
|
|
22
22
|
|
23
23
|
# @return [void]
|
24
24
|
def create!
|
25
|
-
|
25
|
+
@member_center.launcher.app.create!(bundle_id: @uuid, name: name())
|
26
26
|
end
|
27
27
|
|
28
28
|
# @return [String]
|
@@ -18,16 +18,16 @@ module DeployGate
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def registered?
|
21
|
-
DeployGate::Xcode::MemberCenter.instance
|
22
|
-
!
|
21
|
+
instance = DeployGate::Xcode::MemberCenter.instance
|
22
|
+
!instance.launcher.device.find_by_udid(@udid).nil?
|
23
23
|
end
|
24
24
|
|
25
25
|
# @return [void]
|
26
26
|
def register!
|
27
|
-
DeployGate::Xcode::MemberCenter.instance
|
27
|
+
instance = DeployGate::Xcode::MemberCenter.instance
|
28
28
|
return if registered?
|
29
29
|
|
30
|
-
|
30
|
+
instance.launcher.device.create!(name: @register_name, udid: @udid)
|
31
31
|
end
|
32
32
|
|
33
33
|
# @return [String]
|
@@ -36,9 +36,9 @@ module DeployGate
|
|
36
36
|
# @return [Array]
|
37
37
|
def all_create
|
38
38
|
if @member_center.adhoc?
|
39
|
-
prod_certs =
|
39
|
+
prod_certs = @member_center.launcher.certificate.production.all
|
40
40
|
else
|
41
|
-
prod_certs =
|
41
|
+
prod_certs = @member_center.launcher.certificate.all.reject{|cert| cert.class != Spaceship::Portal::Certificate::InHouse}
|
42
42
|
end
|
43
43
|
|
44
44
|
# check local install certificate
|
@@ -65,7 +65,7 @@ module DeployGate
|
|
65
65
|
# @param [String] uuid
|
66
66
|
# @return [String]
|
67
67
|
def download(uuid)
|
68
|
-
profiles =
|
68
|
+
profiles = @member_center.launcher.provisioning_profile.all.reject!{|p| p.uuid != uuid}
|
69
69
|
|
70
70
|
raise NotExistUUIDProvisioningProfileError, I18n.t('xcode.member_center.provisioning_profile.not_exist_uuid_provisioning_profile_error', uuid: uuid) if profiles.empty?
|
71
71
|
select_profile = profiles.first
|
@@ -91,7 +91,7 @@ module DeployGate
|
|
91
91
|
app_identifier: @app_identifier,
|
92
92
|
username: @member_center.email,
|
93
93
|
output_path: OUTPUT_PATH,
|
94
|
-
team_id:
|
94
|
+
team_id: @member_center.launcher.client.team_id,
|
95
95
|
force: true
|
96
96
|
}
|
97
97
|
values.merge!({provisioning_name: provisioning_name}) unless provisioning_name.nil?
|
@@ -7,9 +7,9 @@ describe DeployGate::Xcode::MemberCenter do
|
|
7
7
|
let(:email) { 'test@example.com' }
|
8
8
|
let(:center) { DeployGate::Xcode::MemberCenter.instance }
|
9
9
|
before do
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
allow_any_instance_of(Spaceship::PortalClient).to receive(:login) {}
|
11
|
+
allow_any_instance_of(Spaceship::PortalClient).to receive(:teams) {['team_name', 'team_id']}
|
12
|
+
allow_any_instance_of(Spaceship::Launcher).to receive(:select_team) {}
|
13
13
|
allow_any_instance_of(DeployGate::Xcode::MemberCenter).to receive(:input_email).and_return(email)
|
14
14
|
end
|
15
15
|
|
@@ -1,33 +1,21 @@
|
|
1
1
|
describe DeployGate::Xcode::MemberCenters::App do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
class SpaceshipApp
|
8
|
-
attr_reader :bundle_id
|
9
|
-
def initialize(bundle_id)
|
10
|
-
@bundle_id = bundle_id
|
11
|
-
end
|
12
|
-
def create!(options)
|
13
|
-
end
|
2
|
+
let(:email) { 'test@example.com' }
|
3
|
+
let(:registered_uuid) { 'com.example.test.registered' }
|
4
|
+
let(:non_registered_uuid) { 'com.example.test.non.registered' }
|
5
|
+
let(:app) { DeployGate::Xcode::MemberCenters::App.new('com.example.test.new.app') }
|
14
6
|
|
15
|
-
|
16
|
-
|
7
|
+
before do
|
8
|
+
allow_any_instance_of(Spaceship::PortalClient).to receive(:login) {}
|
9
|
+
allow_any_instance_of(Spaceship::PortalClient).to receive(:teams) {['team_name', 'team_id']}
|
10
|
+
allow_any_instance_of(Spaceship::Launcher).to receive(:select_team) {}
|
11
|
+
allow_any_instance_of(Spaceship::PortalClient).to receive(:apps) {[
|
12
|
+
{"identifier" => registered_uuid}
|
13
|
+
]}
|
14
|
+
allow_any_instance_of(DeployGate::Xcode::MemberCenter).to receive(:input_email).and_return(email)
|
17
15
|
end
|
18
16
|
|
19
|
-
let(:uuid) { 'com.example.test' }
|
20
|
-
let(:app) { DeployGate::Xcode::MemberCenters::App.new(uuid) }
|
21
17
|
|
22
18
|
context "#created?" do
|
23
|
-
let(:registered_uuid) { 'com.example.test.registered' }
|
24
|
-
let(:non_registered_uuid) { 'com.example.test.non.registered' }
|
25
|
-
|
26
|
-
before do
|
27
|
-
allow_any_instance_of(SpaceshipApp).to receive(:all) do
|
28
|
-
[SpaceshipApp.new(registered_uuid)]
|
29
|
-
end
|
30
|
-
end
|
31
19
|
|
32
20
|
it "app created" do
|
33
21
|
app = DeployGate::Xcode::MemberCenters::App.new(registered_uuid)
|
@@ -45,7 +33,7 @@ describe DeployGate::Xcode::MemberCenters::App do
|
|
45
33
|
context "#create!" do
|
46
34
|
it "must call Spaceshio.app.create!" do
|
47
35
|
call_create = false
|
48
|
-
|
36
|
+
allow(Spaceship::Portal::App).to receive(:create!) { call_create = true }
|
49
37
|
|
50
38
|
app.create!
|
51
39
|
expect(call_create).to be_truthy
|
@@ -54,7 +42,7 @@ describe DeployGate::Xcode::MemberCenters::App do
|
|
54
42
|
|
55
43
|
context "#name" do
|
56
44
|
it "get name" do
|
57
|
-
expect(app.name).to eq 'com example test'
|
45
|
+
expect(app.name).to eq 'com example test new app'
|
58
46
|
end
|
59
47
|
end
|
60
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deploygate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deploygate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -240,42 +240,42 @@ dependencies:
|
|
240
240
|
requirements:
|
241
241
|
- - ~>
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: 1.
|
243
|
+
version: 1.9.0
|
244
244
|
type: :runtime
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
248
|
- - ~>
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version: 1.
|
250
|
+
version: 1.9.0
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
252
|
name: spaceship
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
255
|
- - ~>
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version: 0.32.
|
257
|
+
version: 0.32.4
|
258
258
|
type: :runtime
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
262
|
- - ~>
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version: 0.32.
|
264
|
+
version: 0.32.4
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
266
|
name: sigh
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
268
268
|
requirements:
|
269
269
|
- - ~>
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version: 1.10.
|
271
|
+
version: 1.10.4
|
272
272
|
type: :runtime
|
273
273
|
prerelease: false
|
274
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
276
|
- - ~>
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version: 1.10.
|
278
|
+
version: 1.10.4
|
279
279
|
- !ruby/object:Gem::Dependency
|
280
280
|
name: bundler
|
281
281
|
requirement: !ruby/object:Gem::Requirement
|