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
# ------------------------------------------------------------------------------ | |
# Resque | |
# Manages background jobs and does all the hard work so we dont have to. | |
# | |
# Notes: | |
# This configuration assumes we are only using one background worker for our | |
# tasks. This makes it easier to let god take care of it, since there's only | |
# one pid to control. | |
# | |
# There's also a hackish, ugly thread that runs with it to kill anyone stuck, |
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
Capistrano::Configuration.instance(:must_exist).load do | |
# User settings | |
set :user, 'deploy' unless exists?(:user) | |
set :group,'www-data' unless exists?(:group) | |
# Server settings | |
set :app_server, :unicorn unless exists?(:app_server) | |
set :web_server, :nginx unless exists?(:web_server) |
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 GuestFormStep < ActiveRecord::Base | |
abstract_class = true | |
translates :name, :description | |
belongs_to :guest_form | |
has_many :questions, :dependent => :destroy, :order => 'position' | |
validates_presence_of :name | |
validates_presence_of :type | |
validates_presence_of :guest_form |
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
var fullScreen = false; | |
function getMyApp(appName) | |
{ | |
if(navigator.appName.indexOf ("Microsoft") !=-1) | |
{ | |
return window[appName]; | |
}else{ | |
return document[appName]; | |
} |
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
namespace :god do | |
namespace :restart do | |
task :default, :roles => :app, :except => { :no_release => true } do | |
run "rvmsudo #{bin_god} restart #{application}" | |
end | |
end | |
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
location /sidekiq { | |
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/htpasswd; | |
if (!-f $request_filename) { | |
proxy_pass http://unicorn; | |
break; | |
} | |
} |
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
Product Modifier Class for 404 (Baby Spinach) | |
{ | |
:active => true, | |
:amount_free => nil, | |
:amount_free_is_dollars => nil, | |
:auto_jumping => false, | |
:created_by => "/enterprise/User/1/", | |
:created_date => "2013-11-17T16:44:31.120325", | |
:forced => true, |
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
config.before :suite do | |
# Make sure we cleanup (if anything went wrong it could leave the DB | |
# in a dirty state) | |
DatabaseCleaner.clean_with :truncation | |
# Create a master company. | |
master_company = FactoryGirl::SeedGenerator.create :master_company | |
Role.available_roles.each do |r| | |
# Create roles and a default user for each role | |
FactoryGirl::SeedGenerator.create :"#{r}_role" | |
FactoryGirl::SeedGenerator.create r |
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
# Must have Nokogiri gem installed and save this file in your spec/support dir | |
# Allows you to write cleaner/faster specs in your views (50% faster than css_select) | |
# Increased readability in your spec doc | |
# ex. | |
# rendered.should contain('my heading').within('h1') # searches all H1 tags for 'my heading' | |
# or | |
# rendered.should contain('my string') # searches entire rendered string for 'my string' | |
class Within | |
def initialize(expected, css_selector) | |
@expected = expected |
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
2020-06-17T18:58:45.222800+00:00 app[web.1]: I, [2020-06-17T18:58:45.222660 #34] INFO -- : [cd6c3cd7-9efc-4564-a66f-262ed5e155a3] {"method":"POST","path":"/auth/registrations","format":"html","controller":"Auth::RegistrationsController","action":"create","status":422,"duration":646.07,"view":1.39,"db":552.84,"request_id":"cd6c3cd7-9efc-4564-a66f-262ed5e155a3","params":{"data":{"type":"users","attributes":{"email":"[email protected]","authentications_attributes":[{"provider":"apple","oauth_token":"eyJraWQiOiI4NkQ4OEtmIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2FwcGxlaWQuYXBwbGUuY29tIiwiYXVkIjoiZGlnaXRhbC5waWVyLnN0YWdpbmciLCJleHAiOjE1OTI0MjA5MjQsImlhdCI6MTU5MjQyMDMyNCwic3ViIjoiMDAxODcwLmJhZWFkOWI2Y2VlMTQyNTdhYjRmOWMzYmQxNjcwMWFkLjE3NTkiLCJub25jZSI6ImU4NDgwMjkzZjQ0OTFiNjE0MTUxZjg4MGU5Zjc3ZDE4Y2RhYmEzNDFhNjEzOGViMzg1OTE0OGUyNTVmZWEwNjMiLCJjX2hhc2giOiJrY1VvS0lXelJmaTVvTWxPdFhKMlJ3IiwiZW1haWwiOiJndWlsaGVybWUuemlvbGxlQHBpZXIuZGlnaXRhbCIsImVtYWlsX3ZlcmlmaWVkIjoidHJ1ZSIsImF1dGhfdGltZSI6MTU5MjQyMDMyNCwibm |