* Initial automatic cleanup with rubocop * Fix syntax error introduced by rubocop * Cleanup seeds file * Cleanup lib folder * Exclude bin folder because it contains auto generated files * Make Rubocop a little bit more chatty * Block length should not include comments in the count * Cleanup config folder * Cleanup specs * Updated Rubocop version and generated a todo file * Fix broken ArticlesApi spec * Fix tests * Restored rubocop pre-commit hook
22 lines
499 B
Ruby
Executable file
22 lines
499 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
require "pathname"
|
|
require "fileutils"
|
|
include FileUtils
|
|
|
|
# path to your application root.
|
|
APP_ROOT = Pathname.new File.expand_path("..", __dir__)
|
|
|
|
def system!(*args)
|
|
system(*args) || abort("\n== Command #{args} failed ==")
|
|
end
|
|
|
|
chdir APP_ROOT do
|
|
# This script runs test and open up code coverage
|
|
|
|
puts "\n== Running the test =="
|
|
spec_path = ARGV[0] || "spec"
|
|
system "bin/rspec #{spec_path}"
|
|
|
|
puts "\n== Opening Simplecov =="
|
|
system! "open coverage/index.html"
|
|
end
|