I'm participating in a "Single Page Apps fight" on the wroclove.rb conference and we don't want to make too much noise with the slides, so here are a few snippets that may make it easier to understand my points.
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 'yaml' | |
TRANSLATIONS = YAML.load_file('en.yml')['en'] | |
def t(path) | |
current = TRANSLATIONS | |
path.split('.').take_while { |key| current = current[key] } | |
current | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Ember schedule CPU usage" /> | |
<meta charset=utf-8 /> | |
<title>Ember Starting Point</title> | |
<script src="backburner.js"></script> | |
</head> | |
<body> |
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
# found in excellent post at: http://reefpoints.dockyard.com/ruby/2013/03/29/running-postgresql-9-2-on-travis-ci.html | |
before_install: | |
- sudo /etc/init.d/postgresql stop | |
- sudo cp /etc/postgresql/9.1/main/pg_hba.conf ./ | |
- sudo apt-get remove postgresql postgresql-9.1 -qq --purge | |
- source /etc/lsb-release | |
- echo "deb http://apt.postgresql.org/pub/repos/apt/ $DISTRIB_CODENAME-pgdg main" > pgdg.list | |
- sudo mv pgdg.list /etc/apt/sources.list.d/ | |
- wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - |
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
before_install: | |
- curl -O http://mirrors.kernel.org/ubuntu/pool/main/s/sqlite3/libsqlite3-0_3.7.13-1_amd64.deb | |
- curl -O http://mirrors.kernel.org/ubuntu/pool/main/s/sqlite3/sqlite3_3.7.13-1_amd64.deb | |
- sudo dpkg -i libsqlite3-0_3.7.13-1_amd64.deb sqlite3_3.7.13-1_amd64.deb |
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
deploy: | |
- provider: heroku | |
api_key: ... | |
app: staging-app | |
on: | |
branch: master | |
- provider: heroku | |
api_key: ... | |
app: production_app | |
on: |
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
{ | |
"payload": { | |
"id": 1, | |
"number": 1, | |
"status": null, | |
"started_at": null, | |
"finished_at": null, | |
"status_message": "Passed", | |
"commit": "62aae5f70ceee39123ef", | |
"branch": "master", |
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
curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby |
In your Gemfile add:
group :development, :test do
gem 'micro_migrations', :git => 'git@gist.github.com:33e9f92c229eb808a4fa.git'
end
You might want to add something like this to the Rakefile of apps that use a gem that uses micro_migrations:
ENV['SCHEMA'] = "#{Gem.loaded_specs['your-gem-name'].full_gem_path}/db/schema.rb"
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
#!/bin/bash | |
pushd /tmp | |
git clone https://github.com/travis-ci/travis-artifacts.git | |
cd travis-artifacts | |
gem build travis-artifacts.gemspec | |
gem install travis-artifacts*.gem | |
popd |