dip 7.1.4 → 7.2.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: cadfc19302e46c5c7894019537957a5ce90cc2bc1cae559c2222579772a7fc83
4
- data.tar.gz: c987a956bc57d96aefc0259fd15f633f19838883ee21d6d95367145e200fcb4a
3
+ metadata.gz: 737530a0e1bcc0319fdd15a9f5a1cd21f5d5fe5283ed6e6811b322797608bbff
4
+ data.tar.gz: 246fd6ef9d149b08cbe260ca9d22247824029af5c018b525460c68cffdf8c104
5
5
  SHA512:
6
- metadata.gz: 2a5589248901774f7edef3c793861f92c6923e896b2fd39ca566b91684bc79ef9d942a4f8ebf1d1d360e624bff5f2d20eb0ea39d833e9e9f1d0d4ac12b32de7e
7
- data.tar.gz: c3c296f2a86720b6fec17f9f824aabfdd611c6dbe0626294e6d6a055fc16f48335c0a04ef699a1190c4a21dc773eaa1b6f16faef152e1b9c55a3826d19346507
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
- ```shhttps://ya-webdesign.com/images250_/vertical-divider-png-1.pnghttps://ya-webdesign.com/images250_/vertical-divider-png-1.png
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
@@ -23,7 +23,11 @@ module Dip
23
23
 
24
24
  compose_argv = Array(find_files) + Array(cli_options) + argv
25
25
 
26
- exec_program("docker-compose", compose_argv, shell: shell)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dip
4
- VERSION = "7.1.4"
4
+ VERSION = "7.2.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.1.4
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-07-16 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor