deploygate 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deploygate.gemspec +1 -4
- data/lib/deploygate/api/v1/session.rb +12 -3
- data/lib/deploygate/api/v1/user.rb +3 -2
- data/lib/deploygate/builds/ios/analyze.rb +1 -0
- data/lib/deploygate/builds/ios/export.rb +42 -5
- data/lib/deploygate/command_builder.rb +21 -5
- data/lib/deploygate/commands/config.rb +118 -0
- data/lib/deploygate/commands/deploy/build.rb +33 -0
- data/lib/deploygate/commands/deploy/push.rb +1 -1
- data/lib/deploygate/commands/deploy.rb +1 -1
- data/lib/deploygate/commands/{init.rb → login.rb} +16 -10
- data/lib/deploygate/session.rb +4 -0
- data/lib/deploygate/user.rb +2 -1
- data/lib/deploygate/version.rb +1 -1
- data/lib/deploygate.rb +3 -1
- data/spec/deploygate/api/v1/session_spec.rb +24 -5
- data/spec/deploygate/builds/ios/export_spec.rb +37 -0
- data/spec/deploygate/user_spec.rb +3 -0
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcbc0cf5a40dedda39f5a8133e251de4c6c8d955
|
4
|
+
data.tar.gz: 17e3f2da919f53adf2d2506d89a0e9c9c3b6f180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f9aac5b243a50fb6978e2fbd4d949dcb8cf89e668072d8d677344e1d052c8d60bcf970f7191ae2ace4d37cb4e63019b456912e8bac2cb3d846db00cb1c850cf
|
7
|
+
data.tar.gz: 0ac60a3e559e6330e0f5e7114e1eda5cbf8e133cdc1775f7d4bcabcd5ab76e512351e3c19f09b67d23ff05af6fc98088c19fe050ef647ca6cae340eacc855e68
|
data/deploygate.gemspec
CHANGED
@@ -18,10 +18,6 @@ dg installed! To get started fast:
|
|
18
18
|
|
19
19
|
$ dg deploy
|
20
20
|
|
21
|
-
Or see the docs at:
|
22
|
-
|
23
|
-
https://deploygate.com/docs/cli
|
24
|
-
|
25
21
|
POST_INSTALL_MESSAGE
|
26
22
|
|
27
23
|
spec.add_dependency 'json', '~> 1.8.2'
|
@@ -40,6 +36,7 @@ POST_INSTALL_MESSAGE
|
|
40
36
|
spec.add_dependency 'gym', '~> 1.0.0'
|
41
37
|
spec.add_dependency 'spaceship', '~> 0.12.3'
|
42
38
|
spec.add_dependency 'sigh', '~> 1.1.0'
|
39
|
+
spec.add_dependency 'locale'
|
43
40
|
|
44
41
|
spec.add_development_dependency "bundler", "~> 1.3"
|
45
42
|
spec.add_development_dependency "rake"
|
@@ -6,14 +6,23 @@ module DeployGate
|
|
6
6
|
|
7
7
|
class << self
|
8
8
|
|
9
|
+
# @param [String] token
|
10
|
+
# @return [Hash]
|
11
|
+
def show(token)
|
12
|
+
res = Base.new(token).get(ENDPOINT + '/user', {})
|
13
|
+
return nil if res['error']
|
14
|
+
|
15
|
+
res['results']
|
16
|
+
end
|
17
|
+
|
9
18
|
# @param [String] name
|
10
19
|
# @param [String] token
|
11
20
|
# @return [Boolean]
|
12
21
|
def check(name, token)
|
13
|
-
|
14
|
-
return false if
|
22
|
+
results = show(token)
|
23
|
+
return false if results.nil?
|
15
24
|
|
16
|
-
name ==
|
25
|
+
name == results['name']
|
17
26
|
end
|
18
27
|
|
19
28
|
# @param [String] email
|
@@ -9,9 +9,10 @@ module DeployGate
|
|
9
9
|
# @param [String] name
|
10
10
|
# @param [String] email
|
11
11
|
# @param [String] password
|
12
|
+
# @param [String] locale
|
12
13
|
# @return [Hash]
|
13
|
-
def create(name, email, password)
|
14
|
-
res = Base.new().post(ENDPOINT, {:name => name, :email => email, :password => password})
|
14
|
+
def create(name, email, password, locale = 'en')
|
15
|
+
res = Base.new().post(ENDPOINT, {:name => name, :email => email, :password => password, :locale => locale})
|
15
16
|
|
16
17
|
user_create_results = {
|
17
18
|
:error => res['error'],
|
@@ -50,17 +50,17 @@ module DeployGate
|
|
50
50
|
certificate_str = cert.read
|
51
51
|
certificate = OpenSSL::X509::Certificate.new certificate_str
|
52
52
|
id = OpenSSL::Digest::SHA1.new(certificate.to_der).to_s.upcase!
|
53
|
-
|
53
|
+
installed_distribution_certificate_ids.include?(id)
|
54
54
|
end
|
55
55
|
certs.include?(true)
|
56
56
|
end
|
57
57
|
|
58
58
|
# @return [Array]
|
59
|
-
def
|
60
|
-
|
59
|
+
def installed_distribution_certificate_ids
|
60
|
+
certificates = installed_certificates()
|
61
61
|
ids = []
|
62
|
-
|
63
|
-
next
|
62
|
+
certificates.each do |current|
|
63
|
+
next unless current.match(/iPhone Distribution:/)
|
64
64
|
begin
|
65
65
|
(ids << current.match(/.*\) (.*) \".*/)[1])
|
66
66
|
rescue
|
@@ -71,6 +71,43 @@ module DeployGate
|
|
71
71
|
ids
|
72
72
|
end
|
73
73
|
|
74
|
+
# @return [Array]
|
75
|
+
def installed_distribution_conflicting_certificates
|
76
|
+
certificates = installed_certificates()
|
77
|
+
names = []
|
78
|
+
certificates.each do |current|
|
79
|
+
begin
|
80
|
+
names << current.match(/(iPhone Distribution:.*)/)[1]
|
81
|
+
rescue
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
conflicting_names = names.select{|e| names.index(e) != names.rindex(e)}.uniq
|
86
|
+
conflicting_certificates = []
|
87
|
+
certificates.each do |current|
|
88
|
+
begin
|
89
|
+
name = current.match(/(iPhone Distribution:.*)/)[1]
|
90
|
+
next unless conflicting_names.include?(name)
|
91
|
+
conflicting_certificates << current
|
92
|
+
rescue
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
conflicting_certificates
|
97
|
+
end
|
98
|
+
|
99
|
+
# @return [Array]
|
100
|
+
def installed_certificates
|
101
|
+
available = `security find-identity -v -p codesigning`
|
102
|
+
certificates = []
|
103
|
+
available.split("\n").each do |current|
|
104
|
+
next if current.include? "REVOKED"
|
105
|
+
certificates << current
|
106
|
+
end
|
107
|
+
|
108
|
+
certificates
|
109
|
+
end
|
110
|
+
|
74
111
|
# @param [Array] profile_paths
|
75
112
|
# @return [String]
|
76
113
|
def select_profile(profile_paths)
|
@@ -11,14 +11,14 @@ module DeployGate
|
|
11
11
|
program :version, VERSION
|
12
12
|
program :description, 'You can control to DeployGate in your terminal.'
|
13
13
|
|
14
|
-
command :
|
15
|
-
c.syntax = 'dg
|
16
|
-
c.description = '
|
14
|
+
command :login do |c|
|
15
|
+
c.syntax = 'dg login'
|
16
|
+
c.description = 'DeployGate login command'
|
17
17
|
c.action do |args, options|
|
18
18
|
begin
|
19
|
-
Commands::
|
19
|
+
Commands::Login.run
|
20
20
|
rescue => e
|
21
|
-
error_handling("Commands::
|
21
|
+
error_handling("Commands::Login Error: #{e.class}", create_error_issue_body(e))
|
22
22
|
raise e
|
23
23
|
end
|
24
24
|
end
|
@@ -56,6 +56,22 @@ module DeployGate
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
+
command :config do |c|
|
60
|
+
c.syntax = 'dg config'
|
61
|
+
c.description = 'dg user login config'
|
62
|
+
c.option '--json', 'output json format'
|
63
|
+
c.option '--name STRING', String, 'your DeployGate user name'
|
64
|
+
c.option '--token STRING', String, 'your DeployGate api token'
|
65
|
+
c.action do |args, options|
|
66
|
+
begin
|
67
|
+
Commands::Config.run(args, options)
|
68
|
+
rescue => e
|
69
|
+
error_handling("Commands::Config Error: #{e.class}", create_error_issue_body(e))
|
70
|
+
raise e
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
59
75
|
run!
|
60
76
|
end
|
61
77
|
|
@@ -0,0 +1,118 @@
|
|
1
|
+
module DeployGate
|
2
|
+
module Commands
|
3
|
+
class Config
|
4
|
+
class << self
|
5
|
+
|
6
|
+
# @param [Array] args
|
7
|
+
# @param [Commander::Command::Options] options
|
8
|
+
def run(args, options)
|
9
|
+
json_format = options.json
|
10
|
+
name = options.name
|
11
|
+
token = options.token
|
12
|
+
|
13
|
+
if name.nil? || token.nil?
|
14
|
+
login_user = DeployGate::Session.new().show_login_user
|
15
|
+
if login_user.nil?
|
16
|
+
print_not_login(json_format)
|
17
|
+
else
|
18
|
+
print_login_user(login_user, json_format)
|
19
|
+
end
|
20
|
+
else
|
21
|
+
login(name, token, json_format)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# @param [String] name
|
26
|
+
# @param [String] token
|
27
|
+
# @param [Boolean] json_format
|
28
|
+
# @return [void]
|
29
|
+
def login(name, token, json_format)
|
30
|
+
if API::V1::Session.check(name, token)
|
31
|
+
DeployGate::Session.save(name, token)
|
32
|
+
login_user = DeployGate::Session.new().show_login_user
|
33
|
+
print_login_success(login_user, json_format)
|
34
|
+
else
|
35
|
+
print_login_failed(json_format)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# @param [Hash] login_user
|
40
|
+
# @param [Boolean] json_format
|
41
|
+
# @return [void]
|
42
|
+
def print_login_success(login_user, json_format)
|
43
|
+
message = 'Login success'
|
44
|
+
data = {:message => message, :error => false}
|
45
|
+
|
46
|
+
unless json_format
|
47
|
+
DeployGate::Message::Success.print(message)
|
48
|
+
puts ''
|
49
|
+
end
|
50
|
+
|
51
|
+
print_login_user(login_user, json_format, data)
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param [Boolean] json_format
|
55
|
+
# @param [Hash] data
|
56
|
+
# @return [void]
|
57
|
+
def print_login_failed(json_format, data = {})
|
58
|
+
message = 'Login failed'
|
59
|
+
data[:error] = true
|
60
|
+
data[:message] = message
|
61
|
+
|
62
|
+
if json_format
|
63
|
+
print_json(data)
|
64
|
+
else
|
65
|
+
DeployGate::Message::Error.print(message)
|
66
|
+
puts <<EOF
|
67
|
+
|
68
|
+
Please check your name and api token.
|
69
|
+
EOF
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# @param [Boolean] json_format
|
74
|
+
# @param [Hash] data
|
75
|
+
# @return [void]
|
76
|
+
def print_not_login(json_format, data = {})
|
77
|
+
message = 'Not user login'
|
78
|
+
data[:error] = true
|
79
|
+
data[:message] = message
|
80
|
+
|
81
|
+
if json_format
|
82
|
+
print_json(data)
|
83
|
+
else
|
84
|
+
DeployGate::Message::Warning.print(message)
|
85
|
+
puts <<EOF
|
86
|
+
|
87
|
+
Please login to dg command.
|
88
|
+
$ dg login
|
89
|
+
EOF
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# @param [Hash] login_user
|
94
|
+
# @param [Boolean] json_format
|
95
|
+
# @param [Hash] data
|
96
|
+
# @return [void]
|
97
|
+
def print_login_user(login_user, json_format, data = {})
|
98
|
+
data[:error] = data[:error].nil? ? false : data[:error]
|
99
|
+
data[:name] = login_user['name']
|
100
|
+
|
101
|
+
if json_format
|
102
|
+
print_json(data)
|
103
|
+
else
|
104
|
+
puts <<EOF
|
105
|
+
User name: #{data[:name]}
|
106
|
+
EOF
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# @param [Hash] data
|
111
|
+
# @return [void]
|
112
|
+
def print_json(data)
|
113
|
+
puts data.to_json
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -12,6 +12,7 @@ module DeployGate
|
|
12
12
|
work_dir = args.first
|
13
13
|
|
14
14
|
if DeployGate::Build.ios?(work_dir)
|
15
|
+
check_local_certificates()
|
15
16
|
root_path = DeployGate::Builds::Ios.project_root_path(work_dir)
|
16
17
|
workspaces = DeployGate::Builds::Ios.find_workspaces(root_path)
|
17
18
|
ios(workspaces, options)
|
@@ -156,6 +157,38 @@ Please run on the root directory of iOS project or specify .apk/.ipa file to dep
|
|
156
157
|
EOF
|
157
158
|
DeployGate::Message::Warning.print(message)
|
158
159
|
end
|
160
|
+
|
161
|
+
def check_local_certificates
|
162
|
+
if DeployGate::Builds::Ios::Export.installed_distribution_certificate_ids.count == 0
|
163
|
+
# not local install certificate
|
164
|
+
DeployGate::Message::Error.print("Error: Not local install distribution certificate")
|
165
|
+
puts <<EOF
|
166
|
+
|
167
|
+
Not local install iPhone Distribution certificates.
|
168
|
+
Please install certificate.
|
169
|
+
|
170
|
+
Docs: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
|
171
|
+
|
172
|
+
EOF
|
173
|
+
exit
|
174
|
+
end
|
175
|
+
|
176
|
+
conflicting_certificates = DeployGate::Builds::Ios::Export.installed_distribution_conflicting_certificates
|
177
|
+
if conflicting_certificates.count > 0
|
178
|
+
DeployGate::Message::Error.print("Error: Conflicting local install certificates")
|
179
|
+
puts <<EOF
|
180
|
+
|
181
|
+
Conflicting local install certificates.
|
182
|
+
Please uninstall certificates.
|
183
|
+
EOF
|
184
|
+
conflicting_certificates.each do |certificate|
|
185
|
+
puts certificate
|
186
|
+
end
|
187
|
+
puts ""
|
188
|
+
|
189
|
+
exit
|
190
|
+
end
|
191
|
+
end
|
159
192
|
end
|
160
193
|
end
|
161
194
|
end
|
@@ -6,7 +6,7 @@ module DeployGate
|
|
6
6
|
# @param [Array] args
|
7
7
|
# @param [Commander::Command::Options] options
|
8
8
|
def run(args, options)
|
9
|
-
|
9
|
+
Login.start_login_or_create_account() unless DeployGate::Session.new.login?
|
10
10
|
|
11
11
|
# push or build(android/ios)
|
12
12
|
args.push(Dir.pwd) if args.empty?
|
@@ -1,18 +1,17 @@
|
|
1
1
|
module DeployGate
|
2
2
|
module Commands
|
3
|
-
class
|
3
|
+
class Login
|
4
4
|
class << self
|
5
5
|
|
6
6
|
# @return [void]
|
7
7
|
def run
|
8
|
-
start_login_or_create_account()
|
9
|
-
|
10
|
-
finish
|
8
|
+
start_login_or_create_account()
|
11
9
|
end
|
12
10
|
|
13
11
|
# @return [void]
|
14
12
|
def start_login_or_create_account
|
15
13
|
puts 'Welcome to DeployGate!'
|
14
|
+
print_deploygate_aa()
|
16
15
|
puts ''
|
17
16
|
email = ask("Email: ")
|
18
17
|
|
@@ -22,7 +21,7 @@ module DeployGate
|
|
22
21
|
puts ''
|
23
22
|
password = input_password('Password: ')
|
24
23
|
puts ''
|
25
|
-
|
24
|
+
start(email, password)
|
26
25
|
else
|
27
26
|
create_account(email)
|
28
27
|
end
|
@@ -31,7 +30,7 @@ module DeployGate
|
|
31
30
|
# @param [String] email
|
32
31
|
# @param [String] password
|
33
32
|
# @return [void]
|
34
|
-
def
|
33
|
+
def start(email, password)
|
35
34
|
begin
|
36
35
|
Session.login(email, password)
|
37
36
|
rescue Session::LoginError => e
|
@@ -65,7 +64,7 @@ module DeployGate
|
|
65
64
|
raise 'User create error'
|
66
65
|
else
|
67
66
|
Message::Success.print('done! Your account has been set up successfully.')
|
68
|
-
|
67
|
+
start(email, password)
|
69
68
|
end
|
70
69
|
end
|
71
70
|
|
@@ -101,9 +100,16 @@ module DeployGate
|
|
101
100
|
ask(message) { |q| q.echo = "*" }
|
102
101
|
end
|
103
102
|
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
def print_deploygate_aa
|
104
|
+
puts <<'EOF'
|
105
|
+
_ _ _
|
106
|
+
| | | | | |
|
107
|
+
__| | ___ ___ | | ___ _ ,____ ___ | |_ ___
|
108
|
+
/ _` |/ _ \' _ \| |/ _ \ \ / / _ \ / _ `| __/ _ \
|
109
|
+
| (_| | __/ |_) | | (_) \ v / (_| | (_| | |_' __/
|
110
|
+
\___, \___| .__/|_|\___/ ` / \__, |\__,_|\__\___`
|
111
|
+
|_| /_/ |___/
|
112
|
+
EOF
|
107
113
|
end
|
108
114
|
end
|
109
115
|
end
|
data/lib/deploygate/session.rb
CHANGED
data/lib/deploygate/user.rb
CHANGED
@@ -13,7 +13,8 @@ module DeployGate
|
|
13
13
|
# @param [String] password
|
14
14
|
# @return [DeployGate::User]
|
15
15
|
def self.create(name, email, password)
|
16
|
-
|
16
|
+
locale = Locale.current.language
|
17
|
+
results = DeployGate::API::V1::User.create(name, email, password, locale)
|
17
18
|
return if results[:error]
|
18
19
|
DeployGate::User.new(results[:name])
|
19
20
|
end
|
data/lib/deploygate/version.rb
CHANGED
data/lib/deploygate.rb
CHANGED
@@ -12,6 +12,7 @@ require "highline"
|
|
12
12
|
require "uuid"
|
13
13
|
require "gem_update_checker"
|
14
14
|
require "active_support/core_ext/time"
|
15
|
+
require "locale"
|
15
16
|
|
16
17
|
# ios build
|
17
18
|
require "gym"
|
@@ -27,8 +28,9 @@ require "deploygate/api/v1/session"
|
|
27
28
|
require "deploygate/api/v1/push"
|
28
29
|
require "deploygate/api/v1/user"
|
29
30
|
require "deploygate/command_builder"
|
30
|
-
require "deploygate/commands/
|
31
|
+
require "deploygate/commands/login"
|
31
32
|
require "deploygate/commands/logout"
|
33
|
+
require "deploygate/commands/config"
|
32
34
|
require "deploygate/commands/deploy"
|
33
35
|
require "deploygate/commands/deploy/push"
|
34
36
|
require "deploygate/commands/deploy/build"
|
@@ -1,25 +1,24 @@
|
|
1
1
|
describe DeployGate::API::V1::Session do
|
2
|
-
describe "#
|
2
|
+
describe "#show" do
|
3
3
|
it "logined" do
|
4
4
|
token = 'token'
|
5
5
|
name = 'test'
|
6
6
|
response = {
|
7
7
|
:error => false,
|
8
8
|
:because => '',
|
9
|
-
:results => {
|
9
|
+
:results => {'name' => name}
|
10
10
|
}
|
11
11
|
stub_request(:get, "#{API_ENDPOINT}/sessions/user").
|
12
12
|
with(:headers => { 'AUTHORIZATION' => token }).
|
13
13
|
to_return(:body => response.to_json)
|
14
14
|
|
15
15
|
|
16
|
-
|
17
|
-
expect(
|
16
|
+
results = DeployGate::API::V1::Session.show(token)
|
17
|
+
expect(results).to eql response[:results]
|
18
18
|
end
|
19
19
|
|
20
20
|
it "not login" do
|
21
21
|
token = 'token'
|
22
|
-
name = 'test'
|
23
22
|
response = {
|
24
23
|
:error => true,
|
25
24
|
:because => 'error message'
|
@@ -28,6 +27,26 @@ describe DeployGate::API::V1::Session do
|
|
28
27
|
with(:headers => { 'AUTHORIZATION' => token }).
|
29
28
|
to_return(:body => response.to_json)
|
30
29
|
|
30
|
+
results = DeployGate::API::V1::Session.show(token)
|
31
|
+
expect(results).to eql response[:results]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
describe "#check" do
|
35
|
+
it "logined" do
|
36
|
+
token = 'token'
|
37
|
+
name = 'test'
|
38
|
+
results = {'name' => name}
|
39
|
+
allow(DeployGate::API::V1::Session).to receive(:show).and_return(results)
|
40
|
+
|
41
|
+
result = DeployGate::API::V1::Session.check(name, token)
|
42
|
+
expect(result).to be_truthy
|
43
|
+
end
|
44
|
+
|
45
|
+
it "not login" do
|
46
|
+
token = 'token'
|
47
|
+
name = 'test'
|
48
|
+
allow(DeployGate::API::V1::Session).to receive(:show).and_return(nil)
|
49
|
+
|
31
50
|
result = DeployGate::API::V1::Session.check(name, token)
|
32
51
|
expect(result).to be_falsey
|
33
52
|
end
|
@@ -56,4 +56,41 @@ describe DeployGate::Builds::Ios::Export do
|
|
56
56
|
expect(DeployGate::Builds::Ios::Export.inhouse?('path')).to be_falsey
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
describe "#installed_distribution_certificate_ids" do
|
61
|
+
before do
|
62
|
+
@distribution_certificate_id = 'distribution_certificate_id'
|
63
|
+
@distribution_certificate = " 1) #{@distribution_certificate_id} \"iPhone Distribution: DeployGate Inc.\""
|
64
|
+
@not_distribution_certificate = " 1) xxxxxxxxxxxxxx \"iPhone Developer: DeployGate Inc.\""
|
65
|
+
end
|
66
|
+
it "not installed distribution certificate" do
|
67
|
+
allow(DeployGate::Builds::Ios::Export).to receive(:installed_certificates).and_return([@not_distribution_certificate])
|
68
|
+
expect(DeployGate::Builds::Ios::Export.installed_distribution_certificate_ids.count).to eql 0
|
69
|
+
end
|
70
|
+
|
71
|
+
it "installed distribution certificate" do
|
72
|
+
allow(DeployGate::Builds::Ios::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @not_distribution_certificate])
|
73
|
+
|
74
|
+
ids = DeployGate::Builds::Ios::Export.installed_distribution_certificate_ids
|
75
|
+
expect(ids).to eql([@distribution_certificate_id])
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe "#installed_distribution_conflicting_certificates" do
|
80
|
+
before do
|
81
|
+
@distribution_certificate = " 1) xxxxxxxxxx \"iPhone Distribution: DeployGate Inc.\""
|
82
|
+
@distribution_certificate2 = " 2) yyyyyyyyyyyy \"iPhone Distribution: DeployGate Inc.\""
|
83
|
+
@distribution_certificate3 = " 2) yyyyyyyyyyyy \"iPhone Distribution: DeployGate Inc2.\""
|
84
|
+
end
|
85
|
+
|
86
|
+
it "conflicting" do
|
87
|
+
allow(DeployGate::Builds::Ios::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @distribution_certificate2])
|
88
|
+
expect(DeployGate::Builds::Ios::Export.installed_distribution_conflicting_certificates.count).to eql 2
|
89
|
+
end
|
90
|
+
|
91
|
+
it "not conflicting" do
|
92
|
+
allow(DeployGate::Builds::Ios::Export).to receive(:installed_certificates).and_return([@distribution_certificate, @distribution_certificate3])
|
93
|
+
expect(DeployGate::Builds::Ios::Export.installed_distribution_conflicting_certificates.count).to eql 0
|
94
|
+
end
|
95
|
+
end
|
59
96
|
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.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deploygate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 1.1.0
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: locale
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
224
|
name: bundler
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -290,10 +304,11 @@ files:
|
|
290
304
|
- lib/deploygate/builds/ios/export.rb
|
291
305
|
- lib/deploygate/builds/ios/set_profile.rb
|
292
306
|
- lib/deploygate/command_builder.rb
|
307
|
+
- lib/deploygate/commands/config.rb
|
293
308
|
- lib/deploygate/commands/deploy.rb
|
294
309
|
- lib/deploygate/commands/deploy/build.rb
|
295
310
|
- lib/deploygate/commands/deploy/push.rb
|
296
|
-
- lib/deploygate/commands/
|
311
|
+
- lib/deploygate/commands/login.rb
|
297
312
|
- lib/deploygate/commands/logout.rb
|
298
313
|
- lib/deploygate/config/base.rb
|
299
314
|
- lib/deploygate/config/cache_version.rb
|
@@ -316,6 +331,7 @@ files:
|
|
316
331
|
- spec/deploygate/config/base_spec.rb
|
317
332
|
- spec/deploygate/deploy_spec.rb
|
318
333
|
- spec/deploygate/session_spec.rb
|
334
|
+
- spec/deploygate/user_spec.rb
|
319
335
|
- spec/spec_helper.rb
|
320
336
|
- spec/test_files/DeployGateSample.apk
|
321
337
|
homepage: https://deploygate.com
|
@@ -328,10 +344,6 @@ post_install_message: |2+
|
|
328
344
|
|
329
345
|
$ dg deploy
|
330
346
|
|
331
|
-
Or see the docs at:
|
332
|
-
|
333
|
-
https://deploygate.com/docs/cli
|
334
|
-
|
335
347
|
rdoc_options: []
|
336
348
|
require_paths:
|
337
349
|
- lib
|
@@ -347,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
347
359
|
version: '0'
|
348
360
|
requirements: []
|
349
361
|
rubyforge_project:
|
350
|
-
rubygems_version: 2.4.5
|
362
|
+
rubygems_version: 2.4.5.1
|
351
363
|
signing_key:
|
352
364
|
specification_version: 4
|
353
365
|
summary: A command-line interface for DeployGate
|
@@ -363,5 +375,6 @@ test_files:
|
|
363
375
|
- spec/deploygate/config/base_spec.rb
|
364
376
|
- spec/deploygate/deploy_spec.rb
|
365
377
|
- spec/deploygate/session_spec.rb
|
378
|
+
- spec/deploygate/user_spec.rb
|
366
379
|
- spec/spec_helper.rb
|
367
380
|
- spec/test_files/DeployGateSample.apk
|