Sha256: 42a0eb7431f5669a14e716711e815d7c51f8f5a49364346d62d0c234d4ebb17b
Contents?: true
Size: 961 Bytes
Versions: 3
Compression:
Stored size: 961 Bytes
Contents
require "bundler/gem_tasks" upstream = Gem::Specification.find_by_name("rubocop") desc "Vendor rubocop-#{upstream.version} configuration into gem" task :vendor do src = Pathname.new(upstream.gem_dir).join("config") dst = Pathname.new(__FILE__).dirname.join("config") mkdir_p dst cp(src.join("default.yml"), dst.join("upstream.yml")) cp(src.join("enabled.yml"), dst.join("enabled.yml")) cp(src.join("disabled.yml"), dst.join("disabled.yml")) require "rubocop" require "yaml" cfg = RuboCop::Cop::Cop.all.inject({}) { |acc, cop| acc[cop.cop_name] = { "Enabled" => false }; acc } File.open(dst.join("disable_all.yml"), "w") { |fh| fh.write cfg.to_yaml } sh %{git add #{dst}/{upstream,enabled,disabled,disable_all}.yml} sh %{git commit -m "Vendor rubocop-#{upstream.version} upstream configuration."} end require "lcgstyle" require "rubocop/rake_task" RuboCop::RakeTask.new(:style) do |task| task.options << "--display-cop-names" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lcgstyle-0.0.5 | Rakefile |
lcgstyle-0.0.4 | Rakefile |
lcgstyle-0.0.2 | Rakefile |