Module: Githuh
- Extended by:
- Forwardable
- Defined in:
- lib/githuh.rb,
lib/githuh/llm.rb,
lib/githuh/version.rb,
lib/githuh/llm/base.rb,
lib/githuh/env_loader.rb,
lib/githuh/llm/openai.rb,
lib/githuh/cli/launcher.rb,
lib/githuh/llm/anthropic.rb,
lib/githuh/cli/commands/base.rb,
lib/githuh/cli/commands/version.rb,
lib/githuh/cli/commands/repo/list.rb,
lib/githuh/cli/commands/user/info.rb,
lib/githuh/cli/commands/issue/export.rb,
lib/githuh/cli/commands/issue/export_paginated.rb
Defined Under Namespace
Constant Summary collapse
- BANNER =
"Githuh Version #{VERSION}".freeze
- BINARY =
File.('../exe/githuh', __dir__).freeze
- VERSION =
'0.4.0'
Class Attribute Summary collapse
-
.in_test ⇒ Object
Returns the value of attribute in_test.
-
.launcher ⇒ Object
Returns the value of attribute launcher.
Class Method Summary collapse
Class Attribute Details
.in_test ⇒ Object
Returns the value of attribute in_test.
29 30 31 |
# File 'lib/githuh.rb', line 29 def in_test @in_test end |
.launcher ⇒ Object
Returns the value of attribute launcher.
29 30 31 |
# File 'lib/githuh.rb', line 29 def launcher @launcher end |
Class Method Details
.configure_kernel_behavior!(help: false) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/githuh.rb', line 35 def configure_kernel_behavior!(help: false) Kernel.module_eval do alias original_exit exit alias original_puts puts alias original_warn warn end Kernel.module_eval do def puts(*) ::Githuh.stdout.puts(*) end def warn(*) ::Githuh.stderr.puts(*) end end if in_test Kernel.module_eval do def exit(code) ::Githuh.stderr.puts("RSpec: intercepted exit code: #{code}") end end elsif help Kernel.module_eval do def exit(_code) # for help, override default exit code with 0 original_exit(0) end end else Kernel.module_eval do def exit(code) original_exit(code) end end end Dry::CLI end |
.restore_kernel_behavior! ⇒ Object
76 77 78 79 80 81 82 83 |
# File 'lib/githuh.rb', line 76 def restore_kernel_behavior! Kernel.module_eval do alias exit original_exit alias puts original_puts alias warn original_warn alias exit original_exit end end |