deploygate 0.8.3 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pull_request.yml +21 -0
- data/.github/workflows/release.yml +28 -0
- data/.ruby-version +1 -1
- data/README.md +1 -1
- data/config/locales/en.yml +4 -23
- data/lib/deploygate/api/v1/base.rb +6 -1
- data/lib/deploygate/api/v1/user.rb +0 -24
- data/lib/deploygate/command_builder.rb +2 -0
- data/lib/deploygate/commands/add_devices.rb +5 -2
- data/lib/deploygate/commands/deploy/build.rb +2 -1
- data/lib/deploygate/commands/deploy/push.rb +1 -1
- data/lib/deploygate/commands/deploy.rb +1 -1
- data/lib/deploygate/commands/login.rb +10 -70
- data/lib/deploygate/user.rb +0 -11
- data/lib/deploygate/version.rb +2 -1
- data/lib/deploygate/xcode/analyze.rb +13 -11
- data/lib/deploygate.rb +1 -1
- data/spec/deploygate/api/v1/user_spec.rb +0 -27
- data/spec/deploygate/xcode/analyze_spec.rb +68 -0
- metadata +8 -6
- data/.travis.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 205fe31f4fd075fe324796f70e1bacbd271415654c97813ac7bfd9dabcf72a88
|
4
|
+
data.tar.gz: 1d489557b2810cfdf378d8566cd7ac6723842c7ed2d9c29505f601d810db70b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d09762f900f984318f51724d8f047bb783f25f3082120f7ad16c2b229dbfe17c3933a1d59621a4fafcccf7009124b5c9b7cef8a254b8cd37cad6ff286618327
|
7
|
+
data.tar.gz: 6b9b2c2845aa72e70872df1663f331aa83eca0ec956970ac93e6e4c724d92e7c2168b208d80910c52508bf3875bb9278c9739653aeda1c0a4031a5225e70acc2
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Run jobs on every PR
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby_version:
|
11
|
+
- 2.6
|
12
|
+
- 2.7
|
13
|
+
# - 3.0 # needs to upgrade fastlane and activesupport else
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby_version }}
|
20
|
+
bundler-cache: true
|
21
|
+
- run: bundle exec rake
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Release built gem on tag-push
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
release:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
bundler-cache: true
|
16
|
+
- run: bundle exec rake build
|
17
|
+
- id: gem
|
18
|
+
run: echo "::set-output name=result::$(find pkg -name 'deploygate-*.gem' -type f | head -1)"
|
19
|
+
- run: |
|
20
|
+
curl --data-binary '@${{ steps.gem.outputs.result }}' \
|
21
|
+
-H 'Authorization: ${{ secrets.RUBYGEMS_API_KEY }}' \
|
22
|
+
"https://rubygems.org/api/v1/gems"
|
23
|
+
- uses: slackapi/slack-github-action@v1.16.0
|
24
|
+
with:
|
25
|
+
payload: "{\"text\": \"Released a deploygate gem in <https://rubygems.org/gems/deploygate/|RubyGems>\"}"
|
26
|
+
env:
|
27
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SHARED_FOR_RELEASE_ARTIFACT_SLACK_INCOMING_WEBHOOK_URL }}
|
28
|
+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.9
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ dg: A command-line interface for DeployGate
|
|
9
9
|
|
10
10
|
*dg* runs with a minimal set of requirements.
|
11
11
|
|
12
|
-
- Ruby 2.
|
12
|
+
- Ruby 2.6+ (Depends on [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/))
|
13
13
|
|
14
14
|
## Installation
|
15
15
|
|
data/config/locales/en.yml
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
en:
|
3
3
|
errors:
|
4
4
|
check_update_failure: 'Checking update failed'
|
5
|
+
account_not_found_error: 'Your account was not found. Please create it from https://deploygate.com'
|
5
6
|
command_builder:
|
6
7
|
name: 'dg'
|
7
8
|
description: 'Control DeployGate from your terminal.'
|
@@ -17,12 +18,14 @@ en:
|
|
17
18
|
scheme: 'Set Xcode build scheme (iOS app only)'
|
18
19
|
open: 'Open a browser after the build uploaded (OS X only)'
|
19
20
|
disable_notify: 'Disable email notification (iOS app only)'
|
21
|
+
xcodeproj: 'The path to the target Xcode project file (iOS app only)'
|
20
22
|
add_devices:
|
21
23
|
description: 'Register devices to your Apple Developer account and refresh your provisioning profile. (iOS only) By default, it automatically finds new devices added to your application on DeployGate and ask you which device to register. You can also specify which device to register via command line options.'
|
22
24
|
user: 'Owner user or organization name'
|
23
25
|
udid: 'UDID to be registered'
|
24
26
|
device_name: 'Device name to be registered'
|
25
27
|
distribution_key: 'If you also want to update distribution page, set the last part of the URL of the page'
|
28
|
+
xcodeproj: 'The path to the target Xcode project file (iOS app only)'
|
26
29
|
server:
|
27
30
|
description: 'Start the add-devices server. When added new device automatically run add-devices command.'
|
28
31
|
connecting: 'Connecting...'
|
@@ -95,7 +98,7 @@ en:
|
|
95
98
|
$ dg login
|
96
99
|
print_login_user: 'User name: %{name}'
|
97
100
|
login:
|
98
|
-
|
101
|
+
start_login:
|
99
102
|
welcome: 'Welcome to DeployGate!'
|
100
103
|
email: 'Email: '
|
101
104
|
check_account: 'Checking for your account...'
|
@@ -105,28 +108,6 @@ en:
|
|
105
108
|
Could not log in to DeployGate.
|
106
109
|
Please try again.
|
107
110
|
success: 'Hello %{name}!'
|
108
|
-
create_account:
|
109
|
-
prompt: "Looks new to DeployGate. Let's set up your account, just choose your user name and password."
|
110
|
-
creating: 'Creating your account... '
|
111
|
-
error: |
|
112
|
-
Could not create your account.
|
113
|
-
Please try again.
|
114
|
-
success: 'done! Your account has been set up successfully.'
|
115
|
-
input_new_account_name:
|
116
|
-
input_user_name: 'Username: '
|
117
|
-
checking: 'Checking for availability... '
|
118
|
-
already_used_user_name: 'Sorry, %{user_name} was already taken. Please try again.'
|
119
|
-
success: 'Good, %{user_name} is available.'
|
120
|
-
input_new_account_password:
|
121
|
-
input_password: 'Password: '
|
122
|
-
input_same_password: 'Type the same password: '
|
123
|
-
error: "Passwords didn't match. Please type again."
|
124
|
-
check_terms:
|
125
|
-
terms_url: 'Terms of Service: https://deploygate.com/terms'
|
126
|
-
privacy_url: 'Privacy Policy: https://deploygate.com/terms/privacy'
|
127
|
-
note: "DeployGate properly manages your account information under GDPR, Japan's Personal Information Protection Act and our Privacy Policy."
|
128
|
-
text: 'I agree to the Terms of Service and Privacy Policy (y/n) '
|
129
|
-
error: 'You must agree to the Terms of Service and Privacy Policy.'
|
130
111
|
logout:
|
131
112
|
success: |
|
132
113
|
Logout success!
|
@@ -4,6 +4,10 @@ module DeployGate
|
|
4
4
|
class Base
|
5
5
|
BASE_URL = ENV['DG_DEVELOP_URL'] || 'https://deploygate.com'
|
6
6
|
API_BASE_URL = "#{BASE_URL}/api"
|
7
|
+
BASE_HEADERS = [
|
8
|
+
['X-DEPLOYGATE-CLIENT-ID', "cli/#{::DeployGate::VERSION_CODE}"],
|
9
|
+
['X-DEPLOYGATE-CLIENT-VERSION-NAME', ::DeployGate::VERSION],
|
10
|
+
].freeze
|
7
11
|
|
8
12
|
# @param [String] token
|
9
13
|
# @return [DeployGate::API::V1::Base]
|
@@ -53,7 +57,8 @@ module DeployGate
|
|
53
57
|
end
|
54
58
|
|
55
59
|
def headers
|
56
|
-
extheaders =
|
60
|
+
extheaders = BASE_HEADERS.dup
|
61
|
+
|
57
62
|
unless @token.nil?
|
58
63
|
extheaders.push(['AUTHORIZATION', @token])
|
59
64
|
end
|
@@ -6,30 +6,6 @@ module DeployGate
|
|
6
6
|
ENDPOINT = '/users'
|
7
7
|
|
8
8
|
class << self
|
9
|
-
# @param [String] name
|
10
|
-
# @param [String] email
|
11
|
-
# @param [String] password
|
12
|
-
# @param [String] locale
|
13
|
-
# @return [Hash]
|
14
|
-
def create(name, email, password, locale = 'en')
|
15
|
-
res = Base.new().post(ENDPOINT, {:name => name, :email => email, :password => password, :locale => locale})
|
16
|
-
|
17
|
-
user_create_results = {
|
18
|
-
:error => res['error'],
|
19
|
-
:message => res['because']
|
20
|
-
}
|
21
|
-
|
22
|
-
results = res['results']
|
23
|
-
unless results.nil?
|
24
|
-
user_create_results.merge!({
|
25
|
-
:name => results['user']['name'],
|
26
|
-
:token => results['api_token']
|
27
|
-
})
|
28
|
-
end
|
29
|
-
|
30
|
-
user_create_results
|
31
|
-
end
|
32
|
-
|
33
9
|
# @param [String] name
|
34
10
|
# @param [String] email
|
35
11
|
# @return [Boolean]
|
@@ -70,6 +70,7 @@ module DeployGate
|
|
70
70
|
c.option '--scheme STRING', String, I18n.t('command_builder.deploy.scheme')
|
71
71
|
c.option '--open', I18n.t('command_builder.deploy.open')
|
72
72
|
c.option '--disable_notify', I18n.t('command_builder.deploy.disable_notify')
|
73
|
+
c.option '--xcodeproj STRING', I18n.t('command_builder.deploy.xcodeproj')
|
73
74
|
c.action do |args, options|
|
74
75
|
options.default :message => '', :user => nil, :open => false, 'disable_notify' => false, :command => nil
|
75
76
|
begin
|
@@ -91,6 +92,7 @@ module DeployGate
|
|
91
92
|
c.option '--distribution-key STRING', String, I18n.t('command_builder.add_devices.distribution_key')
|
92
93
|
c.option '--configuration STRING', String, I18n.t('command_builder.deploy.configuration')
|
93
94
|
c.option '--server', I18n.t('command_builder.add_devices.server.description')
|
95
|
+
c.option '--xcodeproj STRING', I18n.t('command_builder.add_devices.xcodeproj')
|
94
96
|
c.action do |args, options|
|
95
97
|
options.default :user => nil, :server => false, :command => 'add_devices'
|
96
98
|
begin
|
@@ -11,7 +11,7 @@ module DeployGate
|
|
11
11
|
|
12
12
|
session = DeployGate::Session.new
|
13
13
|
unless session.login?
|
14
|
-
Login.
|
14
|
+
Login.start_login()
|
15
15
|
session = DeployGate::Session.new()
|
16
16
|
end
|
17
17
|
|
@@ -21,9 +21,12 @@ module DeployGate
|
|
21
21
|
distribution_key = options.distribution_key
|
22
22
|
server = options.server
|
23
23
|
|
24
|
+
build_configuration = options.configuration
|
25
|
+
xcodeproj_path = options.xcodeproj
|
26
|
+
|
24
27
|
root_path = DeployGate::Xcode::Ios.project_root_path(work_dir)
|
25
28
|
workspaces = DeployGate::Xcode::Ios.find_workspaces(root_path)
|
26
|
-
analyze = DeployGate::Xcode::Analyze.new(workspaces,
|
29
|
+
analyze = DeployGate::Xcode::Analyze.new(workspaces, build_configuration, nil, xcodeproj_path)
|
27
30
|
bundle_id = analyze.target_bundle_identifier
|
28
31
|
developer_team = analyze.developer_team
|
29
32
|
member_center = DeployGate::Xcode::MemberCenter.new(developer_team)
|
@@ -34,8 +34,9 @@ module DeployGate
|
|
34
34
|
DeployGate::Xcode::Export.check_local_certificates
|
35
35
|
build_configuration = options.configuration
|
36
36
|
target_scheme = options.scheme
|
37
|
+
xcodeproj_path = options.xcodeproj
|
37
38
|
|
38
|
-
analyze = DeployGate::Xcode::Analyze.new(workspaces, build_configuration, target_scheme)
|
39
|
+
analyze = DeployGate::Xcode::Analyze.new(workspaces, build_configuration, target_scheme, xcodeproj_path)
|
39
40
|
target_scheme = analyze.scheme
|
40
41
|
|
41
42
|
code_sign_identity = nil
|
@@ -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
|
-
Login.
|
9
|
+
Login.start_login() unless DeployGate::Session.new.login?
|
10
10
|
|
11
11
|
# push or build(android/ios)
|
12
12
|
args.push(Dir.pwd) if args.empty?
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module DeployGate
|
2
2
|
module Commands
|
3
3
|
class Login
|
4
|
+
class AccountNotFoundError < DeployGate::RavenIgnoreException; end
|
5
|
+
|
4
6
|
class << self
|
5
7
|
|
6
8
|
# @return [void]
|
@@ -8,31 +10,32 @@ module DeployGate
|
|
8
10
|
welcome()
|
9
11
|
|
10
12
|
if options.terminal
|
11
|
-
|
13
|
+
start_login()
|
12
14
|
else
|
13
15
|
DeployGate::BrowserLogin.new().start()
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
17
19
|
def welcome
|
18
|
-
puts I18n.t('commands.login.
|
20
|
+
puts I18n.t('commands.login.start_login.welcome')
|
19
21
|
print_deploygate_aa()
|
20
22
|
end
|
21
23
|
|
22
24
|
# @return [void]
|
23
|
-
|
25
|
+
# @raise [AccountNotFoundError] emailに一致するUserが存在しないとき
|
26
|
+
def start_login
|
24
27
|
puts ''
|
25
|
-
email = ask(I18n.t('commands.login.
|
28
|
+
email = ask(I18n.t('commands.login.start_login.email'))
|
26
29
|
|
27
30
|
puts ''
|
28
|
-
puts I18n.t('commands.login.
|
31
|
+
puts I18n.t('commands.login.start_login.check_account')
|
29
32
|
if DeployGate::User.registered?('', email)
|
30
33
|
puts ''
|
31
|
-
password = input_password(I18n.t('commands.login.
|
34
|
+
password = input_password(I18n.t('commands.login.start_login.input_password'))
|
32
35
|
puts ''
|
33
36
|
start(email, password)
|
34
37
|
else
|
35
|
-
|
38
|
+
raise AccountNotFoundError, HighLine.color(I18n.t('errors.account_not_found_error'))
|
36
39
|
end
|
37
40
|
end
|
38
41
|
|
@@ -56,69 +59,6 @@ module DeployGate
|
|
56
59
|
puts HighLine.color(I18n.t('commands.login.start.success', name: session.name), HighLine::GREEN)
|
57
60
|
end
|
58
61
|
|
59
|
-
# @param [String] email
|
60
|
-
# @return [void]
|
61
|
-
def create_account(email)
|
62
|
-
puts I18n.t('commands.login.create_account.prompt')
|
63
|
-
puts ''
|
64
|
-
|
65
|
-
name = input_new_account_name()
|
66
|
-
puts ''
|
67
|
-
|
68
|
-
password = input_new_account_password()
|
69
|
-
puts ''
|
70
|
-
|
71
|
-
unless check_terms
|
72
|
-
puts HighLine.color(I18n.t('commands.login.check_terms.error'), HighLine::RED)
|
73
|
-
exit 1
|
74
|
-
end
|
75
|
-
|
76
|
-
print I18n.t('commands.login.create_account.creating')
|
77
|
-
if DeployGate::User.create(name, email, password).nil?
|
78
|
-
puts HighLine.color(I18n.t('commands.login.create_account.error'), HighLine::RED)
|
79
|
-
raise 'User create error'
|
80
|
-
else
|
81
|
-
puts HighLine.color(I18n.t('commands.login.create_account.success'), HighLine::GREEN)
|
82
|
-
start(email, password)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
# @return [String]
|
87
|
-
def input_new_account_name
|
88
|
-
user_name = ask(I18n.t('commands.login.input_new_account_name.input_user_name'))
|
89
|
-
print I18n.t('commands.login.input_new_account_name.checking')
|
90
|
-
|
91
|
-
if DeployGate::User.registered?(user_name, '')
|
92
|
-
puts HighLine.color(I18n.t('commands.login.input_new_account_name.already_used_user_name', user_name: user_name), HighLine::RED)
|
93
|
-
return input_new_account_name()
|
94
|
-
else
|
95
|
-
puts HighLine.color(I18n.t('commands.login.input_new_account_name.success', user_name: user_name), HighLine::GREEN)
|
96
|
-
return user_name
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
# @return [String]
|
101
|
-
def input_new_account_password
|
102
|
-
password = input_password(I18n.t('commands.login.input_new_account_password.input_password'))
|
103
|
-
secound_password = input_password(I18n.t('commands.login.input_new_account_password.input_same_password'))
|
104
|
-
|
105
|
-
if password == secound_password
|
106
|
-
return password
|
107
|
-
else
|
108
|
-
puts HighLine.color(I18n.t('commands.login.input_new_account_password.error'), HighLine::RED)
|
109
|
-
return input_new_account_password()
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
# @return [boolean]
|
114
|
-
def check_terms
|
115
|
-
puts I18n.t('commands.login.check_terms.terms_url')
|
116
|
-
puts I18n.t('commands.login.check_terms.privacy_url')
|
117
|
-
puts I18n.t('commands.login.check_terms.note')
|
118
|
-
puts ''
|
119
|
-
HighLine.agree(I18n.t('commands.login.check_terms.text')) {|q| q.default = "n"}
|
120
|
-
end
|
121
|
-
|
122
62
|
# @return [String]
|
123
63
|
def input_password(message)
|
124
64
|
ask(message) { |q| q.echo = "*" }
|
data/lib/deploygate/user.rb
CHANGED
@@ -8,17 +8,6 @@ module DeployGate
|
|
8
8
|
@name = name
|
9
9
|
end
|
10
10
|
|
11
|
-
# @param [String] name
|
12
|
-
# @param [String] email
|
13
|
-
# @param [String] password
|
14
|
-
# @return [DeployGate::User]
|
15
|
-
def self.create(name, email, password)
|
16
|
-
locale = Locale.current.language
|
17
|
-
results = DeployGate::API::V1::User.create(name, email, password, locale)
|
18
|
-
return if results[:error]
|
19
|
-
DeployGate::User.new(results[:name])
|
20
|
-
end
|
21
|
-
|
22
11
|
# @param [String] name
|
23
12
|
# @param [String] email
|
24
13
|
# @return [Boolean]
|
data/lib/deploygate/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module DeployGate
|
2
2
|
module Xcode
|
3
3
|
class Analyze
|
4
|
-
attr_reader :workspaces, :
|
4
|
+
attr_reader :workspaces, :build_workspace, :scheme, :xcodeproj
|
5
5
|
|
6
6
|
BASE_WORK_DIR_NAME = 'project.xcworkspace'
|
7
7
|
DEFAULT_BUILD_CONFIGURATION = 'Release'
|
@@ -16,12 +16,11 @@ module DeployGate
|
|
16
16
|
# @param [String] build_configuration
|
17
17
|
# @param [String] target_scheme
|
18
18
|
# @return [DeployGate::Xcode::Analyze]
|
19
|
-
def initialize(workspaces, build_configuration = nil, target_scheme = nil)
|
19
|
+
def initialize(workspaces, build_configuration = nil, target_scheme = nil, xcodeproj_path = nil)
|
20
20
|
@workspaces = workspaces
|
21
21
|
@build_configuration = build_configuration || DEFAULT_BUILD_CONFIGURATION
|
22
|
-
@scheme_workspace = find_scheme_workspace(workspaces)
|
23
22
|
@build_workspace = find_build_workspace(workspaces)
|
24
|
-
@xcodeproj =
|
23
|
+
@xcodeproj = xcodeproj_path.presence || find_xcodeproj(workspaces)
|
25
24
|
|
26
25
|
config = FastlaneCore::Configuration.create(Gym::Options.available_options, { project: @xcodeproj })
|
27
26
|
Gym.config = config
|
@@ -114,18 +113,21 @@ module DeployGate
|
|
114
113
|
|
115
114
|
# @param [Array] workspaces
|
116
115
|
# @return [String]
|
117
|
-
def
|
116
|
+
def find_xcodeproj(workspaces)
|
118
117
|
return nil if workspaces.empty?
|
119
|
-
return workspaces.first if workspaces.count == 1
|
120
118
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
119
|
+
if workspaces.count == 1
|
120
|
+
scheme_workspace = workspaces.first
|
121
|
+
else
|
122
|
+
scheme_workspace = nil
|
123
|
+
workspaces.each do |workspace|
|
124
|
+
if BASE_WORK_DIR_NAME == File.basename(workspace)
|
125
|
+
scheme_workspace = workspace
|
126
|
+
end
|
125
127
|
end
|
126
128
|
end
|
127
129
|
|
128
|
-
|
130
|
+
scheme_workspace != nil ? File.dirname(scheme_workspace) : nil
|
129
131
|
end
|
130
132
|
|
131
133
|
# @param [Array] workspaces
|
data/lib/deploygate.rb
CHANGED
@@ -36,6 +36,7 @@ require "xcodeproj"
|
|
36
36
|
module DeployGate
|
37
37
|
end
|
38
38
|
|
39
|
+
require "deploygate/version"
|
39
40
|
require "deploygate/raven_ignore_exception"
|
40
41
|
require "deploygate/api/v1/base"
|
41
42
|
require "deploygate/api/v1/session"
|
@@ -72,4 +73,3 @@ require "deploygate/xcode/ios"
|
|
72
73
|
require "deploygate/android/gradle_deploy"
|
73
74
|
require "deploygate/android/gradle_plugin_installer"
|
74
75
|
require "deploygate/android/gradle_project"
|
75
|
-
require "deploygate/version"
|
@@ -1,31 +1,4 @@
|
|
1
1
|
describe DeployGate::API::V1::User do
|
2
|
-
describe "#create" do
|
3
|
-
it "success" do
|
4
|
-
name = 'test'
|
5
|
-
email = 'email'
|
6
|
-
password = 'password'
|
7
|
-
token = 'token'
|
8
|
-
response = {
|
9
|
-
:error => false,
|
10
|
-
:because => '',
|
11
|
-
:results => {
|
12
|
-
:user => {:name => name},
|
13
|
-
:api_token => token
|
14
|
-
}
|
15
|
-
}
|
16
|
-
stub_request(:post, "#{API_ENDPOINT}/users").
|
17
|
-
to_return(:body => response.to_json)
|
18
|
-
|
19
|
-
results = DeployGate::API::V1::User.create(name, email, password)
|
20
|
-
expect(results).to eq({
|
21
|
-
:error => response[:error],
|
22
|
-
:message => response[:because],
|
23
|
-
:name => name,
|
24
|
-
:token => token
|
25
|
-
})
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
2
|
describe "#registered?" do
|
30
3
|
it "registered" do
|
31
4
|
name = 'test'
|
@@ -1,2 +1,70 @@
|
|
1
1
|
describe DeployGate::Xcode::Analyze do
|
2
|
+
describe '#new' do
|
3
|
+
subject { described_class.new(workspaces, build_configuration, target_scheme, xcodeproj) }
|
4
|
+
|
5
|
+
let(:build_configuration) { nil }
|
6
|
+
let(:target_scheme) { nil }
|
7
|
+
let(:xcodeproj) { nil }
|
8
|
+
|
9
|
+
describe 'detect scheme workspace and build workspace' do
|
10
|
+
before do
|
11
|
+
allow(FastlaneCore::Configuration).to receive(:create)
|
12
|
+
project = instance_double(FastlaneCore::Project)
|
13
|
+
allow(project).to receive(:select_scheme)
|
14
|
+
allow(project).to receive(:schemes).and_return([])
|
15
|
+
allow(project).to receive(:options).and_return({})
|
16
|
+
allow(FastlaneCore::Project).to receive(:new).and_return(project)
|
17
|
+
allow(Gym).to receive(:config=)
|
18
|
+
end
|
19
|
+
|
20
|
+
context 'exists single xcodeproj files' do
|
21
|
+
let(:workspaces) do
|
22
|
+
%w[
|
23
|
+
/base_dir/Test/Test/Test.xcodeproj/project.xcworkspace
|
24
|
+
]
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'without scheme workspace arg' do
|
28
|
+
it 'build_workspace and xcodeproj is same' do
|
29
|
+
is_expected.to have_attributes(
|
30
|
+
build_workspace: '/base_dir/Test/Test/Test.xcodeproj/project.xcworkspace',
|
31
|
+
xcodeproj: '/base_dir/Test/Test/Test.xcodeproj'
|
32
|
+
)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context 'exists multiple xcodeproj files' do
|
38
|
+
let(:workspaces) do
|
39
|
+
%w[
|
40
|
+
/base_dir/Test/ALib/ALib.xcodeproj/project.xcworkspace
|
41
|
+
/base_dir/Test/Hoge/Hoge.xcodeproj/project.xcworkspace
|
42
|
+
/base_dir/Test/Test/Test.xcodeproj/project.xcworkspace
|
43
|
+
/base_dir/Test/Test.xcworkspace
|
44
|
+
/base_dir/Test/ZLib/ZLib.xcodeproj/project.xcworkspace
|
45
|
+
]
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'without scheme workspace arg' do
|
49
|
+
it 'scheme workspace is last workspace has project.xcworkspace' do
|
50
|
+
is_expected.to have_attributes(
|
51
|
+
build_workspace: '/base_dir/Test/Test.xcworkspace',
|
52
|
+
xcodeproj: '/base_dir/Test/ZLib/ZLib.xcodeproj'
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
context 'with scheme workspace arg' do
|
58
|
+
let(:xcodeproj) { './ZLib.xcodeproj' }
|
59
|
+
|
60
|
+
it 'scheme workspace is last workspace has project.xcworkspace' do
|
61
|
+
is_expected.to have_attributes(
|
62
|
+
build_workspace: '/base_dir/Test/Test.xcworkspace',
|
63
|
+
xcodeproj: './ZLib.xcodeproj'
|
64
|
+
)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
2
70
|
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.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deploygate
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -332,10 +332,11 @@ executables:
|
|
332
332
|
extensions: []
|
333
333
|
extra_rdoc_files: []
|
334
334
|
files:
|
335
|
+
- ".github/workflows/pull_request.yml"
|
336
|
+
- ".github/workflows/release.yml"
|
335
337
|
- ".gitignore"
|
336
338
|
- ".rspec"
|
337
339
|
- ".ruby-version"
|
338
|
-
- ".travis.yml"
|
339
340
|
- Gemfile
|
340
341
|
- LICENSE.txt
|
341
342
|
- README.md
|
@@ -424,8 +425,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
424
425
|
- !ruby/object:Gem::Version
|
425
426
|
version: '0'
|
426
427
|
requirements: []
|
427
|
-
rubygems_version: 3.0.
|
428
|
-
signing_key:
|
428
|
+
rubygems_version: 3.0.9
|
429
|
+
signing_key:
|
429
430
|
specification_version: 4
|
430
431
|
summary: A command-line interface for DeployGate
|
431
432
|
test_files:
|
@@ -448,3 +449,4 @@ test_files:
|
|
448
449
|
- spec/deploygate/xcode/member_centers/provisioning_profile_spec.rb
|
449
450
|
- spec/spec_helper.rb
|
450
451
|
- spec/test_files/DeployGateSample.apk
|
452
|
+
...
|
data/.travis.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
env:
|
3
|
-
global:
|
4
|
-
secure: gGY+C54Cfp082o5Oaf6tZqzfOlXsWSMcVNvTpoOgMfJGsHo//d9t/si9Bn1pFaFyjJedW+IcC0pt+FcKVCDgnsUaL0Y0HT/ZsGkV8k7vv9F5nbHOde4nk189Sr2HtHR3wdr7KaMh2/DialisnqllxgzxA/wRLfHKsjqRsjWUw/VWL5E7Z734mzpTGE2mVJNRj02/cs0Y/izZgdi6wrt4lEZfxE3jS+QkJZHMjGNfcwvH26whU6oX1PiJ4o5xl0Rr8Q8xav3wbtTCcOJNPSeMkkiH5sSXuqrjI6kgwvjlByKhyg2Ws0GvZLxAfTml+Vo5po1uWsohdZJaJcEhd4GsGfbMZWCFuBP2mCE+gVmkkMeJxRKnWoi6NotgPmqG1JWlzGngDB/hJ4wuuh+swa0KJvZGiMEJ5P3GNydCybEPOsk1Ww+lUkXRHxD+/LW03EkxMd5LA3He/nYXz3pWCYA6qcFgrYMmq+3ozjSaQr+1d/Iu14Awv5+cwCltPfl5bERDno0jc0TdSs/7qplAL/efpjBsP7DkGE5r521gg8mIiXx509jU08i9S60SXiw0RBnYyjE5SzlsiOqaFdJxVygDGcDIAA/GTefLHO9i3SinZHFS6jr3Xi/vpOIc7Jz4W2Jmuqv+CJP4gspPoAxdWOE/QipTt0Jv4kCMf7dJwd9jaRc=
|
5
|
-
rvm:
|
6
|
-
- 2.4
|
7
|
-
- 2.5
|
8
|
-
- 2.6
|
9
|
-
- 2.7
|
10
|
-
before_install:
|
11
|
-
- gem install bundler -v 2.1.4
|
12
|
-
install: BUNDLER_VERSION=2.1.4 bundle install --jobs=3 --retry=3
|
13
|
-
script:
|
14
|
-
- bundle exec rake
|
15
|
-
deploy:
|
16
|
-
provider: rubygems
|
17
|
-
api_key:
|
18
|
-
secure: sy649ijrSPFvCtR7cg/Hy2I7iY3WQxROyyw3hjoOU5wFxjNYh+DoDXmZiMmdRSNjO2GQIbeuX5sPhgHTleIlOl0c8QtYxwiky6O9WnT3lwOkxtnhI1H+sQCJxWV9Ur99GtYCzosfOgqvoiXqOIllI/mNzhO4Vru3Nc+E9pM1aM9jU9TIulDxOCSyteXvX+23DaiW8CNicFWEGhT4rSdDGqKbmZTjDKP2SanEthUp1N0AqZR9ACvqGCz7Q/5cXjoUFz89uBaNwyp3UrYhfP1niVgR3dp8ev23RbMUGsmVz8WVMOkrBbA2nSBF+fRsxuj5YO+J0knQY32sXpNH06jvJ8GvnbOwWD6wm7q4h1UOjvb29PamtRF4lSfxhZb848eHtipkNyuqCfWaeCrlpn5b49poBPZ1FTOC8C6o1LbFPAJwchttj5fcVReNVsa8+xt6TO6p/vti0WMptVUUHU5xSxG7t3FzRF1WTM09oSNnmfyI/rOQv1qgOP2RmNaJQl9iRCbyCTgU8kpL8BR2vswntxILj5Q9zl2M83zGo7mYB8EjvbPjWqVURzvww5Jl5BSJfiIgeLBq/cjb7h/oqvRqgolkfqwaudagRUY+Fgtlmic15gjs8aA9OfzShBigf5We/aZRaXLWjtOwJ5+GKsBbmi73mkyTn0cMFbTpDv3RVNE=
|
19
|
-
gem: deploygate
|
20
|
-
on:
|
21
|
-
tags: true
|
22
|
-
repo: DeployGate/deploygate-cli
|
23
|
-
rvm: 2.4
|
24
|
-
after_deploy:
|
25
|
-
- 'curl -X POST --data-urlencode "payload={\"text\": \"Released a deploygate gem in <https://rubygems.org/gems/deploygate/|RubyGems>\"}" $SLACK_URL'
|