Skip to content

Commit 561d89e

Browse files
committed
Add before_headers and after_headers execution position DSL
1 parent 5687c51 commit 561d89e

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
##### Enhancements
66

7+
* Add `before_headers` and `after_headers` execution position DSL.
8+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
9+
[#686](https://github.com/CocoaPods/Core/pull/686)
10+
711
* Add a pre_integrate_hook API
812
[David Chavez](https://github.com/dcvz)
913
[#643](https://github.com/CocoaPods/Core/pull/643)

lib/cocoapods-core/specification/dsl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ def dependency=(args)
10471047
SCRIPT_PHASE_OPTIONAL_KEYS = [:shell_path, :input_files, :output_files, :input_file_lists, :output_file_lists,
10481048
:show_env_vars_in_log, :execution_position, :dependency_file].freeze
10491049

1050-
EXECUTION_POSITION_KEYS = [:before_compile, :after_compile, :any].freeze
1050+
EXECUTION_POSITION_KEYS = [:before_compile, :after_compile, :before_headers, :after_headers, :any].freeze
10511051

10521052
ALL_SCRIPT_PHASE_KEYS = (SCRIPT_PHASE_REQUIRED_KEYS + SCRIPT_PHASE_OPTIONAL_KEYS).freeze
10531053

spec/podfile/target_definition_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ module Pod
488488
it 'raises if script phase includes an invalid execution position key' do
489489
e = lambda { @parent.store_script_phase(:name => 'PhaseName', :script => 'echo "Hello World"', :execution_position => :unknown) }.should.raise Podfile::StandardError
490490
e.message.should == 'Invalid execution position value `unknown` in shell script `PhaseName` within `MyApp` target. ' \
491-
'Available options are `[:before_compile, :after_compile, :any]`.'
491+
'Available options are `[:before_compile, :after_compile, :before_headers, :after_headers, :any]`.'
492492
end
493493

494494
it 'raises if the same script phase name already exists' do

spec/specification/consumer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ module Pod
391391
]
392392
end
393393

394-
it 'returns the empty hash if no script phases have been specified' do
394+
it 'returns the empty array if no script phases have been specified' do
395395
@consumer.script_phases.should == []
396396
end
397397
end

spec/specification/linter_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def result_should_include(*values)
535535
it 'checks script phases include a valid execution position value' do
536536
@spec.script_phases = { :name => 'Hello World', :script => 'echo "Hello World"', :execution_position => :unknown }
537537
result_should_include('script_phases', 'Invalid execution position value `unknown` in shell script `Hello World`. ' \
538-
'Available options are `before_compile, after_compile, any`.')
538+
'Available options are `before_compile, after_compile, before_headers, after_headers, any`.')
539539
end
540540

541541
#------------------#

0 commit comments

Comments
 (0)