Sha256: 5098a1605ecfe70cd407a1f354ce832a71ff7cc7540d013a67cf6e4786ca2ad5
Contents?: true
Size: 1.79 KB
Versions: 3
Compression:
Stored size: 1.79 KB
Contents
# frozen_string_literal: true require 'bundler/gem_tasks' require 'rubocop/rake_task' require 'ronn' require 'github_changelog_generator/task' require 'yard' GitHubChangelogGenerator::RakeTask.new :changelog do |config| config.user = 'servian' config.project = 'awskeyring' config.future_release = "v#{Awskeyring::VERSION}" config.since_tag = 'v0.10.0' end RuboCop::RakeTask.new do |rubocop| rubocop.options = %w[-D --enable-pending-cops] rubocop.requires << 'rubocop-performance' rubocop.requires << 'rubocop-rake' rubocop.requires << 'rubocop-rspec' rubocop.requires << 'rubocop-rubycw' end desc 'Run RSpec code examples' task :spec do puts 'Running RSpec...' require 'rspec/core' runner = RSpec::Core::Runner xcode = runner.run(%w[--pattern spec/**{,/*/**}/*_spec.rb --order rand --format documentation --color]) abort 'RSpec failed' if xcode.positive? end desc 'Check filemode bits' task :filemode do puts 'Running FileMode...' files = Set.new(`git ls-files -z`.split("\x0")) dirs = Set.new(files.map { |file| File.dirname(file) }) failure = [] files.merge(dirs).each do |file| mode = File.stat(file).mode print '.' failure << file if (mode & 0x7) != (mode >> 3 & 0x7) end abort "\nError: Incorrect file mode found\n#{failure.join("\n")}" unless failure.empty? print "\n" end desc 'generate manpage' task :ronn do puts 'Running Ronn...' doc = Ronn::Document.new('man/awskeyring.5.ronn') doc.date = Time.parse(`git show -s --format=%ad --date=short`) File.write('man/awskeyring.5', doc.to_roff) puts "done\n\n" end YARD::Rake::YardocTask.new do |t| t.options = ['--fail-on-warning', '--no-progress', '--files', '*.md'] t.stats_options = ['--list-undoc'] end desc 'Run Linting, Tests and Documetation tasks' task default: %i[filemode rubocop spec ronn yard]
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
awskeyring-1.9.2 | Rakefile |
awskeyring-1.9.1 | Rakefile |
awskeyring-1.9.0 | Rakefile |