deploygate 0.0.6 → 0.1.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.
- checksums.yaml +13 -5
- data/.gitignore +4 -0
- data/.travis.yml +4 -4
- data/README.md +3 -3
- data/lib/deploygate/android/gradle_deploy.rb +95 -0
- data/lib/deploygate/android/gradle_plugin_installer.rb +101 -0
- data/lib/deploygate/android/gradle_project.rb +14 -0
- data/lib/deploygate/commands/deploy/build.rb +15 -154
- data/lib/deploygate/{build.rb → project.rb} +3 -3
- data/lib/deploygate/version.rb +1 -1
- data/lib/deploygate/xcode/analyze.rb +116 -0
- data/lib/deploygate/xcode/export.rb +281 -0
- data/lib/deploygate/{builds → xcode}/ios.rb +13 -5
- data/lib/deploygate/xcode/member_center.rb +52 -0
- data/lib/deploygate/xcode/member_centers/app.rb +35 -0
- data/lib/deploygate/xcode/member_centers/provisioning_profile.rb +99 -0
- data/lib/deploygate.rb +14 -5
- data/spec/deploygate/project_spec.rb +39 -0
- data/spec/deploygate/xcode/analyze_spec.rb +3 -0
- data/spec/deploygate/{builds/ios → xcode}/export_spec.rb +21 -21
- data/spec/deploygate/{builds → xcode}/ios_spec.rb +12 -12
- data/spec/deploygate/xcode/member_center_spec.rb +21 -0
- data/spec/deploygate/xcode/member_centers/app_spec.rb +60 -0
- data/spec/deploygate/xcode/member_centers/provisioning_profile_spec.rb +3 -0
- metadata +70 -66
- data/lib/deploygate/builds/ios/analyze.rb +0 -111
- data/lib/deploygate/builds/ios/export.rb +0 -188
- data/lib/deploygate/builds/ios/set_profile.rb +0 -128
- data/spec/deploygate/build_spec.rb +0 -37
- data/spec/deploygate/builds/ios/analyze_spec.rb +0 -3
- data/spec/deploygate/builds/ios/set_profile_spec.rb +0 -3
@@ -1,12 +1,12 @@
|
|
1
|
-
describe DeployGate::
|
1
|
+
describe DeployGate::Xcode::Export do
|
2
2
|
describe "#adhoc?" do
|
3
3
|
it "when adhoc plist" do
|
4
4
|
profile = {
|
5
5
|
'ProvisionsAllDevices' => nil,
|
6
6
|
'Entitlements' => {'get-task-allow' => false}
|
7
7
|
}
|
8
|
-
allow(DeployGate::
|
9
|
-
expect(DeployGate::
|
8
|
+
allow(DeployGate::Xcode::Export).to receive(:profile_to_plist).and_return(profile)
|
9
|
+
expect(DeployGate::Xcode::Export.adhoc?('path')).to be_truthy
|
10
10
|
end
|
11
11
|
|
12
12
|
it "when inhouse plist" do
|
@@ -14,8 +14,8 @@ describe DeployGate::Builds::Ios::Export do
|
|
14
14
|
'ProvisionsAllDevices' => true,
|
15
15
|
'Entitlements' => {'get-task-allow' => false}
|
16
16
|
}
|
17
|
-
allow(DeployGate::
|
18
|
-
expect(DeployGate::
|
17
|
+
allow(DeployGate::Xcode::Export).to receive(:profile_to_plist).and_return(profile)
|
18
|
+
expect(DeployGate::Xcode::Export.adhoc?('path')).to be_falsey
|
19
19
|
end
|
20
20
|
|
21
21
|
it "when not distribution plist" do
|
@@ -23,8 +23,8 @@ describe DeployGate::Builds::Ios::Export do
|
|
23
23
|
'ProvisionsAllDevices' => nil,
|
24
24
|
'Entitlements' => {'get-task-allow' => true}
|
25
25
|
}
|
26
|
-
allow(DeployGate::
|
27
|
-
expect(DeployGate::
|
26
|
+
allow(DeployGate::Xcode::Export).to receive(:profile_to_plist).and_return(profile)
|
27
|
+
expect(DeployGate::Xcode::Export.adhoc?('path')).to be_falsey
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -34,8 +34,8 @@ describe DeployGate::Builds::Ios::Export do
|
|
34
34
|
'ProvisionsAllDevices' => nil,
|
35
35
|
'Entitlements' => {'get-task-allow' => false}
|
36
36
|
}
|
37
|
-
allow(DeployGate::
|
38
|
-
expect(DeployGate::
|
37
|
+
allow(DeployGate::Xcode::Export).to receive(:profile_to_plist).and_return(profile)
|
38
|
+
expect(DeployGate::Xcode::Export.inhouse?('path')).to be_falsey
|
39
39
|
end
|
40
40
|
|
41
41
|
it "when inhouse plist" do
|
@@ -43,8 +43,8 @@ describe DeployGate::Builds::Ios::Export do
|
|
43
43
|
'ProvisionsAllDevices' => true,
|
44
44
|
'Entitlements' => {'get-task-allow' => false}
|
45
45
|
}
|
46
|
-
allow(DeployGate::
|
47
|
-
expect(DeployGate::
|
46
|
+
allow(DeployGate::Xcode::Export).to receive(:profile_to_plist).and_return(profile)
|
47
|
+
expect(DeployGate::Xcode::Export.inhouse?('path')).to be_truthy
|
48
48
|
end
|
49
49
|
|
50
50
|
it "when not distribution plist" do
|
@@ -52,8 +52,8 @@ describe DeployGate::Builds::Ios::Export do
|
|
52
52
|
'ProvisionsAllDevices' => nil,
|
53
53
|
'Entitlements' => {'get-task-allow' => true}
|
54
54
|
}
|
55
|
-
allow(DeployGate::
|
56
|
-
expect(DeployGate::
|
55
|
+
allow(DeployGate::Xcode::Export).to receive(:profile_to_plist).and_return(profile)
|
56
|
+
expect(DeployGate::Xcode::Export.inhouse?('path')).to be_falsey
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -64,14 +64,14 @@ describe DeployGate::Builds::Ios::Export do
|
|
64
64
|
@not_distribution_certificate = " 1) xxxxxxxxxxxxxx \"iPhone Developer: DeployGate Inc.\""
|
65
65
|
end
|
66
66
|
it "not installed distribution certificate" do
|
67
|
-
allow(DeployGate::
|
68
|
-
expect(DeployGate::
|
67
|
+
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@not_distribution_certificate])
|
68
|
+
expect(DeployGate::Xcode::Export.installed_distribution_certificate_ids.count).to eql 0
|
69
69
|
end
|
70
70
|
|
71
71
|
it "installed distribution certificate" do
|
72
|
-
allow(DeployGate::
|
72
|
+
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @not_distribution_certificate])
|
73
73
|
|
74
|
-
ids = DeployGate::
|
74
|
+
ids = DeployGate::Xcode::Export.installed_distribution_certificate_ids
|
75
75
|
expect(ids).to eql([@distribution_certificate_id])
|
76
76
|
end
|
77
77
|
end
|
@@ -84,13 +84,13 @@ describe DeployGate::Builds::Ios::Export do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it "conflicting" do
|
87
|
-
allow(DeployGate::
|
88
|
-
expect(DeployGate::
|
87
|
+
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @distribution_certificate2])
|
88
|
+
expect(DeployGate::Xcode::Export.installed_distribution_conflicting_certificates.count).to eql 2
|
89
89
|
end
|
90
90
|
|
91
91
|
it "not conflicting" do
|
92
|
-
allow(DeployGate::
|
93
|
-
expect(DeployGate::
|
92
|
+
allow(DeployGate::Xcode::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @distribution_certificate3])
|
93
|
+
expect(DeployGate::Xcode::Export.installed_distribution_conflicting_certificates.count).to eql 0
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
describe DeployGate::
|
1
|
+
describe DeployGate::Xcode::Ios do
|
2
2
|
before do
|
3
3
|
class ProjectMock
|
4
4
|
def schemes
|
@@ -21,7 +21,7 @@ describe DeployGate::Builds::Ios do
|
|
21
21
|
allow(File).to receive(:expand_path).and_return('path')
|
22
22
|
allow(FastlaneCore::Project).to receive(:new).and_return(ProjectMock.new)
|
23
23
|
|
24
|
-
DeployGate::
|
24
|
+
DeployGate::Xcode::Ios.build(AnalyzeMock.new, '', '')
|
25
25
|
expect(call_gym_manager).to be_truthy
|
26
26
|
end
|
27
27
|
|
@@ -33,8 +33,8 @@ describe DeployGate::Builds::Ios do
|
|
33
33
|
allow(FastlaneCore::Project).to receive(:new).and_return(ProjectMock.new)
|
34
34
|
|
35
35
|
expect {
|
36
|
-
DeployGate::
|
37
|
-
}.to raise_error DeployGate::
|
36
|
+
DeployGate::Xcode::Ios.build(AnalyzeMock.new, '', '', 'not support export method')
|
37
|
+
}.to raise_error DeployGate::Xcode::Ios::NotSupportExportMethodError
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -42,14 +42,14 @@ describe DeployGate::Builds::Ios do
|
|
42
42
|
it "pod workspace" do
|
43
43
|
allow(File).to receive(:extname).and_return('.xcworkspace')
|
44
44
|
|
45
|
-
result = DeployGate::
|
45
|
+
result = DeployGate::Xcode::Ios.workspace?('path')
|
46
46
|
expect(result).to be_truthy
|
47
47
|
end
|
48
48
|
|
49
49
|
it "xcode project" do
|
50
50
|
allow(File).to receive(:extname).and_return('.xcodeproj')
|
51
51
|
|
52
|
-
result = DeployGate::
|
52
|
+
result = DeployGate::Xcode::Ios.workspace?('path')
|
53
53
|
expect(result).to be_falsey
|
54
54
|
end
|
55
55
|
end
|
@@ -58,14 +58,14 @@ describe DeployGate::Builds::Ios do
|
|
58
58
|
it "pod workspace" do
|
59
59
|
allow(File).to receive(:extname).and_return('.xcworkspace')
|
60
60
|
|
61
|
-
result = DeployGate::
|
61
|
+
result = DeployGate::Xcode::Ios.project?('path')
|
62
62
|
expect(result).to be_falsey
|
63
63
|
end
|
64
64
|
|
65
65
|
it "xcode project" do
|
66
66
|
allow(File).to receive(:extname).and_return('.xcodeproj')
|
67
67
|
|
68
|
-
result = DeployGate::
|
68
|
+
result = DeployGate::Xcode::Ios.project?('path')
|
69
69
|
expect(result).to be_truthy
|
70
70
|
end
|
71
71
|
end
|
@@ -77,19 +77,19 @@ describe DeployGate::Builds::Ios do
|
|
77
77
|
describe "#project_root_path" do
|
78
78
|
let(:root_path) {'test'}
|
79
79
|
it "when test/test.xcodeproj/project.xcworkspace" do
|
80
|
-
expect(DeployGate::
|
80
|
+
expect(DeployGate::Xcode::Ios.project_root_path('test/test.xcodeproj/project.xcworkspace')).to eq root_path
|
81
81
|
end
|
82
82
|
|
83
83
|
it "when test/test.xcodeproj" do
|
84
|
-
expect(DeployGate::
|
84
|
+
expect(DeployGate::Xcode::Ios.project_root_path('test/test.xcodeproj')).to eq root_path
|
85
85
|
end
|
86
86
|
|
87
87
|
it "when test/test.xcworkspace" do
|
88
|
-
expect(DeployGate::
|
88
|
+
expect(DeployGate::Xcode::Ios.project_root_path('test/test.xcworkspace')).to eq root_path
|
89
89
|
end
|
90
90
|
|
91
91
|
it "when test/" do
|
92
|
-
expect(DeployGate::
|
92
|
+
expect(DeployGate::Xcode::Ios.project_root_path('test/')).to eq root_path + '/'
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
describe DeployGate::Xcode::MemberCenter do
|
2
|
+
class SpaceshipClient
|
3
|
+
def in_house?
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
let(:email) { 'test@example.com' }
|
8
|
+
let(:center) { DeployGate::Xcode::MemberCenter.instance }
|
9
|
+
before do
|
10
|
+
allow(Spaceship).to receive(:login) {}
|
11
|
+
allow(Spaceship).to receive(:select_team) {}
|
12
|
+
allow(Spaceship).to receive(:client).and_return(SpaceshipClient.new)
|
13
|
+
allow_any_instance_of(DeployGate::Xcode::MemberCenter).to receive(:input_email).and_return(email)
|
14
|
+
end
|
15
|
+
|
16
|
+
context '#initialize' do
|
17
|
+
it "input email" do
|
18
|
+
expect(center.email).to eq email
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
describe DeployGate::Xcode::MemberCenters::App do
|
2
|
+
before do
|
3
|
+
allow_any_instance_of(DeployGate::Xcode::MemberCenter).to receive(:instance) {}
|
4
|
+
allow(Spaceship).to receive(:app).and_return(SpaceshipApp.new(uuid))
|
5
|
+
end
|
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
|
14
|
+
|
15
|
+
def all
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
let(:uuid) { 'com.example.test' }
|
20
|
+
let(:app) { DeployGate::Xcode::MemberCenters::App.new(uuid) }
|
21
|
+
|
22
|
+
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
|
+
|
32
|
+
it "app created" do
|
33
|
+
app = DeployGate::Xcode::MemberCenters::App.new(registered_uuid)
|
34
|
+
|
35
|
+
expect(app.created?).to be_truthy
|
36
|
+
end
|
37
|
+
|
38
|
+
it "no app created" do
|
39
|
+
app = DeployGate::Xcode::MemberCenters::App.new(non_registered_uuid)
|
40
|
+
|
41
|
+
expect(app.created?).to be_falsey
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context "#create!" do
|
46
|
+
it "must call Spaceshio.app.create!" do
|
47
|
+
call_create = false
|
48
|
+
allow_any_instance_of(SpaceshipApp).to receive(:create!) { call_create = true }
|
49
|
+
|
50
|
+
app.create!
|
51
|
+
expect(call_create).to be_truthy
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context "#name" do
|
56
|
+
it "get name" do
|
57
|
+
expect(app.name).to eq 'com example test'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|