firespring_dev_commands 1.4.3.pre.alpha.3 → 1.4.3.pre.alpha.4

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: 764aab3927a5dc24b6474ba35af2e54f7b97dfa93ac54ae8187989ff954cfbbe
4
- data.tar.gz: 33c04cd996134dcb26fa12358b5ec3ab436dcaa07f5db69f0f96d8b13fb1c5e4
3
+ metadata.gz: b5a2a68e769de13d686aaeddfd1b056908c24bd0fad7d0f3062b2c1d82596682
4
+ data.tar.gz: affdf4ccd12f20844b85299d9aa83f103c8e899dfede6756d391667f9c09416d
5
5
  SHA512:
6
- metadata.gz: 572c3b804cf02d5d7e4a62060a4a779b67843a14047a36f207b3e1198868326eb1379b3cc44ee0160c714ef8bbdfaf14e3c76ccf58e75cf88784415df4595ea5
7
- data.tar.gz: f91c0898808c71729efe61cb841eec2901824f7793d49a50fe42bee80b2accb42b415baf20659e52e95850b4a9fae6355c5f82b70f02a7fa4e19dcd12d28ba5f
6
+ metadata.gz: b545465c7312f6264ddcb7b9216491d533dfe40fae93d9eb0ffa0b7e7fbf6517084a802e0f18ef18e23e67c6ad1e7802dafa0e099a2560e43d6b3398225f8849
7
+ data.tar.gz: e7e74cf01825dc67a40548a193a98e1c9bb1c0db09ec21a3c75d82d3631817da0bd95cb97bd2f84cda8af606401ab66565e0d62bbb9fb1c8863bba1223f81e22
@@ -3,6 +3,7 @@ module Dev
3
3
  # Class containing useful methods for interacting with the Aws account
4
4
  class Account
5
5
  # Config object for setting top level Aws account config options
6
+ # TODO: registry is deprecated and should be removed on the next major release
6
7
  Config = Struct.new(:root, :children, :default, :registry, :ecr_registry_ids, :login_to_account_ecr_registry)
7
8
 
8
9
  # Instantiates a new top level config object if one hasn't already been created
@@ -22,6 +23,7 @@ module Dev
22
23
  # The name of the file containing the Aws settings
23
24
  CONFIG_FILE = "#{Dev::Aws::CONFIG_DIR}/config".freeze
24
25
 
26
+ # TODO: registry is deprecated and should be removed on the next major release
25
27
  attr_accessor :root, :children, :default, :registry, :ecr_registry_ids
26
28
 
27
29
  # Instantiate an account object
@@ -37,10 +39,11 @@ module Dev
37
39
  @default = self.class.config.default
38
40
 
39
41
  # Create the ecr registry list based off several possible configuration values
40
- @ecr_registry_ids = Array(self.class.config.ecr_registry_ids)
41
- @ecr_registry_ids << self.class.config.registry
42
+ @ecr_registry_ids = [self.class.config.registry]
42
43
  @ecr_registry_ids << Dev::Aws::Profile.new.current if self.class.config.login_to_account_ecr_registry
44
+ @ecr_registry_ids.concat(Array(self.class.config.ecr_registry_ids))
43
45
  @ecr_registry_ids = @ecr_registry_ids.flatten.compact.reject(&:empty?).uniq
46
+ @registry = @ecr_registry_ids.first
44
47
  end
45
48
 
46
49
  # Returns all configured account information objects
@@ -77,7 +77,7 @@ module Dev
77
77
 
78
78
  # Authroizes the docker cli to pull/push images from the Aws container registry (e.g. if docker compose needs to pull an image)
79
79
  # Authroizes the docker ruby library to pull/push images from the Aws container registry
80
- def registry_login!(registry_id: Dev::Aws::Account.new.ecr_registry_ids.last, region: Dev::Aws::DEFAULT_REGION)
80
+ def registry_login!(registry_id: Dev::Aws::Account.new.ecr_registry_ids.first, region: Dev::Aws::DEFAULT_REGION)
81
81
  raise 'registry_id is required' if registry_id.to_s.strip.empty?
82
82
  raise 'region is required' if region.to_s.strip.empty?
83
83
 
@@ -92,7 +92,7 @@ module Dev
92
92
  # Authroizes the docker cli to pull/push images from the Aws container registry
93
93
  # (e.g. if docker compose needs to pull an image)
94
94
  # @deprecated Please use {Dev::Aws::Login#registry_login!} instead
95
- def docker_login!(registry_id: Dev::Aws::Account.new.ecr_registry_ids.last, region: Dev::Aws::DEFAULT_REGION)
95
+ def docker_login!(registry_id: Dev::Aws::Account.new.ecr_registry_ids.first, region: Dev::Aws::DEFAULT_REGION)
96
96
  warn '[DEPRECATION] `Dev::Aws::Login#docker_login!` is deprecated. Please use `Dev::Aws::Login#registry_login!` instead.'
97
97
  docker_cli_login!(registry: "#{registry_id}.dkr.ecr.#{region}.amazonaws.com", region: region)
98
98
  puts
@@ -110,7 +110,7 @@ module Dev
110
110
 
111
111
  # Authroizes the docker ruby library to pull/push images from the Aws container registry
112
112
  # @deprecated Please use {Dev::Aws::Login#registry_login!} instead
113
- def ecr_login!(registry_id: Dev::Aws::Account.new.ecr_registry_ids.last, region: Dev::Aws::DEFAULT_REGION)
113
+ def ecr_login!(registry_id: Dev::Aws::Account.new.ecr_registry_ids.first, region: Dev::Aws::DEFAULT_REGION)
114
114
  warn '[DEPRECATION] `Dev::Aws::Login#ecr_login!` is deprecated. Please use `Dev::Aws::Login#registry_login!` instead.'
115
115
  docker_lib_login!(registry_id: registry_id, region: region)
116
116
  end
@@ -6,6 +6,6 @@ module Dev
6
6
  # Use 'v.v.v.pre.alpha.v' for pre-release vesions
7
7
  # Use 'v.v.v.beta.v for beta versions
8
8
  # Use semantic versioning for any releases (https://semver.org/)
9
- VERSION = '1.4.3.pre.alpha.3'.freeze
9
+ VERSION = '1.4.3.pre.alpha.4'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firespring_dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3.pre.alpha.3
4
+ version: 1.4.3.pre.alpha.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring