Sha256: 10dbdb05b444092b5060137904080af2f12cc785be7d86b999d4e9a73b926008

Contents?: true

Size: 902 Bytes

Versions: 10

Compression:

Stored size: 902 Bytes

Contents

# encoding: UTF-8

module Tetra
  # tetra generate-spec
  class GenerateSpecSubcommand < Tetra::Subcommand
    option %w(-f --filter), "FILTER", "filter files to be installed by this spec", default: "*.jar"
    parameter "[POM]", "a pom file path", default: "pom.xml"

    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)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tetra-1.2.2 lib/tetra/ui/generate_spec_subcommand.rb
tetra-1.2.1 lib/tetra/ui/generate_spec_subcommand.rb
tetra-1.2.0 lib/tetra/ui/generate_spec_subcommand.rb
tetra-1.1.0 lib/tetra/ui/generate_spec_subcommand.rb
tetra-1.0.0 lib/tetra/ui/generate_spec_subcommand.rb
tetra-0.54.0 lib/tetra/ui/generate_spec_subcommand.rb
tetra-0.53.0 lib/tetra/ui/generate_spec_subcommand.rb
tetra-0.52.0 lib/tetra/ui/generate_spec_subcommand.rb
tetra-0.51.0 lib/tetra/ui/generate_spec_subcommand.rb
tetra-0.50.0 lib/tetra/ui/generate_spec_subcommand.rb