github-authentication 1.0.2 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a279af637a4369feb5bff421697bed089b09f8096d6829eccb37b3c4911d7ba9
4
- data.tar.gz: edb60c288c631aafd17fbc0b361fef03f86e019a38a77d1debcc1544627e424d
3
+ metadata.gz: fc7a5e8c75f0a6c1eff271d772031e5d18850dd6bb7d2387908d5186558e1396
4
+ data.tar.gz: fdd8a299c44fa0d0a4336af31d0568ab0b6f9d71111fa0fa3a3157b04a9356c7
5
5
  SHA512:
6
- metadata.gz: 10259c8db9c441f9d899962653a0307cc0eed4584797135857c883a047c4609027909cf7bfdc2828ebe6b3b9f520244cdf4267e0fa8957fa2daea46795bbc83b
7
- data.tar.gz: f6d4ab126dbc799ec03fea9a6d7c5893d4abae73fb50b16cb3a15169876f615ee01756593d21d1b86f7cadf88b8630faa6f7fd7ca7941f49103031636bee078d
6
+ metadata.gz: cef00e4c97906f4e6a988ec830ed5462a3f146365b2abebdd0284fee99e243c5ca5db618642eb7fffb004d24080fce2294a2875043fbe947d01c70a751177466
7
+ data.tar.gz: 4fe79c4825cb493039a315aaeda5f982616bee4b411909d931ef7e20938a55b5b0f1b5ea99781b02e2c1f17cba6ae4af950659a73e8b2661f15fc087a0c459f5
@@ -3,31 +3,47 @@ name: Tests
3
3
  on: [push]
4
4
 
5
5
  jobs:
6
+ lint:
7
+ runs-on: ubuntu-latest
8
+
9
+ strategy:
10
+ fail-fast: false
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Set up Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ bundler-cache: true
18
+
19
+ - name: Lint Ruby
20
+ run: |
21
+ bin/rubocop
22
+
6
23
  ruby-tests:
7
24
  runs-on: ubuntu-latest
8
25
 
9
26
  strategy:
27
+ fail-fast: false
10
28
  matrix:
11
- ruby: [ '2.6' ]
29
+ ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]
12
30
  steps:
13
- - uses: actions/checkout@v2
14
- - name: Set up Ruby ${{ matrix.ruby }}
15
- uses: actions/setup-ruby@v1
16
- with:
17
- ruby-version: ${{ matrix.ruby }}
31
+ - uses: actions/checkout@v4
32
+
18
33
  - name: Setup timezone
19
34
  uses: zcong1993/setup-timezone@master
20
35
  with:
21
36
  timezone: UTC
22
- - name: Lint Ruby
23
- run: |
24
- gem install bundler
25
- bundle install --jobs 4 --retry 3
26
- bin/rubocop
37
+
38
+ - name: Set up Ruby ${{ matrix.ruby }}
39
+ uses: ruby/setup-ruby@v1
40
+ with:
41
+ ruby-version: ${{ matrix.ruby }}
42
+ bundler-cache: true
43
+ bundler: latest
44
+
27
45
  - name: Run Ruby tests
28
46
  run: |
29
- gem install bundler
30
- bundle install --jobs 4 --retry 3
31
47
  bin/rake test
32
48
  env:
33
49
  SUITE: ruby
data/.rubocop.yml CHANGED
@@ -2,8 +2,7 @@ inherit_gem:
2
2
  rubocop-shopify: rubocop.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.6
6
- CacheRootDirectory: tmp/rubocop
5
+ CacheRootDirectory: tmp/rubocop-cache
7
6
  UseCache: true
8
7
 
9
8
  Style/MethodCallWithArgsParentheses:
@@ -18,6 +17,8 @@ Style/MethodCallWithArgsParentheses:
18
17
  - refute_nil
19
18
  - assert_kind_of
20
19
  - refute_kind_of
20
+ - assert_predicate
21
+ - refute_predicate
21
22
 
22
23
  Naming/FileName:
23
24
  Exclude:
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.0
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ ### Next
2
+
3
+ ...
4
+
5
+ ### 1.2.0
6
+ - Support multi-org credentials (https://github.com/Shopify/github-authentication/pull/34)
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  source "https://rubygems.org"
3
4
 
4
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
data/Gemfile.lock CHANGED
@@ -1,75 +1,96 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-authentication (1.0.2)
4
+ github-authentication (1.2.0)
5
5
  jwt (~> 2.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.1.4.1)
10
+ activesupport (7.1.2)
11
+ base64
12
+ bigdecimal
11
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ connection_pool (>= 2.2.5)
15
+ drb
12
16
  i18n (>= 1.6, < 2)
13
17
  minitest (>= 5.1)
18
+ mutex_m
14
19
  tzinfo (~> 2.0)
15
- zeitwerk (~> 2.3)
16
- addressable (2.8.0)
17
- public_suffix (>= 2.0.2, < 5.0)
18
- ast (2.4.0)
19
- concurrent-ruby (1.1.9)
20
- crack (0.4.3)
21
- safe_yaml (~> 1.0.0)
20
+ addressable (2.8.5)
21
+ public_suffix (>= 2.0.2, < 6.0)
22
+ ast (2.4.2)
23
+ base64 (0.2.0)
24
+ bigdecimal (3.1.4)
25
+ concurrent-ruby (1.2.2)
26
+ connection_pool (2.4.1)
27
+ crack (0.4.5)
28
+ rexml
29
+ drb (2.2.0)
30
+ ruby2_keywords
22
31
  hashdiff (1.0.1)
23
- i18n (1.8.10)
32
+ i18n (1.14.1)
24
33
  concurrent-ruby (~> 1.0)
25
- jaro_winkler (1.5.4)
26
- jwt (2.3.0)
27
- minitest (5.14.0)
28
- mocha (1.11.2)
29
- parallel (1.19.1)
30
- parser (2.7.1.2)
31
- ast (~> 2.4.0)
32
- public_suffix (4.0.6)
33
- rainbow (3.0.0)
34
- rake (12.3.3)
35
- rexml (3.2.5)
36
- rubocop (0.82.0)
37
- jaro_winkler (~> 1.5.1)
34
+ json (2.7.1)
35
+ jwt (2.7.1)
36
+ language_server-protocol (3.17.0.3)
37
+ minitest (5.20.0)
38
+ mocha (2.1.0)
39
+ ruby2_keywords (>= 0.0.5)
40
+ mutex_m (0.2.0)
41
+ parallel (1.24.0)
42
+ parser (3.3.0.5)
43
+ ast (~> 2.4.1)
44
+ racc
45
+ public_suffix (5.0.4)
46
+ racc (1.7.3)
47
+ rainbow (3.1.1)
48
+ rake (13.1.0)
49
+ regexp_parser (2.9.0)
50
+ rexml (3.2.6)
51
+ rubocop (1.62.1)
52
+ json (~> 2.3)
53
+ language_server-protocol (>= 3.17.0)
38
54
  parallel (~> 1.10)
39
- parser (>= 2.7.0.1)
55
+ parser (>= 3.3.0.2)
40
56
  rainbow (>= 2.2.2, < 4.0)
41
- rexml
57
+ regexp_parser (>= 1.8, < 3.0)
58
+ rexml (>= 3.2.5, < 4.0)
59
+ rubocop-ast (>= 1.31.1, < 2.0)
42
60
  ruby-progressbar (~> 1.7)
43
- unicode-display_width (>= 1.4.0, < 2.0)
44
- rubocop-shopify (1.0.2)
45
- rubocop (~> 0.82.0)
46
- ruby-progressbar (1.10.1)
47
- safe_yaml (1.0.5)
48
- timecop (0.9.1)
49
- tzinfo (2.0.4)
61
+ unicode-display_width (>= 2.4.0, < 3.0)
62
+ rubocop-ast (1.31.2)
63
+ parser (>= 3.3.0.4)
64
+ rubocop-shopify (2.14.0)
65
+ rubocop (~> 1.51)
66
+ ruby-progressbar (1.13.0)
67
+ ruby2_keywords (0.0.5)
68
+ timecop (0.9.8)
69
+ tzinfo (2.0.6)
50
70
  concurrent-ruby (~> 1.0)
51
- unicode-display_width (1.7.0)
52
- vcr (5.1.0)
53
- webmock (3.8.3)
54
- addressable (>= 2.3.6)
71
+ unicode-display_width (2.5.0)
72
+ vcr (6.2.0)
73
+ webmock (3.19.1)
74
+ addressable (>= 2.8.0)
55
75
  crack (>= 0.3.2)
56
76
  hashdiff (>= 0.4.0, < 2.0.0)
57
- zeitwerk (2.4.2)
58
77
 
59
78
  PLATFORMS
60
- ruby
79
+ arm64-darwin-21
80
+ arm64-darwin-22
81
+ arm64-darwin-23
82
+ x86_64-linux
61
83
 
62
84
  DEPENDENCIES
63
85
  activesupport
64
86
  github-authentication!
65
87
  minitest (~> 5.0)
66
- mocha (~> 1.11)
67
- rake (~> 12.3)
68
- rubocop (~> 0.52)
88
+ mocha (~> 2)
89
+ rake (~> 13)
69
90
  rubocop-shopify
70
91
  timecop (~> 0.9)
71
- vcr (~> 5.1)
92
+ vcr (~> 6.2)
72
93
  webmock (~> 3.8)
73
94
 
74
95
  BUNDLED WITH
75
- 2.2.22
96
+ 2.3.8
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "bundler/gem_tasks"
3
4
  require "rake/testtask"
4
5
 
data/bin/rake CHANGED
@@ -9,8 +9,10 @@
9
9
  #
10
10
 
11
11
  require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
13
+ "../../Gemfile",
14
+ Pathname.new(__FILE__).realpath,
15
+ )
14
16
 
15
17
  bundle_binstub = File.expand_path("../bundle", __FILE__)
16
18
 
data/bin/rubocop CHANGED
@@ -9,8 +9,10 @@
9
9
  #
10
10
 
11
11
  require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
13
+ "../../Gemfile",
14
+ Pathname.new(__FILE__).realpath,
15
+ )
14
16
 
15
17
  bundle_binstub = File.expand_path("../bundle", __FILE__)
16
18
 
@@ -1,30 +1,35 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'github_authentication'
4
+ require "github_authentication"
5
5
 
6
6
  begin
7
- require 'active_support'
8
- require 'active_support/cache'
9
- require 'active_support/notifications'
7
+ require "active_support"
8
+ require "active_support/cache"
9
+ require "active_support/notifications"
10
10
  rescue LoadError
11
11
  warn("Active Support is required for the credential helper")
12
12
  exit(2)
13
13
  end
14
14
 
15
15
  case ARGV[0]
16
- when 'get'
16
+ when "get"
17
+ description = $stdin.each_line.map { |line| line.split("=", 2).map(&:strip) }.to_h
18
+ org = description.fetch("path", "").split("/").first
19
+ environment = GithubAuthentication::Environment.new(org: org)
20
+
17
21
  exit_status = GithubAuthentication::GitCredentialHelper.new(
18
- pem: File.read(ENV.fetch('GITHUB_APP_KEYFILE')),
19
- app_id: ENV.fetch('GITHUB_APP_ID'),
20
- installation_id: ENV.fetch('GITHUB_APP_INSTALLATION_ID'),
21
- storage: ActiveSupport::Cache::FileStore.new(ENV.fetch('GITHUB_APP_CREDENTIAL_STORAGE_PATH'))
22
+ pem: environment.pem,
23
+ app_id: environment.app_id,
24
+ installation_id: environment.installation_id,
25
+ storage: environment.storage,
26
+ description: description,
22
27
  ).handle_get
23
28
  exit(exit_status)
24
- when 'store'
29
+ when "store"
25
30
  # We maintain our own internal storage, so no-op any `store` requests
26
- when nil, ''
27
- warn('Supported operations: get, store')
31
+ when nil, ""
32
+ warn("Supported operations: get, store")
28
33
  exit(1)
29
34
  else
30
35
  warn("Unknown argument: #{ARGV[0]}")
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  # Specify which files should be added to the gem when it is released.
30
30
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
31
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
31
+ spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
32
32
  %x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
33
33
  end
34
34
  spec.bindir = "exe"
@@ -37,13 +37,14 @@ Gem::Specification.new do |spec|
37
37
 
38
38
  spec.add_dependency("jwt", "~> 2.2")
39
39
 
40
- spec.add_development_dependency("rake", "~> 12.3")
40
+ spec.required_ruby_version = ">= 2.7.0"
41
+
42
+ spec.add_development_dependency("activesupport")
41
43
  spec.add_development_dependency("minitest", "~> 5.0")
44
+ spec.add_development_dependency("mocha", "~> 2")
45
+ spec.add_development_dependency("rake", "~> 13")
46
+ spec.add_development_dependency("rubocop-shopify")
42
47
  spec.add_development_dependency("timecop", "~> 0.9")
43
- spec.add_development_dependency("mocha", "~> 1.11")
48
+ spec.add_development_dependency("vcr", "~> 6.2")
44
49
  spec.add_development_dependency("webmock", "~> 3.8")
45
- spec.add_development_dependency("vcr", "~> 5.1")
46
- spec.add_development_dependency("rubocop", "~> 0.52")
47
- spec.add_development_dependency("rubocop-shopify")
48
- spec.add_development_dependency("activesupport")
49
50
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'github_authentication/token'
3
+ require "github_authentication/token"
4
4
 
5
5
  module GithubAuthentication
6
6
  class Cache
7
7
  # storage = ActiveSupport::Cache
8
- def initialize(storage:, key: '')
8
+ def initialize(storage:, key: "")
9
9
  @storage = storage
10
10
  @key = "github:authentication:#{key}"
11
11
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/core_ext/object/blank.rb"
4
+
5
+ module GithubAuthentication
6
+ class Environment
7
+ def initialize(org:, env: ENV)
8
+ @org = org.presence
9
+ @env = env
10
+ end
11
+
12
+ def pem
13
+ File.read(resolve("GITHUB_APP_KEYFILE"))
14
+ end
15
+
16
+ def app_id
17
+ resolve("GITHUB_APP_ID")
18
+ end
19
+
20
+ def installation_id
21
+ resolve("GITHUB_APP_INSTALLATION_ID")
22
+ end
23
+
24
+ def storage
25
+ ActiveSupport::Cache::FileStore.new(resolve("GITHUB_APP_CREDENTIAL_STORAGE_PATH"))
26
+ end
27
+
28
+ private
29
+
30
+ def resolve(suffix)
31
+ if @org
32
+ @env["#{@org.upcase}_#{suffix}"] || @env.fetch(suffix)
33
+ else
34
+ @env.fetch(suffix)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'jwt'
3
+ require "jwt"
4
4
  require "uri"
5
- require 'openssl'
5
+ require "openssl"
6
6
 
7
7
  require "github_authentication/http"
8
8
 
@@ -2,25 +2,23 @@
2
2
 
3
3
  module GithubAuthentication
4
4
  class GitCredentialHelper
5
- def initialize(pem:, installation_id:, app_id:, storage: nil, stdin: $stdin)
5
+ def initialize(pem:, installation_id:, app_id:, description:, storage: nil)
6
6
  @pem = pem
7
7
  @installation_id = installation_id
8
8
  @app_id = app_id
9
+ @description = description
9
10
  @storage = storage
10
- @stdin = stdin
11
11
  end
12
12
 
13
13
  def handle_get
14
- description = parse_stdin
15
-
16
- unless description['protocol'] == 'https' && description['host'] == 'github.com'
17
- warn("Unsupported description: #{description}")
14
+ unless @description["protocol"] == "https" && @description["host"] == "github.com"
15
+ warn("Unsupported description: #{@description}")
18
16
  return 2
19
17
  end
20
18
 
21
19
  token = provider.token(seconds_ttl: min_cache_ttl)
22
20
  puts("password=#{token}")
23
- puts('username=api')
21
+ puts("username=api")
24
22
 
25
23
  0
26
24
  end
@@ -32,16 +30,10 @@ module GithubAuthentication
32
30
  10 * 60
33
31
  end
34
32
 
35
- def parse_stdin
36
- # Credential description is written to STDIN in line delimited key=value form,
37
- # see https://git-scm.com/docs/git-credential#IOFMT
38
- @stdin.each_line.map { |line| line.split('=', 2).map(&:strip) }.to_h
39
- end
40
-
41
33
  def provider
42
34
  @provider ||= Provider.new(
43
35
  generator: generator,
44
- cache: Cache.new(storage: @storage || ObjectCache.new)
36
+ cache: Cache.new(storage: @storage || ObjectCache.new),
45
37
  )
46
38
  end
47
39
 
@@ -49,7 +41,7 @@ module GithubAuthentication
49
41
  @generator ||= Generator::App.new(
50
42
  pem: @pem,
51
43
  app_id: @app_id,
52
- installation_id: @installation_id
44
+ installation_id: @installation_id,
53
45
  )
54
46
  end
55
47
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'net/http'
4
- require 'timeout'
3
+ require "net/http"
4
+ require "timeout"
5
5
 
6
- require 'github_authentication/retriable'
6
+ require "github_authentication/retriable"
7
7
 
8
8
  module GithubAuthentication
9
9
  module Http
@@ -17,7 +17,6 @@ module GithubAuthentication
17
17
  http.use_ssl = true
18
18
  http.start
19
19
  begin
20
-
21
20
  request = Net::HTTP::Post.new(uri.request_uri)
22
21
  yield(request) if block_given?
23
22
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'github_authentication/token'
3
+ require "github_authentication/token"
4
4
 
5
5
  module GithubAuthentication
6
6
  class ObjectCache
@@ -14,7 +14,7 @@ module GithubAuthentication
14
14
  options = @cache[key][:options]
15
15
  if options.key?(:expires_at) && Time.now.utc > options[:expires_at]
16
16
  @cache.delete(key)
17
- return nil
17
+ return
18
18
  end
19
19
 
20
20
  @cache[key][:value]
@@ -1,28 +1,26 @@
1
1
  # frozen_string_literal: true
2
- require "mutex_m.rb"
3
2
 
4
- require 'github_authentication/retriable'
3
+ require "github_authentication/retriable"
5
4
 
6
5
  module GithubAuthentication
7
6
  class Provider
8
7
  include Retriable
9
- include Mutex_m
10
8
 
11
9
  Error = Class.new(StandardError)
12
10
  TokenGeneratorError = Class.new(Error)
13
11
 
14
12
  def initialize(generator:, cache:)
15
- super()
16
13
  @token = nil
17
14
  @generator = generator
18
15
  @cache = cache
16
+ @mutex = Mutex.new
19
17
  end
20
18
 
21
19
  def token(seconds_ttl: 5 * 60)
22
20
  return @token if @token&.valid_for?(seconds_ttl)
23
21
 
24
22
  with_retries(TokenGeneratorError) do
25
- mu_synchronize do
23
+ @mutex.synchronize do
26
24
  return @token if @token&.valid_for?(seconds_ttl)
27
25
 
28
26
  if (@token = @cache.read)
@@ -9,12 +9,12 @@ module GithubAuthentication
9
9
  begin
10
10
  return_value = yield(attempt, previous_failure)
11
11
  rescue *exceptions => exception
12
- raise unless attempt < max_attempts
12
+ raise if attempt >= max_attempts
13
13
 
14
14
  sleep_after_attempt(
15
15
  attempt: attempt,
16
16
  base_sleep_time: sleep_between_attempts,
17
- exponential_backoff: exponential_backoff
17
+ exponential_backoff: exponential_backoff,
18
18
  )
19
19
 
20
20
  attempt += 1
@@ -28,7 +28,7 @@ module GithubAuthentication
28
28
  private
29
29
 
30
30
  def sleep_after_attempt(attempt:, base_sleep_time:, exponential_backoff:)
31
- return unless base_sleep_time > 0
31
+ return if base_sleep_time <= 0
32
32
 
33
33
  time_to_sleep = if exponential_backoff
34
34
  calculate_exponential_backoff(attempt: attempt, base_sleep_time: base_sleep_time)
@@ -1,18 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'json'
3
+ require "json"
4
4
 
5
5
  module GithubAuthentication
6
6
  class Token
7
7
  attr_reader :expires_at
8
8
 
9
- def self.from_json(data)
10
- return nil if data.nil?
9
+ class << self
10
+ def from_json(data)
11
+ return if data.nil?
11
12
 
12
- token, expires_at = JSON.parse(data).values_at('token', 'expires_at')
13
- new(token, Time.iso8601(expires_at))
14
- rescue JSON::ParserError
15
- nil
13
+ token, expires_at = JSON.parse(data).values_at("token", "expires_at")
14
+ new(token, Time.iso8601(expires_at))
15
+ rescue JSON::ParserError
16
+ nil
17
+ end
16
18
  end
17
19
 
18
20
  def initialize(token, expires_at)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GithubAuthentication
4
- VERSION = "1.0.2"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "github_authentication/version"
4
+ require "github_authentication/environment"
4
5
  require "github_authentication/generator"
5
6
  require "github_authentication/provider"
6
7
  require "github_authentication/cache"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederik Dudzik
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2021-12-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: jwt
@@ -25,19 +24,19 @@ dependencies:
25
24
  - !ruby/object:Gem::Version
26
25
  version: '2.2'
27
26
  - !ruby/object:Gem::Dependency
28
- name: rake
27
+ name: activesupport
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - "~>"
30
+ - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '12.3'
32
+ version: '0'
34
33
  type: :development
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - "~>"
37
+ - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '12.3'
39
+ version: '0'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: minitest
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -53,103 +52,89 @@ dependencies:
53
52
  - !ruby/object:Gem::Version
54
53
  version: '5.0'
55
54
  - !ruby/object:Gem::Dependency
56
- name: timecop
55
+ name: mocha
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - "~>"
60
59
  - !ruby/object:Gem::Version
61
- version: '0.9'
60
+ version: '2'
62
61
  type: :development
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
65
  - - "~>"
67
66
  - !ruby/object:Gem::Version
68
- version: '0.9'
67
+ version: '2'
69
68
  - !ruby/object:Gem::Dependency
70
- name: mocha
69
+ name: rake
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
72
  - - "~>"
74
73
  - !ruby/object:Gem::Version
75
- version: '1.11'
74
+ version: '13'
76
75
  type: :development
77
76
  prerelease: false
78
77
  version_requirements: !ruby/object:Gem::Requirement
79
78
  requirements:
80
79
  - - "~>"
81
80
  - !ruby/object:Gem::Version
82
- version: '1.11'
81
+ version: '13'
83
82
  - !ruby/object:Gem::Dependency
84
- name: webmock
83
+ name: rubocop-shopify
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
- - - "~>"
86
+ - - ">="
88
87
  - !ruby/object:Gem::Version
89
- version: '3.8'
88
+ version: '0'
90
89
  type: :development
91
90
  prerelease: false
92
91
  version_requirements: !ruby/object:Gem::Requirement
93
92
  requirements:
94
- - - "~>"
93
+ - - ">="
95
94
  - !ruby/object:Gem::Version
96
- version: '3.8'
95
+ version: '0'
97
96
  - !ruby/object:Gem::Dependency
98
- name: vcr
97
+ name: timecop
99
98
  requirement: !ruby/object:Gem::Requirement
100
99
  requirements:
101
100
  - - "~>"
102
101
  - !ruby/object:Gem::Version
103
- version: '5.1'
102
+ version: '0.9'
104
103
  type: :development
105
104
  prerelease: false
106
105
  version_requirements: !ruby/object:Gem::Requirement
107
106
  requirements:
108
107
  - - "~>"
109
108
  - !ruby/object:Gem::Version
110
- version: '5.1'
109
+ version: '0.9'
111
110
  - !ruby/object:Gem::Dependency
112
- name: rubocop
111
+ name: vcr
113
112
  requirement: !ruby/object:Gem::Requirement
114
113
  requirements:
115
114
  - - "~>"
116
115
  - !ruby/object:Gem::Version
117
- version: '0.52'
116
+ version: '6.2'
118
117
  type: :development
119
118
  prerelease: false
120
119
  version_requirements: !ruby/object:Gem::Requirement
121
120
  requirements:
122
121
  - - "~>"
123
122
  - !ruby/object:Gem::Version
124
- version: '0.52'
123
+ version: '6.2'
125
124
  - !ruby/object:Gem::Dependency
126
- name: rubocop-shopify
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: activesupport
125
+ name: webmock
141
126
  requirement: !ruby/object:Gem::Requirement
142
127
  requirements:
143
- - - ">="
128
+ - - "~>"
144
129
  - !ruby/object:Gem::Version
145
- version: '0'
130
+ version: '3.8'
146
131
  type: :development
147
132
  prerelease: false
148
133
  version_requirements: !ruby/object:Gem::Requirement
149
134
  requirements:
150
- - - ">="
135
+ - - "~>"
151
136
  - !ruby/object:Gem::Version
152
- version: '0'
137
+ version: '3.8'
153
138
  description: Authenticate with GitHub
154
139
  email:
155
140
  - frederik.dudzik@shopify.com
@@ -161,7 +146,8 @@ files:
161
146
  - ".github/workflows/tests.yml"
162
147
  - ".gitignore"
163
148
  - ".rubocop.yml"
164
- - ".travis.yml"
149
+ - ".ruby-version"
150
+ - CHANGELOG.md
165
151
  - Gemfile
166
152
  - Gemfile.lock
167
153
  - LICENSE.txt
@@ -177,6 +163,7 @@ files:
177
163
  - lib/github-authentication.rb
178
164
  - lib/github_authentication.rb
179
165
  - lib/github_authentication/cache.rb
166
+ - lib/github_authentication/environment.rb
180
167
  - lib/github_authentication/generator.rb
181
168
  - lib/github_authentication/generator/app.rb
182
169
  - lib/github_authentication/generator/personal.rb
@@ -194,7 +181,6 @@ metadata:
194
181
  homepage_uri: https://github.com/Shopify/github-authentication
195
182
  source_code_uri: https://github.com/Shopify/github-authentication
196
183
  allowed_push_host: https://rubygems.org
197
- post_install_message:
198
184
  rdoc_options: []
199
185
  require_paths:
200
186
  - lib
@@ -202,15 +188,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
188
  requirements:
203
189
  - - ">="
204
190
  - !ruby/object:Gem::Version
205
- version: '0'
191
+ version: 2.7.0
206
192
  required_rubygems_version: !ruby/object:Gem::Requirement
207
193
  requirements:
208
194
  - - ">="
209
195
  - !ruby/object:Gem::Version
210
196
  version: '0'
211
197
  requirements: []
212
- rubygems_version: 3.2.20
213
- signing_key:
198
+ rubygems_version: 3.7.1
214
199
  specification_version: 4
215
200
  summary: GitHub Authetication
216
201
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6.3
7
- before_install: gem install bundler -v 1.17.2