Module: Release::Gem
- Includes:
- TR::CondUtils
- Defined in:
- lib/release/gem.rb,
lib/release/gem/cli.rb,
lib/release/gem/gemdep.rb,
lib/release/gem/version.rb,
lib/release/gem/gem_action.rb,
lib/release/gem/gem_engine.rb,
lib/release/gem/vcs_action.rb,
lib/release/gem/gem_cli_action.rb,
lib/release/gem/vcs_cli_action.rb,
lib/release/gem/release_infector.rb
Defined Under Namespace
Modules: Action, Cli, Engine Classes: Abort, Error, GemDep, GemDepError, ReleaseInfector, ReleaseInfectorError
Constant Summary collapse
- VERSION =
"0.3.3"
Class Method Summary collapse
-
.cue(pmt, msg) ⇒ Object
caller user error.
-
.cul(pmt, msg) ⇒ Object
caller user log.
- .diff_only(a1, a2) ⇒ Object
- .engine(eng, *args, &block) ⇒ Object
- .format_dt(dt) ⇒ Object
- .logger(tag = nil, &block) ⇒ Object
-
.pastel ⇒ Object
logger.
-
.q(msg) ⇒ Object
Your code goes here…
Class Method Details
.cue(pmt, msg) ⇒ Object
caller user error
42 43 44 |
# File 'lib/release/gem.rb', line 42 def self.cue(pmt, msg) pmt.puts " ==x #{msg}".red if not pmt.nil? end |
.cul(pmt, msg) ⇒ Object
caller user log
37 38 39 |
# File 'lib/release/gem.rb', line 37 def self.cul(pmt,msg) pmt.puts " ==> #{msg} ".yellow if not pmt.nil? end |
.diff_only(a1, a2) ⇒ Object
50 51 52 |
# File 'lib/release/gem.rb', line 50 def self.diff_only(a1, a2) Set.new(a1)^a2 end |
.engine(eng, *args, &block) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/release/gem.rb', line 29 def self.engine(eng, *args, &block) case eng when :gem Engine::GemEngine.new(*args, &block) end end |
.format_dt(dt) ⇒ Object
46 47 48 |
# File 'lib/release/gem.rb', line 46 def self.format_dt(dt) dt.strftime("%d %b %Y (%a), %H:%M:%S:%L") end |
.logger(tag = nil, &block) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/release/gem.rb', line 54 def self.logger(tag = nil, &block) if @_logger.nil? if ENV['RELGEM_LOG_TO_STDOUT'] == "true" @_logger = TeLogger::Tlogger.new else @_logger = TeLogger::Tlogger.new("relgem.log",5, 5*1024*1024) end end if block if not_empty?(tag) @_logger.with_tag(tag, &block) else @_logger.with_tag(@_logger.tag, &block) end else if is_empty?(tag) @_logger.tag = :rel_gem @_logger else # no block but tag is given? hmm @_logger.tag = tag @_logger end end end |
.pastel ⇒ Object
logger
82 83 84 85 86 87 |
# File 'lib/release/gem.rb', line 82 def self.pastel if @_pastel.nil? @_pastel = Pastel.new end @_pastel end |
.q(msg) ⇒ Object
Your code goes here…
25 26 27 |
# File 'lib/release/gem.rb', line 25 def self.q(msg) pastel.yellow("\n #{msg}\n") end |