Class: Reviewer::Configuration
- Inherits:
-
Object
- Object
- Reviewer::Configuration
- Defined in:
- lib/reviewer/configuration.rb
Overview
Configuration values container for Reviewer
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}"
- DEFAULT_HISTORY_LOCATION =
"#{DEFAULT_PATH}/#{DEFAULT_HISTORY_FILE_NAME}"
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 ⇒ Object
Returns the value of attribute printer.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/reviewer/configuration.rb', line 26 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.
15 16 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 |
# File 'lib/reviewer/configuration.rb', line 15 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}" DEFAULT_HISTORY_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_HISTORY_FILE_NAME}" attr_accessor :file, :history_file, :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.
15 16 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 |
# File 'lib/reviewer/configuration.rb', line 15 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}" DEFAULT_HISTORY_LOCATION = "#{DEFAULT_PATH}/#{DEFAULT_HISTORY_FILE_NAME}" attr_accessor :file, :history_file, :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 ⇒ Object
Returns the value of attribute printer.
24 25 26 |
# File 'lib/reviewer/configuration.rb', line 24 def printer @printer end |