Skip to content

Commit

Permalink
[Specification DSL] Be sure to always include spec description when p…
Browse files Browse the repository at this point in the history
…rinting deprecation warnings.

The install hooks should probably move to the Deprecations module. @irrationalfab any reason this wasn’t done?
  • Loading branch information
alloy committed Sep 20, 2013
1 parent c856da5 commit 5d57c45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/cocoapods-core/specification/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1019,9 +1019,9 @@ def dependency(*args)
# end
#
def pre_install(&block)
CoreUI.warn "The pre install hook of the specification DSL has been " \
"deprecated, use the `resource_bundles` or the `prepare_command` " \
"attributes."
CoreUI.warn "[#{to_s}] The pre install hook of the specification " \
"DSL has been deprecated, use the `resource_bundles` or the " \
"`prepare_command` attributes."
@pre_install_callback = block
end

Expand Down Expand Up @@ -1049,9 +1049,9 @@ def pre_install(&block)
# end
#
def post_install(&block)
CoreUI.warn "The post install hook of the specification DSL has been " \
"deprecated, use the `resource_bundles` or the `prepare_command` " \
"attributes."
CoreUI.warn "[#{to_s}] The post install hook of the specification " \
"DSL has been deprecated, use the `resource_bundles` or the " \
"`prepare_command` attributes."
@post_install_callback = block
end

Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods-core/specification/dsl/deprecations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def singleton_method_added(method)
end

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

def clean_paths=(value)
Expand Down

2 comments on commit 5d57c45

@fabiopelosin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@irrationalfab any reason this wasn’t done?

I think that I just forgot about it 😄

@alloy
Copy link
Member Author

@alloy alloy commented on 5d57c45 Sep 20, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough :D

Please sign in to comment.