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.34.0 lib/steep/drivers/print_project.rb
steep-0.33.0 lib/steep/drivers/print_project.rb
steep-0.32.0 lib/steep/drivers/print_project.rb
steep-0.31.1 lib/steep/drivers/print_project.rb
steep-0.31.0 lib/steep/drivers/print_project.rb
steep-0.30.0 lib/steep/drivers/print_project.rb
steep-0.29.0 lib/steep/drivers/print_project.rb
steep-0.28.0 lib/steep/drivers/print_project.rb
steep-0.27.0 lib/steep/drivers/print_project.rb
steep-0.25.0 lib/steep/drivers/print_project.rb
steep-0.24.0 lib/steep/drivers/print_project.rb
steep-0.23.0 lib/steep/drivers/print_project.rb
steep-0.22.0 lib/steep/drivers/print_project.rb
steep-0.21.0 lib/steep/drivers/print_project.rb
steep-0.20.0 lib/steep/drivers/print_project.rb
steep-0.19.0 lib/steep/drivers/print_project.rb
steep-0.18.0 lib/steep/drivers/print_project.rb
steep-0.17.1 lib/steep/drivers/print_project.rb
steep-0.17.0 lib/steep/drivers/print_project.rb
steep-0.16.3 lib/steep/drivers/print_project.rb