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
- VERSION =
:nodoc:
"0.3.0"- RELEASE =
"2016-01-27"- TIMESTAMP =
"2011-07-05 12:32:36 -04:00"
Class Method Summary collapse
- .config ⇒ 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
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/git/lighttp.rb', line 317 def config @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 } }.to_struct end |
.configure {|config| ... } ⇒ Object
Configure Git::Lighttp modules using keys. See Config for options.
336 337 338 339 |
# File 'lib/git/lighttp.rb', line 336 def configure(&block) 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
341 342 343 344 345 346 347 348 349 350 |
# File 'lib/git/lighttp.rb', line 341 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 => error abort "configuration option not found" end |
.to_h ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/git/lighttp/version.rb', line 15 def self.to_h { :name => name, :version => VERSION, :semver => VERSION.to_semver_h, :release => RELEASE, :timestamp => TIMESTAMP } end |