Class: Reviewer::Configuration
- Inherits:
-
Object
- Object
- Reviewer::Configuration
- Defined in:
- lib/reviewer/configuration.rb,
lib/reviewer/configuration/loader.rb
Overview
Configuration values container for Reviewer
Defined Under Namespace
Classes: Loader
Constant Summary collapse
- DEFAULT_PATH =
Dir.pwd.freeze
- DEFAULT_CONFIG_FILE_NAME =
'.reviewer.yml'- DEFAULT_HISTORY_FILE_NAME =
'.reviewer_history.yml'- DEFAULT_CONFIG_LOCATION =
"#{DEFAULT_PATH}/#{DEFAULT_CONFIG_FILE_NAME}".freeze
- DEFAULT_HISTORY_LOCATION =
"#{DEFAULT_PATH}/#{DEFAULT_HISTORY_FILE_NAME}".freeze
Instance Attribute Summary collapse
-
#file ⇒ Pathname
The pathname for the primary configuraton file.
-
#history_file ⇒ Pathname
The pathname for the history file to store data across runs.
-
#printer ⇒ Output::Printer
The printer instance for console output.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/reviewer/configuration.rb', line 29 def initialize @file = Pathname(DEFAULT_CONFIG_LOCATION) @history_file = Pathname(DEFAULT_HISTORY_LOCATION) # Future Configuration Options: # - seed_substitution_value(string): Currently a constant of `$SEED` in Reviewer::Command, but # may need to be configurable in case any command-line strings have other legitimate uses # for the value such that it may need to be override. Ideally, it woudl be changed to3 # something obscure enough that conflicts wouldn't happen, but you never know # - benchmark_everything(:dev, :optimize): Use the `time_up` gem to measure and show all the results # for each tool and step to help identify and reduce bottlenecks. It would mainly be a flag # for use in development, but it could also help folks troubleshoot their speed in finer # detail than the standard Reviewer output # - default_preparation_refresh(integer time): Right now, it's hard-coded at 6 hours, but that may require # tuning for individual tools end |
Instance Attribute Details
#file ⇒ Pathname
Returns the pathname for the primary configuraton file.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/reviewer/configuration.rb', line 17 class Configuration DEFAULT_PATH = Dir.pwd.freeze DEFAULT_CONFIG_FILE_NAME = '.reviewer.yml' DEFAULT_HISTORY_FILE_NAME = '.reviewer_history.yml' DEFAULT_CONFIG_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_CONFIG_FILE_NAME}".freeze DEFAULT_HISTORY_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_HISTORY_FILE_NAME}".freeze attr_accessor :file, :history_file attr_reader :printer def initialize @file = Pathname(DEFAULT_CONFIG_LOCATION) @history_file = Pathname(DEFAULT_HISTORY_LOCATION) # Future Configuration Options: # - seed_substitution_value(string): Currently a constant of `$SEED` in Reviewer::Command, but # may need to be configurable in case any command-line strings have other legitimate uses # for the value such that it may need to be override. Ideally, it woudl be changed to3 # something obscure enough that conflicts wouldn't happen, but you never know # - benchmark_everything(:dev, :optimize): Use the `time_up` gem to measure and show all the results # for each tool and step to help identify and reduce bottlenecks. It would mainly be a flag # for use in development, but it could also help folks troubleshoot their speed in finer # detail than the standard Reviewer output # - default_preparation_refresh(integer time): Right now, it's hard-coded at 6 hours, but that may require # tuning for individual tools end end |
#history_file ⇒ Pathname
Returns the pathname for the history file to store data across runs.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/reviewer/configuration.rb', line 17 class Configuration DEFAULT_PATH = Dir.pwd.freeze DEFAULT_CONFIG_FILE_NAME = '.reviewer.yml' DEFAULT_HISTORY_FILE_NAME = '.reviewer_history.yml' DEFAULT_CONFIG_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_CONFIG_FILE_NAME}".freeze DEFAULT_HISTORY_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_HISTORY_FILE_NAME}".freeze attr_accessor :file, :history_file attr_reader :printer def initialize @file = Pathname(DEFAULT_CONFIG_LOCATION) @history_file = Pathname(DEFAULT_HISTORY_LOCATION) # Future Configuration Options: # - seed_substitution_value(string): Currently a constant of `$SEED` in Reviewer::Command, but # may need to be configurable in case any command-line strings have other legitimate uses # for the value such that it may need to be override. Ideally, it woudl be changed to3 # something obscure enough that conflicts wouldn't happen, but you never know # - benchmark_everything(:dev, :optimize): Use the `time_up` gem to measure and show all the results # for each tool and step to help identify and reduce bottlenecks. It would mainly be a flag # for use in development, but it could also help folks troubleshoot their speed in finer # detail than the standard Reviewer output # - default_preparation_refresh(integer time): Right now, it's hard-coded at 6 hours, but that may require # tuning for individual tools end end |
#printer ⇒ Output::Printer
Returns the printer instance for console output.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/reviewer/configuration.rb', line 17 class Configuration DEFAULT_PATH = Dir.pwd.freeze DEFAULT_CONFIG_FILE_NAME = '.reviewer.yml' DEFAULT_HISTORY_FILE_NAME = '.reviewer_history.yml' DEFAULT_CONFIG_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_CONFIG_FILE_NAME}".freeze DEFAULT_HISTORY_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_HISTORY_FILE_NAME}".freeze attr_accessor :file, :history_file attr_reader :printer def initialize @file = Pathname(DEFAULT_CONFIG_LOCATION) @history_file = Pathname(DEFAULT_HISTORY_LOCATION) # Future Configuration Options: # - seed_substitution_value(string): Currently a constant of `$SEED` in Reviewer::Command, but # may need to be configurable in case any command-line strings have other legitimate uses # for the value such that it may need to be override. Ideally, it woudl be changed to3 # something obscure enough that conflicts wouldn't happen, but you never know # - benchmark_everything(:dev, :optimize): Use the `time_up` gem to measure and show all the results # for each tool and step to help identify and reduce bottlenecks. It would mainly be a flag # for use in development, but it could also help folks troubleshoot their speed in finer # detail than the standard Reviewer output # - default_preparation_refresh(integer time): Right now, it's hard-coded at 6 hours, but that may require # tuning for individual tools end end |