Skip to content

Commit

Permalink
style: fix rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
d-lebed committed Mar 18, 2022
1 parent 9eb5faf commit 3aa8b9f
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions lib/dip/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def down(*argv)

desc "run [OPTIONS] CMD [ARGS]", "Run configured command in a docker-compose service. `run` prefix may be omitted"
method_option :publish, aliases: "-p", type: :string, repeatable: true,
desc: "Publish a container's port(s) to the host"
desc: "Publish a container's port(s) to the host"
method_option :help, aliases: "-h", type: :boolean, desc: "Display usage information"
def run(*argv)
if argv.empty? || options[:help]
Expand All @@ -88,7 +88,7 @@ def run(*argv)

desc "provision", "Execute commands within provision section"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def provision
if options[:help]
invoke :help, ["provision"]
Expand Down
4 changes: 2 additions & 2 deletions lib/dip/cli/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CLI
class Console < Base
desc "start", "Integrate Dip into current shell"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def start
if options[:help]
invoke :help, ["start"]
Expand All @@ -22,7 +22,7 @@ def start

desc "inject", "Inject aliases"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def inject
if options[:help]
invoke :help, ["inject"]
Expand Down
26 changes: 13 additions & 13 deletions lib/dip/cli/dns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ class CLI
class DNS < Base
desc "up", "Run dnsdock container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
method_option :name, aliases: "-n", type: :string, default: "dnsdock",
desc: "Container name"
desc: "Container name"
method_option :socket, aliases: "-s", type: :string, default: "/var/run/docker.sock",
desc: "Path to docker socket"
desc: "Path to docker socket"
method_option :net, aliases: "-t", type: :string, default: "frontend",
desc: "Container network name"
desc: "Container network name"
method_option :publish, aliases: "-p", type: :string, default: "53/udp",
desc: "Container port"
desc: "Container port"
method_option :image, aliases: "-i", type: :string, default: "aacebedo/dnsdock:latest-amd64",
desc: "Docker image name"
desc: "Docker image name"
method_option :domain, aliases: "-d", type: :string, default: "docker",
desc: "Top level domain"
desc: "Top level domain"
def up
if options[:help]
invoke :help, ["up"]
Expand All @@ -40,9 +40,9 @@ def up

desc "down", "Stop dnsdock container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
method_option :name, aliases: "-n", type: :string, default: "dnsdock",
desc: "Container name"
desc: "Container name"
def down
if options[:help]
invoke :help, ["down"]
Expand All @@ -55,7 +55,7 @@ def down

desc "restart", "Stop and start dnsdock container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def restart(*args)
if options[:help]
invoke :help, ["restart"]
Expand All @@ -68,11 +68,11 @@ def restart(*args)

desc "ip", "Get ip address of dnsdock container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
method_option :name, aliases: "-n", type: :string, default: "dnsdock",
desc: "Container name"
desc: "Container name"
method_option :net, aliases: "-t", type: :string, default: "frontend",
desc: "Container network name"
desc: "Container network name"
def ip
if options[:help]
invoke :help, ["status"]
Expand Down
20 changes: 10 additions & 10 deletions lib/dip/cli/nginx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ class CLI
class Nginx < Base
desc "up", "Run nginx container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
method_option :name, aliases: "-n", type: :string, default: "nginx",
desc: "Container name"
desc: "Container name"
method_option :socket, aliases: "-s", type: :string, default: "/var/run/docker.sock",
desc: "Path to docker socket"
desc: "Path to docker socket"
method_option :net, aliases: "-t", type: :string, default: "frontend",
desc: "Container network name"
desc: "Container network name"
method_option :publish, aliases: "-p", type: :array, default: ["80:80"],
desc: "Container port(s). For more than one port, separate them by a space"
desc: "Container port(s). For more than one port, separate them by a space"
method_option :image, aliases: "-i", type: :string, default: "bibendi/nginx-proxy:latest",
desc: "Docker image name"
desc: "Docker image name"
method_option :domain, aliases: "-d", type: :string, default: "docker",
desc: "Top level domain"
desc: "Top level domain"
method_option :certs, aliases: "-c", type: :string, desc: "Path to ssl certificates"
def up
if options[:help]
Expand All @@ -42,9 +42,9 @@ def up

desc "down", "Stop nginx container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
method_option :name, aliases: "-n", type: :string, default: "nginx",
desc: "Container name"
desc: "Container name"
def down
if options[:help]
invoke :help, ["down"]
Expand All @@ -57,7 +57,7 @@ def down

desc "restart", "Stop and start nginx container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def restart(*args)
if options[:help]
invoke :help, ["restart"]
Expand Down
18 changes: 9 additions & 9 deletions lib/dip/cli/ssh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ class CLI
class SSH < Base
desc "up", "Run ssh-agent container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
method_option :key, aliases: "-k", type: :string, default: "$HOME/.ssh/id_rsa",
desc: "Path to ssh key"
desc: "Path to ssh key"
method_option :volume, aliases: "-v", type: :string, default: "$HOME",
desc: "Mounted docker volume"
desc: "Mounted docker volume"
method_option :interactive, aliases: "-t", type: :boolean, default: true,
desc: "Run in interactive mode"
desc: "Run in interactive mode"
method_option :user, aliases: "-u", type: :string,
desc: "UID for ssh-agent container"
desc: "UID for ssh-agent container"
# Backward compatibility
method_option :nonteractive, aliases: "-T", type: :boolean,
desc: "Run in noninteractive mode"
desc: "Run in noninteractive mode"
def up
if options[:help]
invoke :help, ["up"]
Expand All @@ -38,7 +38,7 @@ def up

desc "down", "Stop ssh-agent container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def down
if options[:help]
invoke :help, ["down"]
Expand All @@ -49,7 +49,7 @@ def down

desc "restart", "Stop and start ssh-agent container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def restart(*args)
if options[:help]
invoke :help, ["restart"]
Expand All @@ -62,7 +62,7 @@ def restart(*args)

desc "status", "Show status of ssh-agent container"
method_option :help, aliases: "-h", type: :boolean,
desc: "Display usage information"
desc: "Display usage information"
def status
if options[:help]
invoke :help, ["status"]
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/dip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe Dip do
it "has a version number" do
expect(Dip::VERSION).not_to be nil
expect(Dip::VERSION).not_to be_nil
end

describe ".config" do
Expand Down

0 comments on commit 3aa8b9f

Please sign in to comment.