Skip to content

Commit

Permalink
Merge pull request #1047 from mwaggett/maint/master/fix-cachedir
Browse files Browse the repository at this point in the history
Revert "Move deploy options into subcommands that actually support them" + Revert "Add R10K::CLI spec tests"
  • Loading branch information
adrienthebo authored Apr 24, 2020
2 parents 758564a + b879367 commit 71a7ae7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 424 deletions.
32 changes: 12 additions & 20 deletions lib/r10k/cli/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ def self.command
(https://puppet.com/docs/puppet/latest/environments_about.html).
DESCRIPTION

required nil, :cachedir, 'Specify a cachedir, overriding the value in config'
flag nil, :'no-force', 'Prevent the overwriting of local module modifications'
flag nil, :'generate-types', 'Run `puppet generate types` after updating an environment'
option nil, :'puppet-path', 'Path to puppet executable', argument: :required do |value, cmd|
unless File.executable? value
$stderr.puts "The specified puppet executable #{value} is not executable."
puts cmd.help
exit 1
end
end

run do |opts, args, cmd|
puts cmd.help(:verbose => opts[:verbose])
exit 0
Expand Down Expand Up @@ -49,18 +60,8 @@ def self.command
scheduled. On subsequent deployments, Puppetfile deployment will default to off.
DESCRIPTION

required nil, :cachedir, 'Specify a cachedir, overriding the value in config'
required nil, :'default-branch-override', 'Specify a branchname to override the default branch in the puppetfile'
flag nil, :'generate-types', 'Run `puppet generate types` after updating an environment'
flag nil, :'no-force', 'Prevent the overwriting of local module modifications'
option nil, :'puppet-path', 'Path to puppet executable', argument: :required do |value, cmd|
unless File.executable? value
$stderr.puts "The specified puppet executable #{value} is not executable."
puts cmd.help
exit 1
end
end
flag :p, :puppetfile, 'Deploy modules from a puppetfile'
required nil, :'default-branch-override', 'Specify a branchname to override the default branch in the puppetfile'

runner R10K::Action::CriRunner.wrap(R10K::Action::Deploy::Environment)
end
Expand All @@ -81,15 +82,6 @@ def self.command
DESCRIPTION

required :e, :environment, 'Update the modules in the given environment'
flag nil, :'generate-types', 'Run `puppet generate types` after updating an environment'
flag nil, :'no-force', 'Prevent the overwriting of local module modifications'
option nil, :'puppet-path', 'Path to puppet executable', argument: :required do |value, cmd|
unless File.executable? value
$stderr.puts "The specified puppet executable #{value} is not executable."
puts cmd.help
exit 1
end
end

runner R10K::Action::CriRunner.wrap(R10K::Action::Deploy::Module)
end
Expand Down
27 changes: 0 additions & 27 deletions spec/shared-contexts/cli.rb

This file was deleted.

182 changes: 0 additions & 182 deletions spec/shared-examples/cli.rb

This file was deleted.

1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

Dir.glob(File.expand_path('spec/shared-examples/**/*.rb', PROJECT_ROOT)).each { |file| require file }

require 'shared-contexts/cli'
require 'shared-contexts/git-fixtures'
require 'matchers/exit_with'
require 'matchers/match_realpath'
Expand Down
Loading

0 comments on commit 71a7ae7

Please sign in to comment.