Skip to content

Commit

Permalink
Merge pull request #2690 from github/licensee-6
Browse files Browse the repository at this point in the history
Upgrade to licensee 6
  • Loading branch information
arfon committed Nov 10, 2015
2 parents 34abe5b + d081f68 commit fd5da9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion github-linguist.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rake'
s.add_development_dependency 'yajl-ruby'
s.add_development_dependency 'color-proximity', '~> 0.2.1'
s.add_development_dependency 'licensee', '~> 4.7.4'
s.add_development_dependency 'licensee', '6.0.0b1'

end
5 changes: 2 additions & 3 deletions test/test_grammars.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class TestGrammars < Minitest::Test

# This grammar has a nonstandard but acceptable license.
"vendor/grammars/gap-tmbundle",
"vendor/grammars/factor",

# These grammars have no license but have been grandfathered in. New grammars
# must have a license that allows redistribution.
Expand Down Expand Up @@ -81,7 +80,7 @@ def test_local_scopes_are_in_sync
end

def test_submodules_have_recognized_licenses
unrecognized = submodule_licenses.select { |k,v| v.nil? && Licensee::Project.new(k).license_file }
unrecognized = submodule_licenses.select { |k,v| v.nil? && Licensee::FSProject.new(k).license_file }
unrecognized.reject! { |k,v| PROJECT_WHITELIST.include?(k) }
message = "The following submodules have unrecognized licenses:\n* #{unrecognized.keys.join("\n* ")}\n"
message << "Please ensure that the project's LICENSE file contains the full text of the license."
Expand Down Expand Up @@ -132,7 +131,7 @@ def submodule_licenses
# Given the path to a submodule, return its SPDX-compliant license key
def submodule_license(submodule)
# Prefer Licensee to detect a submodule's license
project = Licensee::Project.new(submodule)
project = Licensee::FSProject.new(submodule)
return project.license.key if project.license

# We know a license file exists, but Licensee wasn't able to detect the license,
Expand Down

0 comments on commit fd5da9c

Please sign in to comment.