You can find my new posts over at http://jamieorc.wordpress.com/
[...]You can find my new posts over at http://jamieorc.wordpress.com/
[...]Recently I’ve been using Capistrano to deploy projects to Solaris. One client uses a Joyent Accelerator (OpenSolaris) and another (University of Virginia) uses Solaris 5.8. The Accelerator is great as it has ZFS, the new Solaris Services, speed, etc. But Solaris is not the [...]
Recently I’ve been using Capistrano to deploy projects to Solaris. One client uses a Joyent Accelerator (OpenSolaris) and another (University of Virginia) uses Solaris 5.8. The Accelerator is great as it has ZFS, the new Solaris Services, speed, etc. But Solaris is not [...]
I was reading a post to Rails Studio mailing list today when I came across this:
If you’re using mocha/stubba, you can say:
@user_notifier.expects(:deliver_activation).never
If you’re using flexmock, you can say:
flexmock(@user_observer).should_receive(:deliver_activation).never
Which would I rather use? Disregarding the frameworks, if you read my previous post, you know the answer: use the active verb! expects [...]
I was reading a post to Rails Studio mailing list today when I came across this:
If you’re using mocha/stubba, you can say:
@user_notifier.expects(:deliver_activation).never
If you’re using flexmock, you can say:
flexmock(@user_observer).should_receive(:deliver_activation).never
Which would I rather use? Disregarding the frameworks, if you read my previous post, you know the answer: use the active verb! [...]
_why has started a new and interesting project: Hackety Hack: the Manifesto. The accompanying blog is http://hackety.org/.
[...]_why has started a new and interesting project: Hackety Hack: the Manifesto. The accompanying blog is http://hackety.org/.
[...]I like behavior driven development. Even though I still using Ruby and Rails built-in testing framework, I write test names descriptive of behavior.
But I have stopped using should.
Should has become a bunch of noise in BDD that needs to be expunged. What’s wrong with test_should_move_resource_lower_and_return_to_edit_exhibit? One alone is fine, but [...]
I like behavior driven development. Even though I still using Ruby and Rails built-in testing framework, I write test names descriptive of behavior.
But I have stopped using should.
Should has become a bunch of noise in BDD that needs to be expunged. What’s wrong with test_should_move_resource_lower_and_return_to_edit_exhibit? One alone is fine, [...]
This week I found the FormTestHelper plugin by Jason Garber. It both enhances and simplifies form testing in Rails functional and integration tests. The great thing is the FormTestHelper tests the form, not just the submission of the form data. For example, if you try to set a [...]
This week I found the FormTestHelper plugin by Jason Garber. It both enhances and simplifies form testing in Rails functional and integration tests. The great thing is the FormTestHelper tests the form, not just the submission of the form data. For example, if you try to set [...]
Last week I attended The Rails Edge Reston. I can honestly say that it was the best workshop or conference I have attended. I’ve been to 3 or 4 No Fluff, Just Stuff conferences, Rails Conf, and Ruby Conf. It’s true that I’ve seen many of [...]
Last week I attended The Rails Edge Reston. I can honestly say that it was the best workshop or conference I have attended. I’ve been to 3 or 4 No Fluff, Just Stuff conferences, Rails Conf, and Ruby Conf. It’s true that I’ve seen many [...]
repository: http://svn.dangosaur.us/svn/elemental/
Introduces builder-like syntax to rhtml:
1 2 |
<%= p @item.content %> <%= p span @person.first_name, :id => dom_id(@person, "name_") %> |
1 2 3 4 |
<% table do @list.each do |item| tr do %> <%= td item.name %> <%= td item.content %> <% end end end %> |
Elemental allows you [...]
repository: http://svn.dangosaur.us/svn/elemental/
Introduces builder-like syntax to rhtml:
1 2 |
<%= p @item.content %> <%= p span @person.first_name, :id => dom_id(@person, "name_") %> |
1 2 3 4 |
<% table do @list.each do |item| tr do %> <%= td item.name %> <%= td item.content %> <% end end end %> |
Elemental allows [...]
I finally finished the basic change-over to Mephisto tonight. Looks like I’ll need to restyle the code examples, as they are puny and lack any syntax-coloring.
[...]I finally finished the basic change-over to Mephisto tonight. Looks like I’ll need to restyle the code examples, as they are puny and lack any syntax-coloring.
[...]I decided I wanted all 356 rows of a table dumped to a fixture, but CSV was a disaster. So:
1 2 3 4 5 6 7 |
require 'yaml'
js = Journal.find_all
File.open ('dump.yml', "w") do |f|
js.each do |j|
f.print YAML.dump ({"j_#{j.id}" => j.attributes})
end
end |
(I actually did it from script/console.) The only caveat is I got a [...]
I decided I wanted all 356 rows of a table dumped to a fixture, but CSV was a disaster. So:
1 2 3 4 5 6 7 |
require 'yaml'
js = Journal.find_all
File.open ('dump.yml', "w") do |f|
js.each do |j|
f.print YAML.dump ({"j_#{j.id}" => j.attributes})
end
end |
(I actually did it from script/console.) The only caveat is I got [...]
A couple of days ago my MacBook Pro started shutting down randomly while running on battery. I called Apple, they had me reset the power manager and the PRAM. The next day, it shut down again, so I called Apple and they agreed to ship a new battery. Yesterday, while [...]
A couple of days ago my MacBook Pro started shutting down randomly while running on battery. I called Apple, they had me reset the power manager and the PRAM. The next day, it shut down again, so I called Apple and they agreed to ship a new battery. Yesterday, [...]
I’ve been working on some javascript code for a client site and found a good use for binding event listeners through javascript rather than inline. There are several pages I need to add javascript code to expand each textarea on focus and collapse it on blur. So I wrote this [...]
I’ve been working on some javascript code for a client site and found a good use for binding event listeners through javascript rather than inline. There are several pages I need to add javascript code to expand each textarea on focus and collapse it on blur. So I wrote [...]
I’ve been playing with Markaby the past few nights. I love it! I’m in the camp that would rather write everything in Ruby rather than mix with html and ERb. I find reading this code:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
error_messages_for 'laptop' p do label "Name", :for => "laptop_name" text_field 'laptop', 'name' end div do [...] Markaby RulesI’ve been playing with Markaby the past few nights. I love it! I’m in the camp that would rather write everything in Ruby rather than mix with html and ERb. I find reading this code:
|