wslc-wip 0.17.7 → 0.18.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: 3f6c715d39600201d79b4181892f546555b4ccb48fb6046815c2dd27d2e4d203
4
- data.tar.gz: 4aab099d2fa77a875c8037fb865739d9858d59abda28ae4d3bda83d85b2ac7aa
3
+ metadata.gz: 44cc7065b814848fed40e76cd95c640a7722a3b56834c76be1382f99fc8881bf
4
+ data.tar.gz: fc400d2a47818ec0a70d0bc5afba7b13afe93bbfbc54728c1446b844351873c9
5
5
  SHA512:
6
- metadata.gz: 75beec87e7d2b2d4b9a2e71f72a0d126d4e407840a3c9d4fc06a63af80d5fe7d0b4ae68cfbaaf85b9fe749356f9f455953118110cc2c955db5bb152c9eed5dab
7
- data.tar.gz: 3ac4feb3c65bef872f8b86027ecff32f9f3891a6f3c630b481167e87fb18e7b17a1fed631a23731a9445275e37feb521cb2a0ecf98adf82d7e0a7df9f515536d
6
+ metadata.gz: bf14d601c1e35a60deb8d242b072d76f87fdd40e14381e9f890d2f0f6235daf43eddab7692fce1e90d1dc199892b3b935f2452d3d101cffc39b8767798115275
7
+ data.tar.gz: 2a995ceea7b96839811d2de3f99619174bc215b78303b2061ca9c95995d62e992949fbfd1cf39e03e9ea3314a2f036a9149dcd0c78ebdfa3939b8bc17e86a6d1
data/README.md CHANGED
@@ -372,6 +372,7 @@ valid compose.yml over sections it doesn't need to look at:
372
372
  | `wip config` | Print the effective configuration (secrets masked) |
373
373
  | `wip build [--no-cache] [-- OPTIONS]` | Build the image from the `build` definition. `wslc build` reuses matching local layers by default; `--no-cache` disables that. |
374
374
  | `wip up [-d] [--no-sync] [--no-cache]` | Start the primary `dependencies:` entry (`container:` names which one) and its sidecars (creating any that are missing, on `network:` if set). `-d` runs the main container in the background; with `sync:` configured, the source is mirrored into the volume first unless `--no-sync` |
375
+ | `wip stop` | Stop the primary container and its sidecar `dependencies:` without removing them |
375
376
  | `wip down` | Stop and remove the primary container and its sidecar `dependencies:` |
376
377
  | `wip exec [--no-interactive] COMMAND...` | Run a command in the existing container |
377
378
  | `wip run [--no-interactive] COMMAND...` | Run a command in a new `--rm` container (mode: compose `exec`s into `compose.service` instead — see "Compose mode" above) |
data/lib/wip/cli.rb CHANGED
@@ -119,14 +119,22 @@ module Wip
119
119
  warn "\nwip: sync stopped"
120
120
  end
121
121
 
122
+ desc 'stop', 'Stop the configured container and its dependencies without removing them'
123
+ def stop
124
+ return execute(compose_bridge.stop, exit_on_failure: false) if load_config.compose?
125
+
126
+ execute(builder.stop, exit_on_failure: false)
127
+ sidecar_names.each do |name|
128
+ execute(builder.dependency_stop(name), exit_on_failure: false)
129
+ end
130
+ end
131
+
122
132
  desc 'down', 'Stop and remove the configured container and its dependencies'
123
133
  def down
124
134
  return execute(compose_bridge.down, exit_on_failure: false) if load_config.compose?
125
135
 
126
- execute(builder.down, exit_on_failure: false)
127
136
  execute(builder.remove, exit_on_failure: false)
128
137
  sidecar_names.each do |name|
129
- execute(builder.dependency_down(name), exit_on_failure: false)
130
138
  execute(builder.dependency_remove(name), exit_on_failure: false)
131
139
  end
132
140
  end
@@ -84,10 +84,6 @@ module Wip
84
84
  [@wslc, 'exec', required_container, *required_sync.mirror_command]
85
85
  end
86
86
 
87
- def down
88
- [@wslc, 'stop', required_container]
89
- end
90
-
91
87
  # Only reachable under mode: compose-native — mode: compose delegates `wip logs`
92
88
  # to the external compose command's own `logs` (ComposeBridge#logs) instead.
93
89
  # Single container only, mirroring `wslc`/docker's own `logs`: there's no
@@ -98,6 +94,10 @@ module Wip
98
94
  command.push(name.to_s)
99
95
  end
100
96
 
97
+ def stop
98
+ [@wslc, 'stop', required_container]
99
+ end
100
+
101
101
  def remove
102
102
  [@wslc, 'remove', '-f', required_container]
103
103
  end
@@ -128,7 +128,7 @@ module Wip
128
128
  [@wslc, 'list', '--all', '--filter', "name=#{name}", '--format', 'json']
129
129
  end
130
130
 
131
- def dependency_down(name)
131
+ def dependency_stop(name)
132
132
  [@wslc, 'stop', name.to_s]
133
133
  end
134
134
 
@@ -45,6 +45,8 @@ module Wip
45
45
  command
46
46
  end
47
47
 
48
+ def stop = base.push('stop')
49
+
48
50
  def down = base.push('down')
49
51
 
50
52
  def exec(service, arguments, interactive: true)
data/lib/wip/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wip
4
- VERSION = '0.17.7'
4
+ VERSION = '0.18.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wslc-wip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.7
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wip contributors