thekompanee / fuubar Goto Github PK
View Code? Open in Web Editor NEWThe instafailing RSpec progress bar formatter
Home Page: http://jeffkreeftmeijer.com/2010/fuubar-the-instafailing-rspec-progress-bar-formatter/
License: MIT License
The instafailing RSpec progress bar formatter
Home Page: http://jeffkreeftmeijer.com/2010/fuubar-the-instafailing-rspec-progress-bar-formatter/
License: MIT License
When using fuubar with Spork I get this error:
Exception encountered: #<ArgumentError: negative argument>
backtrace:
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/ruby-progressbar-0.0.9/lib/progressbar.rb:180:in `*'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/ruby-progressbar-0.0.9/lib/progressbar.rb:180:in `clear'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/ruby-progressbar-0.0.9/lib/progressbar.rb:29:in `initialize'
/home/hector/.rvm/gems/ruby-1.9.2-p0/bundler/gems/fuubar-12c417da6d58/lib/fuubar.rb:12:in `new'
/home/hector/.rvm/gems/ruby-1.9.2-p0/bundler/gems/fuubar-12c417da6d58/lib/fuubar.rb:12:in `start'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:75:in `block in notify'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:74:in `each'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:74:in `notify'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:34:in `start'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/rspec/core/reporter.rb:10:in `report'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/rspec/core/command_line.rb:24:in `run'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.3.1/lib/rspec/monkey/spork/test_framework/rspec.rb:4:in `run_tests'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.9.0.rc2/lib/spork/run_strategy/forking.rb:13:in `block in run'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.9.0.rc2/lib/spork/forker.rb:21:in `block in initialize'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.9.0.rc2/lib/spork/forker.rb:18:in `fork'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.9.0.rc2/lib/spork/forker.rb:18:in `initialize'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.9.0.rc2/lib/spork/run_strategy/forking.rb:9:in `new'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.9.0.rc2/lib/spork/run_strategy/forking.rb:9:in `run'
/home/hector/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.9.0.rc2/lib/spork/server.rb:47:in `run'
/home/hector/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/drb/drb.rb:1558:in `perform_without_block'
/home/hector/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/drb/drb.rb:1518:in `perform'
/home/hector/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/drb/drb.rb:1592:in `block (2 levels) in main_loop'
/home/hector/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/drb/drb.rb:1588:in `loop'
/home/hector/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/drb/drb.rb:1588:in `block in main_loop'
It works fine when using without Spork. Guys in the office are not having this issue since they are using a Mac.
My configuration is Ubuntu OS, ruby 1.9.2-p0, rails 3.0.3, rspec 2.3.0 and fuubar 0.0.3
Hey, I just noticed that RSpec core has a --fail-fast
command line option now. Do you still need the 'rspec-instafail'
dependency in the gemspec, or can it be removed?
RSpec 2.1 has been released, but the fuubar gem depends on ~> 2.0.1. It should just work with the newer version, could you bump it in the Gemfile?
/Library/Ruby/Gems/1.8/gems/fuubar-0.0.2/lib/fuubar.rb:8: warning: already initialized constant COLORS
See this comment
Hi, thanks for fuubar!
RSpec 3.1 was released in September. Any chance we can get an updated release of fuubar?
Hello, I'm using fuubar 2.0.0.rc1
on a rails 4.1.1
project that is utilizing rspec 3.0.2
.
I have set my .rspec
file as follows:
--format Fuubar
--color
And have not made any other fuubar related config settings in my app.
When I run rspec, I get the following output:
/usr/local/opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.0/lib/rspec/core/formatters/console_codes.rb:8: warning: already initialized constant RSpec::Core::Formatters::ConsoleCodes::VT100_CODES
/usr/local/Cellar/rbenv/0.4.0/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.0/lib/rspec/core/formatters/console_codes.rb:8: warning: previous definition of VT100_CODES was here
/usr/local/opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.0/lib/rspec/core/formatters/console_codes.rb:21: warning: already initialized constant RSpec::Core::Formatters::ConsoleCodes::VT100_CODE_VALUES
/usr/local/Cellar/rbenv/0.4.0/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.0/lib/rspec/core/formatters/console_codes.rb:21: warning: previous definition of VT100_CODE_VALUES was here
Here is a link to the rspec-core
code that the above is complaining about.
I'm not sure how to fix the problem, but I figured I should let you know about it.
Please see this ss for explaination - http://note.io/Z1BkWL
We run around a 100,000 tests on our GitHub repository through Travis CI. Apparently Travis CI logs each line refresh that Fuubar generates, and we're hitting the 4 MB limit set on the size of these log files.
Could the number of line refreshes be reduced, e.g. to no more than 1 a second?
chalofa_ruby-progressbar gem seems to be yanked from rubygems.org. Its probably renamed to ruby-progressbar. Can you please make the relevant change to the Gemfile?
https://rubygems.org/gems/fuubar-legacy
https://rubygems.org/search?utf8=%E2%9C%93&query=progressbar
Thanks.
2/1: 100% |==========================================| Time: 00:00:02
Hi There,
Great little gem by the way. Love the succinct output.
I'm trying to update rspec-rails
to 3.2 to avoid an issue with Ruby 2.2.0 and it looks like there are some dependencies in your library on an older version of rspec-expectations
. This is the error I get when trying to bundle update rspec-rails
:
Bundler could not find compatible versions for gem "rspec-expectations":
In Gemfile:
fuubar (>= 0) ruby depends on
rspec (~> 3.0) ruby depends on
rspec-expectations (~> 3.1.0) ruby
rspec-rails (~> 3.2.0) ruby depends on
rspec-expectations (3.2.0)
Let me know your thoughts.
Thanks!
Josh
When I use fuubar in a Rails project by including fuubar in my Gemfile:
gem 'fuubar'
I get a warning "irb: warn: can't alias context from irb_context." when I run bundle exec rails c
Sapphire:cms will$ bundle exec rails c
Loading development environment (Rails 4.2.1)
irb: warn: can't alias context from irb_context.
irb(main):001:0>
I believe this started after upgrading to RSpec 3. It's similar to this issue in PaperTrail paper-trail-gem/paper_trail#381
This could be fixed by removing the first line:
require 'rspec'
from fuubar.rb
A work-around until this fix is applied is to change the fuubar gem line to
gem 'fuubar', :require => false
I just realized this can also be fixed by putting the fuubar gem line in the test group
group :test do
gem 'fuubar'
end
First of all let me thank you for the very neat plugin (which should be a part of RSpec IMO too)!
There is that feature I realized I would like to have:
Display currently running spec as part of the progress bar so that you know what exactly the progress is (compare this to the file copy dialog found in most OSes - it displays overall progress and the file being processed currently).
In my case I notice that some part of the suite is running especially slow and I am interested what kind of specs cause the slowdown (and yeah I know about the --profile option thanks :) )
Hello,
I am using the parallel-tests gem which REALLY REALLY speeds up test time (since we have an 8-core machine to develop on ...). However, looking at the spec results is a mess, since they just get spit out to the console.
Would you be interested in collaborating getting fuubar running with parallel-tests so that you get one progress bar per process, and the failing tests are output cleanly to the console?
Thanks!
Jens
See this comment
Before anything, thanks for writing this.
I like so much this idea I had my own working on rspec 1, and was hoping someone would fix it hehe.. lazy lazy...
Anyways, you wrote it better. Here's the only thing I miss: By the end you get the slowest examples, I did it this way:
https://github.com/nofxx/rspec_spinner/blob/master/lib/rspec_spinner/base.rb#L39
As originally reported in #20 by @nofxx:
rspec-instafail changed things on v0.2.3.
Can't require 'rspec/instafail'. For search purposes:fuubar.rb:3:in `require': cannot load such file -- rspec/instafail
I won't have a lot of time to look into this soon, but it would be great if somebody could pick this one up. :)
activesupport-4.0.2/lib/active_support/core_ext/time/calculations.rb:263:in `-': can't convert nil into an exact number (TypeError)
from activesupport-4.0.2/lib/active_support/core_ext/time/calculations.rb:263:in `minus_with_duration'
from activesupport-4.0.2/lib/active_support/core_ext/time/calculations.rb:274:in `minus_with_coercion'
from ruby-progressbar-1.4.0/lib/ruby-progressbar/components/timer.rb:9:in `start'
from ruby-progressbar-1.4.0/lib/ruby-progressbar/base.rb:162:in `with_timers'
from ruby-progressbar-1.4.0/lib/ruby-progressbar/base.rb:30:in `block in start'
from ruby-progressbar-1.4.0/lib/ruby-progressbar/base.rb:173:in `with_update'
from ruby-progressbar-1.4.0/lib/ruby-progressbar/base.rb:28:in `start'
from fuubar-1.3.2/lib/fuubar.rb:30:in `block in start'
from fuubar-1.3.2/lib/fuubar.rb:81:in `with_current_color'
from fuubar-1.3.2/lib/fuubar.rb:30:in `start'
from rspec-core-2.14.7/lib/rspec/core/reporter.rb:127:in `block in notify'
from rspec-core-2.14.7/lib/rspec/core/reporter.rb:126:in `each'
from rspec-core-2.14.7/lib/rspec/core/reporter.rb:126:in `notify'
from rspec-core-2.14.7/lib/rspec/core/reporter.rb:66:in `start'
from rspec-core-2.14.7/lib/rspec/core/reporter.rb:56:in `report'
from rspec-core-2.14.7/lib/rspec/core/command_line.rb:25:in `run'
from rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'
from rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
Hello,
When trying to run my specsuite I'm getting the following error:
/Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/fuubar-0.0.2/lib/fuubar.rb:14:in start': undefined method
bar_mark=' for #ProgressBar:0/2043 (NoMethodError)
from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/reporter.rb:75:in send' from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/reporter.rb:75:in
notify'
from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/reporter.rb:74:in each' from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/reporter.rb:74:in
notify'
from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/reporter.rb:34:in start' from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/reporter.rb:10:in
report'
from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/command_line.rb:24:in run' from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/runner.rb:55:in
run_in_process'
from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/runner.rb:46:in run' from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/gems/rspec-core-2.1.0/lib/rspec/core/runner.rb:10:in
autorun'
from /Users/cassiommc/.rvm/gems/ree-1.8.7-2010.02@csh-rails3/bin/rspec:19
I'm running Rspec 2.1, Rails 3.0.3 and fuubar 0.0.2
Thanks!
I have a feature request:
As a developer with a lot of specs
I want this list of files RSpec shows to be summarized
So it won't fill up entire display before running specs
I'd like fuubar to hide the list of files RSpec shows and have it replaced with something like "Running 91 spec files" Or even nicer, grouped by directory: "Running examples for 32 controllers, 5 libs, 63 models and 14 helpers"
It looks like something changed in rspec 3.0.0 between beta2 and rc1, since Fuubar no longer works with rspec 3.0.0.rc1
/home/ressu/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fuubar-2.0.0.beta2/lib/fuubar.rb:32:in `start': undefined local variable or method `configuration' for #<Fuubar:0x007f250877df60> (NameError)
from /home/ressu/.rbenv/gems/2.1.0/gems/rspec-core-3.0.0.rc1/lib/rspec/core/reporter.rb:137:in `block in notify'
from /home/ressu/.rbenv/gems/2.1.0/gems/rspec-core-3.0.0.rc1/lib/rspec/core/reporter.rb:136:in `each'
from /home/ressu/.rbenv/gems/2.1.0/gems/rspec-core-3.0.0.rc1/lib/rspec/core/reporter.rb:136:in `notify'
....
Hi,
I just installed foobar by putting it in the Gemfile and running bundle, but when I try
to run rspec it gives me this error:
/ruby-2.0.0-p0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:1021:in `require': cannot load such file -- fuubar (LoadError)
It seems that foobar it's there:
$ gem list | grep foo
foobar (0.0.1)
Any clue ?
Cheers
Please consider providing a textual changelog so it is easier for users to see what changes from version to version.
When using fuubar with zeus + guard + rspec I'm getting the following exception thrown.
I tried specifying the method in my spec_helper.rb
like so with no luck
RSpec.configure do |config|
config.fuubar_progress_bar_options = { :format => 'My Fuubar! <%B> %p%% %a' }e
...
end
Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/fuubar-1.3.2/lib/fuubar.rb:17:in `initialize': undefined method `fuubar_progress_bar_options' for #<RSpec::Core::Configuration:0x007ff2f9b530d0> (NoMethodError)
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:578:in `new'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:578:in `add_formatter'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `block in load_formatters_into'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `each'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `load_formatters_into'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:28:in `configure'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:21:in `run'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:103:in `fork'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:103:in `command'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:80:in `block (3 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:80:in `fork'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:80:in `block (2 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `each'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `block in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `loop'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (3 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `fork'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (2 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `each'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `block in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `loop'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (3 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `fork'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (2 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `each'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `block in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `loop'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (3 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `fork'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (2 levels) in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `each'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:73:in `block in go'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `loop'
from /Users/karolis/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/zeus-0.13.3/lib/zeus.rb:62:in `go'
from -e:1:in `<main>
rake aborted!
NameError: uninitialized constant RSpec::Core::Version
/Users/streek/.rvm/gems/ruby-2.0.0-p481/gems/rspec-instafail-0.2.5/lib/rspec/instafail.rb:7:in <module:RSpec>' /Users/streek/.rvm/gems/ruby-2.0.0-p481/gems/rspec-instafail-0.2.5/lib/rspec/instafail.rb:1:in
<top (required)>'
/Users/streek/.rvm/gems/ruby-2.0.0-p481/gems/fuubar-1.2.1/lib/fuubar.rb:3:in <top (required)>' /Users/streek/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in
require'
/Users/streek/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in block (2 levels) in require' /Users/streek/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in
each'
/Users/streek/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in block in require' /Users/streek/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in
each'
/Users/streek/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in require' /Users/streek/.rvm/gems/ruby-2.0.0-p481@global/gems/bundler-1.6.2/lib/bundler.rb:132:in
require'
Fuubar looks awesome. Would be great if there was an interactive prompt when a failure happens. Something like:
I think that'd make it so I could iterate on broken specs much faster
See this gist:
Hi,
When I'm trying to use fuubar formatter against my project using Rails2.3.10, RSpec-1.3 and metric_fu, it raise undefined method bar_mark
for PrograssBar instance.
Because the ruby-progressbar gem required by fuubar conflicts with 'progressbar' gem required by 'rails_best_practices' (it's required by metric_fu).
What should I do to resolve this problem?
Thanks,
I honestly hope I am not missing something incredibly obvious, but no matter how hard I try, I cannot get RSpec to load Fuubar.
I installed it with gem install fuubar
and ran rspec --format Fuubar --color spec
in my project as per the README. That just results in this stack trace:
/Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:1108:in `require': cannot load such file -- fuubar (LoadError)
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:1108:in `rescue in custom_formatter'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:1105:in `custom_formatter'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:574:in `add_formatter'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `block in load_formatters_into'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `each'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `load_formatters_into'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:28:in `configure'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:21:in `run'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'
I am running MRI Ruby 2.0.0p247 and RSpec 2.14.8. I have tried using versions 1.2.1, 1.3.2 and 2.0.0.beta1 of Fuubar.
I'm trying to customize the progress bar using the fuubar_progress_bar_options method as exemplified in the README. But the bar is not being amended continuing with its default value.
Whenever I run Rake, I get this error:
rake aborted!
uninitialized constant RSpec::Core::Hooks
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@herudio/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:32:in `<class:Configuration>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@herudio/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:31:in `<module:Core>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@herudio/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:7:in `<module:RSpec>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@herudio/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:6:in `<top (required)>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@herudio/gems/fuubar-1.3.0/lib/fuubar.rb:1:in `<top (required)>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/alessandro/projects/herudio/config/application.rb:7:in `<top (required)>'
/home/alessandro/projects/herudio/Rakefile:4:in `require'
/home/alessandro/projects/herudio/Rakefile:4:in `<top (required)>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/bin/rake:23:in `load'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/bin/rake:23:in `<main>'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/bin/ruby_executable_hooks:15:in `eval'
/home/alessandro/.rvm/gems/ruby-2.0.0-p353@global/bin/ruby_executable_hooks:15:in `<main>'
Here's my Gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
# Rails
gem 'rails', '4.0.2'
# Users
gem 'cancan'
gem 'devise'
gem 'rolify'
gem 'figaro'
# Assets preprocessors
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
# Assets libs
gem 'jquery-rails'
gem 'turbolinks'
gem 'foundation-rails'
# Templating
gem 'haml-rails'
# Active Record
gem 'pg'
# Forms
gem 'simple_form'
# JS runtime
gem 'therubyracer', platform: :ruby
# Web server
gem 'thin'
# I18n
gem 'rails-i18n'
gem 'devise-i18n'
group :development do
# Error management
gem 'better_errors'
gem 'binding_of_caller', platforms: [:mri_19, :mri_20, :rbx]
# Templating
gem 'html2haml'
# Disable assets logging
gem 'quiet_assets'
end
group :development, :test do
# RSpec
gem 'rspec-rails'
gem 'fuubar'
# Factories
gem 'factory_girl_rails'
end
group :test do
# Integration tests
gem 'capybara'
# Database testing
gem 'database_cleaner', '1.0.1'
# Email testing
gem 'email_spec'
end
rake
's version: 10.1.0
rspec-core
's version: 2.14.7
fuubar
's version: 1.3.0
Using rspec-rails 3.0.0.beta1 on a rails 4.1.0.beta1 application, running bundle update
produces this output:
% bundle update
Updating git://github.com/elabs/pundit.git
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rspec-mocks":
In Gemfile:
fuubar (>= 0) ruby depends on
rspec-mocks (= 2.0.0) ruby
rspec-rails (~> 3.0.0.beta1) ruby depends on
rspec-mocks (3.0.0.beta1)
Could not find gem 'chalofa_ruby-progressbar (~> 0.0.9) ruby', which is required by gem 'fuubar (>= 0) ruby', in any of the sources.
Switching the dependency declaration from gem 'fuubar'
to gem 'fuubar', github: 'jeffkreeftmeijer/fuubar'
, then running bundle update
produces:
% bundle update
Updating git://github.com/elabs/pundit.git
Updating git://github.com/jeffkreeftmeijer/fuubar.git
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rspec-mocks":
In Gemfile:
fuubar (>= 0) ruby depends on
rspec-mocks (~> 2.14.0) ruby
rspec-rails (~> 3.0.0.beta1) ruby depends on
rspec-mocks (3.0.0.beta1)
a806825 looks like a fix for this. Seems like there are circumstances where fuubar still requests an older version of rspec-mocks.
/cc @twalpole @jfelchner
This looks fantastic and thank you so much for supporting rspec 1.3.x. However, this is what I'm getting:
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/formatter/base_text_formatter.rb:97:in `colour?': undefined method `colour' for {}:Hash (NoMethodError)
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/formatter/base_text_formatter.rb:114:in `colour'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/formatter/base_text_formatter.rb:131:in `red'
from /home/hanna/.bundle/ruby/1.8/gems/rspec-instafail-0.1.4/lib/rspec/instafail/rspec_1.rb:10:in `example_failed'
from /home/hanna/.bundle/ruby/1.8/bundler/gems/fuubar-a6f0bb6ab6e80322db716ae98b0c980efed840df-legacy/lib/fuubar.rb:41:in `example_failed'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:44:in `example_failed'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:43:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:43:in `example_failed'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:35:in `example_finished'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:55:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:214:in `run_examples'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:212:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:212:in `run_examples'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:103:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:23:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:22:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:22:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/options.rb:152:in `run_examples'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec:5
rake aborted!
RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.
via e.g.
spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']
Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can image, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.
There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.
I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!
Appendix:
If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies
p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.
In CircleCI when using fuubar we are not getting any progress output. We get the failure reports as soon as a test fails, and the output appears at the end of the test run, but while tests are running there is no feedback as to where in the process they are (or if they are actually progressing at all).
Running fuubar from the command prompt under Windows XP with the --no-color attribute gives the output below (http://www.robvanderwoude.com/ansi.php suggests that "[0m" is an instruction to "Reset all previous text attributes"):
←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m 45591/45691:
←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m
←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m
←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m
←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m
←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m←[0m
←[0m 45691/45691: 100% |==========================================| Time: 00:01
:01
←[0m
Finished in 1 minute 1.53 seconds
45691 examples, 0 failures
When using Rspec 3.0.0.beta2, this warning is produced:
The Fuubar formatter uses the deprecated formatter interface.
Formatter added at: /Users/christian/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.0.beta2/exe/rspec:4:in `<top (required)>'
ETA doesn't really give much useful information. It would be more useful to just see how long the tests are running already.
Any reason not to alter the gemfile dependency so we can update to RSpec 2.3 and 2.4pre?
I am on rails 3.2.1 and spork 1.0.0.rc1
Since upgrade rails spork does not reload models, factories etc...
When I try to see what is cached via spork -d
I get this error
Using RSpec, Unknown
Loading Spork.prefork block...
wrong number of arguments (2 for 1) (ArgumentError)
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/spork-1.0.0rc1/lib/spork/diagnoser.rb:35:in `load'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `block in load'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/engine.rb:587:in `each'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/engine.rb:587:in `block in <class:Engine>'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
/Users/andrea/.rvm/gems/ruby-1.9.2-p180-patched/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/andrea/dev/kemen/virgilio/config/environment.rb:8:in `<top (required)>'
Hey everyone,
I just pushed 1.0.0.rc1, as Fuubar is more than one year old and was still on 0.0.6 somehow. So, please try it out so we can get 1.0 final out soon. :)
I've had a short chat with @elia (#5 (comment)) and I decided to package the legacy branch up in a gem anyway after 1.0 is released. It might be a good idea to use 0.1.x versions for that.
What do you think? :)
https://gist.github.com/704073
(only happens without Bundler)
I'm using rspec 3.0.0
and get the message when run rspec with Fuubar
formatter.
Deprecation Warnings:
The Fuubar formatter uses the deprecated formatter interface not supported directly by RSpec 3. To continue to use this formatter you must install the
rspec-legacy_formatters
gem, which provides support for legacy formatters or upgrade the formatter to a compatible version. Formatter added at: /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/zeus-0.15.1/lib/zeus/rails.rb:202:in `test'If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
config.raise_errors_for_deprecations!
, and it will turn the
deprecation warnings into errors, giving you the full backtrace.
I guess it should be fixed instead of using legacy formatters?
Any output from the app during testing should perhaps be displayed somewhere else instead of at the current cursor - if that is possible.
This will avoid any mis-formatting which I think makes this format at times harder to read than the rspec default.
Is there a known workaround for this by using some kind of STDOUT redirect?
My co-workers don't want it there, so it would be nice to use it without putting it into the Gemfile.
When running rspec --format Fuubar --color spec
, everything's perfect. When adding
--format Fuubar
--color
to .rspec
or ~/.rspec
, it doesn't. Any idea what's going on?
Update
Running rspec
does the trick, but I need to rake
also take up the arguments correctly.
Hi, I'm workinng to create a C library(https://github.com/tomas-stefano/relation) and when I made the wrapper in Ruby using RSpec with fuubar ... prints in a failed spec:
`method_missing': undefined method `backtrace' for nil:NilClass
I begin to investigate thinking this is RSpec bug, but I could not reproduce this bug in RSpec. So after seeing a little more in the backtrace I see:
from /Users/tomas/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.2.0/lib/rspec/core/formatters/base_formatter.rb:117:in `read_failed_line'
from /Users/tomas/.rvm/gems/ruby-1.9.2-p0/gems/rspec-instafail-0.1.4/lib/rspec/instafail/rspec_2.rb:13:in `example_failed'
from /Users/tomas/.rvm/gems/ruby-1.9.2-p0/gems/fuubar-0.0.1/lib/fuubar.rb:40:in `example_failed'
from /Users/tomas/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.2.0/lib/rspec/core/reporter.rb:75:in `block in notify'
And I see that fuubar in line 40 call the example_failed that pass a variable called exception in the args being nil (why is raise the Exception ...)
You can reproduce the bug in this commit/tree: https://github.com/tomas-stefano/relation/tree/779d425d5a17271f0741762de5a4548483546c1f/ruby_wrapper
just type:
$ rake compile && rspec spec
And you see this error.
But when I run with the RSpec normally:
$ rspec --format progress
Just when I expected:
Finished in 0.00472 seconds
25 examples, 1 failure
Thanks =-)
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.