By default RAILS_RELATIVE_URL_ROOT
is used only for asset pipeline.
To namespace your rails routes you need to wrap run MyApp::Application
with map
in your config.ru:
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: weinre | |
# Required-Start: $remote_fs $syslog networking | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: weinre mobile debugger | |
# Description: Provides remote front-end debugger for mobile user agents | |
# like Chrome Inspector or FireBug |
//## Moment.JS Holiday Plugin | |
// | |
//Usage: | |
// Call .holiday() from any moment object. If date is a US Federal Holiday, name of the holiday will be returned. | |
// Otherwise, return nothing. | |
// | |
// Example: | |
// `moment('12/25/2013').holiday()` will return "Christmas Day" | |
// | |
//Holidays: |
import org.openqa.selenium.JavascriptExecutor; | |
import org.openqa.selenium.WebDriver; | |
public class LocalStorage { | |
private JavascriptExecutor js; | |
public LocalStorage(WebDriver webDriver) { | |
this.js = (JavascriptExecutor) webDriver; | |
} |
function ngIt($injector) { | |
return function(text, fn) { | |
it(text, function(done) { | |
var $rootScope = $injector.get('$rootScope') | |
, fin | |
, finished = function(err) { | |
fin = true; | |
done(err); | |
}; | |
fn(finished); |
if (Function.prototype.bind && typeof console == "object" && typeof console.log == "object") { | |
var logFns = ["log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"]; | |
$.each(logFns, function (i, method) { | |
console[method] = Function.prototype.call.bind(console[method], console); | |
}); | |
} |
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
#!/bin/bash | |
# Convert all tables in a specified database to a different charset | |
# | |
# NOTE: this will NOT preserve data if it was stored improperly to begin with, | |
# e.g. UTF8 encoded strings saved as latin1 charset will get munged by this | |
# script when the table is converted. To preserve data you must export it, change | |
# the charset, then re-import. | |
# | |
# Command taken from: |
# http://stackoverflow.com/a/8936202 | |
# | |
# ActiveAdmin already includes the necessary jquery in active_admin/base, | |
# so just add this to javascripts/active_admin.js after //= require active_admin/base | |
# | |
# | |
# Serialize and Sort | |
# | |
# model_name - you guessed it, the name of the model we are calling sort on. | |
# This is the actual variable name, no need to change it. |
# This is an example of how to use database_cleaner gem and | |
# RSpec tags to make `after_commit` hook play nice with | |
# `use_transactional_fixtures`. | |
# Simply mark the specs that use after_commit with | |
# `:uses_after_commit` tag. | |
# ... | |
require 'database_cleaner' |