Skip to content

Commit

Permalink
[Spec::Linter] Improve frameworks validation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Apr 13, 2014
1 parent 16c4f9e commit 3236705
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cocoapods-core/specification/linter.rb
Expand Up @@ -357,7 +357,7 @@ def _validate_compiler_flags(flags)
#
def frameworks_invalid?(frameworks)
frameworks.any? do |framework|
framework_regex = /[^a-zA-Z\d]/
framework_regex = /[^\w\-\+]/
framework =~ framework_regex
end
end
Expand Down
8 changes: 7 additions & 1 deletion spec/specification/linter_spec.rb
Expand Up @@ -296,6 +296,13 @@ def message_should_include(*values)

#------------------#

it 'accepts valid frameworks' do
@spec.frameworks = %w(AddressBook Audio-Frameworks)
@linter.lint
results = @linter.results
results.should.be.empty
end

it 'checks that frameworks do not end with a .framework extension' do
@spec.frameworks = %w(AddressBook.framework QuartzCore.framework)
message_should_include('framework', 'name')
Expand Down Expand Up @@ -326,7 +333,6 @@ def message_should_include(*values)
stdc++.6.0.9
Geoloqi-$(CONFIGURATION)
)

@linter.lint
results = @linter.results
results.should.be.empty
Expand Down

0 comments on commit 3236705

Please sign in to comment.