- DHH Keynote
- [Tenderlove Keynote][2]
- [Koichi Sasada - What’s happening in your Rails app?][3]
- [Richard Scheeman - Speed Science][4]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Postgis21 < Formula | |
desc "Adds support for geographic objects to PostgreSQL" | |
homepage "http://postgis.net" | |
url "http://pkgs.fedoraproject.org/repo/pkgs/postgis/postgis-2.1.8.tar.gz/c33923e37424978a1306ce461c1d14ed/postgis-2.1.8.tar.gz" | |
sha256 "7c2380b895fe7bda34c2e70deab3fcf4c12b13ab40d7501cdaa6fa36f1a6c662" | |
revision 1 | |
def pour_bottle? | |
# Postgres extensions must live in the Postgres prefix, which precludes | |
# bottling: https://github.com/Homebrew/homebrew/issues/10247 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Sphinx < Formula | |
url 'http://sphinxsearch.com/files/archive/sphinx-0.9.9.tar.gz' | |
homepage 'http://www.sphinxsearch.com' | |
sha256 'bf8f55ffc095ff6b628f0cbc7eb54761811140140679a1c869cc1b17c42803e4' | |
depends_on 'homebrew/dupes/apple-gcc42' | |
resource 'stemmer' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.2.4' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# Ensure backward compatibility with Minitest 4 | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) | |
# This connection will do for database-independent bug reports. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Sphinx20 < Formula | |
homepage 'http://www.sphinxsearch.com' | |
url 'http://sphinxsearch.com/files/sphinx-2.0.9-release.tar.gz' | |
sha256 'c4fb5d7951bc0831e46f102d17b5f32bbde11434ce3b00b20531dfe9e646869d' | |
head 'http://sphinxsearch.googlecode.com/svn/trunk/' | |
devel do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby template_engine_shootout.rb | |
Fetching gem metadata from https://rubygems.org/.... | |
Fetching version metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using benchmark-ips 2.3.0 | |
Using erubis 2.7.0 | |
Using tilt 2.0.1 | |
Using haml 4.0.7 | |
Using temple 0.7.6 | |
Using slim 3.0.6 |
It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time
class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime
steps in:
>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= f.label :appointment_time %><br> | |
<%= f.fields_for :appointment_time, @person.appointment_time do |t| %> | |
<%= t.text_field :day, size: 2, placeholder: 'DD' %> / | |
<%= t.text_field :month, size: 2, placeholder: 'MM' %> / | |
<%= t.text_field :year, size: 4, placeholder: 'YYYY' %> - | |
<%= t.text_field :hour, size: 2, placeholder: 'HH' %> : | |
<%= t.text_field :min, size: 2, placeholder: 'MM' %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person < ActiveRecord::Base | |
validates :name, presence: true, length: { maximum: 255 } | |
validates :date_of_birth_day, presence: true, format: /\A\d{1,2}\z/ | |
validates :date_of_birth_month, presence: true, format: /\A\d{1,2}\z/ | |
validates :date_of_birth_year, presence: true, format: /\A\d{4}\z/ | |
validates :date_of_birth, presence: true | |
validate do | |
if building_date_of_birth? |