mirror of
https://github.com/github/choosealicense.com
synced 2024-12-21 20:30:10 +01:00
mindlessly satisfy rubocop 0.48
This commit is contained in:
parent
aeca75a53b
commit
75c05d717c
1
Gemfile
1
Gemfile
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
require 'json'
|
require 'json'
|
||||||
|
3
Rakefile
3
Rakefile
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'html-proofer'
|
require 'html-proofer'
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ task :approved_licenses do
|
|||||||
puts approved.join(', ')
|
puts approved.join(', ')
|
||||||
puts "\n"
|
puts "\n"
|
||||||
|
|
||||||
potential = approved - licenses.map { |l| l['id'] }
|
potential = approved - (licenses.map { |l| l['id'] })
|
||||||
puts "#{potential.count} potential additions:"
|
puts "#{potential.count} potential additions:"
|
||||||
puts potential.join(', ')
|
puts potential.join(', ')
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# Checks if a given license meets the approval criteria to be added to choosealicense.com
|
# Checks if a given license meets the approval criteria to be added to choosealicense.com
|
||||||
# See https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license
|
# See https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license
|
||||||
# Usage: script/check-approval [SPDX LICENSE ID]
|
# Usage: script/check-approval [SPDX LICENSE ID]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# Usage: script/generate-docs
|
# Usage: script/generate-docs
|
||||||
# Reads in the fields, meta, and rules YAML files and produces markdown output
|
# Reads in the fields, meta, and rules YAML files and produces markdown output
|
||||||
# suitable for documenting in the project's README
|
# suitable for documenting in the project's README
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'json'
|
require 'json'
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'byte order marks' do
|
describe 'byte order marks' do
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'license fillable fields' do
|
describe 'license fillable fields' do
|
||||||
@ -6,7 +7,7 @@ describe 'license fillable fields' do
|
|||||||
context "The #{license['title']} license" do
|
context "The #{license['title']} license" do
|
||||||
it 'should only contain supported fillable fields' do
|
it 'should only contain supported fillable fields' do
|
||||||
matches = license['content'].scan(/\[([a-z]+)\]/)
|
matches = license['content'].scan(/\[([a-z]+)\]/)
|
||||||
extra_fields = matches.flatten - fields.map { |f| f['name'] }
|
extra_fields = matches.flatten - (fields.map { |f| f['name'] })
|
||||||
expect(extra_fields).to be_empty
|
expect(extra_fields).to be_empty
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'license meta' do
|
describe 'license meta' do
|
||||||
@ -8,7 +9,7 @@ describe 'license meta' do
|
|||||||
|
|
||||||
context "The #{license['title']} license" do
|
context "The #{license['title']} license" do
|
||||||
it 'should only contain supported meta fields' do
|
it 'should only contain supported meta fields' do
|
||||||
extra_fields = raw_fields.keys - meta.map { |m| m['name'] }
|
extra_fields = raw_fields.keys - (meta.map { |m| m['name'] })
|
||||||
expect(extra_fields).to be_empty
|
expect(extra_fields).to be_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'license rules' do
|
describe 'license rules' do
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'shown licenses' do
|
describe 'shown licenses' do
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'licenses' do
|
describe 'licenses' do
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'jekyll'
|
require 'jekyll'
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
require 'json'
|
require 'json'
|
||||||
@ -42,7 +43,7 @@ def licenses
|
|||||||
end
|
end
|
||||||
|
|
||||||
def shown_licenses
|
def shown_licenses
|
||||||
licenses.select { |l| !l['hidden'] }
|
licenses.reject { |l| l['hidden'] }
|
||||||
end
|
end
|
||||||
|
|
||||||
def site
|
def site
|
||||||
|
Loading…
x
Reference in New Issue
Block a user