stack_car 0.19.0 → 0.21.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: 90e88a55ea7a8c0d22d9dbe7a1cd65b090a8c45f14a60608d82e152c993637dd
4
- data.tar.gz: d6b2c2278fdc79e14f01c62db89af4a2c393b6a05d1248d4ca7bc04053df6f5e
3
+ metadata.gz: 152620b7925e4962a2d8e90c5e3e7ad23c473156bd2f842b0d2694218000ecbb
4
+ data.tar.gz: 15b7aac27f24df13ad749f0776b8c47a8405442ed0a8ffa6dcc20f7fb6f91e57
5
5
  SHA512:
6
- metadata.gz: 7ee954fc6d2646fb4e5056de6397785fc78f87c55529c1b86af5c5d88daaa1af73cf5cfdbc7c7db5e4eaddc34d0a889d875e0ab00381c6aebc05ac64fc88a481
7
- data.tar.gz: fd8d7f014fcd1deef882dd9deeefa4886f091ff5ddcad96e7f48a1ee1a06cd296b201bb05b5e419cd6497e4d11082c27396ea6dd11c87047794340c5dfd4ff26
6
+ metadata.gz: 7a2e35436014e3a8a6c292deb70789b0d19731473f24f48f83fa2989e2477c839ccd33b5d57ed68719ca7c372b56031e9144f9c1bdbc2ae8f2a2d0e348aef36a
7
+ data.tar.gz: fb1e62c1114c0a26d1ce54356b5b095c486ebd039d073f4072bda8cadd0cb08b57721e932c9b2d490444a3cfc25d780dfaa397ca05d4dd0b6d52c8ac74455aff
data/lib/stack_car/cli.rb CHANGED
@@ -25,13 +25,14 @@ module StackCar
25
25
 
26
26
  method_option :service, default: 'web', type: :string, aliases: '-s'
27
27
  method_option :build, default: false, type: :boolean, aliases: '-b'
28
+ method_option :detach, default: false, type: :boolean, aliases: '-d'
28
29
  method_option :logs, default: true, type: :boolean
29
30
  desc "up", "starts docker compose with rebuild, defaults to web"
30
31
  def up
31
32
  setup
32
- ensure_development_env
33
33
  args = []
34
34
  args << '--build' if options[:build]
35
+ args << '--detach' if options[:detach]
35
36
  if options[:build]
36
37
  run("#{dotenv} docker compose pull #{options[:service]}")
37
38
  end
@@ -43,7 +44,6 @@ module StackCar
43
44
  desc "stop", "stops the specified running service, defaults to all"
44
45
  def stop
45
46
  setup
46
- ensure_development_env
47
47
  run("#{dotenv} docker compose stop #{options[:service]}")
48
48
  run_with_exit("rm -rf tmp/pids/*")
49
49
  end
@@ -57,7 +57,6 @@ module StackCar
57
57
  desc 'down', 'stops and removes containers and networks specific to this project by default, run with -h for more options'
58
58
  def down
59
59
  setup
60
- ensure_development_env
61
60
 
62
61
  if options[:help]
63
62
  run('docker compose down --help')
@@ -99,7 +98,6 @@ module StackCar
99
98
  desc "build", "builds specified service, defaults to web"
100
99
  def build
101
100
  setup
102
- ensure_development_env
103
101
  run_with_exit("#{dotenv} docker compose build #{options[:service]}")
104
102
  end
105
103
 
@@ -125,6 +123,13 @@ module StackCar
125
123
  end
126
124
  map status: :ps
127
125
 
126
+ method_option :service, default: 'web', type: :string, aliases: '-s'
127
+ desc "config", "outputs the docker compose config"
128
+ def config
129
+ setup
130
+ run_with_exit("#{dotenv} docker compose config #{args.join(' ')} #{options[:service]}")
131
+ end
132
+
128
133
  method_option :service, default: 'web', type: :string, aliases: '-s'
129
134
  desc "bundle ARGS", "wraps docker compose run web unless --service is used to specify"
130
135
  def bundle(*args)
@@ -418,7 +423,11 @@ module StackCar
418
423
  Dir.chdir('stack_car')
419
424
  self.destination_root += "/stack_car"
420
425
  end
426
+ ensure_development_env
427
+
421
428
  DotRc.new
429
+ ENV['APP_NAME'] ||= File.basename(ENV['PWD']).gsub('_', '-')
430
+ ENV['BASE_TAG'] ||= %x{cd hyrax-webapp && git rev-parse --short=8 HEAD} if File.exists?('hyrax-webapp')
422
431
  end
423
432
 
424
433
  def remove_container(service_name, remove_volumes)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StackCar
4
- VERSION = '0.19.0'
4
+ VERSION = '0.21.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_car
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Kaufman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-31 00:00:00.000000000 Z
11
+ date: 2025-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler