dip 7.3.1 → 7.4.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: 60d7a15f7de7909f0e61a3e3f9ca8112cf2a94cf21bccfb813be9a209f83e2db
4
- data.tar.gz: d9dd72eff516119adb097147dd566ae1688fed731153617e81d16ed8eb9c54a1
3
+ metadata.gz: 42554510aef42c0faa6c2d1ccec6be58c8997bbd1708d2a9e7008363dcc0916a
4
+ data.tar.gz: c2cc4e38f8f42fed73be2f88e0b66331521176d80c04bf789dccdf1de63e4d64
5
5
  SHA512:
6
- metadata.gz: 5e7d3fb075dea8f3be052cbcc8bde8083fd9c967dbce8ab852aefc5ba21bc885f787794dbaf81b68bf5a5e282d7272b6a4495ab567df305e70845e1b5dd14d00
7
- data.tar.gz: 07e3051d76cd9a7af8a51422024c6865feb2b2c7cf59f1865a1d162a133d513565c9a4214cfa8441291694ba85a9e8562bb98a95cd392839d5d69a7a90f70982
6
+ metadata.gz: c9bb9b9e632a899c9cb4433a8aeece65e3f5ebd9705c80fabea87f2197b5013a95dbaa522127cdf42f875c546e897f00b5068a3d421023b2d5f9a1d54f933a51
7
+ data.tar.gz: 5eee73a6bcfc1bbda1526fb04b3143dc2784be36b6b98a2b0855a376a0799113b7d79e17f48c02dd2504b577237662284f044c5cbed39e99d0a2d1fc2973720e
data/README.md CHANGED
@@ -30,6 +30,8 @@ Dip can be injected into the current shell (ZSH or Bash).
30
30
  eval "$(dip console)"
31
31
  ```
32
32
 
33
+ **IMPORTANT**: Beware of possible collisions with local tools. One particular example is supporting both local and Docker frontend build tools, such as Yarn. If you want some developer to run `yarn` locally and other to use Docker for that, you should either avoid adding the `yarn` command to the `dip.yml` or avoid using the shell integration for hybrid development.
34
+
33
35
  After that we can type commands without `dip` prefix. For example:
34
36
 
35
37
  ```sh
data/lib/dip/cli.rb CHANGED
@@ -69,8 +69,17 @@ module Dip
69
69
  end
70
70
 
71
71
  desc "down [OPTIONS]", "Run `docker-compose down` command"
72
+ method_option :help, aliases: "-h", type: :boolean, desc: "Display usage information"
73
+ method_option :all, aliases: "-A", type: :boolean, desc: "Shutdown all running docker-compose projects"
72
74
  def down(*argv)
73
- compose("down", *argv)
75
+ if options[:help]
76
+ invoke :help, ["down"]
77
+ elsif options[:all]
78
+ require_relative "commands/down_all"
79
+ Dip::Commands::DownAll.new.execute
80
+ else
81
+ compose("down", *argv)
82
+ end
74
83
  end
75
84
 
76
85
  desc "run [OPTIONS] CMD [ARGS]", "Run configured command in a docker-compose service. `run` prefix may be omitted"
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../command"
4
+
5
+ module Dip
6
+ module Commands
7
+ class DownAll < Dip::Command
8
+ def execute
9
+ exec_subprocess(
10
+ "docker rm --volumes $(docker stop $(docker ps --filter 'label=com.docker.compose.project' -q))"
11
+ )
12
+ end
13
+ end
14
+ end
15
+ end
data/lib/dip/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dip
4
- VERSION = "7.3.1"
4
+ VERSION = "7.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dip
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.1
4
+ version: 7.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bibendi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-07 00:00:00.000000000 Z
11
+ date: 2022-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -179,6 +179,7 @@ files:
179
179
  - lib/dip/commands/compose.rb
180
180
  - lib/dip/commands/console.rb
181
181
  - lib/dip/commands/dns.rb
182
+ - lib/dip/commands/down_all.rb
182
183
  - lib/dip/commands/list.rb
183
184
  - lib/dip/commands/nginx.rb
184
185
  - lib/dip/commands/provision.rb