Module: Pod::Specification::DSL::Deprecations

Included in:
Pod::Specification
Defined in:
lib/cocoapods-core/specification/dsl/deprecations.rb

Overview

Provides warning and errors for the deprecated attributes of the DSL.

Constant Summary collapse

DEPRECATED_METHODS =
[
  :part_of_dependency=,
  :part_of=,
  :exclude_header_search_paths=,
]

Instance Method Summary collapse

Instance Method Details

#clean_paths=(value) ⇒ Object

Raises:



31
32
33
34
35
# File 'lib/cocoapods-core/specification/dsl/deprecations.rb', line 31

def clean_paths=(value)
  raise Informative, "[#{self}] Clean paths are deprecated. " \
    'CocoaPods now cleans unused files by default. Use the ' \
      '`preserve_paths` attribute if needed.'
end

#documentation=(value) ⇒ Object



26
27
28
29
# File 'lib/cocoapods-core/specification/dsl/deprecations.rb', line 26

def documentation=(value)
  CoreUI.warn "[#{self}] The `documentation` DSL directive of the " \
    'podspec format has been deprecated.'
end

#preferred_dependency=(name) ⇒ Object



7
8
9
10
11
# File 'lib/cocoapods-core/specification/dsl/deprecations.rb', line 7

def preferred_dependency=(name)
  self.default_subspecs = [name]
  CoreUI.warn "[#{self}] `preferred_dependency` has been renamed "\
    'to `default_subspecs`.'
end

#singleton_method_added(method) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/cocoapods-core/specification/dsl/deprecations.rb', line 13

def singleton_method_added(method)
  if method == :header_mappings
    raise Informative, "[#{self}] The use of the `header_mappings` " \
      "hook has been deprecated.\n Use the `header_dir` and the " \
        '`header_mappings_dir` attributes.'

  elsif method == :copy_header_mapping
    raise Informative, "[#{self}] The use of the " \
      "`copy_header_mapping` hook has been deprecated.\nUse" \
        'the `header_dir` and the `header_mappings_dir` attributes.'
  end
end