Skip to content

๐Ÿ’Ž โฎ Zi โฏ Special Package - Any Gem

License

Notifications You must be signed in to change notification settings

z-shell/any-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Logo โฎ ZI โฏ Special Package - Any Gem

Package source: Source Tarball Binary Git Node Gem
Status: โŒ โŒ โŒ โŒ โœ”๏ธ (default)


The any-gem Package

This package is special โ€“ it is designed for easy installing of any Ruby Gems locally inside the plugin directory, exposing their binaries via shims (i.e.: forwarder scripts) created automatically by Bin-Gem-Node annex.

The Ruby Gem(s) to install are specified by the param'GEM โ†’ {gem1}; GEM2 โ†’ {gem2}; โ€ฆ' ice. The name of the plugin will be {gem1}, unless id-as'' ice will be provided, or the IDAS param will be set (i.e.: param'IDAS โ†’ my-plugin; GEM โ†’ โ€ฆ').

A few example invocations:

# Install `chef` Gem and call the plugin with the same name
zi pack param='GEM โ†’ chef' for any-gem
# Install `rails' Gem and call the plugin: ruby-on-rails
zi id-as=ruby-on-rails pack param='GEM โ†’ rails' for any-gem
# Install `jekyll` Gem and call the plugin: jkl
zi pack param='IDAS โ†’ jkl; GEM โ†’ jekyll' for any-gem

Default Profile

The only profile that does all the magic. It relies on the %PARAM% keywords, which are substituted with the value from the ice param'PARAM โ†’ value; โ€ฆ'.

The ZI command executed will be equivalent to:

zi lucid id-as="${${:-%IDAS%}:-%GEM%}" as=null \
  gem="%GEM%;%GEM2%;%GEM3%;%GEM4%;%GEM5%;%GEM6%;%GEM7%;%OTHER%" \
  sbin="n:bin/*" for \
    z-shell/null

This repository compatible with ZI

The ZI package that can use the zsh-string-lib to automatically:

  • get the plugin's Git repository OR release-package URL,
  • get the list of the recommended ices for the plugin,
    • there can be multiple lists of ices,
    • the ice lists are stored in profiles; there's at least one profile, default,
    • the ices can be selectively overridden.