Class: Tetra::GenerateSpecSubcommand
- Inherits:
-
Subcommand
- Object
- Clamp::Command
- Subcommand
- Tetra::GenerateSpecSubcommand
- Defined in:
- lib/tetra/ui/generate_spec_subcommand.rb
Overview
tetra generate-spec
Instance Method Summary collapse
Methods inherited from Subcommand
#bypass_parsing, #checking_exceptions, #configure_log_level, #ensure_dry_running, #format_path, #print_generation_result, #verbose=, #very_verbose=, #very_very_verbose=
Methods included from Logging
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/tetra/ui/generate_spec_subcommand.rb', line 9 def execute checking_exceptions do project = Tetra::Project.new(".") ensure_dry_running(:has_finished, project) do patches = project.write_source_patches package = Tetra::Package.new(project, pom, filter, patches) patches.each do |patch| print_generation_result(project, patch) end result_path, conflict_count = package.to_spec print_generation_result(project, result_path, conflict_count) puts "Warning: #{pom} not found, some spec fields will be left blank" unless File.file?(pom) puts "Warning: source archive not found, package will not build" unless project.src_archive end end end |