firespring_dev_commands 1.5.0.pre.alpha.2 → 1.5.0.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: c00aad2781f73b860860758fa26f0976413ec9917c472a702e4dc93caeffe725
4
- data.tar.gz: bad9dce8ab37b9e3a71ba479f05fd23405c0ab91abad53ef1f57f2b5f7daf073
3
+ metadata.gz: 5ea24bf7d2abac993a227d9812a7d6a0de93a215f23850c81dae81d3d1a22d5d
4
+ data.tar.gz: '091a5b77894268283e1c08ce383fb3fdaea162980652241b6ec95edc53fca924'
5
5
  SHA512:
6
- metadata.gz: 1818bc0df7bc48e264a95b4a091e0b02776ae9e5fb3f56a06b6e2d39d0bf6aa9ca3275a9af6aba06bd62a139c999951a18fd9859a41601910d6bc986680be4bc
7
- data.tar.gz: 3259dd964ab887e049166cba3552e3cdc87f9b9e67170acc48363daf3f1495543fd691dbd5be51c63d3cbe44c15ecebbc784f5f4df826fcec452bbbb06caedc8
6
+ metadata.gz: 6599b07b498c352f6c0dfea440e326dc73ae6d3d3ae2a106b81ce2afcf3e4a0c3dd37dfb1700de538d7cb4542311af3c61d9f0aa83c1be019a3e71fbe8df8af9
7
+ data.tar.gz: 4eeb80a2ecb84cb1912777766344361c1bfd58211de216dbb76106a85b98d68d218b6e68626fbbbbc43d1cf962880f543c928473a06855c61f7d7c6b39fe2dfb
@@ -31,7 +31,7 @@ module Dev
31
31
  # Temporary credentials are written back to the credentials file
32
32
  def authorize!(account)
33
33
  # Make sure the account has been set up
34
- cfgini = setup_cfgini
34
+ cfgini = setup_cfgini(account)
35
35
 
36
36
  defaultini = cfgini['default']
37
37
  profileini = cfgini["profile #{account}"]
@@ -39,7 +39,7 @@ module Dev
39
39
  region = profileini['region'] || defaultini['region'] || Dev::Aws::DEFAULT_REGION
40
40
 
41
41
  serial = profileini['mfa_serial_name'] || defaultini['mfa_serial_name']
42
- serial = "arn:aws:iam::#{Dev::Aws::Account.new.roo.id}:mfa/#{serial}" if serial
42
+ serial = "arn:aws:iam::#{Dev::Aws::Account.new.root.id}:mfa/#{serial}" if serial
43
43
  serial ||= profileini['mfa_serial'] || defaultini['mfa_serial']
44
44
 
45
45
  role = profileini['role_name'] || defaultini['role_name']
@@ -71,7 +71,7 @@ module Dev
71
71
 
72
72
  # Returns the config ini file
73
73
  # Runs the setup for our current account if it's not already setup
74
- def setup_cfgini
74
+ def setup_cfgini(account)
75
75
  cfgini = IniFile.new(filename: "#{Dev::Aws::CONFIG_DIR}/config", default: 'default')
76
76
  unless cfgini.has_section?("profile #{account}")
77
77
  Dev::Aws::Account.new.write!(account)
@@ -70,8 +70,11 @@ module Dev
70
70
  end
71
71
 
72
72
  # Prunes/removes all unused volumes
73
+ # Specify ALL_VOLUMES=false in your environment to only clean anonymous volumes (docker version 23.x+)
73
74
  def prune_volumes
74
- _prune('volumes')
75
+ opts = {}
76
+ opts[:filters] = {all: ['true']}.to_json if Dev::Common.new.version_greater_than('22.9999.0', self.class.version) && ENV['ALL_VOLUMES'].to_s.strip != 'false'
77
+ _prune('volumes', opts: opts)
75
78
  end
76
79
 
77
80
  # Prunes/removes all unused images
@@ -80,8 +83,8 @@ module Dev
80
83
  end
81
84
 
82
85
  # Private method which actually calls the prune endpoint on the docker api connection
83
- private def _prune(type)
84
- response = ::Docker.connection.post("/#{type.downcase}/prune", {})
86
+ private def _prune(type, opts: {})
87
+ response = ::Docker.connection.post("/#{type.downcase}/prune", opts)
85
88
  format_prune(type, response)
86
89
  rescue ::Docker::Error::ServerError => e
87
90
  # Specifically check for 'prune already running' error and retry if found
@@ -137,7 +137,7 @@ module Dev
137
137
  DEV_COMMANDS_TOP_LEVEL.instance_eval do
138
138
  namespace application do
139
139
  namespace :php do
140
- desc 'Install all npm packages'
140
+ desc 'Install all composer packages'
141
141
  task install: %w(init_docker up_no_deps) do
142
142
  Dev::Docker::Compose.new(services: application).exec(*php.install_command)
143
143
  end
@@ -93,7 +93,7 @@ module Dev
93
93
  DEV_COMMANDS_TOP_LEVEL.instance_eval do
94
94
  namespace application do
95
95
  namespace :ruby do
96
- desc 'Install all npm packages'
96
+ desc 'Install all bundled gems'
97
97
  task install: %w(init_docker up_no_deps) do
98
98
  Dev::Docker::Compose.new(services: application).exec(*ruby.install_command)
99
99
  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.5.0.pre.alpha.2'.freeze
9
+ VERSION = '1.5.0.pre.alpha.4'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firespring_dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.pre.alpha.2
4
+ version: 1.5.0.pre.alpha.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-15 00:00:00.000000000 Z
11
+ date: 2023-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport