1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-06 09:35:44 +01:00

mindlessly satisfy rubocop 0.48

This commit is contained in:
Mike Linksvayer 2017-03-26 17:19:44 -07:00
parent aeca75a53b
commit 75c05d717c
12 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
source 'https://rubygems.org'
require 'json'

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
require 'json'
require 'open-uri'
require 'spec_helper'

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'byte order marks' do

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'license rules' do

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'shown licenses' do

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'licenses' do

View File

@ -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