Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posts Tagged Ruby

autotest without the unit_diff

Ever since getting ZenTest 3.9.1, it seems unit-diff is always turned on. That means your output in autotest is noiser, and I prefer the normal output from my spec or test framework. Anyways, I'm not sure what changed since earlier versions of autotest (maybe the rails command used to override the command string?), [...]


multi_rails 0.0.5 released

multi_rails version 0.0.5 has been released!

http://multi-rails.rubyforge.org/

MultiRails
MultiRails lets you test your Rails plugin or app against many versions of Rails in one sweep.
DESCRIPTION:
MultiRails allows easy testing against multiple versions of Rails for your Rails specific gem or plugin. It also has tentative support testing Rails applications against multiple versions of Rails.
Use MultiRails to hook in [...]


Why I use test/spec over rspec

...the worst thing that can happen to a code base is size. -- Steve Yegge

Project
LOC

RSpec
15581

test/spec
1512

bacon
477

(Lines of code counted with sloccount, adding up only results from the lib and test (or spec) directories for each of the latest gems.)


Rails observers make rake db:migrate crash from version 0

Rails observers are typically defined like this in environment.rb:
PLAIN TEXT
RUBY:

Rails::Initializer.run do |config|

  config.action_controller.session_store = :active_record_store

  config.active_record.observers = :user_observer

end

I recently hit an issue where a fresh db:migrate of an app with a standard observer blew out every time. After some digging into the trace, I saw it was due to rake loading environment.rb, which [...]


Rails 2.0.2 is coming…

That was fast...
...and now its official.


[ANN] multi_rails 0.0.4 Released

MultiRails lets you test your Rails plugin or app against many versions of Rails in one sweep.
DESCRIPTION:
MultiRails allows easy testing against multiple versions of Rails for your Rails specific gem or plugin. It also has tentative support testing Rails applications against multiple versions of Rails.
Use MultiRails to hook in Rails 2.0 testing in your [...]


Handling asset caching nicely in Rails 2.0

update: fix some incorrect paths that did not have the public in front. (thanks Jon)
From your rails root:
mkdir public/javascripts/cache
mkdir public/stylesheets/cache
svn add public/javascripts/cache/
svn add public/stylesheets/cache/
svn propset svn:ignore '*' public/javascripts/cache/
svn propset svn:ignore '*' public/stylesheets/cache/
svn ci -m "add cache directories for combined assets, but ignore their contents"
Then wherever you are doing the js and css includes:
< %= [...]


Creating a Static Loopback Address to use in VMWare

The problem: you want to be able to always use the same address in VMWare Fusion for your local Mac web server(s), to test IE6 and IE7 with apps as you dev locally. You normally connect via DHCP, so you can't depend on your IP address being constant. You can't use localhost or [...]


Fixing Textmate Test Issues - `blank_slate_method_added’: stack level too deep (SystemStackError)

If you are getting long, recursive stack traces like the following when trying to run a test/spec from within Textmate:
PLAIN TEXT
RUBY:

/opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/blankslate.rb:84:in `blank_slate_method_added': stack level too deep (SystemStackError)

from /opt/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/blankslate.rb:84:in `blank_slate_method_added'

from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/builder.rb:86:in `method_added'

from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/builder.rb:111

from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'...

The stack goes on for many more lines, and your tests always work normally outside of textmate. The issue is [...]


MultiRails 0.0.3 released

MultiRails lets you test your Rails plugin or app against many versions of Rails in one sweep.
rubyforge: http://rubyforge.org/projects/multi-rails/
rdocs: http://multi-rails.rubyforge.org/
svn stable: http://robsanheim.googlecode.com/svn/tags/stable/multi_rails (gem is released from here)
svn trunk: http://robsanheim.googlecode.com/svn/trunk/multi_rails
mailing list: http://groups.google.com/group/multi_rails
Description
MultiRails [...]


← Before After →