lib/automation_wizard/generators/project.rb in automation_wizard-2.0.1 vs lib/automation_wizard/generators/project.rb in automation_wizard-2.0.2
- old
+ new
@@ -4,11 +4,11 @@
module Generators
class Project < Thor::Group
include Thor::Actions
argument :name, type: :string, desc: 'The name of the project'
- argument :level, type: :string, desc: 'Project level'
+ argument :level, type: :string, required: false, desc: 'Project level'
desc 'Generates a project structure for automation applicant test'
def self.source_root
File.dirname(__FILE__) + '/project'
@@ -37,10 +37,10 @@
def copy_readme
copy_file 'Readme.md.tt', "#{name}/README.md"
end
def copy_specs
- template 'spec_helper.rb', "#{name}/spec/spec_helper.rb"
+ copy_file 'spec_helper.rb', "#{name}/spec/spec_helper.rb"
template 'loblaws_search_spec.rb.tt', "#{name}/spec/loblaws_search_spec.rb"
end
def copy_pages
template 'loblaws_home.rb.tt', "#{name}/lib/pages/loblaws_home.rb"