Sha256: 9716d2c1f12cf540c41b20a286b3e1ca8df657ddda65f2f18c6e7a6b9b79895f

Contents?: true

Size: 1.51 KB

Versions: 27

Compression:

Stored size: 1.51 KB

Contents

module Steep
  module Drivers
    class PrintProject
      attr_reader :stdout
      attr_reader :stderr

      include Utils::DriverHelper

      def initialize(stdout:, stderr:)
        @stdout = stdout
        @stderr = stderr
      end

      def run
        project = load_config()

        loader = Project::FileLoader.new(project: project)
        loader.load_sources([])
        loader.load_signatures()

        project.targets.each do |target|
          stdout.puts "Target:"
          stdout.puts "  #{target.name}:"
          stdout.puts "    sources:"
          stdout.puts "      patterns:"
          target.source_patterns.each do |pattern|
            stdout.puts "        - #{pattern}"
          end
          stdout.puts "      ignores:"
          target.ignore_patterns.each do |pattern|
            stdout.puts "        - #{pattern}"
          end
          stdout.puts "      files:"
          target.source_files.each_key do |path|
            stdout.puts "        - #{path}"
          end
          stdout.puts "    signatures:"
          stdout.puts "      patterns:"
          target.signature_patterns.each do |pattern|
            stdout.puts "        - #{pattern}"
          end
          stdout.puts "      files:"
          target.signature_files.each_key do |path|
            stdout.puts "        - #{path}"
          end
          stdout.puts "    libraries:"
          target.options.libraries.each do |lib|
            stdout.puts "      - #{lib}"
          end
        end

        0
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
steep-0.16.2 lib/steep/drivers/print_project.rb
steep-0.16.1 lib/steep/drivers/print_project.rb
steep-0.16.0 lib/steep/drivers/print_project.rb
steep-0.15.0 lib/steep/drivers/print_project.rb
steep-0.14.0 lib/steep/drivers/print_project.rb
steep-0.13.0 lib/steep/drivers/print_project.rb
steep-0.12.0 lib/steep/drivers/print_project.rb