Module: Git::Lighttp
- Defined in:
- lib/git/lighttp.rb,
lib/git/lighttp/treeish.rb,
lib/git/lighttp/version.rb,
lib/git/lighttp/http_backend.rb
Overview
The objective of this class is to implement various ideas proposed by the Semantic Versioning Specification (see reference).
Defined Under Namespace
Modules: AuthenticationHelpers, GitHelpers, HttpBackendHelpers Classes: Application, Htgroup, Htpasswd, HttpBackend, ProjectHandler, Treeish
Constant Summary collapse
- DEFAULT_CONFIG =
{ default: { project_root: '/home/git', git_path: '/usr/bin/git' }, treeish: { authenticate: false }, http_backend: { authenticate: true, get_any_file: true, upload_pack: true, receive_pack: false } }.freeze
- VERSION =
:nodoc:
'0.3.1'- RELEASE =
'2016-02-04'- TIMESTAMP =
'2011-07-05 12:32:36 -04:00'
Class Method Summary collapse
- .config ⇒ Object
- .config_reset! ⇒ Object
-
.configure {|config| ... } ⇒ Object
Configure Git::Lighttp modules using keys.
- .info ⇒ Object
- .load_config_file(file) ⇒ Object
- .to_h ⇒ Object
Class Method Details
.config ⇒ Object
335 336 337 |
# File 'lib/git/lighttp.rb', line 335 def config @config ||= DEFAULT_CONFIG.to_struct end |
.config_reset! ⇒ Object
339 340 341 |
# File 'lib/git/lighttp.rb', line 339 def config_reset! @config = DEFAULT_CONFIG.to_struct end |
.configure {|config| ... } ⇒ Object
Configure Git::Lighttp modules using keys. See Config for options.
344 345 346 347 |
# File 'lib/git/lighttp.rb', line 344 def configure(*) # :yield: config yield config config end |
.info ⇒ Object
11 12 13 |
# File 'lib/git/lighttp/version.rb', line 11 def self.info "#{name} v#{VERSION} (#{RELEASE})" end |
.load_config_file(file) ⇒ Object
349 350 351 352 353 354 355 356 357 358 |
# File 'lib/git/lighttp.rb', line 349 def load_config_file(file) YAML.load_file(file).to_struct.each_pair do |app, | .each_pair do |option, value| config[app][option] = value end end config rescue IndexError abort 'configuration option not found' end |