1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-30 16:41:45 +01:00

rubocop suggestions

This commit is contained in:
Mike Linksvayer 2022-01-05 17:50:10 -08:00
parent c5fa06a734
commit 20d853259a
No known key found for this signature in database
GPG Key ID: 136DBD194F0080CF
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ require 'colored'
require 'fuzzy_match'
# Display usage instructions
puts File.open(__FILE__).read.scan(/^# .*/)[0...3].join("\n").gsub(/^# /, '') if ARGV.count != 1
puts File.read(__FILE__).scan(/^# .*/)[0...3].join("\n").gsub(/^# /, '') if ARGV.count != 1
class TrueClass
def to_s

View File

@ -6,7 +6,7 @@ describe 'byte order marks' do
Dir["#{licenses_path}/*.txt"].each do |file|
context "the #{File.basename(file, '.txt')} license" do
it 'does not begin with a byte order mark' do
bom = File.open(file).read.start_with?("\u0000EF\u0000BB\u0000BF")
bom = File.read(file).start_with?("\u0000EF\u0000BB\u0000BF")
msg = 'License file begins with a Byte Order Mark. See https://stackoverflow.com/a/1068700.'
expect(bom).to eql(false), msg
end