RubyGems Navigation menu

make_menu 0.0.1

Creates a number-selection menu from a Makefile. The menu will attempt to fill the width of the terminal window. - Any targets in the Makefile with a double-hash comment will be displayed, e.g.: serve: ## Start Rails server in background This will display a line such as '1. Start Rails server in background' which runs the command `make serve`. - A line that starts with a triple-hash will create a new menu group, e.g.: ### Docker Commands This will begin a new group with the header 'Docker Commands' - The environment variable MENU can be used to specify a custom menu class, e.g.: export MENU=Accounts This assumes that a class `AccountsMenu` is defined in the file `accounts_menu.rb` You can define two constants in your custom class: LOGO (String) text or ASCII art to display above the menu HIGHLIGHTS (Hash{String=>[Symbol,Array]}) Add coloring to specific words or phrases - The environment variable MAKEFILE can specify a Makefile. The default is './Makefile'. The menu will not display any targets called 'menu' or 'status'. The latter, if present, is called each time the menu displays. ----------------------------- Docker Container Status Panel ----------------------------- Displays a color-coded panel indicating whether or not a Docker container is running. You must define a custom class inheriting from `MakeMenu::StatusPanel` and indicate this using the environment variable MENU, e.g.: export MENU=Accounts This assumes that a class `AccountsStatusPanel` is defined in the file `accounts_status_panel.rb` You can define a constant CONTAINERS {String=>String} in this custom class to map the displayed label to the container name, e.g.: CONTAINERS = { 'Backend' => 'myapp-backend-1' }

Gemfile:
= Copier Copié!

installation:
=

Versions:

  1. 2.1.1 - February 15, 2024 (10,5 ko)
  2. 2.1.0 - February 07, 2024 (10,5 ko)
  3. 2.0.0 - January 10, 2024 (10 ko)
  4. 1.1.0 - January 09, 2024 (10 ko)
  5. 1.0.0 - January 07, 2024 (9,5 ko)
  6. 0.0.1 - December 20, 2023 (11,5 ko)
Voir toutes les versions (11)

Dépendances de Runtime (1):

tty-screen ~> 0.8.2

Propriétaires:

Pushed by:

Auteurs:

  • Barri Mason

Total de contrôle SHA 256:

= Copier Copié!

Total de téléchargements 3 392

Pour cette version 224

License:

MIT

Version de Ruby requise: >= 0

Liens: