mirror of
https://github.com/github/choosealicense.com
synced 2024-12-21 12:20: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
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
require 'json'
|
||||
|
3
Rakefile
3
Rakefile
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'html-proofer'
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
@ -26,7 +27,7 @@ task :approved_licenses do
|
||||
puts approved.join(', ')
|
||||
puts "\n"
|
||||
|
||||
potential = approved - licenses.map { |l| l['id'] }
|
||||
potential = approved - (licenses.map { |l| l['id'] })
|
||||
puts "#{potential.count} potential additions:"
|
||||
puts potential.join(', ')
|
||||
end
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# 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
|
||||
# Usage: script/check-approval [SPDX LICENSE ID]
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Usage: script/generate-docs
|
||||
# Reads in the fields, meta, and rules YAML files and produces markdown output
|
||||
# suitable for documenting in the project's README
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'open-uri'
|
||||
require 'spec_helper'
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'byte order marks' do
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'license fillable fields' do
|
||||
@ -6,7 +7,7 @@ describe 'license fillable fields' do
|
||||
context "The #{license['title']} license" do
|
||||
it 'should only contain supported fillable fields' do
|
||||
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
|
||||
end
|
||||
end
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'license meta' do
|
||||
@ -8,7 +9,7 @@ describe 'license meta' do
|
||||
|
||||
context "The #{license['title']} license" 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
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'license rules' do
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'shown licenses' do
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'licenses' do
|
||||
|
@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'jekyll'
|
||||
require 'open-uri'
|
||||
require 'json'
|
||||
@ -42,7 +43,7 @@ def licenses
|
||||
end
|
||||
|
||||
def shown_licenses
|
||||
licenses.select { |l| !l['hidden'] }
|
||||
licenses.reject { |l| l['hidden'] }
|
||||
end
|
||||
|
||||
def site
|
||||
|
Loading…
x
Reference in New Issue
Block a user