Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions lib/rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module Rake; end
require_relative "rake/rake_module"
require_relative "rake/trace_output"
require_relative "rake/pseudo_status"
require_relative "rake/options"
require_relative "rake/task_arguments"
require_relative "rake/invocation_chain"
require_relative "rake/task"
Expand Down
9 changes: 2 additions & 7 deletions lib/rake/application.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require "optparse"

require_relative "options"
require_relative "task_manager"
require_relative "file_list"
require_relative "thread_pool"
Expand Down Expand Up @@ -165,13 +166,7 @@ def add_loader(ext, loader)

# Application options from the command line
def options
@options ||= Struct.new(
:always_multitask, :backtrace, :build_all, :dryrun,
:ignore_deprecate, :ignore_system, :job_stats, :load_system,
:nosearch, :rakelib, :show_all_tasks, :show_prereqs,
:show_task_pattern, :show_tasks, :silent, :suppress_backtrace_pattern,
:thread_pool_size, :trace, :trace_output, :trace_rules
).new
@options ||= Options.new
end

# Return the thread pool used for multithreaded processing.
Expand Down
31 changes: 31 additions & 0 deletions lib/rake/options.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# frozen_string_literal: true

module Rake

##
# Options used by the Rake command line application.
#
class Options
attr_accessor :always_multitask
attr_accessor :backtrace
attr_accessor :build_all
attr_accessor :dryrun
attr_accessor :ignore_deprecate
attr_accessor :ignore_system
attr_accessor :job_stats
attr_accessor :load_system
attr_accessor :nosearch
attr_accessor :rakelib
attr_accessor :show_all_tasks
attr_accessor :show_prereqs
attr_accessor :show_task_pattern
attr_accessor :show_tasks
attr_accessor :silent
attr_accessor :suppress_backtrace_pattern
attr_accessor :thread_pool_size
attr_accessor :trace
attr_accessor :trace_output
attr_accessor :trace_rules
end

end
Loading