Socket
Book a DemoInstallSign in
Socket

prysless

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prysless

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Prysless

Build Status Test Coverage Code Climate Inline docs Gem Version

prysless aims to integrate ruby programs in terminal sessions with lowest harm.

It is based on pry REPL, hence the name.

Installation

Add this line to your application's Gemfile:

gem 'prysless'

And then execute:

$ bundle

Or install it yourself as:

$ gem install prysless

Configuring

All the configuring is done via environment variables, so to me it adds up to editing my bashrc

  • PRYSLESS_LIBRARY_PATH: path to load additional libraries, ":"-separated
  • PRYSLESS_REQUIRE: variable definitions
  • PRYSLESS_ALIASES: shell command aliases

For example:

export PRYSLESS_ALIASES='l=ls:c=cd'
export PRYSLESS_LIBRARY_PATH="$HOME/dev/ec2l/lib"
export PRYSLESS_REQUIRE="e=ec2l/Ec2l/Client.new:a=pry/[]"

PRYSLESS_REQUIRE tells prysless what objects to preload and how to name them.

So, for example:

e=ec2l/Ec2l/Client.new

Will load into the variable named e Ec2l::Client.new after requiring 'ec2l'.

Because I use the development version of ec2l and not the gem directly, I added my ec2l development library directory to PRYSLESS_LIBRARY_PATH.

Also, I like to add an alias to prysless_store command:

alias p=prysless_store

Using

Just run

prysless

Once in pry shell, you'll be able to access the variables you defined:

[1] pry(<Prysless::Shell>)> e
=> <Ec2l::Client:0x000000022f5e70
...
[2] pry(<Prysless::Shell>)> cd e

[4] pry(<Ec2l::Client>):1> show-doc ins

Lets say you need to share data between your session and an external program:

[8] pry(#<Prysless::Shell>)> s.blah = 'test'
=> "test"

Now on your shell, provided 'p' is an alias to prysless_store:

$ echo I need to $(p blah) some more
I need to test some more

Contributing

FAQs

Package last updated on 22 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.