- see https://gist.github.com/machty/5723945 for the latest API (unlikely to change from now on)
- latest Ember build: https://machty.s3.amazonaws.com/ember/ember-async-routing-10.js
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
env = require 'config/environment' | |
if env.isDevelopment() | |
window.App.ApplicationAdapter = DS.RESTAdapter.extend({ | |
host: 'http://localhost:3000' | |
}) | |
else if env.isTest() | |
window.App.ApplicationAdapter = DS.FixtureAdapter.extend({ | |
simulateRemoteResponse: false | |
}) |
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
0 info it worked if it ends with ok | |
1 verbose cli [ '/usr/local/Cellar/node/0.10.5/bin/node', | |
1 verbose cli '/usr/local/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli '-g', | |
1 verbose cli 'ember-cli' ] | |
2 info using npm@1.2.18 | |
3 info using node@v0.10.5 | |
4 verbose read json /usr/local/share/npm/lib/package.json | |
5 verbose read json /usr/local/share/npm/lib/package.json |
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
# app/adapters/application.js | |
import DS from 'ember-data'; | |
import config from '../config/environment'; | |
export default DS.ActiveModelAdapter.extend({ | |
host: config.apiUrl | |
}); |
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
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" | |
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
# an example Monit configuration file for delayed_job | |
# | |
# To use: | |
# 1. copy to /var/www/apps/{app_name}/shared/delayed_job.monitrc | |
# 2. replace {app_name} and {environment} as appropriate | |
# 3. add this to your /etc/monit/monitrc | |
# | |
# include /var/www/apps/{app_name}/shared/delayed_job.monitrc | |
check process delayed_job with pidfile /var/www/apps/{app_name}/shared/pids/delayed_job.pid |
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
# Rake tasks for managing git plugins with submodules. | |
# | |
# These tasks aim to make life simpler by automating all the boring work. | |
# What you get: | |
# - complete git integration (all you need to know is install, uninstall and update) | |
# - complete github integration (only use author name + plugin name) | |
# - rails plugin hooks (install.rb/uninstall.rb) are taken care of | |
# | |
# Available commands: | |
# |
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
# 1) Point *.example.com in your DNS setup to your server. | |
# | |
# 2) Setup an Apache vhost to catch the star pointer: | |
# | |
# <VirtualHost *:80> | |
# ServerName example.com | |
# ServerAlias *.example.com | |
# </VirtualHost> | |
# | |
# 3) Set the current account from the subdomain |
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
# destroy all objects | |
Given(/^no #{capture_plural_factory} exist$/) do |plural_factory| | |
plural_factory.classify.constantize.destroy_all | |
# you could add the following to verify that there are indeed no records | |
find_models(plural_factory.singularize).should be_nil | |
end |
OlderNewer