fastlane 2.12.0 → 2.13.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 +4 -4
- data/fastlane/lib/fastlane/actions/git_branch.rb +1 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/pem/lib/pem/manager.rb +2 -2
- data/spaceship/lib/spaceship.rb +1 -0
- data/spaceship/lib/spaceship/portal/certificate.rb +3 -3
- data/spaceship/lib/spaceship/tunes/member.rb +69 -0
- data/spaceship/lib/spaceship/tunes/members.rb +29 -0
- data/spaceship/lib/spaceship/tunes/tunes.rb +2 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +61 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 564e6544aeab7f92fc130134ce78fee3a037cb16
|
4
|
+
data.tar.gz: 68f2180b569422134323d02514a6c1c6b08d73e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c65b9bc5a1494d9d9a06fff5dc282293a62082826010a73f6b4edc9a7043fc3d1603591cf265744bdaa86936207561adbf3abfc23ccb98106688d710b9be790
|
7
|
+
data.tar.gz: 36d5d7e41b5575e3ad1c18875f571322d4fef79172ca881042cc7f516d231b7e35ae158ee1ef06deeaa7538da242c3d60efb8a1d321215b0897a222fc75a271c
|
@@ -6,6 +6,7 @@ module Fastlane
|
|
6
6
|
class GitBranchAction < Action
|
7
7
|
def self.run(params)
|
8
8
|
return ENV['GIT_BRANCH'] if FastlaneCore::Env.truthy?('GIT_BRANCH')
|
9
|
+
return ENV['BRANCH_NAME'] if FastlaneCore::Env.truthy?('BRANCH_NAME')
|
9
10
|
return ENV["TRAVIS_BRANCH"] if FastlaneCore::Env.truthy?("TRAVIS_BRANCH")
|
10
11
|
return ENV["BITRISE_GIT_BRANCH"] if FastlaneCore::Env.truthy?("BITRISE_GIT_BRANCH")
|
11
12
|
`git symbolic-ref HEAD --short 2>/dev/null`.strip
|
data/pem/lib/pem/manager.rb
CHANGED
@@ -10,12 +10,12 @@ module PEM
|
|
10
10
|
login
|
11
11
|
|
12
12
|
existing_certificate = certificate.all.detect do |c|
|
13
|
-
c.
|
13
|
+
c.owner_name == PEM.config[:app_identifier]
|
14
14
|
end
|
15
15
|
|
16
16
|
if existing_certificate
|
17
17
|
remaining_days = (existing_certificate.expires - Time.now) / 60 / 60 / 24
|
18
|
-
UI.message "Existing push notification profile '#{existing_certificate.owner_name}' is valid for #{remaining_days.round} more days."
|
18
|
+
UI.message "Existing push notification profile for '#{existing_certificate.owner_name}' is valid for #{remaining_days.round} more days."
|
19
19
|
if remaining_days > 30
|
20
20
|
if PEM.config[:force]
|
21
21
|
UI.success "You already have an existing push certificate, but a new one will be created since the --force option has been set."
|
data/spaceship/lib/spaceship.rb
CHANGED
@@ -26,6 +26,7 @@ module Spaceship
|
|
26
26
|
AppVersion = Spaceship::Tunes::AppVersion
|
27
27
|
AppSubmission = Spaceship::Tunes::AppSubmission
|
28
28
|
Application = Spaceship::Tunes::Application
|
29
|
+
Members = Spaceship::Tunes::Members
|
29
30
|
|
30
31
|
DESCRIPTION = "Ruby library to access the Apple Dev Center and iTunes Connect".freeze
|
31
32
|
end
|
@@ -15,7 +15,7 @@ module Spaceship
|
|
15
15
|
# @example Company
|
16
16
|
# "SunApps GmbH"
|
17
17
|
# @example Push Profile
|
18
|
-
# "
|
18
|
+
# "Apple Push Services"
|
19
19
|
attr_accessor :name
|
20
20
|
|
21
21
|
# @return (String) Status of the certificate
|
@@ -46,8 +46,8 @@ module Spaceship
|
|
46
46
|
#
|
47
47
|
# @example Code Signing Identity (usually the company name)
|
48
48
|
# "SunApps Gmbh"
|
49
|
-
# @example Push Certificate (the
|
50
|
-
# "
|
49
|
+
# @example Push Certificate (the bundle identifier)
|
50
|
+
# "tools.fastlane.app"
|
51
51
|
attr_accessor :owner_name
|
52
52
|
|
53
53
|
# @return (String) The ID of the owner, that can be used to
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Spaceship
|
2
|
+
module Tunes
|
3
|
+
class Member < TunesBase
|
4
|
+
attr_accessor :email_address
|
5
|
+
attr_accessor :firstname
|
6
|
+
attr_accessor :lastname
|
7
|
+
attr_accessor :username
|
8
|
+
attr_accessor :not_accepted_invitation
|
9
|
+
attr_accessor :user_id
|
10
|
+
|
11
|
+
attr_mapping(
|
12
|
+
'emailAddress.value' => :email_address,
|
13
|
+
'firstName.value' => :firstname,
|
14
|
+
'lastName.value' => :lastname,
|
15
|
+
'userName' => :username,
|
16
|
+
'dsId' => :user_id
|
17
|
+
)
|
18
|
+
|
19
|
+
class << self
|
20
|
+
def factory(attrs)
|
21
|
+
self.new(attrs)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def roles
|
26
|
+
parsed_roles = []
|
27
|
+
raw_data["roles"].each do |role|
|
28
|
+
parsed_roles << role["value"]["name"]
|
29
|
+
end
|
30
|
+
return parsed_roles
|
31
|
+
end
|
32
|
+
|
33
|
+
def preferred_currency
|
34
|
+
currency_base = raw_data["preferredCurrency"]["value"]
|
35
|
+
return {
|
36
|
+
name: currency_base["name"],
|
37
|
+
code: currency_base["currencyCode"],
|
38
|
+
country: currency_base["countryName"],
|
39
|
+
country_code: currency_base["countryCode"]
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def selected_apps
|
44
|
+
parsed_apps = []
|
45
|
+
raw_data["userSoftwares"]["value"]["grantedSoftwareAdamIds"].each do |app_id|
|
46
|
+
parsed_apps << Application.find(app_id)
|
47
|
+
end
|
48
|
+
return parsed_apps
|
49
|
+
end
|
50
|
+
|
51
|
+
def not_accepted_invitation
|
52
|
+
return true if raw_data["activationExpiry"]
|
53
|
+
return false
|
54
|
+
end
|
55
|
+
|
56
|
+
def has_all_apps
|
57
|
+
selected_apps.length == 0
|
58
|
+
end
|
59
|
+
|
60
|
+
def delete!
|
61
|
+
client.delete_member!(self.user_id, self.email_address)
|
62
|
+
end
|
63
|
+
|
64
|
+
def resend_invitation
|
65
|
+
client.reinvite_member(self.email_address)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Spaceship
|
2
|
+
module Tunes
|
3
|
+
class Members < TunesBase
|
4
|
+
class << self
|
5
|
+
def all
|
6
|
+
response = client.members
|
7
|
+
return_members = []
|
8
|
+
response.each do |member|
|
9
|
+
return_members << Tunes::Member.factory(member)
|
10
|
+
end
|
11
|
+
return_members
|
12
|
+
end
|
13
|
+
|
14
|
+
def find(email)
|
15
|
+
all.each do |member|
|
16
|
+
if member.email_address == email
|
17
|
+
return member
|
18
|
+
end
|
19
|
+
end
|
20
|
+
return nil
|
21
|
+
end
|
22
|
+
|
23
|
+
def create!(firstname: nil, lastname: nil, email_address: nil, roles: [], apps: [])
|
24
|
+
client.create_member!(firstname: firstname, lastname: lastname, email_address: email_address, roles: roles, apps: apps)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -27,6 +27,8 @@ require 'spaceship/tunes/pricing_tier'
|
|
27
27
|
require 'spaceship/tunes/recovery_device'
|
28
28
|
require 'spaceship/tunes/territory'
|
29
29
|
require 'spaceship/tunes/availability'
|
30
|
+
require 'spaceship/tunes/members'
|
31
|
+
require 'spaceship/tunes/member'
|
30
32
|
|
31
33
|
require 'spaceship/tunes/app_version_promocodes'
|
32
34
|
require 'spaceship/tunes/app_version_generated_promocodes'
|
@@ -374,6 +374,67 @@ module Spaceship
|
|
374
374
|
end
|
375
375
|
end
|
376
376
|
|
377
|
+
#####################################################
|
378
|
+
# @!group Members
|
379
|
+
#####################################################
|
380
|
+
|
381
|
+
def members
|
382
|
+
r = request(:get, "ra/users/itc")
|
383
|
+
parse_response(r, 'data')["users"]
|
384
|
+
end
|
385
|
+
|
386
|
+
def reinvite_member(email)
|
387
|
+
request(:post, "ra/users/itc/#{email}/resendInvitation")
|
388
|
+
end
|
389
|
+
|
390
|
+
def delete_member!(user_id, email)
|
391
|
+
payload = []
|
392
|
+
payload << {
|
393
|
+
dsId: user_id,
|
394
|
+
email: email
|
395
|
+
}
|
396
|
+
request(:post) do |req|
|
397
|
+
req.url "ra/users/itc/delete"
|
398
|
+
req.body = payload.to_json
|
399
|
+
req.headers['Content-Type'] = 'application/json'
|
400
|
+
end
|
401
|
+
end
|
402
|
+
|
403
|
+
def create_member!(firstname: nil, lastname: nil, email_address: nil, roles: [], apps: [])
|
404
|
+
r = request(:get, "ra/users/itc/create")
|
405
|
+
data = parse_response(r, 'data')
|
406
|
+
|
407
|
+
data["user"]["firstName"] = { value: firstname }
|
408
|
+
data["user"]["lastName"] = { value: lastname }
|
409
|
+
data["user"]["emailAddress"] = { value: email_address }
|
410
|
+
|
411
|
+
roles << "admin" if roles.length == 0
|
412
|
+
|
413
|
+
data["user"]["roles"] = []
|
414
|
+
roles.each do |role|
|
415
|
+
# find role from template
|
416
|
+
data["roles"].each do |template_role|
|
417
|
+
if template_role["value"]["name"] == role
|
418
|
+
data["user"]["roles"] << template_role
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
423
|
+
if apps.length == 0
|
424
|
+
data["user"]["userSoftwares"] = { value: { grantAllSoftware: true, grantedSoftwareAdamIds: [] } }
|
425
|
+
else
|
426
|
+
data["user"]["userSoftwares"] = { value: { grantAllSoftware: false, grantedSoftwareAdamIds: apps } }
|
427
|
+
end
|
428
|
+
|
429
|
+
# send the changes back to Apple
|
430
|
+
r = request(:post) do |req|
|
431
|
+
req.url "ra/users/itc/create"
|
432
|
+
req.body = data.to_json
|
433
|
+
req.headers['Content-Type'] = 'application/json'
|
434
|
+
end
|
435
|
+
handle_itc_response(r.body)
|
436
|
+
end
|
437
|
+
|
377
438
|
#####################################################
|
378
439
|
# @!group Pricing
|
379
440
|
#####################################################
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2017-01-
|
17
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: slack-notifier
|
@@ -1236,6 +1236,8 @@ files:
|
|
1236
1236
|
- spaceship/lib/spaceship/tunes/device_type.rb
|
1237
1237
|
- spaceship/lib/spaceship/tunes/language_converter.rb
|
1238
1238
|
- spaceship/lib/spaceship/tunes/language_item.rb
|
1239
|
+
- spaceship/lib/spaceship/tunes/member.rb
|
1240
|
+
- spaceship/lib/spaceship/tunes/members.rb
|
1239
1241
|
- spaceship/lib/spaceship/tunes/pricing_tier.rb
|
1240
1242
|
- spaceship/lib/spaceship/tunes/recovery_device.rb
|
1241
1243
|
- spaceship/lib/spaceship/tunes/spaceship.rb
|