k8s-ruby2 0.10.7 → 0.10.8

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: c657b6c5a37c01a554c29ccb03e76f2803c1218b5ad44d59f965eb4e32d5ea9b
4
- data.tar.gz: df67da198b054b4c97f1126d0dacf73caa8cd17065b04cfddc724ad2cef97bce
3
+ metadata.gz: 81cc0649baf215e8752b780d291c665e8ba3459d81ce833753f02acfb7d7433d
4
+ data.tar.gz: '055386dc40656b18b56b8183a5a3349a8acdbe736bdd333e4ec68676c421b800'
5
5
  SHA512:
6
- metadata.gz: 1cd6ee55dd7d37e95b3eeab210b1deb279ab07ba4957bcf6b99571f411f6d86ea2757482ee2d6535e50ff31a71222a0bb411a8c3179d554cf15b28fa334c8043
7
- data.tar.gz: a7ce6d7298f056260db08de4f6682d680f91b6f3b9ec6b804e4df305acfaeb5d66a92bca93db391096df832233ed213fd53a185926fb71e51848f9f06796e872
6
+ metadata.gz: 77c3b7fd5108604d254aba24f67c84277a9025627c1a5fe7afd4d4f8ee77e3abe3a0be343f2e83d2e9a1a76854295bef8f1b8fe72b2b6fa7a10290326e7c9f0a
7
+ data.tar.gz: a506f96d9ec9c60776da5f5a87a3a74b7aa17357a7511a0b9585aff2589f52ec5679539eaac2b1f3f0a575aa7fc57e7eb84c99f14022128c2b264f52010dc20e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- k8s-ruby2 (0.10.7)
4
+ k8s-ruby2 (0.10.8)
5
5
  dry-struct (~> 1.4.0)
6
6
  dry-types (~> 1.5.0)
7
7
  excon (~> 0.78)
@@ -3,6 +3,6 @@
3
3
  module K8s
4
4
  class Ruby
5
5
  # Updated on releases using semver.
6
- VERSION = "0.10.7"
6
+ VERSION = "0.10.8"
7
7
  end
8
8
  end
data/lib/k8s/transport.rb CHANGED
@@ -73,9 +73,9 @@ module K8s
73
73
  logger.debug "Using config with .user.token=..."
74
74
 
75
75
  options[:auth_token] = token
76
- elsif config.user.auth_provider && auth_provider = config.user.auth_provider.config
76
+ elsif config.user.auth_provider && auth_provider_config = config.user.auth_provider.config
77
77
  logger.debug "Using config with .user.auth-provider.name=#{config.user.auth_provider.name}"
78
- options[:auth_token] = token_from_auth_provider(auth_provider)
78
+ options[:auth_token] = token_from_auth_provider_config(auth_provider_config)
79
79
  elsif exec_conf = config.user.exec
80
80
  logger.debug "Using config with .user.exec.command=#{exec_conf.command}"
81
81
  options[:auth_token] = token_from_exec(exec_conf)
@@ -93,10 +93,10 @@ module K8s
93
93
 
94
94
  # @param auth_provider [K8s::Config::UserAuthProvider]
95
95
  # @return [String]
96
- def self.token_from_auth_provider(auth_provider)
97
- auth_data = `#{auth_provider.config['cmd-path']} #{auth_provider.config['cmd-args']}`.strip
98
- if auth_provider.config['token-key']
99
- json_path = JsonPath.new(auth_provider.config['token-key'][1...-1])
96
+ def self.token_from_auth_provider_config(auth_provider_config)
97
+ auth_data = `#{auth_provider_config['cmd-path']} #{auth_provider_config['cmd-args']}`.strip
98
+ if auth_provider_config['token-key']
99
+ json_path = JsonPath.new(auth_provider_config['token-key'][1...-1])
100
100
  json_path.first(auth_data)
101
101
  else
102
102
  auth_data
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k8s-ruby2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.7
4
+ version: 0.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - rdx.net