Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
31807c80
Commit
31807c80
authored
Mar 02, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[HooksManager] Show the file that a hook without a name comes from
Closes
https://github.com/CocoaPods/CocoaPods/issues/2990
.
parent
f337b27f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
hooks_manager.rb
lib/cocoapods/hooks_manager.rb
+1
-1
hooks_manager_spec.rb
spec/unit/hooks_manager_spec.rb
+1
-0
No files found.
lib/cocoapods/hooks_manager.rb
View file @
31807c80
...
@@ -45,7 +45,7 @@ module Pod
...
@@ -45,7 +45,7 @@ module Pod
raise
ArgumentError
,
'Missing block'
unless
block
raise
ArgumentError
,
'Missing block'
unless
block
UI
.
warn
'[Hooks] The use of hooks without specifying a `plugin_name` '
\
UI
.
warn
'[Hooks] The use of hooks without specifying a `plugin_name` '
\
'has been deprecated.'
unless
plugin_name
"has been deprecated (from file `
#{
block
.
binding
.
eval
(
'File.expand_path __FILE__'
)
}
`)."
unless
plugin_name
@name
=
name
@name
=
name
@plugin_name
=
plugin_name
@plugin_name
=
plugin_name
...
...
spec/unit/hooks_manager_spec.rb
View file @
31807c80
...
@@ -32,6 +32,7 @@ module Pod
...
@@ -32,6 +32,7 @@ module Pod
it
'warns if no plugin name is given'
do
it
'warns if no plugin name is given'
do
@hooks_manager
.
register
(
:post_install
)
{}
@hooks_manager
.
register
(
:post_install
)
{}
UI
.
warnings
.
should
.
match
/hooks without.*deprecated/
UI
.
warnings
.
should
.
match
/hooks without.*deprecated/
UI
.
warnings
.
should
.
match
/
#{
__FILE__
}
/
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment