Skip to content

Commit

Permalink
Merge pull request #29 from apiology/satisfy_rubocop
Browse files Browse the repository at this point in the history
Satisfy current RuboCop rules
  • Loading branch information
apiology authored Oct 13, 2021
2 parents 4dfa132 + 2ea3728 commit 5cfb73d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions feature/big_files_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
describe BigFiles do
let(:default_glob) do
'{Dockerfile,Rakefile,{*,.*}.{c,clj,cljs,cpp,gemspec,groovy,html,' \
'java,js,json,py,rake,rb,scala,sh,swift,yml},{app,config,db,feature,' \
'lib,spec,src,test,tests,vars,www}/**/{*,.*}.{c,clj,cljs,cpp,gemspec,' \
'groovy,html,java,js,json,py,rake,rb,scala,sh,swift,yml}}'
'java,js,json,py,rake,rb,scala,sh,swift,yml},{app,config,db,feature,' \
'lib,spec,src,test,tests,vars,www}/**/{*,.*}.{c,clj,cljs,cpp,gemspec,' \
'groovy,html,java,js,json,py,rake,rb,scala,sh,swift,yml}}'
end

let(:usage) do
"Usage: bigfiles [options]\n" \
" -g, --glob glob here " \
"Which files to parse - default is #{default_glob}" \
"\n" \
" -e, --exclude-glob glob here " \
"Files to exclude - default is none\n" \
" -h, --help This message\n" \
" -n, --num-files number-here " \
"Top number of files to show--default 3\n"
" -g, --glob glob here " \
"Which files to parse - default is #{default_glob}" \
"\n" \
" -e, --exclude-glob glob here " \
"Files to exclude - default is none\n" \
" -h, --help This message\n" \
" -n, --num-files number-here " \
"Top number of files to show--default 3\n"
end

it 'starts up with no arguments' do
Expand All @@ -34,15 +34,15 @@
context "with #{type}" do
let(:command) do
"cd feature/samples/#{type} && " \
"RUBYLIB=`pwd`/../../lib:\"\$RUBYLIB\" bigfiles " \
"--glob '*.{rb,swift,zorb}' " \
"--exclude-glob " \
"'{excluded.rb}'"
"RUBYLIB=`pwd`/../../lib:\"\$RUBYLIB\" bigfiles " \
"--glob '*.{rb,swift,zorb}' " \
"--exclude-glob " \
"'{excluded.rb}'"
end

it "handles #{type} case" do
expect(exec_io(command))
.to eq(IO.read("feature/expected/#{type}_results.txt"))
.to eq(File.read("feature/expected/#{type}_results.txt"))
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions spec/big_files/big_files_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def expect_file_output(filename, num_lines)

def default_glob
'{Dockerfile,Rakefile,{*,.*}.{c,clj,cljs,cpp,gemspec,groovy,html,' \
'java,js,json,py,rake,rb,scala,sh,swift,yml},{app,config,db,' \
'feature,lib,spec,src,test,tests,vars,www}/**/{*,.*}.{c,clj,' \
'cljs,cpp,gemspec,groovy,html,java,js,json,py,rake,rb,scala,' \
'sh,swift,yml}}'
'java,js,json,py,rake,rb,scala,sh,swift,yml},{app,config,db,' \
'feature,lib,spec,src,test,tests,vars,www}/**/{*,.*}.{c,clj,' \
'cljs,cpp,gemspec,groovy,html,java,js,json,py,rake,rb,scala,' \
'sh,swift,yml}}'
end

def allow_globs_assigned(glob, exclude_glob)
Expand Down

0 comments on commit 5cfb73d

Please sign in to comment.