dip 7.1.1 → 7.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -5
- data/lib/dip/commands/compose.rb +14 -2
- data/lib/dip/commands/run.rb +5 -1
- data/lib/dip/version.rb +1 -1
- metadata +4 -4
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
|
@@ -298,8 +300,6 @@ Runs Nginx server container based on [bibendi/nginx-proxy](https://github.com/bi
|
|
298
300
|
foo-project/docker-compose.yml
|
299
301
|
|
300
302
|
```yml
|
301
|
-
version: '2'
|
302
|
-
|
303
303
|
services:
|
304
304
|
foo-web:
|
305
305
|
image: company/foo_image
|
@@ -320,8 +320,6 @@ networks:
|
|
320
320
|
baz-project/docker-compose.yml
|
321
321
|
|
322
322
|
```yml
|
323
|
-
version: '2'
|
324
|
-
|
325
323
|
services:
|
326
324
|
baz-web:
|
327
325
|
image: company/baz_image
|
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
|
@@ -39,7 +43,7 @@ module Dip
|
|
39
43
|
next unless file_path.exist?
|
40
44
|
|
41
45
|
memo << "--file"
|
42
|
-
memo << file_path.to_s
|
46
|
+
memo << Shellwords.escape(file_path.to_s)
|
43
47
|
end
|
44
48
|
end
|
45
49
|
end
|
@@ -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/commands/run.rb
CHANGED
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
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '0.20'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '0.20'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|