firespring_dev_commands 2.0.0.pre.alpha.1 → 2.0.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:
|
4
|
-
data.tar.gz: '
|
3
|
+
metadata.gz: 52fab6ead6110ad2641d13003b16757be66c3928545d8185c4db3eed806d2443
|
4
|
+
data.tar.gz: '0892d45189fef73d8b20364d696bbd853c635096848e04c8ade75e46f6ba8d2b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8e557565fd8478b0a8d55d3415290871c00201aed6030bbc95ccccddc36d399b47ec58933a8cc915e350ebf3fcfaa7c7066551509bd17705d33aa36b4dd1fb9
|
7
|
+
data.tar.gz: a3449ac14b161ff2dc385f1b68ab0a6362a8bfab21b4c964b2a04db90740b5c866f22b3fda1e4b8e3f1ce9b89711f1c5e759405dcd411851a9a31de42fc549ad
|
@@ -8,9 +8,8 @@ module Dev
|
|
8
8
|
# Class containing methods for interfacing with the docker compose cli
|
9
9
|
class Compose
|
10
10
|
# Config object for setting top level docker compose config options
|
11
|
-
Config = Struct.new(:
|
11
|
+
Config = Struct.new(:project_dir, :project_name, :compose_files, :min_version, :max_version) do
|
12
12
|
def initialize
|
13
|
-
self.executable_name = EXECUTABLE_NAME
|
14
13
|
self.project_dir = DEV_COMMANDS_ROOT_DIR
|
15
14
|
self.project_name = DEV_COMMANDS_PROJECT_NAME
|
16
15
|
self.compose_files = ["#{DEV_COMMANDS_ROOT_DIR}/docker-compose.yml"]
|
@@ -70,12 +69,12 @@ module Dev
|
|
70
69
|
# Checks the min and max version against the current docker version if they have been configured
|
71
70
|
def check_version
|
72
71
|
min_version = self.class.config.min_version
|
73
|
-
|
74
|
-
|
72
|
+
raise "requires #{EXECUTABLE_NAME} version >= #{min_version} (found #{self.class.version})" if min_version &&
|
73
|
+
!Dev::Common.new.version_greater_than(min_version, self.class.version)
|
75
74
|
|
76
75
|
max_version = self.class.config.max_version
|
77
|
-
|
78
|
-
|
76
|
+
raise "requires #{EXECUTABLE_NAME} version < #{max_version} (found #{self.class.version})" if max_version &&
|
77
|
+
Dev::Common.new.version_greater_than(max_version, self.class.version)
|
79
78
|
end
|
80
79
|
|
81
80
|
# Pull in supported env settings and call build
|
@@ -84,7 +83,6 @@ module Dev
|
|
84
83
|
def build
|
85
84
|
merge_options('--parallel')
|
86
85
|
merge_env_pull_option
|
87
|
-
merge_env_push_option
|
88
86
|
merge_env_cache_option
|
89
87
|
execute_command(build_command('build'))
|
90
88
|
end
|
@@ -183,13 +181,6 @@ module Dev
|
|
183
181
|
merge_options('--pull') if ENV['PULL'].to_s.strip == 'true'
|
184
182
|
end
|
185
183
|
|
186
|
-
# Merge --push option if PUSH is set to true and no existing push options are present
|
187
|
-
private def merge_env_push_option
|
188
|
-
return if @options.any? { |it| it.include?('push') }
|
189
|
-
|
190
|
-
merge_options('--push') if ENV['PUSH'].to_s.strip == 'true'
|
191
|
-
end
|
192
|
-
|
193
184
|
# Merge --no-build option unless BUILD is set to true and no existing build options are present
|
194
185
|
private def merge_env_build_option
|
195
186
|
return if @options.any? { |it| it.include?('build') }
|
@@ -239,7 +230,7 @@ module Dev
|
|
239
230
|
|
240
231
|
# Build the compose command with the given inputs
|
241
232
|
private def build_command(action, *cmd)
|
242
|
-
command =
|
233
|
+
command = [EXECUTABLE_NAME]
|
243
234
|
command << '--project-directory' << project_dir
|
244
235
|
command << '-p' << project_name if project_name
|
245
236
|
Array(compose_files).compact.each { |file| command << '-f' << file }
|
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: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -313,9 +313,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
313
313
|
version: '3.2'
|
314
314
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
315
315
|
requirements:
|
316
|
-
- - "
|
316
|
+
- - ">="
|
317
317
|
- !ruby/object:Gem::Version
|
318
|
-
version:
|
318
|
+
version: '0'
|
319
319
|
requirements: []
|
320
320
|
rubygems_version: 3.4.10
|
321
321
|
signing_key:
|