0

How to integrate rubocop with Rake?

I would like to pipe the output of the above shell command to ("sh rubocop") to a text file, but it doesn't seem to work.

Community
  • 1
  • 1
Rpj
  • 5,348
  • 16
  • 62
  • 122

1 Answers1

-1

Rakefile

require 'rake'

task :shell_me do
  sh './blah'
end

blah (executable via chmod +x blah + shebang)

#!/usr/bin/ruby

puts "HI!"

Shell command: $ rake shell_me > blah.log

blah.log:

HI!
ezkl
  • 3,829
  • 23
  • 39