firespring_dev_commands 2.0.0.pre.alpha.1 → 2.0.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: 0b0b0b93719ba8c6b8ddb34f39777bf1f2e4ee5eb95e85c1a1eb0f45e78a9441
4
- data.tar.gz: '08d558e6e2b846d266b158ebf8b6b8eba3e620e3e2002ab77a7876dec65189ec'
3
+ metadata.gz: 52fab6ead6110ad2641d13003b16757be66c3928545d8185c4db3eed806d2443
4
+ data.tar.gz: '0892d45189fef73d8b20364d696bbd853c635096848e04c8ade75e46f6ba8d2b'
5
5
  SHA512:
6
- metadata.gz: 5065bf94f9f4f0492794b4b944a01c017f31eab27d659827fa82c1512bec2c91b9da331e3fa114a49ba9afab75bcce94375955a55d4f00d0066a6149b960beb5
7
- data.tar.gz: 3accee26e593d454a1c87f2cdcb865a723ab5cd12be8b3da1960b86fc5aa12eff6303f2fcc1f8f69e280e14487be132f2b2b27c879d33699ed92e193900a38e9
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(:executable_name, :project_dir, :project_name, :compose_files, :min_version, :max_version) do
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
- version_too_low = min_version && !Dev::Common.new.version_greater_than(min_version, self.class.version)
74
- raise "requires #{self.class.config.executable_name} version >= #{min_version} (found #{self.class.version})" if version_too_low
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
- version_too_high = max_version && Dev::Common.new.version_greater_than(max_version, self.class.version)
78
- raise "requires #{self.class.config.executable_name} version < #{max_version} (found #{self.class.version})" if version_too_high
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 = self.class.config.executable_name.split(/\s+/)
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 }
@@ -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 = '2.0.0.pre.alpha.1'.freeze
9
+ VERSION = '2.0.0'.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: 2.0.0.pre.alpha.1
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-05 00:00:00.000000000 Z
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: 1.3.1
318
+ version: '0'
319
319
  requirements: []
320
320
  rubygems_version: 3.4.10
321
321
  signing_key: