mirror of
https://github.com/github/choosealicense.com
synced 2025-01-04 19:12:05 +01:00
rubocop suggestions
This commit is contained in:
parent
c5fa06a734
commit
20d853259a
@ -11,7 +11,7 @@ require 'colored'
|
|||||||
require 'fuzzy_match'
|
require 'fuzzy_match'
|
||||||
|
|
||||||
# Display usage instructions
|
# 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
|
class TrueClass
|
||||||
def to_s
|
def to_s
|
||||||
|
@ -6,7 +6,7 @@ describe 'byte order marks' do
|
|||||||
Dir["#{licenses_path}/*.txt"].each do |file|
|
Dir["#{licenses_path}/*.txt"].each do |file|
|
||||||
context "the #{File.basename(file, '.txt')} license" do
|
context "the #{File.basename(file, '.txt')} license" do
|
||||||
it 'does not begin with a byte order mark' 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.'
|
msg = 'License file begins with a Byte Order Mark. See https://stackoverflow.com/a/1068700.'
|
||||||
expect(bom).to eql(false), msg
|
expect(bom).to eql(false), msg
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user