Sha256: ef8bcb5c81b0188669b6a0029bdc5e55bbe5a851ff9eb1563765123f1b65f90d
Contents?: true
Size: 805 Bytes
Versions: 2
Compression:
Stored size: 805 Bytes
Contents
require "bundler/gem_tasks" require "rake/testtask" Rake::TestTask.new(:test) do |t| t.libs << "test" t.libs << "lib" t.test_files = FileList["test/**/*_test.rb"] end task default: :test require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList["spec/**/*_spec.rb"] end desc "Generate a new cop with a template" task :new_cop, [:cop] do |_task, args| require "rubocop" cop_name = args.fetch(:cop) do warn "usage: bundle exec rake new_cop[Department/Name]" exit! end generator = RuboCop::Cop::Generator.new(cop_name) generator.write_source generator.write_spec generator.inject_require(root_file_path: "lib/rubocop/cop/ipepe_cops.rb") generator.inject_config(config_file_path: "config/default.yml") puts generator.todo end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubocop-ipepe-0.2.5 | Rakefile |
rubocop-ipepe-0.2.0 | Rakefile |