Module: Libconsole::CI::Github
- Included in:
- Github
- Defined in:
- lib/libconsole/ci/github.rb
Overview
Defined Under Namespace
Classes: Attr
Instance Method Summary collapse
- #add_mask(value) ⇒ Object
-
#debug(message) ⇒ Object
logging.
- #echo(arg) ⇒ Object
- #end_group ⇒ Object
- #error(message, *args, **opts) ⇒ Object
- #failed ⇒ Object
-
#group(title) ⇒ Object
formating.
- #info(message) ⇒ Object
- #notice(message, *args, **opts) ⇒ Object
- #stop_commands(end_token) {|end_token| ... } ⇒ Object
- #warning(message, *args, **opts) ⇒ Object
Instance Method Details
#add_mask(value) ⇒ Object
57 58 59 |
# File 'lib/libconsole/ci/github.rb', line 57 def add_mask(value) puts "::add-mask::#{value}" end |
#debug(message) ⇒ Object
logging
8 9 10 |
# File 'lib/libconsole/ci/github.rb', line 8 def debug() puts "::debug::#{}" end |
#echo(arg) ⇒ Object
67 68 69 |
# File 'lib/libconsole/ci/github.rb', line 67 def echo(arg) `echo #{arg}` end |
#end_group ⇒ Object
53 54 55 |
# File 'lib/libconsole/ci/github.rb', line 53 def end_group puts "::endgroup::" end |
#error(message, *args, **opts) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/libconsole/ci/github.rb', line 34 def error(, *args, **opts) name = args[1] || opts[:name] line = args[2] || opts[:line] || 0 end_line = args[3] || opts[:end_line] || 0 title = args[4] || opts[:title] puts "::error file=#{name},line=#{line},endLine=#{end_line},title=#{title}::#{}" end |
#failed ⇒ Object
43 44 45 46 |
# File 'lib/libconsole/ci/github.rb', line 43 def failed(...) error(...) exit 1 end |
#group(title) ⇒ Object
formating
49 50 51 |
# File 'lib/libconsole/ci/github.rb', line 49 def group(title) puts "::group::#{title}" end |
#info(message) ⇒ Object
12 13 14 |
# File 'lib/libconsole/ci/github.rb', line 12 def info() puts end |
#notice(message, *args, **opts) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/libconsole/ci/github.rb', line 16 def notice(, *args, **opts) name = args[1] || opts[:name] line = args[2] || opts[:line] || 0 end_line = args[3] || opts[:end_line] || 0 title = args[4] || opts[:title] puts "::notice file=#{name},line=#{line},endLine=#{end_line},title=#{title}::#{}" end |
#stop_commands(end_token) {|end_token| ... } ⇒ Object
61 62 63 64 65 |
# File 'lib/libconsole/ci/github.rb', line 61 def stop_commands(end_token) puts "::stop-commands::#{end_token}" yield end_token puts "::#{end_token}::" end |
#warning(message, *args, **opts) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/libconsole/ci/github.rb', line 25 def warning(, *args, **opts) name = args[1] || opts[:name] line = args[2] || opts[:line] || 0 end_line = args[3] || opts[:end_line] || 0 title = args[4] || opts[:title] puts "::warning file=#{name},line=#{line},endLine=#{end_line},title=#{title}::#{}" end |