dip 6.1.0 → 7.1.2

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: 33e5ab547c594c58ea29e95555ac2d055480456f8427c1673db014a4d75388df
4
- data.tar.gz: 2304c89be09d4ad6a348f3fe66492bcee50292b430df54d12902346cbb005aab
3
+ metadata.gz: 010da1a5c2791726c3797c9fa44085447852418fc28a5094875f62ed341f340c
4
+ data.tar.gz: 91d1b18a57ecdaaddcd3546dc25aebe63e6894e717371e073bac80dc582f9f04
5
5
  SHA512:
6
- metadata.gz: 58a00ed2d495ec460579afde5a6e1a7df48983d7979512985e2606b606ab8731aa3b281c1d0a3387534f147a3cd957a9d5884f69a7997fd72c402155e2c7c7c3
7
- data.tar.gz: 34aa9e6d7739a39633431d8756446bc49be63ab9329b2afeaf6e6133745f1b84614d926ad5a13e50330bb7f6425604764d6cf51eae23cb0bf6f8643bc8d3e80c
6
+ metadata.gz: d8a7bc54c7040a2c679392ffc4cedbafe34ee9a311e469c2a7a55743ca31c3aa2b10bbc3643d60f6852ea601ef61a8960669ceab3014bfbaf3671bc42fbe7733
7
+ data.tar.gz: 140c5edce7128128891b2bde78c72d39f5bfcd4aba8994930a75c212fec300de0cd92afd068e53e380d5d365653383dae9dc4abdb4c1420e16847e7befb89a74
data/README.md CHANGED
@@ -19,6 +19,8 @@ A command-line utility that gives the "native" interaction with applications con
19
19
  - Dockerized Ruby on Rails applications: [one](https://github.com/lewagon/rails-k8s-demo), [two](https://github.com/bibendi/dip-example-rails), [three](https://github.com/evilmartians/evil_chat)
20
20
  - Dockerized Node.js application: [one](https://github.com/bibendi/twinkle.js), [two](https://github.com/bibendi/yt-graphql-react-event-booking-api)
21
21
  - [Dockerized Ruby gem](https://github.com/bibendi/schked)
22
+ - [Dockerizing Ruby and Rails development](https://evilmartians.com/chronicles/ruby-on-whales-docker-for-ruby-rails-development)
23
+ - [Reusable development containers with Docker Compose and Dip](https://evilmartians.com/chronicles/reusable-development-containers-with-docker-compose-and-dip)
22
24
 
23
25
  [![asciicast](https://asciinema.org/a/210236.svg)](https://asciinema.org/a/210236)
24
26
 
@@ -36,6 +38,7 @@ After that we can type commands without `dip` prefix. For example:
36
38
  <run-command> *any-args
37
39
  compose *any-compose-arg
38
40
  up <service>
41
+ build
39
42
  down
40
43
  provision
41
44
  ```
@@ -53,41 +56,11 @@ After that, it will be automatically applied when you open your preferred termin
53
56
 
54
57
  ## Installation
55
58
 
56
- You have many ways.
57
-
58
- ### Homebrew
59
-
60
-
61
- You can use [Homebrew](https://brew.sh) on macOS (or [Linux](https://docs.brew.sh/Homebrew-on-Linux)).
62
-
63
- Today Homebrew tap for DIP is located at https://github.com/bibendi/homebrew-dip
64
-
65
- ```sh
66
- brew tap bibendi/dip
67
- brew install dip
68
- ```
69
-
70
- ### Ruby Gem
71
-
72
59
  ```sh
73
60
  gem install dip
74
61
  ```
75
62
 
76
- ### Precompiled binary
77
-
78
- If you don't have installed Ruby, then you could copy a precompiled binary to your system.
79
- It can be found at [releases page](https://github.com/bibendi/dip/releases)
80
- or type bellow into your terminal:
81
-
82
- ```sh
83
- curl -L https://github.com/bibendi/dip/releases/download/v6.1.0/dip-`uname -s`-`uname -m` > /usr/local/bin/dip
84
- chmod +x /usr/local/bin/dip
85
- ```
86
-
87
- ## Docker installation
88
-
89
- - [Ubuntu](docs/docker-ubuntu-install.md)
90
- - [Mac OS](docs/docker-for-mac-install.md)
63
+ The compiled binary is no more provided since version 7, because of new version of [Ruby Packer](https://github.com/pmq20/ruby-packer) not released for a long time with recent Ruby version. Also there was a lot of work to prepare each release of Dip for MacOS version.
91
64
 
92
65
  ## Usage
93
66
 
@@ -108,7 +81,7 @@ Also, you can check out examples at the top.
108
81
 
109
82
  ```yml
110
83
  # Required minimum dip version
111
- version: '4.1'
84
+ version: '7.1'
112
85
 
113
86
  environment:
114
87
  COMPOSE_EXT: development
@@ -121,7 +94,7 @@ compose:
121
94
  project_name: bear
122
95
 
123
96
  interaction:
124
- bash:
97
+ shell:
125
98
  description: Open the Bash shell in app's container
126
99
  service: app
127
100
  command: bash
@@ -169,8 +142,19 @@ interaction:
169
142
  default_args: db_dev
170
143
  command: psql -h pg -U postgres
171
144
 
145
+ setup_key:
146
+ description: Copy key
147
+ service: app
148
+ command: cp `pwd`/config/key.pem /root/keys/
149
+ shell: false # you can disable shell interpolations on the host machine and send the command as is
150
+
151
+ clean_cache:
152
+ description: Delete cache files on the host machine
153
+ command: rm -rf $(pwd)/tmp/cache/*
154
+
172
155
  provision:
173
156
  - dip compose down --volumes
157
+ - dip clean_cache
174
158
  - dip compose up -d pg redis
175
159
  - dip bash -c ./bin/setup
176
160
  ```
data/exe/dip CHANGED
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- lib_path = File.expand_path('../lib', __dir__)
4
+ lib_path = File.expand_path("../lib", __dir__)
5
5
  $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
6
6
 
7
7
  begin
8
- require 'pry-byebug' if ENV["DIP_ENV"] == "debug"
8
+ require "pry-byebug" if ENV["DIP_ENV"] == "debug"
9
9
  rescue LoadError
10
10
  # do nothing
11
11
  end
12
12
 
13
- require 'dip'
14
- require 'dip/cli'
15
- require 'dip/run_vars'
13
+ require "dip"
14
+ require "dip/cli"
15
+ require "dip/run_vars"
16
16
 
17
- Signal.trap('INT') do
17
+ Signal.trap("INT") do
18
18
  warn("\n#{caller.join("\n")}: interrupted")
19
19
  exit(1)
20
20
  end
data/lib/dip.rb CHANGED
@@ -18,7 +18,7 @@ module Dip
18
18
  $PROGRAM_NAME.start_with?("./") ? File.expand_path($PROGRAM_NAME) : "dip"
19
19
  end
20
20
 
21
- %w(test debug).each do |key|
21
+ %w[test debug].each do |key|
22
22
  define_method("#{key}?") do
23
23
  ENV["DIP_ENV"] == key
24
24
  end
data/lib/dip/cli.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thor'
4
- require 'dip/run_vars'
3
+ require "thor"
4
+ require "dip/run_vars"
5
5
 
6
6
  module Dip
7
7
  class CLI < Thor
@@ -34,25 +34,30 @@ module Dip
34
34
 
35
35
  stop_on_unknown_option! :run
36
36
 
37
- desc 'version', 'dip version'
37
+ desc "version", "dip version"
38
38
  def version
39
- require_relative 'version'
39
+ require_relative "version"
40
40
  puts Dip::VERSION
41
41
  end
42
- map %w(--version -v) => :version
42
+ map %w[--version -v] => :version
43
43
 
44
- desc 'ls', 'List available run commands'
44
+ desc "ls", "List available run commands"
45
45
  def ls
46
- require_relative 'commands/list'
46
+ require_relative "commands/list"
47
47
  Dip::Commands::List.new.execute
48
48
  end
49
49
 
50
- desc 'compose CMD [OPTIONS]', 'Run docker-compose commands'
50
+ desc "compose CMD [OPTIONS]", "Run docker-compose commands"
51
51
  def compose(*argv)
52
- require_relative 'commands/compose'
52
+ require_relative "commands/compose"
53
53
  Dip::Commands::Compose.new(*argv).execute
54
54
  end
55
55
 
56
+ desc "build [OPTIONS] SERVICE", "Run `docker-compose build` command"
57
+ def build(*argv)
58
+ compose("build", *argv)
59
+ end
60
+
56
61
  desc "up [OPTIONS] SERVICE", "Run `docker-compose up` command"
57
62
  def up(*argv)
58
63
  compose("up", *argv)
@@ -63,50 +68,50 @@ module Dip
63
68
  compose("stop", *argv)
64
69
  end
65
70
 
66
- desc "down all services [OPTIONS]", "Run `docker-compose down` command"
71
+ desc "down [OPTIONS]", "Run `docker-compose down` command"
67
72
  def down(*argv)
68
73
  compose("down", *argv)
69
74
  end
70
75
 
71
- desc 'run [OPTIONS] CMD [ARGS]', 'Run configured command in a docker-compose service. `run` prefix may be omitted'
72
- method_option :publish, aliases: '-p', type: :string, repeatable: true,
76
+ desc "run [OPTIONS] CMD [ARGS]", "Run configured command in a docker-compose service. `run` prefix may be omitted"
77
+ method_option :publish, aliases: "-p", type: :string, repeatable: true,
73
78
  desc: "Publish a container's port(s) to the host"
74
- method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information'
79
+ method_option :help, aliases: "-h", type: :boolean, desc: "Display usage information"
75
80
  def run(*argv)
76
81
  if argv.empty? || options[:help]
77
- invoke :help, ['run']
82
+ invoke :help, ["run"]
78
83
  else
79
- require_relative 'commands/run'
84
+ require_relative "commands/run"
80
85
  Dip::Commands::Run.new(*argv, publish: options[:publish]).execute
81
86
  end
82
87
  end
83
88
 
84
89
  desc "provision", "Execute commands within provision section"
85
- method_option :help, aliases: '-h', type: :boolean,
86
- desc: 'Display usage information'
90
+ method_option :help, aliases: "-h", type: :boolean,
91
+ desc: "Display usage information"
87
92
  def provision
88
93
  if options[:help]
89
- invoke :help, ['provision']
94
+ invoke :help, ["provision"]
90
95
  else
91
- require_relative 'commands/provision'
96
+ require_relative "commands/provision"
92
97
  Dip::Commands::Provision.new.execute
93
98
  end
94
99
  end
95
100
 
96
- require_relative 'cli/ssh'
101
+ require_relative "cli/ssh"
97
102
  desc "ssh", "ssh-agent container commands"
98
103
  subcommand :ssh, Dip::CLI::SSH
99
104
 
100
- require_relative 'cli/dns'
105
+ require_relative "cli/dns"
101
106
  desc "dns", "DNS server for automatic docker container discovery"
102
107
  subcommand :dns, Dip::CLI::DNS
103
108
 
104
- require_relative 'cli/nginx'
109
+ require_relative "cli/nginx"
105
110
  desc "nginx", "Nginx reverse proxy server"
106
111
  subcommand :nginx, Dip::CLI::Nginx
107
112
 
108
- require_relative 'cli/console'
109
- desc "console", "Integrate Dip commands into shell (only ZSH and Bash is supported)"
113
+ require_relative "cli/console"
114
+ desc "console", "Integrate Dip commands into shell (only ZSH and Bash are supported)"
110
115
  subcommand :console, Dip::CLI::Console
111
116
  end
112
117
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thor'
3
+ require "thor"
4
4
  require_relative "./base"
5
5
  require_relative "../commands/console"
6
6
 
@@ -8,11 +8,11 @@ module Dip
8
8
  class CLI
9
9
  class Console < Base
10
10
  desc "start", "Integrate Dip into current shell"
11
- method_option :help, aliases: '-h', type: :boolean,
12
- desc: 'Display usage information'
11
+ method_option :help, aliases: "-h", type: :boolean,
12
+ desc: "Display usage information"
13
13
  def start
14
14
  if options[:help]
15
- invoke :help, ['start']
15
+ invoke :help, ["start"]
16
16
  else
17
17
  Dip::Commands::Console::Start.new.execute
18
18
  end
@@ -21,11 +21,11 @@ module Dip
21
21
  default_task :start
22
22
 
23
23
  desc "inject", "Inject aliases"
24
- method_option :help, aliases: '-h', type: :boolean,
25
- desc: 'Display usage information'
24
+ method_option :help, aliases: "-h", type: :boolean,
25
+ desc: "Display usage information"
26
26
  def inject
27
27
  if options[:help]
28
- invoke :help, ['inject']
28
+ invoke :help, ["inject"]
29
29
  else
30
30
  Dip::Commands::Console::Inject.new.execute
31
31
  end
data/lib/dip/cli/dns.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thor'
3
+ require "thor"
4
4
  require_relative "./base"
5
5
  require_relative "../commands/dns"
6
6
 
@@ -9,23 +9,23 @@ module Dip
9
9
  # See more https://github.com/aacebedo/dnsdock
10
10
  class DNS < Base
11
11
  desc "up", "Run dnsdock container"
12
- method_option :help, aliases: '-h', type: :boolean,
13
- desc: 'Display usage information'
14
- method_option :name, aliases: '-n', type: :string, default: "dnsdock",
15
- desc: 'Container name'
16
- method_option :socket, aliases: '-s', type: :string, default: "/var/run/docker.sock",
17
- desc: 'Path to docker socket'
18
- method_option :net, aliases: '-t', type: :string, default: "frontend",
19
- desc: 'Container network name'
20
- method_option :publish, aliases: '-p', type: :string, default: "53/udp",
21
- desc: 'Container port'
22
- method_option :image, aliases: '-i', type: :string, default: "aacebedo/dnsdock:latest-amd64",
23
- desc: 'Docker image name'
24
- method_option :domain, aliases: '-d', type: :string, default: "docker",
25
- desc: 'Top level domain'
12
+ method_option :help, aliases: "-h", type: :boolean,
13
+ desc: "Display usage information"
14
+ method_option :name, aliases: "-n", type: :string, default: "dnsdock",
15
+ desc: "Container name"
16
+ method_option :socket, aliases: "-s", type: :string, default: "/var/run/docker.sock",
17
+ desc: "Path to docker socket"
18
+ method_option :net, aliases: "-t", type: :string, default: "frontend",
19
+ desc: "Container network name"
20
+ method_option :publish, aliases: "-p", type: :string, default: "53/udp",
21
+ desc: "Container port"
22
+ method_option :image, aliases: "-i", type: :string, default: "aacebedo/dnsdock:latest-amd64",
23
+ desc: "Docker image name"
24
+ method_option :domain, aliases: "-d", type: :string, default: "docker",
25
+ desc: "Top level domain"
26
26
  def up
27
27
  if options[:help]
28
- invoke :help, ['up']
28
+ invoke :help, ["up"]
29
29
  else
30
30
  Dip::Commands::DNS::Up.new(
31
31
  name: options.fetch(:name),
@@ -39,13 +39,13 @@ module Dip
39
39
  end
40
40
 
41
41
  desc "down", "Stop dnsdock container"
42
- method_option :help, aliases: '-h', type: :boolean,
43
- desc: 'Display usage information'
44
- method_option :name, aliases: '-n', type: :string, default: "dnsdock",
45
- desc: 'Container name'
42
+ method_option :help, aliases: "-h", type: :boolean,
43
+ desc: "Display usage information"
44
+ method_option :name, aliases: "-n", type: :string, default: "dnsdock",
45
+ desc: "Container name"
46
46
  def down
47
47
  if options[:help]
48
- invoke :help, ['down']
48
+ invoke :help, ["down"]
49
49
  else
50
50
  Dip::Commands::DNS::Down.new(
51
51
  name: options.fetch(:name)
@@ -54,11 +54,11 @@ module Dip
54
54
  end
55
55
 
56
56
  desc "restart", "Stop and start dnsdock container"
57
- method_option :help, aliases: '-h', type: :boolean,
58
- desc: 'Display usage information'
57
+ method_option :help, aliases: "-h", type: :boolean,
58
+ desc: "Display usage information"
59
59
  def restart(*args)
60
60
  if options[:help]
61
- invoke :help, ['restart']
61
+ invoke :help, ["restart"]
62
62
  else
63
63
  Dip::CLI::DNS.start(["down"] + args)
64
64
  sleep 1
@@ -67,15 +67,15 @@ module Dip
67
67
  end
68
68
 
69
69
  desc "ip", "Get ip address of dnsdock container"
70
- method_option :help, aliases: '-h', type: :boolean,
71
- desc: 'Display usage information'
72
- method_option :name, aliases: '-n', type: :string, default: "dnsdock",
73
- desc: 'Container name'
74
- method_option :net, aliases: '-t', type: :string, default: "frontend",
75
- desc: 'Container network name'
70
+ method_option :help, aliases: "-h", type: :boolean,
71
+ desc: "Display usage information"
72
+ method_option :name, aliases: "-n", type: :string, default: "dnsdock",
73
+ desc: "Container name"
74
+ method_option :net, aliases: "-t", type: :string, default: "frontend",
75
+ desc: "Container network name"
76
76
  def ip
77
77
  if options[:help]
78
- invoke :help, ['status']
78
+ invoke :help, ["status"]
79
79
  else
80
80
  Dip::Commands::DNS::IP.new(
81
81
  name: options.fetch(:name),
data/lib/dip/cli/nginx.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thor'
3
+ require "thor"
4
4
  require_relative "./base"
5
5
  require_relative "../commands/nginx"
6
6
 
@@ -9,24 +9,24 @@ module Dip
9
9
  # See more https://github.com/bibendi/nginx-proxy
10
10
  class Nginx < Base
11
11
  desc "up", "Run nginx container"
12
- method_option :help, aliases: '-h', type: :boolean,
13
- desc: 'Display usage information'
14
- method_option :name, aliases: '-n', type: :string, default: "nginx",
15
- desc: 'Container name'
16
- method_option :socket, aliases: '-s', type: :string, default: "/var/run/docker.sock",
17
- desc: 'Path to docker socket'
18
- method_option :net, aliases: '-t', type: :string, default: "frontend",
19
- desc: 'Container network name'
20
- method_option :publish, aliases: '-p', type: :array, default: ["80:80"],
21
- desc: 'Container port(s). For more than one port, separate them by a space'
22
- method_option :image, aliases: '-i', type: :string, default: "bibendi/nginx-proxy:latest",
23
- desc: 'Docker image name'
24
- method_option :domain, aliases: '-d', type: :string, default: "docker",
25
- desc: 'Top level domain'
26
- method_option :certs, aliases: '-c', type: :string, desc: 'Path to ssl certificates'
12
+ method_option :help, aliases: "-h", type: :boolean,
13
+ desc: "Display usage information"
14
+ method_option :name, aliases: "-n", type: :string, default: "nginx",
15
+ desc: "Container name"
16
+ method_option :socket, aliases: "-s", type: :string, default: "/var/run/docker.sock",
17
+ desc: "Path to docker socket"
18
+ method_option :net, aliases: "-t", type: :string, default: "frontend",
19
+ desc: "Container network name"
20
+ method_option :publish, aliases: "-p", type: :array, default: ["80:80"],
21
+ desc: "Container port(s). For more than one port, separate them by a space"
22
+ method_option :image, aliases: "-i", type: :string, default: "bibendi/nginx-proxy:latest",
23
+ desc: "Docker image name"
24
+ method_option :domain, aliases: "-d", type: :string, default: "docker",
25
+ desc: "Top level domain"
26
+ method_option :certs, aliases: "-c", type: :string, desc: "Path to ssl certificates"
27
27
  def up
28
28
  if options[:help]
29
- invoke :help, ['up']
29
+ invoke :help, ["up"]
30
30
  else
31
31
  Dip::Commands::Nginx::Up.new(
32
32
  name: options.fetch(:name),
@@ -41,13 +41,13 @@ module Dip
41
41
  end
42
42
 
43
43
  desc "down", "Stop nginx container"
44
- method_option :help, aliases: '-h', type: :boolean,
45
- desc: 'Display usage information'
46
- method_option :name, aliases: '-n', type: :string, default: "nginx",
47
- desc: 'Container name'
44
+ method_option :help, aliases: "-h", type: :boolean,
45
+ desc: "Display usage information"
46
+ method_option :name, aliases: "-n", type: :string, default: "nginx",
47
+ desc: "Container name"
48
48
  def down
49
49
  if options[:help]
50
- invoke :help, ['down']
50
+ invoke :help, ["down"]
51
51
  else
52
52
  Dip::Commands::Nginx::Down.new(
53
53
  name: options.fetch(:name)
@@ -56,11 +56,11 @@ module Dip
56
56
  end
57
57
 
58
58
  desc "restart", "Stop and start nginx container"
59
- method_option :help, aliases: '-h', type: :boolean,
60
- desc: 'Display usage information'
59
+ method_option :help, aliases: "-h", type: :boolean,
60
+ desc: "Display usage information"
61
61
  def restart(*args)
62
62
  if options[:help]
63
- invoke :help, ['restart']
63
+ invoke :help, ["restart"]
64
64
  else
65
65
  Dip::CLI::Nginx.start(["down"] + args)
66
66
  sleep 1
data/lib/dip/cli/ssh.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thor'
3
+ require "thor"
4
4
  require_relative "./base"
5
5
  require_relative "../commands/ssh"
6
6
 
@@ -8,22 +8,22 @@ module Dip
8
8
  class CLI
9
9
  class SSH < Base
10
10
  desc "up", "Run ssh-agent container"
11
- method_option :help, aliases: '-h', type: :boolean,
12
- desc: 'Display usage information'
13
- method_option :key, aliases: '-k', type: :string, default: "$HOME/.ssh/id_rsa",
14
- desc: 'Path to ssh key'
15
- method_option :volume, aliases: '-v', type: :string, default: "$HOME",
16
- desc: 'Mounted docker volume'
17
- method_option :interactive, aliases: '-t', type: :boolean, default: true,
18
- desc: 'Run in interactive mode'
19
- method_option :user, aliases: '-u', type: :string,
20
- desc: 'UID for ssh-agent container'
11
+ method_option :help, aliases: "-h", type: :boolean,
12
+ desc: "Display usage information"
13
+ method_option :key, aliases: "-k", type: :string, default: "$HOME/.ssh/id_rsa",
14
+ desc: "Path to ssh key"
15
+ method_option :volume, aliases: "-v", type: :string, default: "$HOME",
16
+ desc: "Mounted docker volume"
17
+ method_option :interactive, aliases: "-t", type: :boolean, default: true,
18
+ desc: "Run in interactive mode"
19
+ method_option :user, aliases: "-u", type: :string,
20
+ desc: "UID for ssh-agent container"
21
21
  # Backward compatibility
22
- method_option :nonteractive, aliases: '-T', type: :boolean,
23
- desc: 'Run in noninteractive mode'
22
+ method_option :nonteractive, aliases: "-T", type: :boolean,
23
+ desc: "Run in noninteractive mode"
24
24
  def up
25
25
  if options[:help]
26
- invoke :help, ['up']
26
+ invoke :help, ["up"]
27
27
  else
28
28
  Dip::Commands::SSH::Up.new(
29
29
  key: options.fetch(:key),
@@ -37,22 +37,22 @@ module Dip
37
37
  map add: :up
38
38
 
39
39
  desc "down", "Stop ssh-agent container"
40
- method_option :help, aliases: '-h', type: :boolean,
41
- desc: 'Display usage information'
40
+ method_option :help, aliases: "-h", type: :boolean,
41
+ desc: "Display usage information"
42
42
  def down
43
43
  if options[:help]
44
- invoke :help, ['down']
44
+ invoke :help, ["down"]
45
45
  else
46
46
  Dip::Commands::SSH::Down.new.execute
47
47
  end
48
48
  end
49
49
 
50
50
  desc "restart", "Stop and start ssh-agent container"
51
- method_option :help, aliases: '-h', type: :boolean,
52
- desc: 'Display usage information'
51
+ method_option :help, aliases: "-h", type: :boolean,
52
+ desc: "Display usage information"
53
53
  def restart(*args)
54
54
  if options[:help]
55
- invoke :help, ['restart']
55
+ invoke :help, ["restart"]
56
56
  else
57
57
  Dip::CLI::SSH.start(["down"] + args)
58
58
  sleep 1
@@ -61,11 +61,11 @@ module Dip
61
61
  end
62
62
 
63
63
  desc "status", "Show status of ssh-agent container"
64
- method_option :help, aliases: '-h', type: :boolean,
65
- desc: 'Display usage information'
64
+ method_option :help, aliases: "-h", type: :boolean,
65
+ desc: "Display usage information"
66
66
  def status
67
67
  if options[:help]
68
- invoke :help, ['status']
68
+ invoke :help, ["status"]
69
69
  else
70
70
  Dip::Commands::SSH::Status.new.execute
71
71
  end
data/lib/dip/command.rb CHANGED
@@ -6,35 +6,46 @@ module Dip
6
6
  class Command
7
7
  extend Forwardable
8
8
 
9
- def_delegators self, :shell, :subshell
10
-
11
- class ExecRunner
12
- def self.call(cmd, argv, env: {}, **options)
13
- ::Process.exec(env, cmd, *argv, options)
9
+ def_delegators self, :exec_program, :exec_subprocess
10
+
11
+ class ProgramRunner
12
+ def self.call(cmdline, env: {}, **options)
13
+ if cmdline.is_a?(Array)
14
+ ::Kernel.exec(env, cmdline[0], *cmdline[1..-1], **options)
15
+ else
16
+ ::Kernel.exec(env, cmdline, **options)
17
+ end
14
18
  end
15
19
  end
16
20
 
17
- class SubshellRunner
18
- def self.call(cmd, argv, env: {}, panic: true, **options)
19
- return if ::Kernel.system(env, cmd, *argv, options)
20
- raise Dip::Error, "Command '#{([cmd] + argv).join(' ')}' executed with error." if panic
21
+ class SubprocessRunner
22
+ def self.call(cmdline, env: {}, panic: true, **options)
23
+ return if ::Kernel.system(env, cmdline, **options)
24
+ raise Dip::Error, "Command '#{cmdline}' executed with error." if panic
21
25
  end
22
26
  end
23
27
 
24
28
  class << self
25
- def shell(cmd, argv = [], subshell: false, **options)
29
+ def exec_program(*args, **kwargs)
30
+ run(ProgramRunner, *args, **kwargs)
31
+ end
32
+
33
+ def exec_subprocess(*args, **kwargs)
34
+ run(SubprocessRunner, *args, **kwargs)
35
+ end
36
+
37
+ private
38
+
39
+ def run(runner, cmd, argv = [], shell: true, **options)
26
40
  cmd = Dip.env.interpolate(cmd)
41
+ argv = [argv] if argv.is_a?(String)
27
42
  argv = argv.map { |arg| Dip.env.interpolate(arg) }
43
+ cmdline = [cmd, *argv].compact
44
+ cmdline = cmdline.join(" ").strip if shell
28
45
 
29
- puts [Dip.env.vars, cmd, argv].inspect if Dip.debug?
30
-
31
- runner = subshell ? SubshellRunner : ExecRunner
32
- runner.call(cmd, argv, env: Dip.env.vars, **options)
33
- end
46
+ puts [Dip.env.vars, cmdline].inspect if Dip.debug?
34
47
 
35
- def subshell(*args, **kwargs)
36
- kwargs[:subshell] = true
37
- shell(*args, **kwargs)
48
+ runner.call(cmdline, env: Dip.env.vars, **options)
38
49
  end
39
50
  end
40
51
  end
@@ -1,19 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'pathname'
3
+ require "pathname"
4
4
 
5
- require_relative '../command'
6
- require_relative 'dns'
5
+ require_relative "../command"
6
+ require_relative "dns"
7
7
 
8
8
  module Dip
9
9
  module Commands
10
10
  class Compose < Dip::Command
11
11
  DOCKER_EMBEDDED_DNS = "127.0.0.11"
12
12
 
13
- attr_reader :argv, :config
13
+ attr_reader :argv, :config, :shell
14
14
 
15
- def initialize(*argv)
15
+ def initialize(*argv, shell: true)
16
16
  @argv = argv
17
+ @shell = shell
17
18
  @config = ::Dip.config.compose || {}
18
19
  end
19
20
 
@@ -22,7 +23,7 @@ module Dip
22
23
 
23
24
  compose_argv = Array(find_files) + Array(cli_options) + argv
24
25
 
25
- shell("docker-compose", compose_argv)
26
+ exec_program("docker-compose", compose_argv, shell: shell)
26
27
  end
27
28
 
28
29
  private
@@ -49,7 +50,7 @@ module Dip
49
50
  next unless value.is_a?(String)
50
51
 
51
52
  value = ::Dip.env.interpolate(value)
52
- ["--#{name.to_s.gsub('_', '-')}", value]
53
+ ["--#{name.to_s.tr("_", "-")}", value]
53
54
  end.compact
54
55
  end
55
56
 
@@ -58,9 +59,9 @@ module Dip
58
59
  net = Dip.env["FRONTEND_NETWORK"] || "frontend"
59
60
 
60
61
  IO.pipe do |r, w|
61
- Dip::Commands::DNS::IP.
62
- new(name: name, net: net).
63
- execute(out: w, err: File::NULL, panic: false)
62
+ Dip::Commands::DNS::IP
63
+ .new(name: name, net: net)
64
+ .execute(out: w, err: File::NULL, panic: false)
64
65
 
65
66
  w.close_write
66
67
  ip = r.readlines[0].to_s.strip
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../command'
3
+ require_relative "../command"
4
4
 
5
5
  module Dip
6
6
  module Commands
@@ -13,9 +13,9 @@ module Dip
13
13
  private
14
14
 
15
15
  def script
16
- <<-SH.gsub(/^[ ]{12}/, '')
16
+ <<-SH.gsub(/^ {12}/, "")
17
17
  export DIP_SHELL=1
18
- export DIP_EARLY_ENVS=#{ENV.keys.join(',')}
18
+ export DIP_EARLY_ENVS=#{ENV.keys.join(",")}
19
19
  export DIP_PROMPT_TEXT="ⅆ"
20
20
 
21
21
  function dip_clear() {
@@ -88,7 +88,7 @@ module Dip
88
88
  def execute
89
89
  if Dip.config.exist?
90
90
  add_aliases(*Dip.config.interaction.keys) if Dip.config.interaction
91
- add_aliases("compose", "up", "stop", "down", "provision")
91
+ add_aliases("compose", "up", "stop", "down", "provision", "build")
92
92
  end
93
93
 
94
94
  clear_aliases
@@ -107,7 +107,7 @@ module Dip
107
107
 
108
108
  def clear_aliases
109
109
  out << "function dip_clear() { \n" \
110
- "#{aliases.any? ? aliases.map { |a| " unset -f #{a}" }.join("\n") : 'true'} " \
110
+ "#{aliases.any? ? aliases.map { |a| " unset -f #{a}" }.join("\n") : "true"} " \
111
111
  "\n}"
112
112
  end
113
113
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "shellwords"
4
- require_relative '../command'
4
+ require_relative "../command"
5
5
 
6
6
  module Dip
7
7
  module Commands
@@ -17,20 +17,20 @@ module Dip
17
17
  end
18
18
 
19
19
  def execute
20
- subshell("docker", "network create #{@net}".shellsplit, panic: false, err: File::NULL)
21
- subshell("docker", "run #{container_args} #{@image} --domain=#{@domain}".shellsplit)
20
+ exec_subprocess("docker", "network create #{@net}", panic: false, err: File::NULL)
21
+ exec_subprocess("docker", "run #{container_args} #{@image} --domain=#{@domain}")
22
22
  end
23
23
 
24
24
  private
25
25
 
26
26
  def container_args
27
- result = %w(--detach)
27
+ result = %w[--detach]
28
28
  result << "--volume #{@socket}:/var/run/docker.sock:ro"
29
29
  result << "--restart always"
30
30
  result << "--publish #{@publish}"
31
31
  result << "--net #{@net}"
32
32
  result << "--name #{@name}"
33
- result.join(' ')
33
+ result.join(" ")
34
34
  end
35
35
  end
36
36
 
@@ -40,8 +40,8 @@ module Dip
40
40
  end
41
41
 
42
42
  def execute
43
- subshell("docker", "stop #{@name}".shellsplit, panic: false, out: File::NULL, err: File::NULL)
44
- subshell("docker", "rm -v #{@name}".shellsplit, panic: false, out: File::NULL, err: File::NULL)
43
+ exec_subprocess("docker", "stop #{@name}", panic: false, out: File::NULL, err: File::NULL)
44
+ exec_subprocess("docker", "rm -v #{@name}", panic: false, out: File::NULL, err: File::NULL)
45
45
  end
46
46
  end
47
47
 
@@ -52,11 +52,11 @@ module Dip
52
52
  end
53
53
 
54
54
  def execute(**options)
55
- subshell("docker",
56
- "inspect " \
57
- "--format '{{ .NetworkSettings.Networks.#{@net}.IPAddress }}' " \
58
- "#{@name}".shellsplit,
59
- **options)
55
+ exec_subprocess(
56
+ "docker",
57
+ "inspect --format '{{ .NetworkSettings.Networks.#{@net}.IPAddress }}' #{@name}",
58
+ **options
59
+ )
60
60
  end
61
61
  end
62
62
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../command'
4
- require_relative '../interaction_tree'
3
+ require_relative "../command"
4
+ require_relative "../interaction_tree"
5
5
 
6
6
  module Dip
7
7
  module Commands
@@ -12,7 +12,7 @@ module Dip
12
12
  longest_name = tree.keys.map(&:size).max
13
13
 
14
14
  tree.each do |name, command|
15
- puts "#{name.ljust(longest_name)} ##{command[:description] ? ' ' + command[:description] : ''}"
15
+ puts "#{name.ljust(longest_name)} ##{command[:description] ? " #{command[:description]}" : ""}"
16
16
  end
17
17
  end
18
18
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "shellwords"
4
- require_relative '../command'
4
+ require_relative "../command"
5
5
 
6
6
  module Dip
7
7
  module Commands
@@ -18,22 +18,22 @@ module Dip
18
18
  end
19
19
 
20
20
  def execute
21
- subshell("docker", "network create #{@net}".shellsplit, panic: false, err: File::NULL)
22
- subshell("docker", "run #{container_args} #{@image}".shellsplit)
21
+ exec_subprocess("docker", "network create #{@net}", panic: false, err: File::NULL)
22
+ exec_subprocess("docker", "run #{container_args} #{@image}")
23
23
  end
24
24
 
25
25
  private
26
26
 
27
27
  def container_args
28
- result = %w(--detach)
28
+ result = %w[--detach]
29
29
  result << "--volume #{@socket}:/tmp/docker.sock:ro"
30
30
  result << "--volume #{@certs}:/etc/nginx/certs" unless @certs.to_s.empty?
31
31
  result << "--restart always"
32
- result << Array(@publish).map { |p| "--publish #{p}" }.join(' ')
32
+ result << Array(@publish).map { |p| "--publish #{p}" }.join(" ")
33
33
  result << "--net #{@net}"
34
34
  result << "--name #{@name}"
35
35
  result << "--label com.dnsdock.alias=#{@domain}"
36
- result.join(' ')
36
+ result.join(" ")
37
37
  end
38
38
  end
39
39
 
@@ -43,8 +43,8 @@ module Dip
43
43
  end
44
44
 
45
45
  def execute
46
- subshell("docker", "stop #{@name}".shellsplit, panic: false, out: File::NULL, err: File::NULL)
47
- subshell("docker", "rm -v #{@name}".shellsplit, panic: false, out: File::NULL, err: File::NULL)
46
+ exec_subprocess("docker", "stop #{@name}", panic: false, out: File::NULL, err: File::NULL)
47
+ exec_subprocess("docker", "rm -v #{@name}", panic: false, out: File::NULL, err: File::NULL)
48
48
  end
49
49
  end
50
50
  end
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../command'
3
+ require_relative "../command"
4
4
 
5
5
  module Dip
6
6
  module Commands
7
7
  class Provision < Dip::Command
8
8
  def execute
9
9
  Dip.config.provision.each do |command|
10
- subshell(command)
10
+ exec_subprocess(command)
11
11
  end
12
12
  end
13
13
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'shellwords'
4
- require_relative '../../../lib/dip/run_vars'
5
- require_relative '../command'
6
- require_relative '../interaction_tree'
7
- require_relative 'compose'
3
+ require "shellwords"
4
+ require_relative "../../../lib/dip/run_vars"
5
+ require_relative "../command"
6
+ require_relative "../interaction_tree"
7
+ require_relative "compose"
8
8
 
9
9
  module Dip
10
10
  module Commands
@@ -12,21 +12,25 @@ module Dip
12
12
  def initialize(cmd, *argv, publish: nil)
13
13
  @publish = publish
14
14
 
15
- @command, @argv = InteractionTree.
16
- new(Dip.config.interaction).
17
- find(cmd, *argv)&.
18
- values_at(:command, :argv)
15
+ @command, @argv = InteractionTree
16
+ .new(Dip.config.interaction)
17
+ .find(cmd, *argv)&.values_at(:command, :argv)
19
18
 
20
- raise Dip::Error, "Command `#{[cmd, *argv].join(' ')}` not recognized!" unless command
19
+ raise Dip::Error, "Command `#{[cmd, *argv].join(" ")}` not recognized!" unless command
21
20
 
22
21
  Dip.env.merge(command[:environment])
23
22
  end
24
23
 
25
24
  def execute
26
- Dip::Commands::Compose.new(
27
- command[:compose][:method],
28
- *compose_arguments
29
- ).execute
25
+ if command[:service].nil?
26
+ exec_program(command[:command], get_args, shell: command[:shell])
27
+ else
28
+ Dip::Commands::Compose.new(
29
+ command[:compose][:method],
30
+ *compose_arguments,
31
+ shell: command[:shell]
32
+ ).execute
33
+ end
30
34
  end
31
35
 
32
36
  private
@@ -44,11 +48,15 @@ module Dip
44
48
 
45
49
  compose_argv << command.fetch(:service)
46
50
 
47
- unless (cmd = command[:command].to_s).empty?
48
- compose_argv.concat(cmd.shellsplit)
51
+ unless (cmd = command[:command]).empty?
52
+ if command[:shell]
53
+ compose_argv << cmd
54
+ else
55
+ compose_argv.concat(cmd.shellsplit)
56
+ end
49
57
  end
50
58
 
51
- compose_argv.concat(argv.any? ? argv : command[:default_args])
59
+ compose_argv.concat(get_args)
52
60
 
53
61
  compose_argv
54
62
  end
@@ -57,7 +65,7 @@ module Dip
57
65
  run_vars = Dip::RunVars.env
58
66
  return [] unless run_vars
59
67
 
60
- run_vars.map { |k, v| ["-e", "#{k}=#{v}"] }.flatten
68
+ run_vars.map { |k, v| ["-e", "#{k}=#{Shellwords.escape(v)}"] }.flatten
61
69
  end
62
70
 
63
71
  def published_ports
@@ -67,6 +75,24 @@ module Dip
67
75
  []
68
76
  end
69
77
  end
78
+
79
+ def get_args
80
+ if argv.any?
81
+ if command[:shell]
82
+ [argv.shelljoin]
83
+ else
84
+ Array(default_args)
85
+ end
86
+ elsif !(default_args = command[:default_args]).empty?
87
+ if command[:shell]
88
+ default_args.shellsplit
89
+ else
90
+ Array(default_args)
91
+ end
92
+ else
93
+ []
94
+ end
95
+ end
70
96
  end
71
97
  end
72
98
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "shellwords"
4
- require_relative '../command'
4
+ require_relative "../command"
5
5
 
6
6
  module Dip
7
7
  module Commands
@@ -15,44 +15,44 @@ module Dip
15
15
  end
16
16
 
17
17
  def execute
18
- subshell("docker", "volume create --name ssh_data".shellsplit, out: File::NULL, err: File::NULL)
18
+ exec_subprocess("docker", "volume create --name ssh_data", out: File::NULL, err: File::NULL)
19
19
 
20
- subshell(
20
+ exec_subprocess(
21
21
  "docker",
22
- "run #{user_args} --detach --volume ssh_data:/ssh --name=ssh-agent whilp/ssh-agent".shellsplit
22
+ "run #{user_args}--detach --volume ssh_data:/ssh --name=ssh-agent whilp/ssh-agent"
23
23
  )
24
24
 
25
25
  key = Dip.env.interpolate(@key)
26
- subshell("docker", "run #{container_args} whilp/ssh-agent ssh-add #{key}".shellsplit)
26
+ exec_subprocess("docker", "run #{container_args} whilp/ssh-agent ssh-add #{key}")
27
27
  end
28
28
 
29
29
  private
30
30
 
31
31
  def user_args
32
- "-u #{@user}" if @user
32
+ "-u #{@user} " if @user
33
33
  end
34
34
 
35
35
  def container_args
36
- result = %w(--rm)
36
+ result = %w[--rm]
37
37
  volume = Dip.env.interpolate(@volume)
38
38
  result << "--volume ssh_data:/ssh"
39
39
  result << "--volume #{volume}:#{volume}"
40
40
  result << "--interactive --tty" if @interactive
41
- result.join(' ')
41
+ result.join(" ")
42
42
  end
43
43
  end
44
44
 
45
45
  class Down < Dip::Command
46
46
  def execute
47
- subshell("docker", "stop ssh-agent".shellsplit, panic: false, out: File::NULL, err: File::NULL)
48
- subshell("docker", "rm -v ssh-agent".shellsplit, panic: false, out: File::NULL, err: File::NULL)
49
- subshell("docker", "volume rm ssh_data".shellsplit, panic: false, out: File::NULL, err: File::NULL)
47
+ exec_subprocess("docker", "stop ssh-agent", panic: false, out: File::NULL, err: File::NULL)
48
+ exec_subprocess("docker", "rm -v ssh-agent", panic: false, out: File::NULL, err: File::NULL)
49
+ exec_subprocess("docker", "volume rm ssh_data", panic: false, out: File::NULL, err: File::NULL)
50
50
  end
51
51
  end
52
52
 
53
53
  class Status < Dip::Command
54
54
  def execute
55
- subshell("docker", "inspect --format '{{.State.Status}}' ssh-agent".shellsplit)
55
+ exec_subprocess("docker", "inspect --format '{{.State.Status}}' ssh-agent")
56
56
  end
57
57
  end
58
58
  end
data/lib/dip/config.rb CHANGED
@@ -29,10 +29,10 @@ module Dip
29
29
  @override = override
30
30
 
31
31
  @file_path = if ENV["DIP_FILE"]
32
- Pathname.new(prepared_name(ENV["DIP_FILE"]))
33
- else
34
- find(Pathname.new(work_dir))
35
- end
32
+ Pathname.new(prepared_name(ENV["DIP_FILE"]))
33
+ else
34
+ find(Pathname.new(work_dir))
35
+ end
36
36
  end
37
37
 
38
38
  def exist?
@@ -62,10 +62,19 @@ module Dip
62
62
  def load_yaml(file_path = path)
63
63
  return {} unless File.exist?(file_path)
64
64
 
65
- YAML.safe_load(
66
- ERB.new(File.read(file_path)).result,
67
- [], [], true
68
- )&.deep_symbolize_keys! || {}
65
+ data = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new("4.0.0")
66
+ YAML.safe_load(
67
+ ERB.new(File.read(file_path)).result,
68
+ aliases: true
69
+ )
70
+ else
71
+ YAML.safe_load(
72
+ ERB.new(File.read(file_path)).result,
73
+ [], [], true
74
+ )
75
+ end
76
+
77
+ data&.deep_symbolize_keys! || {}
69
78
  end
70
79
  end
71
80
 
@@ -119,7 +128,7 @@ module Dip
119
128
  end
120
129
 
121
130
  def config_missing_error(config_key)
122
- msg = 'config for %<key>s is not defined in %<path>s' % {key: config_key, path: finder.file_path}
131
+ msg = "config for %<key>s is not defined in %<path>s" % {key: config_key, path: finder.file_path}
123
132
  ConfigKeyMissingError.new(msg)
124
133
  end
125
134
  end
@@ -4,7 +4,7 @@ require "pathname"
4
4
 
5
5
  module Dip
6
6
  class Environment
7
- VAR_REGEX = /\$[\{]?(?<var_name>[a-zA-Z_][a-zA-Z0-9_]*)[\}]?/.freeze
7
+ VAR_REGEX = /\$\{?(?<var_name>[a-zA-Z_][a-zA-Z0-9_]*)\}?/.freeze
8
8
  SPECIAL_VARS = %i[os work_dir_rel_path].freeze
9
9
 
10
10
  attr_reader :vars
@@ -26,8 +26,8 @@ module Dip
26
26
  vars.fetch(name) { ENV[name] }
27
27
  end
28
28
 
29
- def fetch(name)
30
- vars.fetch(name) { ENV.fetch(name) { yield } }
29
+ def fetch(name, &block)
30
+ vars.fetch(name) { ENV.fetch(name, &block) }
31
31
  end
32
32
 
33
33
  def []=(key, value)
@@ -35,18 +35,18 @@ module Dip
35
35
  end
36
36
 
37
37
  def interpolate(value)
38
- value.gsub(VAR_REGEX) do
38
+ value.gsub(VAR_REGEX) do |match|
39
39
  var_name = Regexp.last_match[:var_name]
40
40
 
41
41
  if special_vars.key?(var_name)
42
42
  fetch(var_name) { send(special_vars[var_name]) }
43
43
  else
44
- self[var_name]
44
+ fetch(var_name) { match }
45
45
  end
46
46
  end
47
47
  end
48
48
 
49
- alias replace interpolate
49
+ alias_method :replace, :interpolate
50
50
 
51
51
  private
52
52
 
data/lib/dip/ext/hash.rb CHANGED
@@ -24,7 +24,7 @@ module ActiveSupportHashHelpers
24
24
  merge!(other_hash) do |key, this_val, other_val|
25
25
  if this_val.is_a?(Hash) && other_val.is_a?(Hash)
26
26
  this_val.deep_merge(other_val, &block)
27
- elsif block_given?
27
+ elsif block
28
28
  block.call(key, this_val, other_val)
29
29
  else
30
30
  other_val
@@ -58,9 +58,10 @@ module Dip
58
58
  def build_command(entry)
59
59
  {
60
60
  description: entry[:description],
61
- service: entry.fetch(:service),
62
- command: entry[:command],
63
- default_args: prepare_default_args(entry[:default_args]),
61
+ service: entry[:service],
62
+ command: entry[:command].to_s.strip,
63
+ shell: entry.fetch(:shell, true),
64
+ default_args: entry[:default_args].to_s.strip,
64
65
  environment: entry[:environment] || {},
65
66
  compose: {
66
67
  method: entry.dig(:compose, :method) || entry[:compose_method] || "run",
@@ -76,19 +77,6 @@ module Dip
76
77
  entry[:description] ||= nil
77
78
  end
78
79
 
79
- def prepare_default_args(args)
80
- return [] if args.nil?
81
-
82
- case args
83
- when Array
84
- args
85
- when String
86
- args.shellsplit
87
- else
88
- raise ArgumentError, "Unknown type for default_args: #{args.inspect}"
89
- end
90
- end
91
-
92
80
  def compose_run_options(value)
93
81
  return [] unless value
94
82
 
data/lib/dip/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dip
4
- VERSION = "6.1.0"
4
+ VERSION = "7.1.2"
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: 6.1.0
4
+ version: 7.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bibendi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-19 00:00:00.000000000 Z
11
+ date: 2021-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -87,19 +87,47 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: rubocop
90
+ name: standard
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.81'
95
+ version: '1.0'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0.81'
102
+ version: '1.0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: rubocop-rake
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.5'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '0.5'
117
+ - !ruby/object:Gem::Dependency
118
+ name: rubocop-rspec
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '2.2'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '2.2'
103
131
  - !ruby/object:Gem::Dependency
104
132
  name: simplecov
105
133
  requirement: !ruby/object:Gem::Requirement
@@ -168,7 +196,7 @@ licenses:
168
196
  - MIT
169
197
  metadata:
170
198
  allowed_push_host: https://rubygems.org/
171
- post_install_message:
199
+ post_install_message:
172
200
  rdoc_options: []
173
201
  require_paths:
174
202
  - lib
@@ -176,15 +204,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
204
  requirements:
177
205
  - - ">="
178
206
  - !ruby/object:Gem::Version
179
- version: '2.4'
207
+ version: '2.5'
180
208
  required_rubygems_version: !ruby/object:Gem::Requirement
181
209
  requirements:
182
210
  - - ">="
183
211
  - !ruby/object:Gem::Version
184
212
  version: '0'
185
213
  requirements: []
186
- rubygems_version: 3.0.8
187
- signing_key:
214
+ rubygems_version: 3.1.2
215
+ signing_key:
188
216
  specification_version: 4
189
217
  summary: Ruby gem CLI tool for better interacting docker-compose files.
190
218
  test_files: []