Sha256: e04c91f08aae8f992a0a36dbab8135b2ba0dd62e3018396945262f7b1ca38032

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

module Xcode

  class Workspace
    def to_xcodebuild_option
      "-workspace \"#{self.path}\""
    end
  end

  class Project
    def to_xcodebuild_option
      "-project \"#{self.path}\""
    end
  end

  module Builder
    class SchemeBuilder < BaseBuilder

      def initialize(scheme)
        @scheme     = scheme
        @target     = @scheme.build_targets.last
        super @target, @target.config(@scheme.archive_config)
      end

      def prepare_xcodebuild sdk=nil
        cmd = super sdk
        cmd << @scheme.parent.to_xcodebuild_option
        cmd << "-scheme \"#{@scheme.name}\""
        cmd << "-configuration \"#{@scheme.archive_config}\""
        cmd
      end

      # def prepare_test_command sdk=@sdk
      #   cmd = super sdk
      #   cmd << "-scheme \"#{@scheme.name}\""
      #   cmd << "-configuration \"#{@scheme.test_config}\""
      #   cmd
      # end
      
      def test
        unless @scheme.testable?
          print_task :builder, "Nothing to test", :warning        
        else
          super
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xcoder-0.1.18 lib/xcode/builder/scheme_builder.rb