app_store_connect 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e49deacf219897c3907be8ad67fd45c76c8deaf0922fe8632758dc2471385eb
4
- data.tar.gz: 01dcafa516d44da7874ff9c0ed849b6d8bd6ae04d2c4f55759e00cc962adbf79
3
+ metadata.gz: 513dc52bf5480a65562d7ddeb78e974869a25e4a9692318f2b80f83674409dcd
4
+ data.tar.gz: f3066573d1db092a69afe8fed6af086cce0e00dbd3a381d2e08f1e925e47517f
5
5
  SHA512:
6
- metadata.gz: d0b650b1eb71a0480fb1a053f0820017a6e57e91f09b1daa873a2319105a87640293b2e56934806b31394cb1f3012b0ac74499e4ed883779fb261c4b748629bc
7
- data.tar.gz: 16d2a9029bd6e6cc02838dc64cc2443a50d7e37af65209979c442b26574ecc932a7addcc540bcc6046c21eddf34efb3bc2895714e18d78edf2da5f78b42d0874
6
+ metadata.gz: ce5132700e8643296e6f3dda8f9ca6566cc1587f204e33561c25c848e1f4e32c2d5a97c18236d384a332dc10344a3c3b3ef487c36144cc7717d42f813a7b38d4
7
+ data.tar.gz: e8e14c9e489121ef2017d541dfb9d467eda1f586311fafc75dd5cac1c6cf76d61550ab7969785ec91b401705693ce4e06225cbba429a9eacf172740ce5393613
@@ -13,7 +13,7 @@ jobs:
13
13
  - name: Set up Ruby 2.6
14
14
  uses: actions/setup-ruby@v1
15
15
  with:
16
- version: 2.6.x
16
+ ruby-version: 2.6.x
17
17
  - name: Install dependencies
18
18
  run: |
19
19
  gem install bundler
@@ -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
 
@@ -15,7 +15,7 @@ jobs:
15
15
  - name: Set up Ruby 2.6
16
16
  uses: actions/setup-ruby@v1
17
17
  with:
18
- version: 2.6.x
18
+ ruby-version: 2.6.x
19
19
  - name: Install dependencies
20
20
  run: |
21
21
  gem install bundler
data/.gitignore CHANGED
@@ -7,6 +7,6 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
 
10
- # rspec failure tracking
11
10
  .rspec_status
12
11
  .DS_Store
12
+ *.gem
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_store_connect (0.16.0)
4
+ app_store_connect (0.17.0)
5
5
  activesupport
6
6
  jwt (>= 1.4, <= 2.2.1)
7
7
  mixpanel-ruby (<= 2.2.0)
@@ -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
@@ -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
- options = @config.merge(kwargs.merge(@env))
23
+
24
+ options = DEFAULTS.merge(@env.merge(@config.merge(kwargs)))
18
25
 
19
26
  super(options)
20
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppStoreConnect
4
- VERSION = '0.16.0'
4
+ VERSION = '0.17.0'
5
5
  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.16.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-18 00:00:00.000000000 Z
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