New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rus-admin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rus-admin

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

rus-admin

Set of helpers for system administration with IRB

How to install

Download from GitHub, build gem and install locally

git clone https://www.github.com/alx3dev/rus-admin.git \
cd rus-admin \
rake build \
gem install pkg/rus-admin-0.1.1.gem

Install from rubygems

gem install rus-admin

Open IRB shell with:

rus-admin

Find helper

# When search #in_file - result is Struct object of param and line numbers
# When search #in_dir - result is Struct object of param and found file-names

# Last result is available in Find#info
# Find#new or alias Find#reset clear params array
# Find#reset! clear params and info

How to use:

# check for name equal to .gemspec
Find['.gemspec'].in_dir Dir.pwd
=> #<struct Find::Result params=[".gemspec"], path="/home/alx/Alpha/rus-admin", result={}>

# check if name include .gemspec
Find.in_dir Dir.pwd, :include
pp search.result if search.result.any?
=> {".gemspec"=>["rus-admin.gemspec"]}

# reset params to nil
Find.new
# add to params
Find['password']
# add more to params
Find['another_password', 'password_another']
# search in file for params
Find.in_file 'path_to_file.txt'
pp Find.info.result if Find.info.result.any?

Randpass helper

# Create random password with SecureRandom#base64
# Add random characters, and shuffle it
# Last password is saved in attribute :pass

How to use:

Randpass[20]
=> "0!ZNiAUZCbjo!#hHeX+XX$eAC=!p"

Override
Override method capitalize!, make it work without downcase of other characters. Available in classes: String, Symbol, Array. If used in array, hashes and integers are skipped. Read source code for documentation

# override method #capitalize!
Rus::Admin.override!

#check if classes are overriden
Rus::Admin.override?

FAQs

Package last updated on 22 Feb 2022

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc