Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a way to warn users about the changes to the specification hooks #1

Closed
fabiopelosin opened this issue Nov 9, 2012 · 2 comments

Comments

@fabiopelosin
Copy link
Member

from

Pod::Spec.new do |spec|
  def spec.pre_install(pod, target_definition)
    Dir.chdir(pod.root){ `sh make.sh` }
  end
end

to

Pod::Spec.new do |spec|
  spec.pre_install do |pod, target_definition|
    Dir.chdir(pod.root){ `sh make.sh` }
  end
end

/cc @alloy

@alloy
Copy link
Member

alloy commented Nov 20, 2012

BOOM!

class Spec
  def pre_install(pod, target_definition)
  end

  def singleton_method_added(method)
    if [:pre_install, :post_install].include?(method)
      warn "The use of `#{method}' by overriding the method is deprecated."
    end
  end
end

spec = Spec.new
def spec.pre_install(pod, target_definition); end

@fabiopelosin
Copy link
Member Author

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants