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
How to use:
Find['.gemspec'].in_dir Dir.pwd
=> #<struct Find::Result params=[".gemspec"], path="/home/alx/Alpha/rus-admin", result={}>
Find.in_dir Dir.pwd, :include
pp search.result if search.result.any?
=> {".gemspec"=>["rus-admin.gemspec"]}
Find.new
Find['password']
Find['another_password', 'password_another']
Find.in_file 'path_to_file.txt'
pp Find.info.result if Find.info.result.any?
Randpass helper
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
Rus::Admin.override!
Rus::Admin.override?