Module: RubyDep

Defined in:
lib/ruby_dep/logger.rb,
lib/ruby_dep/travis.rb,
lib/ruby_dep/version.rb,
lib/ruby_dep/warning.rb,
lib/ruby_dep/ruby_version.rb,
lib/ruby_dep/travis/ruby_version.rb

Defined Under Namespace

Classes: Logger, NullLogger, RubyVersion, Travis, Warning

Constant Summary collapse

VERSION =
'1.5.0'.freeze
PROJECT_URL =
'http://github.com/e2/ruby_dep'.freeze

Class Method Summary collapse

Class Method Details

.loggerObject



4
5
6
# File 'lib/ruby_dep/logger.rb', line 4

def self.logger
  @logger ||= stderr_logger
end

.logger=(new_logger) ⇒ Object



8
9
10
# File 'lib/ruby_dep/logger.rb', line 8

def self.logger=(new_logger)
  @logger = new_logger.nil? ? NullLogger.new : new_logger
end

.stderr_loggerObject



12
13
14
15
16
# File 'lib/ruby_dep/logger.rb', line 12

def self.stderr_logger
  ::Logger.new(STDERR).tap do |logger|
    logger.formatter = proc { |_,_,_,msg| "#{msg}\n" }
  end
end