Class: Mercurial::Configuration
- Inherits:
-
Object
- Object
- Mercurial::Configuration
- Defined in:
- lib/mercurial-ruby/configuration.rb
Overview
Use this class to setup various internal settings of the gem.
Example:
Mercurial.configure do |conf|
conf.cache_store = Rails.cache
conf.debug_mode = true
end
Only the following settings are supported:
-
hg_binary_path — path to hg binary in your system. Defaults to /usr/local/bin/hg.
-
shell_timeout — default execution timeout for all hg shell commands. Defaults to 3000.
-
cache_store — Rails’s CacheStore compatible class for caching results of successful hg commands. Defaults to nil.
-
debug_mode — send all hg commands to stdout before execution. Defaults to false.
Instance Attribute Summary collapse
-
#cache_store ⇒ Object
Returns the value of attribute cache_store.
-
#debug_mode ⇒ Object
Returns the value of attribute debug_mode.
-
#hg_binary_path ⇒ Object
Returns the value of attribute hg_binary_path.
-
#shell_timeout ⇒ Object
Returns the value of attribute shell_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
24 25 26 27 28 |
# File 'lib/mercurial-ruby/configuration.rb', line 24 def initialize @hg_binary_path = '/usr/local/bin/hg' @shell_timeout = 3000 @debug_mode = false end |
Instance Attribute Details
#cache_store ⇒ Object
Returns the value of attribute cache_store.
22 23 24 |
# File 'lib/mercurial-ruby/configuration.rb', line 22 def cache_store @cache_store end |
#debug_mode ⇒ Object
Returns the value of attribute debug_mode.
22 23 24 |
# File 'lib/mercurial-ruby/configuration.rb', line 22 def debug_mode @debug_mode end |
#hg_binary_path ⇒ Object
Returns the value of attribute hg_binary_path.
22 23 24 |
# File 'lib/mercurial-ruby/configuration.rb', line 22 def hg_binary_path @hg_binary_path end |
#shell_timeout ⇒ Object
Returns the value of attribute shell_timeout.
22 23 24 |
# File 'lib/mercurial-ruby/configuration.rb', line 22 def shell_timeout @shell_timeout end |