This file contains hidden or 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
path = require('path') | |
assets = require('connect-assets') | |
hogan = require('hogan.js') | |
assets.jsCompilers.mustache = | |
namespace: "TEMPLATES" | |
match: /\.js$/ | |
compileSync: (sourcePath, source) -> | |
assetName = path.basename(sourcePath, '.mustache') | |
compiled = hogan.compile(source, asString: true) |
This file contains hidden or 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 "bundler/capistrano" | |
# allowing shell interactions | |
default_run_options[:pty] = true | |
# multistaging | |
set :stages, %w(staging production) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' |
This file contains hidden or 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 'net/imap' | |
require 'net/http' | |
EMAIL = "[email protected]" | |
NAME = "Workory Support" | |
class Gmail | |
def initialize(username,password) | |
@imap = Net::IMAP.new("imap.gmail.com", 993, true) |
This file contains hidden or 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
Rails.application.assets.logger = Logger.new('/dev/null') | |
Rails::Rack::Logger.class_eval do | |
def before_dispatch_with_quiet_assets(env) | |
before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0 | |
end | |
alias_method_chain :before_dispatch, :quiet_assets | |
end |
This file contains hidden or 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
module Devise | |
class FailureApp < ActionController::Metal | |
private | |
def redirect_url | |
if skip_format? | |
new_user_session_path | |
else |