Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
In response to all the responses to: | |
http://twitter.com/rtomayko/status/1155906157 | |
You should never do this in a source file included with your library, | |
app, or tests: | |
require 'rubygems' | |
The system I use to manage my $LOAD_PATH is not your library/app/tests |
require File.dirname(__FILE__) + '/../spec_helper' | |
describe AccountController do | |
as_any_user :get => :show do | |
it { should assign_to(:user, :with => @current_user)} | |
it { should respond_with(:success) } | |
end | |
as_any_user :get => :edit do | |
it { should assign_to(:user, :with => @current_user)} |
class AppBuilder < Rails::AppBuilder | |
include Thor::Actions | |
include Thor::Shell | |
def test | |
append_test_gems | |
rspec | |
cucumber | |
jasmine | |
end |
# Removing leftover leases and persistent rules | |
echo "cleaning up dhcp leases" | |
rm /var/lib/dhcp3/* | |
# Make sure Udev doesn't block our network | |
# http://6.ptmc.org/?p=164 | |
echo "cleaning up udev rules" | |
DIR_PATH=`readlink -f "/etc/udev/rules.d/70-persistent-net.rules"` # get rid of symlinks and get abs path | |
rm -rf /etc/udev/rules.d/70-persistent-net.rules | |
if [[ ! -d "${DIR_PATH}" ]] ; then # now you're testing |
gem "rack-ssl", "1.3.2" | |
# when Capybara issue 409 or 422 get resolved, you can switch back to the official | |
# capybara gem | |
# https://github.com/jnicklas/capybara/pull/409 | |
# https://github.com/jnicklas/capybara/pull/422 | |
gem "capybara", git: "https://github.com/mcolyer/capybara.git", branch: "fix-ssl-redirects" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script> | |
<script> | |
$(document).ready(function(){ | |
function debug(str){ $("#debug").append("<p>"+str+"</p>"); }; | |
if(typeof WebSocket === 'undefined') { | |
alert("Your browser does not support websockets.") | |
} |
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows: