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.

Instance Method Summary collapse

Instance Method Details

#clean_paths=(value) ⇒ Object

Raises:



37
38
39
40
# File 'lib/cocoapods-core/specification/dsl/deprecations.rb', line 37

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

#preferred_dependency=(name) ⇒ Object



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

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

#singleton_method_added(method) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/cocoapods-core/specification/dsl/deprecations.rb', line 14

def singleton_method_added(method)
  if method == :pre_install
    CoreUI.warn "[#{to_s}] The use of `#{method}` by overriding the method is deprecated."
    @pre_install_callback = Proc.new do |pod, target_definition|
      self.pre_install(pod, target_definition)
    end

  elsif method == :post_install
    CoreUI.warn "[#{to_s}] The use of `#{method}` by overriding the method is deprecated."
    @post_install_callback = Proc.new do |target_installer|
      self.post_install(target_installer)
    end

  elsif method == :header_mappings
    raise Informative, "[#{to_s}] 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, "[#{to_s}] The use of the `copy_header_mapping` hook has been deprecated.\n" \
      "Use the `header_dir` and the `header_mappings_dir` attributes."
  end
end