deploygate 0.1.0 → 0.1.1
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 +8 -8
- data/config/i18n-tasks.yml +41 -0
- data/config/locales/en.yml +162 -0
- data/deploygate.gemspec +2 -1
- data/lib/deploygate.rb +6 -4
- data/lib/deploygate/api/v1/users/app.rb +39 -0
- data/lib/deploygate/command_builder.rb +45 -30
- data/lib/deploygate/commands/add_devices.rb +133 -0
- data/lib/deploygate/commands/config.rb +10 -17
- data/lib/deploygate/commands/deploy/build.rb +4 -8
- data/lib/deploygate/commands/deploy/push.rb +9 -11
- data/lib/deploygate/commands/login.rb +17 -19
- data/lib/deploygate/commands/logout.rb +1 -2
- data/lib/deploygate/version.rb +1 -1
- data/lib/deploygate/xcode/analyze.rb +2 -3
- data/lib/deploygate/xcode/export.rb +52 -20
- data/lib/deploygate/xcode/ios.rb +1 -1
- data/lib/deploygate/xcode/member_center.rb +6 -14
- data/lib/deploygate/xcode/member_centers/device.rb +50 -0
- data/lib/deploygate/xcode/member_centers/provisioning_profile.rb +2 -1
- data/spec/deploygate/api/v1/users/app_spec.rb +26 -0
- data/spec/deploygate/i18n_spec.rb +16 -0
- metadata +39 -19
- data/lib/deploygate/message/error.rb +0 -12
- data/lib/deploygate/message/success.rb +0 -12
- data/lib/deploygate/message/warning.rb +0 -12
data/lib/deploygate/xcode/ios.rb
CHANGED
@@ -30,7 +30,7 @@ module DeployGate
|
|
30
30
|
rescue => e
|
31
31
|
# TODO: build error handling
|
32
32
|
use_xcode_path = `xcode-select -p`
|
33
|
-
|
33
|
+
puts HighLine.color(I18n.t('xcode.ios.build.error.use_xcode', use_xcode_path: use_xcode_path), HighLine::RED)
|
34
34
|
raise e
|
35
35
|
end
|
36
36
|
absolute_dsym_path = absolute_ipa_path.gsub(".ipa", ".app.dSYM.zip") # TODO: upload to deploygate
|
@@ -4,12 +4,12 @@ module DeployGate
|
|
4
4
|
module Xcode
|
5
5
|
class MemberCenter
|
6
6
|
include Singleton
|
7
|
-
attr_reader :email, :method
|
7
|
+
attr_reader :email, :method, :team
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
@email = input_email
|
11
11
|
Spaceship.login @email
|
12
|
-
Spaceship.select_team
|
12
|
+
@team = Spaceship.select_team
|
13
13
|
|
14
14
|
if Spaceship.client.in_house?
|
15
15
|
@method = Export::ENTERPRISE
|
@@ -32,18 +32,10 @@ module DeployGate
|
|
32
32
|
|
33
33
|
# @return [String]
|
34
34
|
def input_email
|
35
|
-
puts
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
Please enter your email and password for Apple Developer Center
|
40
|
-
to set up/download provisioning profile automatically so you can
|
41
|
-
export the app without any extra steps.
|
42
|
-
|
43
|
-
Note: Your password will be stored to Keychain and never be sent to DeployGate.
|
44
|
-
|
45
|
-
EOF
|
46
|
-
print 'Email: '
|
35
|
+
puts ''
|
36
|
+
puts I18n.t('xcode.member_center.input_email.prompt')
|
37
|
+
puts ''
|
38
|
+
print I18n.t('xcode.member_center.input_email.email')
|
47
39
|
STDIN.gets.chop
|
48
40
|
end
|
49
41
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module DeployGate
|
2
|
+
module Xcode
|
3
|
+
module MemberCenters
|
4
|
+
class Device
|
5
|
+
attr_reader :udid, :user_name ,:device_name, :member_center
|
6
|
+
attr_accessor :register_name
|
7
|
+
|
8
|
+
# @param [String] udid
|
9
|
+
# @param [String] user_name
|
10
|
+
# @param [String] device_name
|
11
|
+
# @return [DeployGate::Devices::Ios]
|
12
|
+
def initialize(udid, user_name, device_name)
|
13
|
+
@udid = udid
|
14
|
+
@user_name = user_name
|
15
|
+
@device_name = device_name
|
16
|
+
|
17
|
+
@register_name = generate_register_name(@user_name, @device_name)
|
18
|
+
end
|
19
|
+
|
20
|
+
def registered?
|
21
|
+
DeployGate::Xcode::MemberCenter.instance
|
22
|
+
!Spaceship::Device.find_by_udid(@udid).nil?
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [void]
|
26
|
+
def register!
|
27
|
+
DeployGate::Xcode::MemberCenter.instance
|
28
|
+
return if registered?
|
29
|
+
|
30
|
+
Spaceship::Device.create!(name: @register_name, udid: @udid)
|
31
|
+
end
|
32
|
+
|
33
|
+
# @return [String]
|
34
|
+
def to_s
|
35
|
+
"Name: #{self.register_name}, UDID: #{self.udid}"
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def generate_register_name(user_name, device_name)
|
41
|
+
name = ''
|
42
|
+
name += "#{user_name} - " if !user_name.nil? && user_name != ''
|
43
|
+
name += device_name
|
44
|
+
|
45
|
+
name
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -86,7 +86,8 @@ module DeployGate
|
|
86
86
|
app_identifier: @app_identifier,
|
87
87
|
username: @member_center.email,
|
88
88
|
output_path: OUTPUT_PATH,
|
89
|
-
team_id: Spaceship.client.team_id
|
89
|
+
team_id: Spaceship.client.team_id,
|
90
|
+
force: true
|
90
91
|
}
|
91
92
|
values.merge!({provisioning_name: provisioning_name}) unless provisioning_name.nil?
|
92
93
|
values.merge!({cert_id: cert_id}) unless cert_id.nil?
|
@@ -0,0 +1,26 @@
|
|
1
|
+
describe DeployGate::API::V1::Users::App do
|
2
|
+
describe "#not_provisoned_udids" do
|
3
|
+
it "success" do
|
4
|
+
name = 'test'
|
5
|
+
package_name = 'package_name'
|
6
|
+
platform = 'ios'
|
7
|
+
token = 'token'
|
8
|
+
provisioned_iphone = {:udid => 'udid', :user_name => 'user_name', :device_name => 'name', :is_provisioned => true}
|
9
|
+
not_provisioned_iphone = {:udid => 'udid2', :user_name => 'user_name2', :device_name => 'name2', :is_provisioned => false}
|
10
|
+
response = {
|
11
|
+
:error => false,
|
12
|
+
:because => '',
|
13
|
+
:results => [provisioned_iphone, not_provisioned_iphone]
|
14
|
+
}
|
15
|
+
stub_request(:get, "#{API_ENDPOINT}/users/#{name}/platforms/#{platform}/apps/#{package_name}/udids").
|
16
|
+
to_return(:body => response.to_json)
|
17
|
+
|
18
|
+
results = DeployGate::API::V1::Users::App.not_provisioned_udids(token, name, package_name, platform)
|
19
|
+
expect(results).to eq({
|
20
|
+
:error => response[:error],
|
21
|
+
:message => response[:because],
|
22
|
+
:results => [not_provisioned_iphone]
|
23
|
+
})
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'i18n/tasks'
|
3
|
+
|
4
|
+
describe 'I18n' do
|
5
|
+
let(:i18n) { I18n::Tasks::BaseTask.new }
|
6
|
+
|
7
|
+
it 'does not have missing keys' do
|
8
|
+
count = i18n.missing_keys.count
|
9
|
+
fail "There are #{count} missing i18n keys! Run 'i18n-tasks missing' for more details." unless count.zero?
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'does not have unused keys' do
|
13
|
+
count = i18n.unused_keys.count
|
14
|
+
fail "There are #{count} unused i18n keys! Run 'i18n-tasks unused' for more details." unless count.zero?
|
15
|
+
end
|
16
|
+
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.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deploygate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 4.3.5
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: color_echo
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0.1
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ~>
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 2.0.1
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: plist
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +150,20 @@ dependencies:
|
|
164
150
|
- - ~>
|
165
151
|
- !ruby/object:Gem::Version
|
166
152
|
version: 4.2.4
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: i18n
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: gym
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,6 +276,20 @@ dependencies:
|
|
276
276
|
- - ~>
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: 1.21.0
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: i18n-tasks
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ! '>='
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
type: :development
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ! '>='
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
279
293
|
description: You can control to DeployGate in your terminal
|
280
294
|
email:
|
281
295
|
- contact@deploygate.com
|
@@ -292,6 +306,8 @@ files:
|
|
292
306
|
- README.md
|
293
307
|
- Rakefile
|
294
308
|
- bin/dg
|
309
|
+
- config/i18n-tasks.yml
|
310
|
+
- config/locales/en.yml
|
295
311
|
- deploygate.gemspec
|
296
312
|
- lib/deploygate.rb
|
297
313
|
- lib/deploygate/android/gradle_deploy.rb
|
@@ -301,7 +317,9 @@ files:
|
|
301
317
|
- lib/deploygate/api/v1/push.rb
|
302
318
|
- lib/deploygate/api/v1/session.rb
|
303
319
|
- lib/deploygate/api/v1/user.rb
|
320
|
+
- lib/deploygate/api/v1/users/app.rb
|
304
321
|
- lib/deploygate/command_builder.rb
|
322
|
+
- lib/deploygate/commands/add_devices.rb
|
305
323
|
- lib/deploygate/commands/config.rb
|
306
324
|
- lib/deploygate/commands/deploy.rb
|
307
325
|
- lib/deploygate/commands/deploy/build.rb
|
@@ -312,9 +330,6 @@ files:
|
|
312
330
|
- lib/deploygate/config/cache_version.rb
|
313
331
|
- lib/deploygate/config/credential.rb
|
314
332
|
- lib/deploygate/deploy.rb
|
315
|
-
- lib/deploygate/message/error.rb
|
316
|
-
- lib/deploygate/message/success.rb
|
317
|
-
- lib/deploygate/message/warning.rb
|
318
333
|
- lib/deploygate/project.rb
|
319
334
|
- lib/deploygate/session.rb
|
320
335
|
- lib/deploygate/user.rb
|
@@ -324,12 +339,15 @@ files:
|
|
324
339
|
- lib/deploygate/xcode/ios.rb
|
325
340
|
- lib/deploygate/xcode/member_center.rb
|
326
341
|
- lib/deploygate/xcode/member_centers/app.rb
|
342
|
+
- lib/deploygate/xcode/member_centers/device.rb
|
327
343
|
- lib/deploygate/xcode/member_centers/provisioning_profile.rb
|
328
344
|
- spec/deploygate/api/v1/push_spec.rb
|
329
345
|
- spec/deploygate/api/v1/session_spec.rb
|
330
346
|
- spec/deploygate/api/v1/user_spec.rb
|
347
|
+
- spec/deploygate/api/v1/users/app_spec.rb
|
331
348
|
- spec/deploygate/config/base_spec.rb
|
332
349
|
- spec/deploygate/deploy_spec.rb
|
350
|
+
- spec/deploygate/i18n_spec.rb
|
333
351
|
- spec/deploygate/project_spec.rb
|
334
352
|
- spec/deploygate/session_spec.rb
|
335
353
|
- spec/deploygate/user_spec.rb
|
@@ -369,8 +387,10 @@ test_files:
|
|
369
387
|
- spec/deploygate/api/v1/push_spec.rb
|
370
388
|
- spec/deploygate/api/v1/session_spec.rb
|
371
389
|
- spec/deploygate/api/v1/user_spec.rb
|
390
|
+
- spec/deploygate/api/v1/users/app_spec.rb
|
372
391
|
- spec/deploygate/config/base_spec.rb
|
373
392
|
- spec/deploygate/deploy_spec.rb
|
393
|
+
- spec/deploygate/i18n_spec.rb
|
374
394
|
- spec/deploygate/project_spec.rb
|
375
395
|
- spec/deploygate/session_spec.rb
|
376
396
|
- spec/deploygate/user_spec.rb
|