Skip to content

Commit

Permalink
Validate that libraries do not end in .dylib
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkalpin committed Dec 3, 2013
1 parent 2b113fe commit 9eee64d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cocoapods-core/specification/linter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def _validate_weak_frameworks(frameworks)
# Performs validations related to the `libraries` attribute.
#
def _validate_libraries(libs)
if libs.any? { |lib| lib.end_with?('.a') }
if libs.any? { |lib| lib.end_with?('.a', '.dylib') }
error "A library should only be specified by its name"
end
end
Expand Down
5 changes: 5 additions & 0 deletions spec/specification/linter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ def message_should_include(*values)
@spec.libraries = %w{z.a xml.a}
message_should_include('library', 'name')
end

it "checks that libraries do not end with a .dylib extension" do
@spec.libraries = %w{libssl.dylib libz.dylib}
message_should_include('library', 'name')
end
end

#--------------------------------------#
Expand Down

0 comments on commit 9eee64d

Please sign in to comment.