Module: Bard::CLI::Open
- Defined in:
- lib/bard/cli/open.rb
Class Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bard/cli/open.rb', line 2 def self.included mod mod.class_eval do desc "open [server=production]", "opens the url in the web browser." def open server=:production exec "xdg-open #{open_url server}" end private def open_url server if server.to_sym == :ci "https://github.com/botandrosedesign/#{project_name}/actions/workflows/ci.yml" else config[server].ping.first end end end end |