app_store_connect 0.16.0 → 0.17.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/.github/workflows/lint.yml +1 -1
- data/.github/workflows/publish.yml +6 -7
- data/.github/workflows/test.yml +1 -1
- data/.gitignore +1 -1
- data/Gemfile.lock +1 -1
- data/bin/publish +38 -0
- data/lib/app_store_connect.rb +1 -4
- data/lib/app_store_connect/client/options.rb +9 -2
- data/lib/app_store_connect/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 513dc52bf5480a65562d7ddeb78e974869a25e4a9692318f2b80f83674409dcd
|
4
|
+
data.tar.gz: f3066573d1db092a69afe8fed6af086cce0e00dbd3a381d2e08f1e925e47517f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce5132700e8643296e6f3dda8f9ca6566cc1587f204e33561c25c848e1f4e32c2d5a97c18236d384a332dc10344a3c3b3ef487c36144cc7717d42f813a7b38d4
|
7
|
+
data.tar.gz: e8e14c9e489121ef2017d541dfb9d467eda1f586311fafc75dd5cac1c6cf76d61550ab7969785ec91b401705693ce4e06225cbba429a9eacf172740ce5393613
|
data/.github/workflows/lint.yml
CHANGED
@@ -15,14 +15,15 @@ jobs:
|
|
15
15
|
- name: Set up Ruby 2.6
|
16
16
|
uses: actions/setup-ruby@v1
|
17
17
|
with:
|
18
|
-
version: 2.6.x
|
19
|
-
|
18
|
+
ruby-version: 2.6.x
|
20
19
|
- name: Configure Bundler
|
21
20
|
run: |
|
21
|
+
gem install bundler
|
22
|
+
bundle install --jobs=3 --retry=3
|
22
23
|
mkdir -p $HOME/.gem
|
23
24
|
touch $HOME/.gem/credentials
|
24
25
|
chmod 0600 $HOME/.gem/credentials
|
25
|
-
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n:github: ${GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}" > $HOME/.gem/credentials
|
26
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n:github: Bearer ${GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}" > $HOME/.gem/credentials
|
26
27
|
env:
|
27
28
|
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
28
29
|
GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN: ${{secrets.GITHUB_PACKAGE_REPOSITORY_AUTH_TOKEN}}
|
@@ -32,10 +33,8 @@ jobs:
|
|
32
33
|
gem build *.gemspec
|
33
34
|
|
34
35
|
- name: Publish to RubyGems
|
35
|
-
run:
|
36
|
-
gem push *.gem
|
36
|
+
run: bundle exec ./bin/publish --rubygems
|
37
37
|
|
38
38
|
- name: Publish to Github Package Repository
|
39
|
-
run:
|
40
|
-
gem push --key github --host https://rubygems.pkg.github.com/kyledecot *.gem
|
39
|
+
run: bundle exec ./bin/publish --github
|
41
40
|
|
data/.github/workflows/test.yml
CHANGED
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/bin/publish
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'optparse'
|
5
|
+
require 'app_store_connect/version'
|
6
|
+
|
7
|
+
OPTIONS = {
|
8
|
+
hosts: [],
|
9
|
+
version: AppStoreConnect::VERSION
|
10
|
+
}.freeze
|
11
|
+
|
12
|
+
HOSTS = {
|
13
|
+
rubygems: 'https://rubygems.org',
|
14
|
+
github: 'https://rubygems.pkg.github.com/kyledecot'
|
15
|
+
}.freeze
|
16
|
+
|
17
|
+
OptionParser.new do |parser|
|
18
|
+
HOSTS.keys.each do |key|
|
19
|
+
parser.on("--#{key}") do
|
20
|
+
OPTIONS[:hosts] << key
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
parser.on('--version VERSION') do |version|
|
25
|
+
OPTIONS[:version] = version
|
26
|
+
end
|
27
|
+
|
28
|
+
parser.on('--help', '-h') do
|
29
|
+
puts parser
|
30
|
+
exit(0)
|
31
|
+
end
|
32
|
+
end.parse!
|
33
|
+
|
34
|
+
OPTIONS[:hosts].each do |key|
|
35
|
+
ENV['RUBYGEMS_HOST'] = HOSTS.fetch(key)
|
36
|
+
|
37
|
+
system "gem push -k #{key} app_store_connect-#{OPTIONS[:version]}.gem"
|
38
|
+
end
|
data/lib/app_store_connect.rb
CHANGED
@@ -14,10 +14,7 @@ require 'app_store_connect/user_invitation_create_request'
|
|
14
14
|
require 'app_store_connect/profile_create_request'
|
15
15
|
|
16
16
|
module AppStoreConnect
|
17
|
-
@config = {
|
18
|
-
analytics_enabled: true,
|
19
|
-
schema: Schema.new(File.join(__dir__, 'config', 'schema.json'))
|
20
|
-
}
|
17
|
+
@config = {}
|
21
18
|
|
22
19
|
class << self
|
23
20
|
attr_accessor :config
|
@@ -7,14 +7,21 @@ module AppStoreConnect
|
|
7
7
|
class Options < SimpleDelegator
|
8
8
|
attr_reader :kwargs, :config, :env
|
9
9
|
|
10
|
+
DEFAULTS = {
|
11
|
+
analytics_enabled: true,
|
12
|
+
schema: Schema.new(File.join(__dir__, '..', '..', 'config', 'schema.json'))
|
13
|
+
}.freeze
|
14
|
+
private_constant :DEFAULTS
|
15
|
+
|
10
16
|
ENV_REGEXP = /APP_STORE_CONNECT_(?<suffix>[A-Z_]+)/.freeze
|
11
17
|
private_constant :ENV_REGEXP
|
12
18
|
|
13
|
-
def initialize(kwargs)
|
19
|
+
def initialize(kwargs = {})
|
14
20
|
@kwargs = kwargs
|
15
21
|
@config = build_config
|
16
22
|
@env = build_env
|
17
|
-
|
23
|
+
|
24
|
+
options = DEFAULTS.merge(@env.merge(@config.merge(kwargs)))
|
18
25
|
|
19
26
|
super(options)
|
20
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_store_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Decot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -208,6 +208,7 @@ files:
|
|
208
208
|
- README.md
|
209
209
|
- app_store_connect.gemspec
|
210
210
|
- bin/console
|
211
|
+
- bin/publish
|
211
212
|
- bin/setup
|
212
213
|
- lib/app_store_connect.rb
|
213
214
|
- lib/app_store_connect/bundle_id_create_request.rb
|