Skip to content

Commit

Permalink
jensmeder#44 Whitespace -> tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsten Litsche committed Mar 25, 2018
1 parent b9e4f2a commit b62d3a5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions lib/phoenx/entities/target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AbstractTarget
attr_accessor :support_files
attr_accessor :excluded_support_files
attr_reader :dependencies
attr_reader :config_files
attr_reader :config_files

def initialize
@dependencies = []
Expand Down Expand Up @@ -92,7 +92,7 @@ def initialize(name, type, platform, version)
yield(self)
end

# deprecated, stays for backward compatibility reasons
# deprecated, stays for backward compatibility reasons
def test_target(name, &block)
target = Phoenx::TestTarget.new &block
target.name = name
Expand All @@ -104,13 +104,13 @@ def unittest_target(name, &block)
target.name = name
@unittest_targets << target
end

def uitest_target(name, &block)
target = Phoenx::TestTarget.new &block
target.name = name
@uitest_targets << target
end

def extension_target(name, &block)
target = Phoenx::TestableTarget.new name, nil, nil, nil, &block
@extensions << target
Expand Down
50 changes: 25 additions & 25 deletions lib/phoenx/use_cases/generate_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,16 @@ def target

class TestableTargetBuilder < TargetBuilder

:test_targets
:test_targets
:schemes

def generate_target_scheme
# Generate main scheme
scheme = Xcodeproj::XCScheme.new
scheme.configure_with_targets(self.target, nil)
@test_targets.each do |target|
scheme.configure_with_targets(nil, target)
end
@test_targets.each do |target|
scheme.configure_with_targets(nil, target)
end
scheme.test_action.code_coverage_enabled = @target_spec.code_coverage_enabled
self.configure_scheme(scheme, @target_spec)

Expand Down Expand Up @@ -234,9 +234,9 @@ def add_schemes
@target_spec.schemes.each do |s|
scheme = Xcodeproj::XCScheme.new
scheme.configure_with_targets(self.target, nil)
@test_targets.each do |target|
scheme.configure_with_targets(nil, target)
end
@test_targets.each do |target|
scheme.configure_with_targets(nil, target)
end
scheme.test_action.code_coverage_enabled = @target_spec.code_coverage_enabled
self.configure_scheme(scheme, s)

Expand Down Expand Up @@ -272,21 +272,21 @@ def add_unittest_targets
@target_spec.unittest_targets.each do |test_target_spec|
builder = UnitTestTargetBuilder.new(@target, @project, test_target_spec, @project_spec, @target_spec, self.framework_files)
builder.build
@test_targets.push(builder.target)
@test_targets.push(builder.target)
end
end

def add_uitest_targets
@target_spec.uitest_targets.each do |test_target_spec|
builder = UITestTargetBuilder.new(@target, @project, test_target_spec, @project_spec, @target_spec, self.framework_files)
builder.build
@test_targets.push(builder.target)
@test_targets.push(builder.target)
end
end

def build
@schemes = []
@test_targets = []
@test_targets = []
puts ">> Target ".green + @target_spec.name.bold
self.clean_target
self.add_sources
Expand All @@ -298,7 +298,7 @@ def build
self.add_frameworks_and_libraries
self.add_build_phase_scripts
self.add_unittest_targets
self.add_uitest_targets
self.add_uitest_targets
self.generate_target_scheme
self.add_schemes
self.add_support_files
Expand Down Expand Up @@ -437,7 +437,7 @@ def generate_target_scheme
scheme = Xcodeproj::XCScheme.new
scheme.build_action.add_entry Xcodeproj::XCScheme::BuildAction::Entry.new(@target)
scheme.launch_action.buildable_product_runnable = Xcodeproj::XCScheme::RemoteRunnable.new(@target, 2, 'com.apple.Carousel')
scheme.profile_action.buildable_product_runnable = Xcodeproj::XCScheme::RemoteRunnable.new(@target, 2, 'com.apple.Carousel')
scheme.profile_action.buildable_product_runnable = Xcodeproj::XCScheme::RemoteRunnable.new(@target, 2, 'com.apple.Carousel')

self.configure_scheme(scheme, @target_spec)

Expand Down Expand Up @@ -559,24 +559,24 @@ def target
end

end

class UnitTestTargetBuilder < TestTargetBuilder

def build
super
super
@target.product_type = Xcodeproj::Constants::PRODUCT_TYPE_UTI[:unit_test_bundle]
@target.frameworks_build_phase.add_file_reference(@main_target.product_reference)
end
end
end

end

class UITestTargetBuilder < TestTargetBuilder

def build
super
super
@target.product_type = Xcodeproj::Constants::PRODUCT_TYPE_UTI[:ui_test_bundle]
end
end
end

end

end

0 comments on commit b62d3a5

Please sign in to comment.