Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.
In XCode's Preferences > Downloads you can install command line tools.
Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.
In XCode's Preferences > Downloads you can install command line tools.
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: |
require 'test_helper' | |
require 'minitest/autorun' | |
module Tenderlove | |
class Spec < MiniTest::Spec | |
include ActiveSupport::Testing::SetupAndTeardown | |
include ActiveRecord::TestFixtures | |
alias :method_name :__name__ if defined? :__name__ | |
self.fixture_path = File.join(Rails.root, 'test', 'fixtures') |
#http://eggsonbread.com/2010/03/28/my-rspec-best-practices-and-tips/ | |
describe User do | |
subject { user } | |
let(:user) { User.new } | |
context "when name empty" do | |
it { should_not be_valid } | |
specify { user.save.should be_false } | |
end |
# config/locales/en.yml | |
en: | |
errors: | |
messages: | |
wrong_size: "is the wrong size (should be %{file_size})" | |
size_too_small: "is too small (should be at least %{file_size})" | |
size_too_big: "is too big (should be at most %{file_size})" |
require 'test_helper' | |
require 'minitest/autorun' | |
module Tenderlove | |
class Spec < MiniTest::Spec | |
include ActiveSupport::Testing::SetupAndTeardown | |
include ActiveRecord::TestFixtures | |
alias :method_name :__name__ if defined? :__name__ | |
self.fixture_path = File.join(Rails.root, 'test', 'fixtures') |
.--.-. | |
( ( )__ | |
(_, \ ) ,_) | | |
'-'--`--' ~~| , \ _ / | |
,|`-._/| -== (_) ==- | |
^^ .' | /||\ / \ | |
^^ .' | ./ ||`\ | | |
/ `-. |/._ || \ | |
/ `|| `|;-._\ |
Day job: Software Engineer at Swipely | |
Your Rails contributions (if any): Around six or so bug fixes to rails. Have also fixed bugs in a bunch of other gems. Recent contributor to rubygems.org. | |
What's your Ruby/Rails experience?: Been working with rails off and on since around 2006. Full time Rails developer currently. | |
How do you use GitHub?: All of my source code, dotfiles, projects in progress, contributing to other projects. |
class Utf8Header < Thor | |
desc "add", "Add Content UTF-8 on top of all .rb/.feature files" | |
# copy & pasted from https://gist.github.com/738245 | |
def add | |
files = Array.new | |
["*.rb", "*.rake","*.feature"].each do |extension| | |
files.concat(Dir[ File.join(Dir.getwd.split(/\\/), "**", extension) ]) | |
end | |
files.each do |file| |
class MicropostsController < ApplicationController | |
before_filter :set_micropost, :only => [:show, :edit, :update, :create, :new] | |
before_filter :authenticate, :only => [:create, :destroy] # Same here? | |
# Omitted. | |
def destroy | |
@micropost.destroy | |
redirect_back_or root_path |