mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
* Passwords now need to be 8 characters long (new default in authlogic). * To login to the Sidekiq web interface, log in to opensnp.org, if you have the `admin` flag set, you will find it at the usual place. * I finally found out why Rubocop didn't complain about the frozen string literal pragma missing and added all of them. * Rubocop complained about keyword arguments, which is only relevant for Rails 5, so I disabled the cop. * I removed the `inherit_from: .rubocop_todo.yml` from `.rubocop.yml`, so Hound does complain about **all** the issues. I also added a few tasks for running Rubocop.
23 lines
588 B
Ruby
23 lines
588 B
Ruby
# frozen_string_literal: true
|
|
namespace :rubocop do
|
|
desc 'Run rubocop'
|
|
task :run do
|
|
sh('bundle exec rubocop -D') {}
|
|
end
|
|
|
|
desc "Run Rubocop, don't show TODOs"
|
|
task :run_without_todos do
|
|
config = YAML.load(File.read('.rubocop.yml'))
|
|
todos = YAML.load(File.read('.rubocop_todo.yml'))
|
|
tmpfile = Tempfile.new(%w(snpr-rubocop .yml))
|
|
tmpfile.write(config.merge(todos).to_yaml)
|
|
|
|
sh("bundle exec rubocop -D --config #{tmpfile.path}") {}
|
|
end
|
|
|
|
desc 'Generate new TODO file'
|
|
task :generate_todos do
|
|
sh('bundle exec rubocop --auto-gen-config') {}
|
|
end
|
|
end
|