Module: Wildcloud::Git
- Defined in:
- lib/wildcloud/git/core.rb,
lib/wildcloud/git/client.rb,
lib/wildcloud/git/logger.rb,
lib/wildcloud/git/server.rb,
lib/wildcloud/git/version.rb,
lib/wildcloud/git/protocol.rb,
lib/wildcloud/git/configuration.rb
Defined Under Namespace
Modules: Protocol
Classes: Client, Core, Server
Constant Summary
collapse
- VERSION =
'0.0.1'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
22
23
24
25
26
27
28
29
|
# File 'lib/wildcloud/git/configuration.rb', line 22
def self.configuration
return @configuration if @configuration
config = Wildcloud::Configuration.load('git')
config.sources.each do |source|
self.logger.info('Configuration', "Loaded configuration from #{source}")
end
@configuration = config.configuration
end
|
.logger ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/wildcloud/git/logger.rb', line 25
def self.logger
return @logger if @logger
@logger = Wildcloud::Logger::Logger.new
@logger.application = ['wildcloud', 'git', self.configuration['node']['name']].join('.')
@logger.level = self.configuration['logger']['level'].to_s.to_sym if self.configuration['logger'] && self.configuration['logger']['level']
@logger.add(Wildcloud::Logger::Middleware::Console)
@logger
end
|
.logger_add_amqp(amqp) ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/wildcloud/git/logger.rb', line 34
def self.logger_add_amqp(amqp)
@logger.add(Wildcloud::Logger::Middleware::Json)
@logger.add(Wildcloud::Logger::Middleware::Amqp,
:exchange => AMQP::Channel.new(amqp).topic('wildcloud.logger'),
:routing_key => proc { |message| message[:application] }
)
end
|