Class: JobSpec::CLI
- Inherits:
-
Thor
- Object
- Thor
- JobSpec::CLI
- Defined in:
- lib/job_spec/cli.rb
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/job_spec/cli.rb', line 9 def build puts "Looking in '#{[:in]}' for roles... " role_files([:in]).each do |f| require f end FileUtils.mkdir_p(path_relative_to_pwd([:out])) JobSpec::Role.add_expectations(JobSpec::AdhocExpectations.roles) Role.definitions.each do |role| puts "Saving #{role.name} to #{safe_role_out_path(role)}..." File.write(safe_role_out_path(role), RenderAsMarkdown.new(role).render) end puts 'Finished.' end |