blackwinter / brice Goto Github PK
View Code? Open in Web Editor NEWExtra cool IRb goodness for the masses.
Home Page: http://blackwinter.github.io/brice
License: Other
Extra cool IRb goodness for the masses.
Home Page: http://blackwinter.github.io/brice
License: Other
Brice::Config
do not give any examples of available packagesBrice.config.something
? e.g. I want to change the colors or the promptBeen looking for a good replacement for Wirble for a while. Nothing has really satisfied me, as most strike me as far too complex. Brice is about the closest I've found to something I like. So, kudos on the project.
I do have a couple issues though. The first thing I notice when I use brice are warnings about load errors for:
I assume it's trying to load them but rescues the load errors and moves on without them.
I wonder why backports is needed since I'm running 1.9?
I looked at what_methods and that lib is so small (and hasn't seen an update in five years), you might as will just include the code in Brice.
Although added_methods isn't quite as small, it's seems like it's geared directly for use by Brice. Is it being used by any other project? So maybe just include it too, or make it part of ruby-nuggets perhaps?
I guess taken as whole (putting aside the the issue of the actual warnings) my only complaint about Brice is that it would be much nicer if it had fewer dependencies. Being such a fundamental tool, the less dependencies the better.
If you require brice/init
in your .irbrc
file it will crash zeus console with the following message:
/Users/Mike/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:142: stack level too deep (SystemStackError)
/Users/Mike/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:142: stack level too deep (SystemStackError)
$ gem install brice
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument @ rb_sysopen - C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/brice-0.4.0/lib/brice/rc/010_added_methods?.rb
$ ruby -v
ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]
Windows 10. I'm not sure what other info I can add.
i'm using rvm
Loading development environment (Rails 3.1.2)
no such file to load -- brice/init
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
irb
LoadError: no such file to load -- added_methods [/Users/t0d0r/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require']
LoadError: no such file to load -- backports [/Users/t0d0r/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require']
LoadError: no such file to load -- what_methods [/Users/t0d0r/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require']
my .irbrc
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
require 'rubygems'
require 'brice/init'
# IRB Options
IRB.conf[:AUTO_INDENT] = true
I did:
gem install brice
added
require 'rubygems'
require 'brice/init'
to .irbrc
Executed irb
, got:
LoadError: cannot load such file -- added_methods [/Users/Elad/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require']
LoadError: cannot load such file -- backports [/Users/Elad/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require']
LoadError: cannot load such file -- what_methods [/Users/Elad/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require']
Syntax coloring works.
When loading brice via .irbrc, any attempt to access an undefined variable forces irb to close.
Ruby Verison: ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Example (when using brice):
[20:09:50] bcw$ irb
irb(main):001:0> x
[20:10:42] bcw$
Example (not using brice):
[20:10:42] bcw$ irb -f
irb(main):001:0> x
NameError: undefined local variable or method `x' for main:Object
from (irb):1
from /usr/bin/irb:12:in `<main>'
irb(main):002:0>
Just thought you might want to know:
trans@logisys:brice$ gem install brice
Fetching: ruby-nuggets-0.8.5.gem (100%)
Fetching: brice-0.2.3.gem (100%)
Successfully installed ruby-nuggets-0.8.5
Successfully installed brice-0.2.3
2 gems installed
Building YARD (yri) index for ruby-nuggets-0.8.5...
[error]: Unhandled exception in YARD::Handlers::Ruby::ExtendHandler:
[error]: in `lib/nuggets/env/set.rb`:3:
3: ENV.extend(Nuggets::Env::SetMixin)
[error]: ArgumentError: Invalid namespace object: #Nuggets
[error]: Stack trace:
/home/trans/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/yard-0.7.3/lib/yard/code_objects/proxy.rb:57:in `initialize'
/home/trans/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/yard-0.7.3/lib/yard/code_objects/proxy.rb:39:in `new'
/home/trans/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/yard-0.7.3/lib/yard/code_objects/proxy.rb:39:in `initialize'
/home/trans/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/yard-0.7.3/lib/yard/handlers/ruby/mixin_handler.rb:27:in `new'
/home/trans/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/yard-0.7.3/lib/yard/handlers/ruby/mixin_handler.rb:27:in `process_mixin'
/home/trans/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/gems/yard-0.7.3/lib/yard/handlers/ruby/extend_handler.rb:18:in `process_mixin'
Building YARD (yri) index for brice-0.2.3...
Getting this error:
2.3.0 :001 > "String".match(/String/)
/Users/ilarionov/.rvm/gems/ruby-2.3.0/gems/brice-0.4.1/lib/brice/colours.rb:350:in `tokenize': no implicit conversion of nil into String (TypeError)
=> #<MatchData "String">
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.