dip 7.1.4 → 7.2.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 +4 -4
- data/README.md +3 -1
- data/lib/dip/commands/compose.rb +13 -1
- data/lib/dip/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 737530a0e1bcc0319fdd15a9f5a1cd21f5d5fe5283ed6e6811b322797608bbff
|
|
4
|
+
data.tar.gz: 246fd6ef9d149b08cbe260ca9d22247824029af5c018b525460c68cffdf8c104
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54cf7a9194457a328326b4d43cef583c3baedfd880f3679fd2e6c2699b728b48f5017f238a957ab9c799145e790146695f15c5e4abd4ae0a1860ff58e177ead6
|
|
7
|
+
data.tar.gz: 69295132d41712bda09979dea08e504eae8d55805639c940545586bc8f4544e1963d36472cddc2e933758ecefa8783c468b8dcc6c3737ef4a82e7c2a6b313013
|
data/README.md
CHANGED
|
@@ -47,7 +47,7 @@ When we change the current directory, all shell aliases will be automatically re
|
|
|
47
47
|
|
|
48
48
|
Also, in shell mode Dip is trying to determine manually passed environment variables. For example:
|
|
49
49
|
|
|
50
|
-
```
|
|
50
|
+
```sh
|
|
51
51
|
VERSION=20180515103400 rails db:migrate:down
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -201,6 +201,8 @@ returned is `/app/sub-project-dir`.
|
|
|
201
201
|
|
|
202
202
|
Run commands defined within the `interaction` section of dip.yml
|
|
203
203
|
|
|
204
|
+
By default, a command will be executed using [`docker compose`](https://docs.docker.com/compose/install/) command. If you are still using `docker-compose` binary (i.e., prior to Compose V2 changes), a command would be run through it. You can disable using of Compose V2 by passing an environment variable `DIP_COMPOSE_V2=false dip run`.
|
|
205
|
+
|
|
204
206
|
```sh
|
|
205
207
|
dip run rails c
|
|
206
208
|
dip run rake db:migrate
|
data/lib/dip/commands/compose.rb
CHANGED
|
@@ -23,7 +23,11 @@ module Dip
|
|
|
23
23
|
|
|
24
24
|
compose_argv = Array(find_files) + Array(cli_options) + argv
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
if compose_v2?
|
|
27
|
+
exec_program("docker", compose_argv.unshift("compose"), shell: shell)
|
|
28
|
+
else
|
|
29
|
+
exec_program("docker-compose", compose_argv, shell: shell)
|
|
30
|
+
end
|
|
27
31
|
end
|
|
28
32
|
|
|
29
33
|
private
|
|
@@ -68,6 +72,14 @@ module Dip
|
|
|
68
72
|
ip.empty? ? DOCKER_EMBEDDED_DNS : ip
|
|
69
73
|
end
|
|
70
74
|
end
|
|
75
|
+
|
|
76
|
+
def compose_v2?
|
|
77
|
+
if %w[false no 0].include?(Dip.env["DIP_COMPOSE_V2"]) || Dip.test?
|
|
78
|
+
return false
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
!!exec_subprocess("docker", "compose version", panic: false, out: File::NULL, err: File::NULL)
|
|
82
|
+
end
|
|
71
83
|
end
|
|
72
84
|
end
|
|
73
85
|
end
|
data/lib/dip/version.rb
CHANGED
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.
|
|
4
|
+
version: 7.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- bibendi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|