Skip to content

Commit

Permalink
Merge pull request #170 from boltops-tools/test-structure
Browse files Browse the repository at this point in the history
remove project --test-structure option in favor of terraspace new test --type project
  • Loading branch information
tongueroo authored Dec 25, 2021
2 parents fba3642 + 57dfd75 commit 256c16c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 0 additions & 6 deletions lib/terraspace/cli/new/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ def self.project_options
[:config, type: :boolean, default: true, desc: "Whether or not to generate config files."],
[:force, aliases: %w[y], type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files."],
[:quiet, type: :boolean, desc: "Quiet output."],
[:test_structure, type: :boolean, desc: "Create project bootstrap test structure."],
]
end

Expand Down Expand Up @@ -60,11 +59,6 @@ def create_starter_stack
Stack.start(component_args("demo", name))
end

def create_test
return unless @options[:test_structure]
Test::Bootstrap.start(["--dir", name])
end

def bundle_install
return if @options[:bundle] == false
log "=> Installing dependencies with: bundle install"
Expand Down
8 changes: 6 additions & 2 deletions lib/terraspace/cli/new/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ class Test < Thor::Group
include Thor::Actions
include Terraspace::CLI::New::Helpers

argument :name
argument :name, required: false

def self.options
[
[:force, aliases: %w[y], type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
[:test_name, desc: "Test name. Defaults to the project, module or stack name"],
[:type, default: "project", desc: "project, stack or module"],
[:type, default: "stack", desc: "project, stack or module"],
]
end
options.each { |args| class_option(*args) }
Expand Down Expand Up @@ -42,6 +42,10 @@ def test_template_source(template, type)
public

def create
if type != 'project' && name.nil?
puts "ERROR: require NAME for type stack and module".color(:red)
exit 1
end
test_template_source(@options[:lang], type)
puts "=> Creating #{type} test: #{name}"
directory ".", dest
Expand Down

0 comments on commit 256c16c

Please sign in to comment.