Sha256: c9cc152ae07733fc11b5d1973aed2dde98a9d99105745dd5612a5f9e1d7fa90e
Contents?: true
Size: 950 Bytes
Versions: 2
Compression:
Stored size: 950 Bytes
Contents
require 'active_support/core_ext/module/attribute_accessors' require 'logger' begin require 'syslog_logger' rescue LoadError $stderr.puts "SyslogLogger isn't available" end module Box module Release def self.default_logger if defined?(SyslogLogger) SyslogLogger.new("box-release") else Logger.new($stdout) end end @@logger = default_logger mattr_accessor :logger @@install_command = nil mattr_accessor :install_command class ExecutionError < StandardError; end def self.execute!(command) logger.debug "execute '#{command}'" output = `#{command} 2>&1` logger.debug output unless output.empty? if $? != 0 raise ExecutionError.new("Command failed: #{command} (error code #{$?})") end true end end end require 'box/release/loader' require 'box/release/downloader' require 'box/release/base' require 'box/release/memory'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
box-release-0.0.2 | lib/box/release.rb |
box-release-0.0.1 | lib/box/release.rb |