This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
Someone recently asked the following question in the discussion forum of the Rubyists LinkedIn group: What separates a junior Rails developer from a senior one? | |
My response follows. Join us at http://www.linkedin.com/groups?gid=120725 to weigh in on this and other topics of interest to Rubyists. As of today there are almost 1,200 members, including numerous movers and shakers in the Ruby and Rails communities. | |
“Distinguishing between junior and senior people in the Rails world is not so different from making the distinction in other web development environments. | |
“Junior Rails people have not dealt with scaling issues to the degree that senior people have. Getting a public-facing Rails application to perform under significant stress is more challenging than doing the same with other building materials such as PHP. Senior people know how to performance-test Rails applications, where to look for bottlenecks, and how to eliminate them one after another until performance is acceptable in real conditions. The Ra |
# cat, dog = Cat.new, Dog.new | |
# cat.friends << dog | |
# cat.save | |
# => false | |
# cat.errors | |
# #<ActiveRecord::Errors ... @errors={"dog" => "is not valid"}> | |
# cat.errors << dog.errors | |
# cat.errors | |
# #<ActiveRecord::Errors ... @errors={"dog" => "is not valid", "bark" => "is not bigger than bite"} |
#require 'rubygems' | |
require 'pp' | |
#require 'ap' # Awesome Print | |
class Object | |
# expects [ [ symbol, *args ], ... ] | |
def recursive_send(*args) | |
args.inject(self) { |obj, m| obj.send(m.shift, *m) } | |
end | |
end |
// I thought I needed it, but I didn't need it anymore, | |
// but I already implemented it. So, here we go, if you | |
// ever would need a Javascript camelize implementation | |
// you can freely use this :-). | |
// - [email protected] Tue Feb 15 16:49:52 CET 2011 | |
jQuery.extend (String.prototype, { | |
camelize: function () { | |
return this.replace (/(?:^|[-_])(\w)/g, function (_, c) { |
# WAIT! Do consider that `wait` may not be needed. This article describes | |
# that reasoning. Please read it and make informed decisions. | |
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/ | |
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
describe 'Modal' do | |
should 'display login errors' do | |
visit root_path |
def point_in_polygon?(polygonPoints) | |
return false if self.latitude.blank? or self.longitude.blank? | |
polygonPoints.each do |point| | |
point[0] = point[0].to_f | |
point[1] = point[1].to_f | |
end | |
contains_point = false | |
i = -1 | |
j = polygonPoints.size - 1 |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
#!/usr/bin/env ruby | |
require "webrick" | |
=begin | |
WEBrick is a Ruby library that makes it easy to build an HTTP server with Ruby. | |
It comes with most installations of Ruby by default (it’s part of the standard library), | |
so you can usually create a basic web/HTTP server with only several lines of code. | |
The following code creates a generic WEBrick server on the local machine on port 1234, |
shared_examples_for "driver with javascript support" do | |
before { @driver.visit('/with_js') } | |
describe '#find' do | |
it "should find dynamically changed nodes" do | |
@driver.find('//p').first.text.should == 'I changed it' | |
end | |
end | |
describe '#drag_to' do |