Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 42 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
# Clean
#
# rake clean
# rake clobber

require "rake/clean"

CLOBBER.include('doc', '.yardoc')
CLOBBER.include("doc", ".yardoc")

require "yard"
# Bundler
#
# rake build
# rake release

require "bundler/gem_tasks"

gemspec = Gem::Specification.load("money.gemspec")

# RuboCop
#
# rake rubocop

require "rubocop/rake_task"

gemspec = Gem::Specification.load('money.gemspec')
RuboCop::RakeTask.new

# Yard
#
# rake yard

require "yard"

YARD::Rake::YardocTask.new do |t|
t.options << "--title" << gemspec.description
Expand All @@ -16,12 +39,21 @@ YARD::Rake::YardocTask.new do |t|
t.options << "--markup-provider" << "redcarpet" unless RUBY_PLATFORM == "java"
end

# RSpec
#
# rake spec

require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec) do |t|
t.fail_on_error = false
t.ruby_opts = "-w"
end

# File permissions
#
# rake check_permissions

desc "Check file permissions"
task :check_permissions do
files = Dir.glob("**/*.rb")
Expand All @@ -40,5 +72,10 @@ end
# rubocop:disable Rake/Desc
task release: :check_permissions
task spec: :check_permissions
task default: :spec
# rubocop:enable Rake/Desc

# Default task
#
# rake

task default: [:rubocop, :spec]