Sha256: 5e884ed007755d7b2d6c7d341159ebc626d8eb8ad7c6c752070a11427d88e4f6
Contents?: true
Size: 840 Bytes
Versions: 3
Compression:
Stored size: 840 Bytes
Contents
require "bundler/gem_tasks" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) task :default => :spec 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 github_user = `git config github.user`.chop github_user = 'your_id' if github_user.empty? generator = RuboCop::Cop::Generator.new(cop_name, github_user) generator.write_source generator.write_spec generator.inject_require(root_file_path: 'lib/rubocop/cop/publicdoc2_cops.rb') generator.inject_config(config_file_path: 'config/default.yml') puts generator.todo end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubocop-publicdoc2-0.1.4 | Rakefile |
rubocop-publicdoc2-0.1.3 | Rakefile |
rubocop-publicdoc2-0.1.2 | Rakefile |